Class AdvancedContentHandler.Element
java.lang.Object
org.tquadrat.foundation.xml.parse.AdvancedContentHandler.Element
- Enclosing class:
AdvancedContentHandler
@ClassVersion(sourceVersion="$Id: AdvancedContentHandler.java 1157 2025-12-31 14:05:44Z tquadrat $")
@API(status=STABLE,
since="0.1.0")
protected static final class AdvancedContentHandler.Element
extends Object
This class serves a container for the name, the data and the attributes
of an XML element.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: AdvancedContentHandler.java 1157 2025-12-31 14:05:44Z tquadrat $
- Since:
- 0.0.5
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.xml.parse.AdvancedContentHandler.Element"
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe attributes.private final StringBuilderThe data.private final StringThe element's local name.private final Optional<AdvancedContentHandler.Element> The parent for this element.private final StringThe path to the element.private final StringThe element's qualified name.private final URI -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidappendData(char[] characters, int start, int end) Adds another data chunk to the data block for the current element.Returns the attributes of the element.final StringgetData()Returns the data block for this element.final StringReturns the local name of the element.Returns the parent element.final StringgetPath()Returns to XML path to this element.final StringReturns the prefix from the element's qualified name.final StringgetQName()Returns the qualified name of the element.getURI()Returns the namespace URI of the element.final StringtoString()
-
Field Details
-
m_Attributes
The attributes. -
m_Data
The data. -
m_LocalName
The element's local name. -
m_Parent
The parent for this element. -
m_Path
-
m_QName
-
m_URI
-
-
Constructor Details
-
Element
Element(String qName, String localName, URI uri, Map<String, Attribute> attributes, String path, AdvancedContentHandler.Element parent) Create a new object of this class from an element's name and its attributes.- Parameters:
qName- The element's qualified name.localName- The element's local name.uri- The namespace for the element; can benull.attributes- The element's attributes.path- The path to the element; this is a string, compiled from the element's name, separated by slashes ("/").parent- The parent element for this element; may benull.
-
-
Method Details
-
appendData
Adds another data chunk to the data block for the current element.- Parameters:
characters- The characters.start- The start position inside the characters array.end- The ending position inside the array.
-
getAttributes
Returns the attributes of the element.- Returns:
- The attributes.
-
getData
-
getLocalName
Returns the local name of the element.- Returns:
- The local name of the element.
-
getParent
Returns the parent element. -
getPath
-
getPrefix
-
getQName
-
getURI
-
toString
-
