Class ExtendedFieldOptions
- java.lang.Object
-
- dk.netarkivet.harvester.datamodel.extendedfield.ExtendedFieldOptions
-
public class ExtendedFieldOptions extends Object
Class to represent options for Extended Fields.
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEYVALUESEPARATOR
Key-Value separator.static String
NEWLINE
Line separator.
-
Constructor Summary
Constructors Constructor Description ExtendedFieldOptions(String aLines)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getOptions()
String
getOptionsString()
boolean
isKeyValid(String aKey)
Check, if the given key is a valid option.boolean
isValid()
Is these ExtendedField options valid.
-
-
-
Field Detail
-
KEYVALUESEPARATOR
public static final String KEYVALUESEPARATOR
Key-Value separator.- See Also:
- Constant Field Values
-
NEWLINE
public static final String NEWLINE
Line separator.
-
-
Constructor Detail
-
ExtendedFieldOptions
public ExtendedFieldOptions(String aLines)
Constructor.- Parameters:
aLines
- Options separated by newlines (Null argument allowed)
-
-
Method Detail
-
isValid
public boolean isValid()
Is these ExtendedField options valid.- Returns:
- true, if the options are valid; otherwise false
-
getOptionsString
public String getOptionsString()
- Returns:
- the options as lines separated by newlines.
-
isKeyValid
public boolean isKeyValid(String aKey)
Check, if the given key is a valid option.- Parameters:
aKey
- a given option key.- Returns:
- true, if the list of options is valid, and there is an option in the options map with the given key.
-
-