dk.netarkivet.harvester.datamodel.extendedfield
Class ExtendedFieldOptions

java.lang.Object
  extended by dk.netarkivet.harvester.datamodel.extendedfield.ExtendedFieldOptions

public class ExtendedFieldOptions
extends java.lang.Object

Class to represent options for Extended Fields.


Field Summary
static java.lang.String KEYVALUESEPARATOR
          Key-Value separator.
static java.lang.String NEWLINE
          Line separator.
 
Constructor Summary
ExtendedFieldOptions(java.lang.String aLines)
          Constructor.
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> getOptions()
           
 java.lang.String getOptionsString()
           
 boolean isKeyValid(java.lang.String aKey)
          Check, if the given key is a valid option.
 boolean isValid()
          Is these ExtendedField options valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEYVALUESEPARATOR

public static final java.lang.String KEYVALUESEPARATOR
Key-Value separator.

See Also:
Constant Field Values

NEWLINE

public static final java.lang.String NEWLINE
Line separator.

Constructor Detail

ExtendedFieldOptions

public ExtendedFieldOptions(java.lang.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

getOptions

public java.util.Map<java.lang.String,java.lang.String> getOptions()
Returns:
the options as a map.

getOptionsString

public java.lang.String getOptionsString()
Returns:
the options as lines separated by newlines.

isKeyValid

public boolean isKeyValid(java.lang.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.