A simple serializer library which can deserialize Datex II publications from XML to JAXB POJOs. For more information on DATEX II see https://www.datex2.eu/.
JAXB-RI v 2.3.2 is used to generate POJOs from the official Datex II v 2.3 Schema
The following command is used to generate POJOs:
./xjc.sh -no-header -p eu.datex.v220 -npa https://datex2.eu/sites/default/files/DATEXIISchema_2_2_0_0.xsd
The top level entity is the D2LogicalModel. See the XML layout for an example Datex II publication
- Point your favorite HTTP Client towards a Datex II publication endpoint. You can find a list of available of European Datex II nodes in the Datex II Node directory and a list of the publications available by the Norwegian Public Road Authority is made available with documentation.
- Use the DatexSerializer class
D2LogicalModel model = new DatexSerializer().deserialize(InputStream stream)
, see more example tests
The stable release are published to the Bintray JCentral Repo.
<repository>
<id>jcenter</id>
<url>http://jcenter.bintray.com/</url>
</repository>
<!-- ... -->
<dependency>
<groupId>no.vegvesen</groupId>
<artifactId>datex-client</artifactId>
<version>1.0</version>
</dependency>
//core
implementation 'no.vegvesen:datex-client:1.0'
- Clone repo
- Install Gradle
- Run
gradle test
Yes! PRs are welcome.
datex-client is released under the MIT license.