Skip to content

v2.5.0

Compare
Choose a tag to compare
@clausnagel clausnagel released this 18 Nov 22:37
· 1162 commits to master since this release

This release introduces a new approach for processing CityGML Application Domain Extensions (ADEs).

Since version 1.0, citygml4j provides generic ADE support by mapping all ADE elements in a CityGML dataset onto a Java DOM representation. This approach ensures a full round-trip of ADE content. citygml4j helpers such as SchemaHandler are meant to support developers in parsing and understanding the DOM elements, and citygml4j utility classes such as the visitors also work on ADE DOM content. Moreover, XML APIs such as JAXP or JAXB can be used for processing the DOM representation.

Despite of being very flexible, the generic approach however requires low-level XML programming and good knowlegde in CityGML and GML to consume and create ADE content. And the DOM elements stand next to the citygml4j object model for CityGML, which hinders reusing code for ADE content.

The new ADE approach addresses these disadvantages. It allows for extending the citygml4j object model with user-defined ADE classes that seamlessly integrate with the predefined citygml4j object model. JAXB is used for parsing and writing the ADE classes to ADE-enriched CityGML datasets. The required JAXB classes can be easily generated from the ADE XML Schema using the ade-xjc compiler shipped with citygml4j. The extensions are packaged into ADE modules which have to implement the new ADEContext interface.

Multiple ADE modules can be loaded and registered with citygml4j at runtime. Based on these modules, developers can write ADE-aware applications without using low-level XML APIs and can implement code that works for citygml4j object classes and ADE classes alike.

The new ADE module approach does not replace the existing generic approach but can be used in parallel. So all ADE content in a CityGML dataset for which no ADE module has been registered will still be mapped onto DOM elements. To demonstrate the use of the ADEContext interface, an example ADE module called module-noise-ade has been implemented for the CityGML 2.0 NoiseADE. citygml4j is shipped with sample programs that show how to write code against this module.

Note: The realization of the ADEContext interface required some changes to the citygml4j API. Software implemented against version 2.4.x (or prior) of citygml4j needs to be adapted when switching to version 2.5.0. One of these changes affects the core class CityGMLContext which is now implemented as singleton:

old: CityGMLContext context = new CityGMLContext();
new: CityGMLContext context = CityGMLContext.getInstance();

Create a GitHub issue if you need assistance in adapting your code to version 2.5.0.

Have fun :-)