public class TLcdARINCMinimumSectorAltitudeHandler extends Object
ILcdARINCHandler
decodes Minimum Sector Altitude records
(Airport MSA Primary Records, section code P, subsection code S, and
Heliport MSA Primary Records, section code H, subsection code S). Decoded models have
as model descriptor an instance of TLcdARINCMinimumSectorAltitudeModelDescriptor
.
The objects in decoded models are based on the AIS domain objects available in com.luciad.ais.model
,
which all implement ILcdDataObject
. This interface provides a generic and
format-independent way of accessing the type and properties (features) of a domain object.
For this handler, the type of the decoded objects is TLcdARINCDataTypes.MinimumSectorAltitude
,
which can also be retrieved through ILcdDataObject.getDataType()
.
The available properties of the objects are defined in TLcdARINCMinimumSectorAltitudeDataProperties
.
The values for these properties can be retrieved through ILcdDataObject.getValue(com.luciad.datamodel.TLcdDataProperty)
.
TLcdARINCMinimumSectorAltitudeModelDescriptor
Constructor and Description |
---|
TLcdARINCMinimumSectorAltitudeHandler()
Constructs a new
TLcdARINCMinimumSectorAltitudeHandler object. |
TLcdARINCMinimumSectorAltitudeHandler(TLcdDataType aDataType)
Constructs a new
TLcdARINCMinimumSectorAltitudeHandler object with the given data type. |
Modifier and Type | Method and Description |
---|---|
ILcdBounds |
getBoundsToFilterOn()
Returns the (geodetic) bounds that will be used as a filter on the model
created by this handler.
|
TLcdAISDataObjectFactory |
getDataObjectFactory()
Returns the factory to be used to
create domain objects.
|
ALcdAISObjectFactory |
getDomainFactory()
Deprecated.
|
ILcdBounds |
getInitialBounds()
Returns the bounds to be used as initial bounds for the model created by this handler.
|
protected ILcdGeodeticDatum |
getLocalHorizontalDatum(String aGeodeticDatumCode)
Returns an instance of an implementation of the
ILcdGeodeticDatum interface
according to the given geodetic datum code. |
ILcdFeatureIndexedAnd2DBoundsIndexedModel |
getModel()
Returns the model build by this handler.
|
void |
handleRecord(char[] aRecord)
Deals with one record of ARINC data.
|
boolean |
isStoreOriginalReference()
If true, the decoder will store the original geodetic datum of each domain
object in a feature.
|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
newModel(String aSource,
ILcdARINCErrorMessageSupport aErrorMessage)
Resets the internal state of this handler so that
it is ready to handle a new data source from scratch.
|
protected String |
read(char[] aRecord,
int aStart,
int aLength)
Reads from aRecord from position aStart to aStart + aLength - 1, trims the
resulting
String object and returns it. |
protected char |
readSectionCode(char[] aRecord)
Reads the section code of an ARINC record.
|
void |
setAirportModel(ILcdModel aAirportModel)
Specifies a model containing airports.
|
void |
setARINCModelFilter(ILcdARINCModelFilter aFilter)
Specifies a filter to be used while creating the model.
|
void |
setBoundsToFilterOn(ILcdBounds aBoundsToFilterOn)
Specifies (geodetic) bounds that will be used as a filter on the model
created by this handler.
|
static void |
setClassTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setDataObjectFactory(TLcdAISDataObjectFactory aFactory)
Specifies the factory to be used to
create domain objects.
|
void |
setDefaultGeodeticDatum(ILcdGeodeticDatum aDefaultGeodeticDatum)
Sets the default geodetic datum code.
|
void |
setDMEModel(ILcdModel aDMEModel)
Specifies a model containing DME objects.
|
void |
setDomainFactory(ALcdAISObjectFactory aDomainFactory)
Deprecated.
|
void |
setHeliportModel(ILcdModel aHeliportModel)
Specifies a model containing heliports.
|
void |
setInitialBounds(ILcdBounds aInitialBounds)
Specifies a bounds to be used as initial bounds for the model created by this handler.
|
void |
setNDBModel(ILcdModel aNDBModel)
Specifies a model containing NDB objects.
|
void |
setStoreOriginalReference(boolean aStoreRef)
If true, the decoder will store the original geodetic datum of each domain
object in a feature.
|
void |
setTACANModel(ILcdModel aTACANModel)
Specifies a model containing TACAN objects.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setVORModel(ILcdModel aVORModel)
Specifies a model containing VOR objects.
|
void |
setWaypointModel(ILcdModel aWaypointModel)
Specifies a model containing waypoints.
|
public TLcdARINCMinimumSectorAltitudeHandler()
TLcdARINCMinimumSectorAltitudeHandler
object.public TLcdARINCMinimumSectorAltitudeHandler(TLcdDataType aDataType)
TLcdARINCMinimumSectorAltitudeHandler
object with the given data type.public void handleRecord(char[] aRecord)
ILcdARINCHandler
Each implementation of the ILcdARINCHandler
interface decides by itself whether to use the information
found in the given record to
create or modify a domain object, or to do nothing at all.
Typically, this method will be called when looping through the records of a data source.
The domain objects created or modified when calling this method
will be stored in a model. The user can obtain this model by
calling the getModel
method.
aRecord
- the record to deal with
created with data from the given record inILcdARINCHandler.getModel()
public void setAirportModel(ILcdModel aAirportModel)
ILcdFeatureIndexedAnd2DBoundsIndexedModel
.
The model of airports must not be null when the decoding process is started.aAirportModel
- a model containing airports.public void setHeliportModel(ILcdModel aHeliportModel)
ILcdFeatureIndexedAnd2DBoundsIndexedModel
.
The model of heliports must not be null when the decoding process is started.aHeliportModel
- a model containing heliports.public void setDMEModel(ILcdModel aDMEModel)
ILcdFeatureIndexedAnd2DBoundsIndexedModel
.
The model of DMEs must not be null when the decoding process is started.aDMEModel
- a model containing DME objects.public void setTACANModel(ILcdModel aTACANModel)
ILcdFeatureIndexedAnd2DBoundsIndexedModel
.
The model of TACANs must not be null when the decoding process is started.aTACANModel
- a model containing TACAN objects.public void setVORModel(ILcdModel aVORModel)
ILcdFeatureIndexedAnd2DBoundsIndexedModel
.
The model of VORs must not be null when the decoding process is started.aVORModel
- a model containing VOR objects.public void setNDBModel(ILcdModel aNDBModel)
ILcdFeatureIndexedAnd2DBoundsIndexedModel
.
The model of NDBs must not be null when the decoding process is started.aNDBModel
- a model containing NDB objects.public void setWaypointModel(ILcdModel aWaypointModel)
ILcdFeatureIndexedAnd2DBoundsIndexedModel
.
The model of waypoints must not be null when the decoding process is started.aWaypointModel
- a model containing waypoints.public void newModel(String aSource, ILcdARINCErrorMessageSupport aErrorMessage)
ILcdARINCHandler
The user should call this method before using this handler in a decoding process.
newModel
in interface ILcdARINCHandler
aSource
- the name of the source that will be handledaErrorMessage
- for each irregular situation during the decoding, a report should be
added to this object@Deprecated public void setDomainFactory(ALcdAISObjectFactory aDomainFactory)
ILcdARINCHandler
The given domainFactory must not be null.
setDomainFactory
in interface ILcdARINCHandler
aDomainFactory
- the domainFactory to be used to
create domain objectsILcdARINCHandler.getDomainFactory()
@Deprecated public ALcdAISObjectFactory getDomainFactory()
ILcdARINCHandler
getDomainFactory
in interface ILcdARINCHandler
ILcdARINCHandler.setDomainFactory(com.luciad.ais.model.ALcdAISObjectFactory)
public void setDataObjectFactory(TLcdAISDataObjectFactory aFactory)
ILcdARINCHandler
The given factory must not be null.
setDataObjectFactory
in interface ILcdARINCHandler
aFactory
- the domainFactory to be used to
create domain objectsILcdARINCHandler.getDataObjectFactory()
public TLcdAISDataObjectFactory getDataObjectFactory()
ILcdARINCHandler
getDataObjectFactory
in interface ILcdARINCHandler
ILcdARINCHandler.setDataObjectFactory(TLcdAISDataObjectFactory)
public void setDefaultGeodeticDatum(ILcdGeodeticDatum aDefaultGeodeticDatum)
null
can also be provided:
in that case, records which do not mention a geodetic datum will be ignored.aDefaultGeodeticDatum
- The default geodetic datum.public ILcdFeatureIndexedAnd2DBoundsIndexedModel getModel()
ILcdARINCHandler
Please remark that this handler is only capable of creating the expected model if the user calls
newModel
method to reset the internal
state before he or she starts the decoding process,handleRecord
method each time a new
record in the data source is accessed.getModel
in interface ILcdARINCHandler
public void setBoundsToFilterOn(ILcdBounds aBoundsToFilterOn)
ILcdARINCHandler
If this bounds is null, all objects found in the data source will be inserted into the model. If this bounds is not null, only the objects whose bounds interact with the specified bounds will be inserted into the model.
setBoundsToFilterOn
in interface ILcdARINCHandler
aBoundsToFilterOn
- the bounds to be used as a filterpublic ILcdBounds getBoundsToFilterOn()
ILcdARINCHandler
getBoundsToFilterOn
in interface ILcdARINCHandler
ILcdARINCHandler.setBoundsToFilterOn(com.luciad.shape.ILcdBounds)
public void setInitialBounds(ILcdBounds aInitialBounds)
ILcdARINCHandler
This bounds should be large enough to enclose (most of) the model objects. This option is used to avoid to many expansions of the model bounds.
This parameter may be null.
Note: This bounds is not a filter! If a model objects bounds does not interact with aInitialBounds, aInitialBounds will be enlarged to enclose the object.
setInitialBounds
in interface ILcdARINCHandler
aInitialBounds
- the initial bounds for the model created by this handlerpublic ILcdBounds getInitialBounds()
ILcdARINCHandler
getInitialBounds
in interface ILcdARINCHandler
ILcdARINCHandler.setInitialBounds(com.luciad.shape.ILcdBounds)
public void setARINCModelFilter(ILcdARINCModelFilter aFilter)
ILcdARINCHandler
setARINCModelFilter
in interface ILcdARINCHandler
aFilter
- an ILcdARINCModelFilter
to filter the model objectspublic boolean isTraceOn()
true
if tracing is enabled for this class.public static void setClassTraceOn(boolean aTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.aTraceOn
- if true then all log messages are recorded for this
instance. If false, then only the informative, warning and
error log messages are recorded.protected char readSectionCode(char[] aRecord)
aRecord
- the record to read ofprotected String read(char[] aRecord, int aStart, int aLength)
String
object and returns it.aRecord
- the record to be read ofaStart
- the start position for readingaLength
- the length of the String
to be readString
objectprotected ILcdGeodeticDatum getLocalHorizontalDatum(String aGeodeticDatumCode)
ILcdGeodeticDatum
interface
according to the given geodetic datum code. The datum code is expected to be specified by
their three character representation, as it is used in the ARINC specification.
The full list of supported geodetic datum codes can be found in the ARINC Developer's Guide.
If the supplied code is null or empty, the default geodetic datum is returned.
This is WGS 84 by default, but it can be configured through setDefaultGeodeticDatum
.
If no geodetic datum can be found, null
is returned.aGeodeticDatumCode
- the code for the geodetic datum to be returnedpublic void setStoreOriginalReference(boolean aStoreRef)
ILcdARINCHandler
setStoreOriginalReference
in interface ILcdARINCHandler
aStoreRef
- specifies if the decoder must store the original geodetic datum
of each domain object in a feature.public boolean isStoreOriginalReference()
ILcdARINCHandler
isStoreOriginalReference
in interface ILcdARINCHandler