protected class FileSourceXML.Parser
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
FileSourceXML.Parser() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
__characters()
Read a sequence of characters and return these characters as a
string.
|
protected <T extends java.lang.Enum<T>> |
checkRequiredAttributes(javax.xml.stream.events.XMLEvent e,
java.util.EnumMap<T,java.lang.String> attributes,
T... required)
Check if all required attributes are present.
|
protected <T extends java.lang.Enum<T>> |
getAttributes(java.lang.Class<T> cls,
javax.xml.stream.events.StartElement e)
Get attributes of a start element in a map.
|
protected java.lang.String __characters()
throws java.io.IOException,
javax.xml.stream.XMLStreamException
java.io.IOExceptionjavax.xml.stream.XMLStreamExceptionprotected <T extends java.lang.Enum<T>> java.util.EnumMap<T,java.lang.String> getAttributes(java.lang.Class<T> cls,
javax.xml.stream.events.StartElement e)
FileSourceXML.toConstantName(Attribute) correspond to names
of enumeration constants.T - type of the enumeration describing attributescls - class of the enumeration Te - start event from which attributes have to be extractedprotected <T extends java.lang.Enum<T>> void checkRequiredAttributes(javax.xml.stream.events.XMLEvent e,
java.util.EnumMap<T,java.lang.String> attributes,
T... required)
throws javax.xml.stream.XMLStreamException
T - type of the enumeration describing attributese - the eventattributes - extracted attributesrequired - array of required attributesjavax.xml.stream.XMLStreamException - if at least one required attribute is not found