BeanIO 2.0.4

org.beanio.internal.config
Class ComponentConfig

java.lang.Object
  extended by org.beanio.internal.util.TreeNode<ComponentConfig>
      extended by org.beanio.internal.config.ComponentConfig
All Implemented Interfaces:
Cloneable, Iterable<ComponentConfig>, Replicateable
Direct Known Subclasses:
PropertyConfig

public abstract class ComponentConfig
extends TreeNode<ComponentConfig>

The base class for nodes that that make up a stream configuration- groups, records, segments, fields, constants and wrappers. Nodes are organized into a tree structure.

The following attributes apply to XML formatted streams only:

The following attributes are set during compilation, and are meant for internal use only:

Since:
2.0
Author:
Kevin Seim

Field Summary
static char CONSTANT
          Constant component type
static char FIELD
          Field component type
static char GROUP
          Group component type
static char RECORD
          Record component type
static char SEGMENT
          Segment component type
static char STREAM
          Stream component type
static char WRAPPER
          Wrapper component type
 
Constructor Summary
ComponentConfig()
          Constucts a new ComponentConfig.
 
Method Summary
abstract  char getComponentType()
          Returns the component type.
 String getXmlName()
          Returns XML element or attribute name of this component.
 String getXmlNamespace()
          Returns the XML namespace of this component.
 String getXmlPrefix()
          Returns the XML prefix for the namespace assigned to this component.
 boolean isXmlNamespaceAware()
          Returns whetther this component is namespace aware.
 void setXmlName(String xmlName)
          Sets the XML element or attribute name of this component.
 void setXmlNamespace(String xmlNamespace)
          Sets the XML namespace of this component.
 void setXmlNamespaceAware(boolean xmlNamespaceAware)
          Sets whether this component is namespace aware.
 void setXmlPrefix(String xmlPrefix)
          Sets the XML prefix for the namespace assigned to this component.
 
Methods inherited from class org.beanio.internal.util.TreeNode
add, clone, find, getChildren, getFirst, getName, isSupportedChild, iterator, print, setName, size, sort, toParamString, toString, updateReferences
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GROUP

public static final char GROUP
Group component type

See Also:
Constant Field Values

RECORD

public static final char RECORD
Record component type

See Also:
Constant Field Values

SEGMENT

public static final char SEGMENT
Segment component type

See Also:
Constant Field Values

FIELD

public static final char FIELD
Field component type

See Also:
Constant Field Values

CONSTANT

public static final char CONSTANT
Constant component type

See Also:
Constant Field Values

WRAPPER

public static final char WRAPPER
Wrapper component type

See Also:
Constant Field Values

STREAM

public static final char STREAM
Stream component type

See Also:
Constant Field Values
Constructor Detail

ComponentConfig

public ComponentConfig()
Constucts a new ComponentConfig.

Method Detail

getComponentType

public abstract char getComponentType()
Returns the component type.

Returns:
one of GROUP, RECORD, SEGMENT, FIELD, CONSTANT or WRAPPER

getXmlName

public String getXmlName()
Returns XML element or attribute name of this component.

Returns:
the XML element or attribute name

setXmlName

public void setXmlName(String xmlName)
Sets the XML element or attribute name of this component. If set to null (default), the XML name defaults to the component name.

Parameters:
xmlName - the XML element or attribute name

getXmlNamespace

public String getXmlNamespace()
Returns the XML namespace of this component.

Returns:
the XML namespace

setXmlNamespace

public void setXmlNamespace(String xmlNamespace)
Sets the XML namespace of this component. If set to null (default), the namespace is inherited from its parent.

Parameters:
xmlNamespace - the XML namespace

getXmlPrefix

public String getXmlPrefix()
Returns the XML prefix for the namespace assigned to this component.

Returns:
the XML namespace prefix

setXmlPrefix

public void setXmlPrefix(String xmlPrefix)
Sets the XML prefix for the namespace assigned to this component. If set to null and a namespace is set, the namespace will replace the default namespace during marshaling. A prefix should not be set if a namespace is not set.

Parameters:
xmlPrefix - the XML namespace prefix

isXmlNamespaceAware

public boolean isXmlNamespaceAware()
Returns whetther this component is namespace aware.

Returns:
true if this component is namespace aware, false otherwise

setXmlNamespaceAware

public void setXmlNamespaceAware(boolean xmlNamespaceAware)
Sets whether this component is namespace aware.

Parameters:
xmlNamespaceAware - true if this component is namespace aware

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim