You need to configure your AIXM 5.1 model decoder so that it can access locally stored schema definitions.

Why do it?

LuciadLightspeed supports AIXM 5.1 extensions, such as the EUROCONTROL Airspace Data Repository or the FAA Special Activity Airspace. Such AIXM 5.1 extensions are described in an XML schema.

LuciadLightspeed automatically decodes AIXM 5.1 data that uses the schema extensions, provided that the data specifies a valid schema location that points to the right XML Schema. If this is not the case, decoding will fail.

To resolve such a decoding failure, you have two options:

  • Update the data with a schema location. This is often not an option in practice.

  • Manually register the schema location with the decoder.

You can configure your decoder to access schemas from a remote or a local location. Nevertheless, storing your schema definitions locally has several advantages:

  • You can use custom schemas that cannot be accessed on the web.

  • You can cache a schema location locally, thereby speeding up the decoding process. In addition, schemas can still be used if there are network problems.

You do not have to worry about default AIXM schemas. Those are already locally cached.

How does it work?

TLcdAIXM51ModelDecoder decodes AIXM 5.1 data into model objects. For more information about this class, see the API reference documentation as well as Decoding and encoding AIXM5 data.

The class has a method called setEntityResolver(EntityResolver2 aEntityResolver). It sets the entity resolver that will be used to create input sources for XSD schemas.

How to register a schema location with an AIXM decoder?

First, create a new instance of TLcdXMLEntityResolver, which implements the EntityResolver2 interface, and register your XML schema resources:

Program: Registering your XML schema resources with the entity resolver
TLcdXMLEntityResolver entityResolver = new TLcdXMLEntityResolver();

Next, configure your AIXM 5.1 model decoder to use the entity resolver created above:

Program: Configure the decoder with the entity resolver
TLcdAIXM51ModelDecoder aixm51Decoder = new TLcdAIXM51ModelDecoder();

ILcdModel decodedModel = aixm51Decoder.decode("/yourLocalPath/YourAIXM51DataFile.aixm51");