Class ALcdASTERIXModelDescriptor

java.lang.Object
com.luciad.format.asterix.ALcdASTERIXModelDescriptor
All Implemented Interfaces:
ILcdDataModelDescriptor, ILcdDataSourceModelDescriptor<TLcdASTERIXDataSource>, ILcdModelDescriptor, ILcdFeaturedDescriptor, ILcdFeaturedDescriptorProvider, Serializable
Direct Known Subclasses:
TLcdASTERIXPlotModelDescriptor, TLcdASTERIXRadarServiceMessageModelDescriptor, TLcdASTERIXRadarVideoModelDescriptor, TLcdASTERIXTrackModelDescriptor, TLcdASTERIXTrajectoryModelDescriptor, TLcdASTERIXWeatherModelDescriptor

Base class for all ILcdModelDescriptors that are used to represent data of some type. Note that the decoders use a TLcdModelList, and that every sub model of that model list corresponds to the data of one user application profile. Such a sub model has a model descriptor that is an extension of this abstract model descriptor.

This model descriptor is a ILcdDataModelDescriptor. As such, it can be used to retrieve information on the TLcdDataModel used to model the data in the domain objects. All ASTERIX domain object implement the ILcdDataObject interface to model attributes such as "Ground speed", "Type", "Received Power",... The values for those properties are stored in the domain objects, using the ILcdDataObject interface.

To obtain all possible data types of the model element of this model, use the getModelElementTypes() method. The getModelTypes() can be used to obtain all data types in the entire data model.

For reasons of backwards compatibility, this model descriptor is also a ILcdFeaturedDescriptor. Next to ILcdDataObject, ASTERIX domain objects also implement the ILcdFeatured interface to model their additional attributes. Additional meta-information about those features (such as their descriptive name or feature class) can be retrieved using the methods of the ILcdFeaturedDescriptor interface that is implemented by this model descriptor. Certain feature values (retrieved using ILcdFeatured.getFeature(int)) of an ASTERIX domain object (such as TLcdASTERIXTrack) can again return an ILcdFeatured object. That object also needs an ILcdFeaturedDescriptor to be able to specify all meta data. That ILcdFeaturedDescriptor can be retrieved from this model descriptor through its ILcdFeaturedDescriptorProvider interface. Simply invoke getFeaturedDescriptor(com.luciad.util.ILcdFeatured) for that featured object to obtain the associated ILcdFeaturedDescriptor.

See Also:
  • Constructor Details

  • Method Details

    • getDataSource

      public TLcdASTERIXDataSource getDataSource()
      Returns the data source containing the source names that were decoded.
      Specified by:
      getDataSource in interface ILcdDataSourceModelDescriptor<TLcdASTERIXDataSource>
      Returns:
      An TLcdASTERIXDataSource object, or null if the source is unspecified.
      See Also:
    • setDataSource

      public void setDataSource(TLcdASTERIXDataSource aDataSource)
      Updates the data source of this model descriptor. Changing the data source will also change the source name of this descriptor:
      • if the data source is null, the source name will also be set to null.
      • if the data source contains a single source name, that source name will also be returned when calling getSourceName
      • if the data source contains multiple source names, the source name of this model descriptor will be set to null.
      Parameters:
      aDataSource - The new data source for this descriptor. This may be null.
    • getCategory

      public ALcdASTERIXCategory getCategory()
      Returns the ASTERIX category that corresponds with the data in the model.
      Returns:
      the ASTERIX category that corresponds with the data in the model.
    • getUAP

      Returns the ASTERIX UAP that corresponds with the data in the model.
      Returns:
      the ASTERIX UAP that corresponds with the data in the model.
    • getTransformationProvider

      public ALcdASTERIXTransformationProvider getTransformationProvider()
      Returns the ALcdASTERIXTransformationProvider that corresponds with the data in the model.
      Returns:
      The ALcdASTERIXTransformationProvider that corresponds with the data in the model.
    • getScalingFactorProvider

      public ALcdASTERIXScalingFactorProvider getScalingFactorProvider()
      Returns the ALcdASTERIXScalingFactorProvider that corresponds with the data in the model.
      Returns:
      The ALcdASTERIXScalingFactorProvider that corresponds with the data in the model.
    • getFeaturedDescriptor

      public ILcdFeaturedDescriptor getFeaturedDescriptor(ILcdFeatured aFeatured)
      Gets a ILcdFeaturedDescriptor that describes the ILcdFeatured passed.

      Please refer to the class comment for additional information.

      Specified by:
      getFeaturedDescriptor in interface ILcdFeaturedDescriptorProvider
      Parameters:
      aFeatured - a featured object to retrieve a featured descriptor for.
      Returns:
      a ILcdFeaturedDescriptor that describes the ILcdFeatured passed.
    • getTypeName

      public String getTypeName()
      Description copied from interface: ILcdModelDescriptor
      Returns the type/format name of the data source. The data format String is an easy means to identify a format. It is not guaranteed to be unique, so additional checks may be necessary. This can be mif or shape, for instance.
      Specified by:
      getTypeName in interface ILcdModelDescriptor
      Returns:
      the type name of the data source.
    • getDisplayName

      public String getDisplayName()
      Description copied from interface: ILcdModelDescriptor
      Returns a displayable name for the data source, suitable for usage in user interfaces. This is typically a shortened version of the source name, for example the file name without directory or extension.
      Specified by:
      getDisplayName in interface ILcdModelDescriptor
      Returns:
      a displayable name for the data source.
    • getSourceName

      public String getSourceName()
      Description copied from interface: ILcdModelDescriptor
      Returns the full name that uniquely identifies the data source. This can be the full file name for a file source, or the table name for a database source, for instance.
      Specified by:
      getSourceName in interface ILcdModelDescriptor
      Returns:
      the full name of the data source.
    • setDisplayName

      public void setDisplayName(String aDisplayName)
      Sets a new display name for this model descriptor.
      Parameters:
      aDisplayName - the new display name
    • setSourceName

      public void setSourceName(String aSourceName)
      Sets a new source name for this model descriptor. The data source of this model descriptor will also be updated to reflect the source name.
      Parameters:
      aSourceName - the new source name. May be null to indicate that the source is unknown.
    • getFeatureCount

      public int getFeatureCount()
      Returns the number of features.

      Please refer to the class comment for additional information.

      Specified by:
      getFeatureCount in interface ILcdFeaturedDescriptor
      Returns:
      the number of features.
    • getFeatureName

      public String getFeatureName(int aIndex)
      Returns the name of the feature at the given index.

      Please refer to the class comment for additional information.

      Specified by:
      getFeatureName in interface ILcdFeaturedDescriptor
      Parameters:
      aIndex - a valid feature index.
      Returns:
      the name of the feature at the given index.
    • getFeatureIndex

      public int getFeatureIndex(String aFeatureName)
      Returns the index of the given feature name if it exists, -1 otherwise.

      Please refer to the class comment for additional information.

      Specified by:
      getFeatureIndex in interface ILcdFeaturedDescriptor
      Parameters:
      aFeatureName - a feature name.
      Returns:
      the index of the given feature name if it exists, -1 otherwise.
    • getFeatureClass

      public Class getFeatureClass(int aIndex)
      Returns the Class of the feature at the given index.

      Please refer to the class comment for additional information.

      Specified by:
      getFeatureClass in interface ILcdFeaturedDescriptor
      Parameters:
      aIndex - a valid feature index.
      Returns:
      the Class of the feature at the given index.
    • getDataModel

      public TLcdDataModel getDataModel()
      Description copied from interface: ILcdDataModelDescriptor

      Returns the data model that describes the elements of the model. Note that not necessarily all data in the model will be of a type of this data model. Very likely, types from the dependencies of the returned data model are used as well.

      In case the model accepts objects from multiple data models, an anonymous data model that depends on all these data models should be returned (see TLcdDataModelBuilder.createAnonymousDataModel(java.util.Collection)).

      Specified by:
      getDataModel in interface ILcdDataModelDescriptor
      Returns:
      the data model that describes the elements of the model
    • getModelElementTypes

      public Set<TLcdDataType> getModelElementTypes()
      Description copied from interface: ILcdDataModelDescriptor

      Returns a set containing all the data types of which instances can be elements in the model associated with this descriptor. Implementations are free to limit the result to only include the types of which there are actually elements in the model; but they are not required to do so.

      Implementations should return null in case they don't know which element types are present in the model.

      For each element of the model associated with this model descriptor, the following holds true : getModelElementTypes().contains( element.getDataType() ).

      Specified by:
      getModelElementTypes in interface ILcdDataModelDescriptor
      Returns:
      a set containing all the data types of which instances can be elements in the model associated with this descriptor
    • getModelTypes

      public Set<TLcdDataType> getModelTypes()
      Description copied from interface: ILcdDataModelDescriptor

      Returns a set containing all the types of which instances can be used (including both top-level elements and child objects) in the model associated with this descriptor. Implementations are free to limit the result to only include the types of which there are actually instances in the model; but they are not required to do so.

      A simple and correct implementation would be to return getDataModel().getTypes(). Implementations are encouraged to return a subset of this set if they can do so without spending an unreasonable amount of resources.

      Implementations should return null in case they don't know which types are present in the model.

      Specified by:
      getModelTypes in interface ILcdDataModelDescriptor
      Returns:
      a set containing all the data types of which instances can be used in the model associated with this descriptor