Package org.beanio.internal.config
Class GroupConfig
- java.lang.Object
-
- org.beanio.internal.util.TreeNode<ComponentConfig>
-
- org.beanio.internal.config.ComponentConfig
-
- org.beanio.internal.config.PropertyConfig
-
- org.beanio.internal.config.GroupConfig
-
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Iterable<ComponentConfig>,SelectorConfig,Replicateable
- Direct Known Subclasses:
StreamConfig
public class GroupConfig extends PropertyConfig implements SelectorConfig
A group is used to organize records and the overall structure of a stream. A group may contain records and/or other groups. In many cases, a group does not map to any physical aspect of a stream.The
minSize,maxSize, andnillableattributes do not apply to groups.- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class org.beanio.internal.config.PropertyConfig
JSON_TYPE_ARRAY, JSON_TYPE_BOOLEAN, JSON_TYPE_NONE, JSON_TYPE_NUMBER, JSON_TYPE_OBJECT, JSON_TYPE_STRING
-
-
Constructor Summary
Constructors Constructor Description GroupConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description chargetComponentType()Returns the component type.java.lang.StringgetKey()Returns the name of the property descendant to use for the Map key whencollectionis set tomap.java.lang.IntegergetOrder()Returns the order this group must appear within the context of its parent group component.java.lang.StringgetTarget()Returns the name of the target property for this group.protected booleanisSupportedChild(ComponentConfig child)Returns whether a node is a supported child of this node.voidsetKey(java.lang.String key)Sets the name of the property descendant to use for the Map key whencollectionis set tomap.voidsetOrder(java.lang.Integer order)Sets the order this group must appear within the context of its parent group component.voidsetTarget(java.lang.String target)Sets the name of the target property for this group, which can be used in lieu ofclassto return descendant property types.-
Methods inherited from class org.beanio.internal.config.PropertyConfig
getCollection, getGetter, getJsonArrayIndex, getJsonName, getJsonType, getLabel, getMaxOccurs, getMaxOccursRef, getMaxSize, getMinOccurs, getMinOccursRef, getMinSize, getOccursRef, getPosition, getSetter, getType, getUntil, getXmlType, isBound, isCollection, isIdentifier, isJsonArray, isLazy, isNillable, isRepeating, setBound, setCollection, setGetter, setIdentifier, setJsonArray, setJsonArrayIndex, setJsonName, setJsonType, setLabel, setLazy, setMaxOccurs, setMaxOccursRef, setMaxSize, setMinOccurs, setMinOccursRef, setMinSize, setNillable, setOccursRef, setPosition, setSetter, setType, setUntil, setXmlType
-
Methods inherited from class org.beanio.internal.config.ComponentConfig
getOrdinal, getXmlName, getXmlNamespace, getXmlPrefix, isXmlNamespaceAware, setOrdinal, setXmlName, setXmlNamespace, setXmlNamespaceAware, setXmlPrefix
-
Methods inherited from class org.beanio.internal.util.TreeNode
add, clone, find, getChildren, getFirst, getName, isDescendant, iterator, print, print, setName, size, sort, toParamString, toString, updateReferences
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.beanio.internal.config.SelectorConfig
getMaxOccurs, getMinOccurs, getName
-
-
-
-
Method Detail
-
getComponentType
public char getComponentType()
Description copied from class:ComponentConfigReturns the component type.- Specified by:
getComponentTypein interfaceSelectorConfig- Specified by:
getComponentTypein classComponentConfig- Returns:
- one of
ComponentConfig.GROUP,ComponentConfig.RECORD,ComponentConfig.SEGMENT,ComponentConfig.FIELD,ComponentConfig.CONSTANTorComponentConfig.WRAPPER
-
getOrder
public java.lang.Integer getOrder()
Returns the order this group must appear within the context of its parent group component. Records and groups assigned the same order number may appear in any order.- Specified by:
getOrderin interfaceSelectorConfig- Returns:
- the order of this record
-
setOrder
public void setOrder(java.lang.Integer order)
Sets the order this group must appear within the context of its parent group component. Records and groups assigned the same order number may appear in any order.- Specified by:
setOrderin interfaceSelectorConfig- Parameters:
order- the order of this record
-
getKey
public java.lang.String getKey()
Returns the name of the property descendant to use for the Map key whencollectionis set tomap.- Overrides:
getKeyin classPropertyConfig- Returns:
- the key property name
-
setKey
public void setKey(java.lang.String key)
Sets the name of the property descendant to use for the Map key whencollectionis set tomap.- Parameters:
key- the key property name
-
getTarget
public java.lang.String getTarget()
Returns the name of the target property for this group.- Returns:
- the target property name
-
setTarget
public void setTarget(java.lang.String target)
Sets the name of the target property for this group, which can be used in lieu ofclassto return descendant property types.- Parameters:
target- the target property name
-
isSupportedChild
protected boolean isSupportedChild(ComponentConfig child)
Description copied from class:TreeNodeReturns whether a node is a supported child of this node. Called byTreeNode.add(TreeNode).- Overrides:
isSupportedChildin classPropertyConfig- Parameters:
child- the node to test- Returns:
- true if the child is allowed
-
-