Package org.apache.sis.xml
Class TransformingWriter.Event
java.lang.Object
org.apache.sis.xml.TransformedEvent<StartElement>
org.apache.sis.xml.TransformedEvent.Start
org.apache.sis.xml.TransformingWriter.Event
- All Implemented Interfaces:
StartElement
,XMLEvent
,XMLStreamConstants
- Enclosing class:
- TransformingWriter
Wraps the
StartElement
produced by JAXB for using the namespaces used in the XML document.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.xml.TransformedEvent
TransformedEvent.Attr, TransformedEvent.End, TransformedEvent.NS, TransformedEvent.Start, TransformedEvent.Type
-
Field Summary
Fields inherited from class org.apache.sis.xml.TransformedEvent.Start
version
Fields inherited from class org.apache.sis.xml.TransformedEvent
event, name
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
-
Constructor Summary
ConstructorsConstructorDescriptionEvent
(StartElement event, QName name, List<Namespace> namespaces, List<Attribute> attributes, TransformVersion version) Wraps the given event with potentially different name, namespaces and attributes. -
Method Summary
Modifier and TypeMethodDescriptionReturns a context mapping prefixes used in JAXB annotations to namespaces used in XML document.getNamespaceURI
(String prefix) Gets the URI used in the XML document for the given prefix used in JAXB annotations.Methods inherited from class org.apache.sis.xml.TransformedEvent.Start
asStartElement, getAttributeByName, getAttributes, getEventType, getNamespaces, isStartElement, write
Methods inherited from class org.apache.sis.xml.TransformedEvent
asCharacters, asEndElement, getLocation, getName, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, name, toString, writeAsEncodedUnicode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.xml.stream.events.StartElement
getName
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, writeAsEncodedUnicode
-
Constructor Details
-
Event
Event(StartElement event, QName name, List<Namespace> namespaces, List<Attribute> attributes, TransformVersion version) Wraps the given event with potentially different name, namespaces and attributes.
-
-
Method Details
-
getNamespaceURI
Gets the URI used in the XML document for the given prefix used in JAXB annotations. At marshalling time, events are created by JAXB using namespaces used in JAXB annotations.TransformingWriter
wraps those events for converting those namespaces to the ones used in the XML document.Example: the"cit"
prefix from ISO 19115-3:2016 standard represents the"http://standards.iso.org/iso/19115/-3/mdb/1.0"
namespace, which is mapped to"http://www.isotc211.org/2005/gmd"
in the legacy ISO 19139:2007 standard. That later URI is returned.- Specified by:
getNamespaceURI
in interfaceStartElement
- Overrides:
getNamespaceURI
in classTransformedEvent.Start
-
getNamespaceContext
Returns a context mapping prefixes used in JAXB annotations to namespaces used in XML document. TheTransformingNamespaces.getNamespaceURI(String)
method in that context shall do the same work thangetNamespaceURI(String)
in this event.- Specified by:
getNamespaceContext
in interfaceStartElement
- Overrides:
getNamespaceContext
in classTransformedEvent.Start
- See Also:
-