Package de.cxp.ocs.conf.converter
Class FlagFieldConfiguration
- java.lang.Object
-
- de.cxp.ocs.conf.converter.FlagFieldConfiguration
-
- All Implemented Interfaces:
Iterable<FlagFieldConfiguration.PatternMatch>
public class FlagFieldConfiguration extends Object implements Iterable<FlagFieldConfiguration.PatternMatch>
ConfigureableFieldimplementations that holds all information needed by theFlagFieldDataProcessor. The configuration allows:configuration: FlagFieldDataProcessor: group_1_someSourceFieldName: ".*\\d+.*##foo##bar" group_1_someSourceFieldName_match: 1##0.99##-1 group_1_noMatch: -1 group_1_destination: someDestinationField
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFlagFieldConfiguration.PatternMatch
-
Field Summary
Fields Modifier and Type Field Description static StringFIELD_FLAG_DESTINATIONstatic StringFIELD_MATCHstatic StringFIELD_NO_MATCHstatic StringFIELD_REGEXstatic StringGROUP_PREFIXstatic StringGROUP_SEPARATORstatic StringSEPARATORstatic StringTYPE_CONFstatic StringTYPE_FIELD
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDestinationFieldName()Gets the destination field name if configured, otherwise the field name itself is returned.Iterator<FlagFieldConfiguration.PatternMatch>iterator()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
GROUP_PREFIX
public static final String GROUP_PREFIX
- See Also:
- Constant Field Values
-
GROUP_SEPARATOR
public static final String GROUP_SEPARATOR
- See Also:
- Constant Field Values
-
SEPARATOR
public static final String SEPARATOR
- See Also:
- Constant Field Values
-
TYPE_CONF
public static final String TYPE_CONF
- See Also:
- Constant Field Values
-
TYPE_FIELD
public static final String TYPE_FIELD
- See Also:
- Constant Field Values
-
FIELD_REGEX
public static final String FIELD_REGEX
- See Also:
- Constant Field Values
-
FIELD_MATCH
public static final String FIELD_MATCH
- See Also:
- Constant Field Values
-
FIELD_NO_MATCH
public static final String FIELD_NO_MATCH
- See Also:
- Constant Field Values
-
FIELD_FLAG_DESTINATION
public static final String FIELD_FLAG_DESTINATION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FlagFieldConfiguration
public FlagFieldConfiguration(String groupName, Map<String,List<Map.Entry<String,String>>> typeToConfiguration)
Crates a new instance.- Parameters:
groupName- the name of the group the configuration belongs to.typeToConfiguration- aMapcontaining for each typeTYPE_FIELDandTYPE_CONFthe corresponding field and configuration entries.
-
-
Method Detail
-
getDestinationFieldName
public String getDestinationFieldName()
Gets the destination field name if configured, otherwise the field name itself is returned.- Returns:
- the destination field name.
-
iterator
public Iterator<FlagFieldConfiguration.PatternMatch> iterator()
- Specified by:
iteratorin interfaceIterable<FlagFieldConfiguration.PatternMatch>
-
-