com.indexdata.masterkey.pazpar2.client
public class Pazpar2Settings extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Pazpar2Settings.Setting |
Modifier and Type | Field and Description |
---|---|
protected Map<String,Map<String,Pazpar2Settings.Setting>> |
settings |
Modifier | Constructor and Description |
---|---|
protected |
Pazpar2Settings(Pazpar2ClientConfiguration cfg) |
Modifier and Type | Method and Description |
---|---|
String |
encode() |
static Pazpar2Settings |
fromSearchables(Records records,
Pazpar2ClientConfiguration cfg) |
String |
getSetting(String targetId,
String key) |
Document |
getXMLSetting(String targetId,
String key) |
void |
loadSearchable(Record record)
Loads torus target setting record (enveloped, first layer).
|
String |
loadSearchable(SearchableTypeLayer l)
Loads torus target setting record (layer).
|
void |
loadSearchables(Records records)
Loads torus target setting records.
|
protected void |
setPrefixedSettings(String targetId,
String mapPrefix,
Collection<KeyValue> elements) |
protected void |
setPrefixedSettings(String targetId,
String mapPrefix,
Collection<KeyValue> elements,
String pz2SettingPrefix)
setPrefixedSetttings: set a value of maps based on prefix
|
protected void |
setPzSettings(String targetId,
Collection<KeyValue> elements,
Collection<String> excludes)
setPrefixedSetttings: set a value of maps based on prefix
|
void |
setRecordFilter(String recordFilter,
String recordFilterCriteria) |
boolean |
setSetting(String targetId,
String key,
String value,
List<String> excludeList) |
boolean |
setSetting(String targetId,
String key,
String value,
String defaultValue,
List<String> excludeList)
Sets the property 'key' of the given 'targetId' to 'value'.
|
boolean |
setXMLSetting(String targetId,
String key,
Document value) |
Document |
toXml(Element parent)
Encode settings to an XML
|
protected Map<String,Map<String,Pazpar2Settings.Setting>> settings
protected Pazpar2Settings(Pazpar2ClientConfiguration cfg)
public static Pazpar2Settings fromSearchables(Records records, Pazpar2ClientConfiguration cfg)
public void loadSearchables(Records records)
record
- target setting recordpublic void loadSearchable(Record record)
record
- target setting recordpublic String loadSearchable(SearchableTypeLayer l)
record
- target setting recordpublic boolean setSetting(String targetId, String key, String value, List<String> excludeList)
public boolean setSetting(String targetId, String key, String value, String defaultValue, List<String> excludeList)
targetId
- The target to define a setting forkey
- The name of the settingvalue
- The value of the settingdefaultValue
- Fall-back value if 'value' is nullprotected void setPrefixedSettings(String targetId, String mapPrefix, Collection<KeyValue> elements)
protected void setPrefixedSettings(String targetId, String mapPrefix, Collection<KeyValue> elements, String pz2SettingPrefix)
protected void setPzSettings(String targetId, Collection<KeyValue> elements, Collection<String> excludes)
public String encode() throws UnsupportedEncodingException
UnsupportedEncodingException
public Document toXml(Element parent) throws Error
Error
Copyright © 2014. All rights reserved.