Class XmlTextField
- java.lang.Object
-
- org.beanio.internal.parser.format.xml.XmlFieldFormat
-
- org.beanio.internal.parser.format.xml.XmlTextField
-
- All Implemented Interfaces:
FieldFormat
,XmlNode
public class XmlTextField extends XmlFieldFormat
- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from interface org.beanio.internal.parser.format.xml.XmlNode
XML_TYPE_ATTRIBUTE, XML_TYPE_ELEMENT, XML_TYPE_NONE, XML_TYPE_TEXT
-
-
Constructor Summary
Constructors Constructor Description XmlTextField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
extractText(XmlUnmarshallingContext context)
Extracts a field from a record during unmarshalling.java.lang.String
getLocalName()
Returns the XML local name for this node.java.lang.String
getNamespace()
Returns the namespace of this node.java.lang.String
getPrefix()
Returns the namespace prefix for marshaling this node, ornull
if the namespace should override the default namespace.int
getType()
Returns the XML node type.void
insertText(XmlMarshallingContext ctx, java.lang.String text)
Inserts a field into the record during marshalling.boolean
isNamespaceAware()
Returnstrue
if a namespace was configured for this node, and is therefore used to unmarshal and marshal the node.boolean
isNillable()
Returns whether this field is nillable.boolean
isRepeating()
Returns whether this node may repeat in the context of its immediate parent.-
Methods inherited from class org.beanio.internal.parser.format.xml.XmlFieldFormat
extract, getName, getPadding, getSize, insertField, insertValue, isLazy, setLazy, setName, setPadding, toParamString, toString
-
-
-
-
Method Detail
-
extractText
public java.lang.String extractText(XmlUnmarshallingContext context)
Description copied from class:XmlFieldFormat
Extracts a field from a record during unmarshalling.- Specified by:
extractText
in classXmlFieldFormat
- Parameters:
context
- theXmlUnmarshallingContext
holding the record- Returns:
- the extracted field text
-
insertText
public void insertText(XmlMarshallingContext ctx, java.lang.String text)
Description copied from class:XmlFieldFormat
Inserts a field into the record during marshalling.- Specified by:
insertText
in classXmlFieldFormat
- Parameters:
ctx
- theXmlMarshallingContext
holding the recordtext
- the field text to insert
-
getType
public int getType()
Description copied from interface:XmlNode
Returns the XML node type.- Returns:
- one of
XmlNode.XML_TYPE_NONE
,XmlNode.XML_TYPE_ELEMENT
,XmlNode.XML_TYPE_ATTRIBUTE
, orXmlNode.XML_TYPE_TEXT
-
isNillable
public boolean isNillable()
Description copied from interface:FieldFormat
Returns whether this field is nillable.- Returns:
- true if nillable, false otherwise
-
getLocalName
public java.lang.String getLocalName()
Description copied from interface:XmlNode
Returns the XML local name for this node.- Returns:
- the XML local name
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:XmlNode
Returns the namespace of this node. If there is no namespace for this node, or this node is not namespace aware,null
is returned.- Returns:
- the XML namespace of this node
-
isNamespaceAware
public boolean isNamespaceAware()
Description copied from interface:XmlNode
Returnstrue
if a namespace was configured for this node, and is therefore used to unmarshal and marshal the node.- Returns:
true
if this node uses a namespace for matching and formatting this node
-
getPrefix
public java.lang.String getPrefix()
Description copied from interface:XmlNode
Returns the namespace prefix for marshaling this node, ornull
if the namespace should override the default namespace.- Returns:
- the namespace prefix
-
isRepeating
public boolean isRepeating()
Description copied from interface:XmlNode
Returns whether this node may repeat in the context of its immediate parent.- Returns:
- true if this node repeats, false otherwise
-
-