Tools for reading and writing XML documents

Apache SIS uses different libraries to read and write different types of objects. The library used depends on the complexity of the object and on performance constraints. For example, JAXB annotations have the advantage of being close to code, which makes it easier to maintain mapping between Java and XML. On the other hand, SAX is more efficient. In general, Apache SIS uses:

Implementation strategy in Apache SIS

org.apache.sis.internal.jaxb.* packages (non-public) define JAXB adaptors for all types of ISO objects. These adaptors are required anyway to allow JAXB to get SIS classes while implementing GeoAPI interfaces. Conveniently, SIS made both JAXB adaptors and objects wrapping the “real” object to be read or written. This double usage avoids having to double the number of classes (already quite high) present in the internal packages.

Naming conventions in XSD schemas

For each element of the first group listed above, the XSD schemas of the OGC define a type whose name ends with “_PropertyType”. For the second group, each element has a type whose name ends with “_Type”. The “_PropertyType” elements may have a group of attributes (such as gco:uuidref and xlink:href) which the XSD schemas collectively name gco:ObjectIdentification. These attributes do not have dedicated Java methods, but are accessible indirectly via the IdentifiedObject interface described in the following subsection.