Class StandardCodes
java.lang.Object
com.adaptris.adapter.edistream.model.EdiElement
com.adaptris.adapter.edistream.model.StandardCodes
- All Implemented Interfaces:
Serializable
,TreeNode
This class holds the standard codes data from the gxml file. Standard codes
are a list of valid values that a data field can contain. Each list is
referenced by an ID. A single instance of this class will contain all the
defined standard codes in a gxml file. These are stored in a Map.
A field element may reference a standard code list, if so then that field value may only contain an item as defined in the list.
Additionally, a field can define its own list, in that it can list a subset of values from a defined standard code list against which it should be validated.
A field element may reference a standard code list, if so then that field value may only contain an item as defined in the list.
Additionally, a field can define its own list, in that it can list a subset of values from a defined standard code list against which it should be validated.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStdCode
(ElementCode element) void
addStdCode
(String codeReference, Map<String, String> stdCodeValues) int
boolean
hasCodes()
boolean
void
setReference
(boolean isReference) void
boolean
validateField
(Field field) Determines if the given Field object has an associated stdCodes reference, and if so it then ensures that its data value is contained is a valid code.Methods inherited from class com.adaptris.adapter.edistream.model.EdiElement
addChild, children, childrenEquals, equals, equalsStr, getAllowsChildren, getChild, getChildAt, getChildCount, getChildren, getChildrenAsString, getIndex, getMaxRepetitions, getName, getParent, getRepetitions, hasChildren, hashCode, isLeaf, isMandatory, setChildren, setMandatory, setMaxRepetitions, setName, setParent, setRepetitions, setSegmentReps, toString
-
Constructor Details
-
StandardCodes
public StandardCodes()
-
-
Method Details
-
getStdCodesMap
-
setStdCodesMap
-
addStdCode
-
addStdCode
-
hasCodes
public boolean hasCodes() -
getCodesCount
public int getCodesCount() -
isReference
public boolean isReference() -
setReference
public void setReference(boolean isReference) -
validateField
Determines if the given Field object has an associated stdCodes reference, and if so it then ensures that its data value is contained is a valid code.- Parameters:
field
- - Field whose value we are to check- Returns:
- - True if the field contains a valid data value.
-