en:user_advanced:gs3_search_field_display
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:user_advanced:gs3_search_field_display [2016/07/27 22:31] – kjdon | en:user_advanced:gs3_search_field_display [2018/12/10 01:23] (current) – removed kjdon | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======Customising the field list display in Greenstone 3====== | ||
- | |||
- | Note, main dictionaries are found in web/ | ||
- | |||
- | ==== Levels==== | ||
- | |||
- | < | ||
- | |||
- | This will be displayed using level.section from the ServiceRack.properties dictionary. | ||
- | |||
- | < | ||
- | <level name=" | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | |||
- | For english, the lang=en displayItem will be used, as it matches the current lang. | ||
- | For languages where there is not a specific displayItem, | ||
- | |||
- | (See getDisplayText in service/ | ||
- | |||
- | ==== Dictionary Customization ==== | ||
- | |||
- | To get language specific strings in Java we use ResourceBundle dictionaries. If asked for a key from a specific dictionary in a specific language, Java will load the dictionary and look up the key. It has a chain or languages it tries. The specified language, a family related language (I think) , the default language. | ||
- | |||
- | We use a custom classloader to find dictionary files (util/ | ||
- | If the code is looking for eg ServiceRack.properties, | ||
- | This enables a collection to customise the values without affecting other collections. | ||
- | |||
- | getTextString() (in services/ | ||
- | |||
- | In some cases, a dictionary name is passed in to getTextString() (e.g. metadata_names). In this case, we look for metadata_names dictionary using the CollectionClassLoader, | ||
- | |||
- | In the majority of cases, we will try various named dictionaries to try and find the key. It starts with the current class name, then tries up the class hierarchy until it gets to ServiceRack (which is the base class for all ServiceRacks. Once it gets to looking in ServiceRack.properties, | ||
- | |||
- | In this way different services can override values. | ||
- | For example, if GS2MGPPSearch is looking up the value for level.section, | ||
- | |||
- | GS2MGPPSearch.properties: | ||
- | AbstractGS2FieldSearch.properties: | ||
- | AbstractGs2TextSearch.properties: | ||
- | ServiceRack.properties: | ||
- | ServiceRack.properties: | ||
en/user_advanced/gs3_search_field_display.1469658667.txt.gz · Last modified: 2016/07/27 22:31 by kjdon