Package org.apache.sis.xml
Class TransformVersion
java.lang.Object
org.apache.sis.xml.TransformVersion
The target version of standards for
Transformer
.
This is used only for versions different than the native versions declared in JAXB annotations.- Since:
- 0.4
- Version:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final TransformVersion
Apply all known namespace replacements.The URI replacements to apply when going from the model implemented by Apache SIS to the transforming reader/writer.(package private) static final TransformVersion
GML using the legacy"http://www.opengis.net/gml"
namespace.The URI replacements to apply when going from the transforming reader/writer to the model implemented by Apache SIS.(package private) static final TransformVersion
Metadata using the legacy ISO 19139:2007 schema (replaced by ISO 19115-3). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
TransformVersion
(int ec, int ic) Creates a new enumeration initialized to the given capacity.private
TransformVersion
(TransformVersion first) Creates an enumeration initialized to a copy of the given enumeration. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Adds a namespace to be considered as an alias of another namespace.private void
addBijective
(String jaxb, String xml) Adds a two-directional association between a namespace used in JAXB annotation and a namespace used in XML document.private void
addSurjective
(String jaxb, String xml) Adds a one-way association from JAXB namespace to XML namespace.private void
addSurjectives
(String[] jaxb, String xml) Adds one-way associations from JAXB namespaces to a single XML namespace.(package private) final String
Converts a namespace used in JAXB annotation to the namespace used in XML document.exports()
Returns the URI replacements to apply when going from the model implemented by Apache SIS to the transforming reader/writer.(package private) final String
Converts a namespace used in XML document to the namespace used in JAXB annotation.
-
Field Details
-
ISO19139
Metadata using the legacy ISO 19139:2007 schema (replaced by ISO 19115-3). -
GML31
GML using the legacy"http://www.opengis.net/gml"
namespace. Note that the use of GML 3.2 implies the use of ISO 19139:2007. -
ALL
Apply all known namespace replacements. This can be used only at unmarshalling time, for replacing all namespaces by the namespaces declared in Apache SIS JAXB annotations. -
exports
The URI replacements to apply when going from the model implemented by Apache SIS to the transforming reader/writer. Keys are the URIs as declared in JAXB annotations, and values are the URIs to write instead of the actual ones.This map shall not be modified after construction. We do not wrap in
Collections.unmodifiableMap(Map)
for efficiency.- See Also:
-
imports
The URI replacements to apply when going from the transforming reader/writer to the model implemented by Apache SIS. This map is the converse ofexports
. It does not contain the map of properties to rename because that map is handled byTransformingReader
instead, as part of "RenameOnImport.lst" file.This map shall not be modified after construction. We do not wrap in
Collections.unmodifiableMap(Map)
for efficiency.
-
-
Constructor Details
-
TransformVersion
private TransformVersion(int ec, int ic) Creates a new enumeration initialized to the given capacity.- Parameters:
ec
- exports capacity.ic
- imports capacity.
-
TransformVersion
Creates an enumeration initialized to a copy of the given enumeration. This construction should be followed by calls toadd(…)
methods.
-
-
Method Details
-
addAlias
Adds a namespace to be considered as an alias of another namespace. The aliases are usually non-official URL and should not be used in exports. -
addBijective
Adds a two-directional association between a namespace used in JAXB annotation and a namespace used in XML document. A bijective association means that the renaming is reversible. -
addSurjective
Adds a one-way association from JAXB namespace to XML namespace. Many JAXB namespaces may map to the same XML namespace. For example, most ISO 19115-3:2016 namespaces map to the same legacy ISO 19139:2007 namespace. Consequently, this association is not easily reversible. -
addSurjectives
Adds one-way associations from JAXB namespaces to a single XML namespace. This method is used when the legacy schema (thexml
one) was one large monolithic schema, and the new schema (represented byjaxb
) has been separated in many smaller modules. -
exportNS
Converts a namespace used in JAXB annotation to the namespace used in XML document. Returns the same URI if there is no replacement. -
importNS
Converts a namespace used in XML document to the namespace used in JAXB annotation. Returns the same URI if there is no replacement. -
exports
Returns the URI replacements to apply when going from the model implemented by Apache SIS to the transforming reader/writer. Used only for more sophisticated work than whatexportNS(String)
does. Returned as an iterator for avoiding to expose modifiable map; do not invokeIterator.remove()
.
-