You need to configure your AIXM 5.1 model decoder so that it can access locally stored schema definitions.
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.
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.
TLcdXMLEntityResolver entityResolver = new TLcdXMLEntityResolver(); entityResolver.registerEntity("http://www.aixm.aero/schema/5.1/extensions/EUR/ADR","/yourLocalPath/ADR_Features.xsd");
Next, configure your AIXM 5.1 model decoder to use the entity resolver created above:
TLcdAIXM51ModelDecoder aixm51Decoder = new TLcdAIXM51ModelDecoder(); aixm51Decoder.setEntityResolver(entityResolver); ILcdModel decodedModel = aixm51Decoder.decode("/yourLocalPath/YourAIXM51DataFile.aixm51");