public interface JaxbXmlDocumentStructure
Implementations of this interface are notified about the change of currently processed element via methods startElement(javax.xml.namespace.QName) and endElement(javax.xml.namespace.QName) where the QName is
represented by the element name.
Note: This class is designed to support the unmarshalling JSONs in natural notation since the parser does not have other means to decide whether the entities of currently processed element belongs to either to the group of elements or to the group of attributes.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canHandleAttributes()
Returns
true if the implementation is capable of handling and providing information about attributes (#getExpectedAttributes and #getExpectedAttributesMap return valid results), false otherwise. |
void |
endElement(QName name)
Notifies this structure provider that an end element event has been fired and that the parent element of the one with
the given name should be processed.
|
Type |
getEntityType(QName entityName,
boolean isAttribute)
Returns the
Type of entity (element, attribute) with the given name. |
Collection<QName> |
getExpectedAttributes()
Returns a collection of expected attributes of currently processed element.
|
Map<String,QName> |
getExpectedAttributesMap()
Returns a map of expected attributes of currently processed element where
key is represented by the local
name of the attribute and value is it's qualified name. |
Collection<QName> |
getExpectedElements()
Returns a collection of expected sub-elements of currently processed element.
|
Map<String,QName> |
getExpectedElementsMap()
Returns a map of expected sub-elements of currently processed element where
key is represented by the local
name of the sub-element and value is it's qualified name. |
Type |
getIndividualType()
Returns the
Type of individuals stored in an array/list. |
void |
handleAttribute(QName attributeName,
String value)
Notifies this structure provider about an attribute event with the given name has been fired and that this attribute
will be processed.
|
boolean |
hasSubElements()
Returns
true if JAXB bean of the currently processed element can contain any subelements. |
boolean |
isArrayCollection()
Returns
true if the currently processed element should represent an JSON array element. |
boolean |
isSameArrayCollection()
Returns
true if the currently processed element belongs to the same JSON array as the previous element. |
void |
startElement(QName name)
Notifies this structure provider that a start element event with the given name has been fired and that this element
will be processed.
|
void startElement(QName name)
name - name of the element that will be processed.void endElement(QName name)
name - name of the ending element.boolean canHandleAttributes()
true if the implementation is capable of handling and providing information about attributes (#getExpectedAttributes and #getExpectedAttributesMap return valid results), false otherwise.true if expected attributes can be obtained, false otherwise.void handleAttribute(QName attributeName, String value)
attributeName - name of the attribute that will be processed.value - value of the attribute.Type getEntityType(QName entityName, boolean isAttribute)
Type of entity (element, attribute) with the given name. The given entity name is expected to be either
name of the current element or name of it's direct child.entityName - name of the entity to retrieve the Type for.isAttribute - flag whether the requested entity is an attribute or not.null if the entity cannot be retrieved from the structure.Type getIndividualType()
Type of individuals stored in an array/list.
Note: This method should be called only if an invocation of getEntityType(javax.xml.namespace.QName, boolean)
returns a collection/array type.
null if the entity cannot be retrieved from the structure.Collection<QName> getExpectedAttributes()
Map<String,QName> getExpectedAttributesMap()
key is represented by the local
name of the attribute and value is it's qualified name.Collection<QName> getExpectedElements()
Map<String,QName> getExpectedElementsMap()
key is represented by the local
name of the sub-element and value is it's qualified name.boolean isArrayCollection()
true if the currently processed element should represent an JSON array element.true if the element is an JSON array element, false otherwise.boolean isSameArrayCollection()
true if the currently processed element belongs to the same JSON array as the previous element.true if the element is an JSON array belongs to the same JSON array as the previous element,
false otherwise.boolean hasSubElements()
true if JAXB bean of the currently processed element can contain any subelements.true if JAXB bean of the currently processed element can contain any subelements,
false otherwise.Copyright © 2022. All rights reserved.