Package org.apache.sis.storage.geotiff
Class XMLMetadata.Parser
java.lang.Object
org.apache.sis.storage.geotiff.XMLMetadata.Parser
- Enclosing class:
- XMLMetadata
Parser of GDAL metadata.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intA value increased for each level of nested<Item>element.private InstantTemporary storage for metadata values that need a little processing.private final MetadataBuilderWhere to write metadata.private final QNameA qualified name with the "name" local part, used for searching attributes.private final XMLEventReaderThe XML reader from which to get XML elements.private InstantTemporary storage for metadata values that need a little processing. -
Constructor Summary
ConstructorsConstructorDescriptionParser(XMLEventReader reader, MetadataBuilder metadata) Creates a new reader. -
Method Summary
Modifier and TypeMethodDescription(package private) voidflush()Writes toMetadataBuilderall information that were pending parsing completion.private voiditem(StartElement start) Parses a<Item>element and its children.(package private) voidroot(StartElement start) Parses a<GDALMetadata>element and its children.
-
Field Details
-
reader
The XML reader from which to get XML elements. -
name
A qualified name with the "name" local part, used for searching attributes. -
depth
private int depthA value increased for each level of nested<Item>element. -
metadata
Where to write metadata. -
startTime
Temporary storage for metadata values that need a little processing. -
endTime
Temporary storage for metadata values that need a little processing.
-
-
Constructor Details
-
Parser
Parser(XMLEventReader reader, MetadataBuilder metadata) Creates a new reader.- Parameters:
reader- the source of XML elements.metadata- the target of metadata elements.
-
-
Method Details
-
root
Parses a<GDALMetadata>element and its children. After this method returns, the reader is positioned after the closing</GDALMetadata>tag.- Parameters:
start- the<GDALMetadata>element.- Throws:
XMLStreamException
-
item
Parses a<Item>element and its children. After this method returns, the reader is positioned after the closing</Item>tag.- Parameters:
start- the<Item>element.- Throws:
XMLStreamException
-
flush
void flush()Writes toMetadataBuilderall information that were pending parsing completion.
-