Class TLcdVPFModelDescriptor

java.lang.Object
com.luciad.model.TLcdModelDescriptor
com.luciad.format.vpf.TLcdVPFModelDescriptor
All Implemented Interfaces:
ILcdDataModelDescriptor, ILcdModelDescriptor, ILcdFeaturedDescriptor, Serializable

public class TLcdVPFModelDescriptor extends TLcdModelDescriptor implements ILcdDataModelDescriptor, ILcdFeaturedDescriptor
Model descriptor used for VPF models.

This model descriptor provides some extra information about the VPF model:

  • The model type (see TLcdVPFModelDecoder.ModelType for more information on VPF model types).
  • The VPF feature class.
  • The type of feature (POINT, LINE, AREA, TEXT or COMPLEX).
  • Descriptions of the ILcdFeatured attributes, via the ILcdFeaturedDescriptor interface.

See Also:
  • Field Details Link icon

    • TYPE_NAME Link icon

      public static final String TYPE_NAME
      Type name identifying the VPF format type.
      See Also:
    • POINT Link icon

      public static final int POINT
      Constant to indicate that the described model contains only VPF point features.
      See Also:
    • LINE Link icon

      public static final int LINE
      Constant to indicate that the described model contains only VPF line features.
      See Also:
    • AREA Link icon

      public static final int AREA
      Constant to indicate that the described model contains only VPF area features.
      See Also:
    • TEXT Link icon

      public static final int TEXT
      Constant to indicate that the described model contains only VPF text features.
      See Also:
    • COMPLEX Link icon

      public static final int COMPLEX
      Constant to indicate that the described model contains only VPF complex features.
      See Also:
    • MULTIPLE_TYPE Link icon

      public static final int MULTIPLE_TYPE
      Constant to indicate that the described model contains VPF features of multiple types.
      See Also:
    • FULL_MODEL Link icon

      public static final int FULL_MODEL
      Deprecated.
      replaced by IN_MEMORY_MODEL_TYPE
      Constant to indicate that the described model contains an element for every vpf feature the user wants to handle.
      See Also:
    • EMPTY_MODEL Link icon

      public static final int EMPTY_MODEL
      Deprecated.
      replaced by ON_THE_FLY_MODEL_TYPE
      Constant to indicate that the described model contains elements that don't relate one to one to the vpf features the user wants to handle.
      See Also:
    • IN_MEMORY_MODEL_TYPE Link icon

      public static final int IN_MEMORY_MODEL_TYPE
      Constant to indicate that the model is an in-memory model, with all features loaded in memory.
      See Also:
    • ON_THE_FLY_MODEL_TYPE Link icon

      public static final int ON_THE_FLY_MODEL_TYPE
      Constant to indicate that the model is an on-the-fly model, each feature being loaded dynamically when it is needed.
      See Also:
    • HYBRID_MODEL_TYPE Link icon

      public static final int HYBRID_MODEL_TYPE
      Constant to indicate that the model is a hybrid model, each feature being loaded dynamically when it is needed, with caching enabled.
      See Also:
    • fVPFFeatureType Link icon

      protected int fVPFFeatureType
      Deprecated.
      Don't access this variable directly. Use getFeatureType() instead.
      VPF feature type.
  • Constructor Details Link icon

    • TLcdVPFModelDescriptor Link icon

      public TLcdVPFModelDescriptor()
      Constructs a new, empty TLcdVPFModelDescriptor.
    • TLcdVPFModelDescriptor Link icon

      public TLcdVPFModelDescriptor(String aSourceName, String aDisplayName)
      Constructs a new TLcdVPFModelDescriptor.
      Parameters:
      aSourceName - the name of the data source.
      aDisplayName - the display name of the data source.
    • TLcdVPFModelDescriptor Link icon

      public TLcdVPFModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, TLcdVPFFeatureClass aVPFFeatureClass)
      Constructs a new TLcdVPFModelDescriptor.
      Parameters:
      aSourceName - the name of the data source.
      aTypeName - the type name of the data source.
      aDisplayName - the display name of the data source.
      aVPFFeatureClass - the VPF feature class of the model.
    • TLcdVPFModelDescriptor Link icon

      public TLcdVPFModelDescriptor(String aSourceName, String aTypeName, String aDisplayName, TLcdVPFFeatureClass aVPFFeatureClass, int aModelType)
      Constructs a new TLcdVPFModelDescriptor.
      Parameters:
      aSourceName - the name of the data source.
      aTypeName - the type name of the data source.
      aDisplayName - the display name of the data source.
      aVPFFeatureClass - the VPF feature class of the model.
      aModelType - the model type of the model. See TLcdVPFModelDecoder.ModelType for more information on VPF model types.
  • Method Details Link icon

    • getModelType Link icon

      public int getModelType()
      Returns the model type of this model (IN_MEMORY_MODEL_TYPE or ON_THE_FLY_MODEL_TYPE).
      Returns:
      the model type of this model.
    • getDataModel Link icon

      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 Link icon

      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 Link icon

      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
    • getFeatureClass Link icon

      public Class getFeatureClass(int aIndex)
      Description copied from interface: ILcdFeaturedDescriptor
      Returns the Class of the feature at the given index.
      Specified by:
      getFeatureClass in interface ILcdFeaturedDescriptor
      Parameters:
      aIndex - a valid feature index.
      Returns:
      the Class of the feature at the given index.
    • getFeatureCount Link icon

      public int getFeatureCount()
      Description copied from interface: ILcdFeaturedDescriptor
      Returns the number of features.
      Specified by:
      getFeatureCount in interface ILcdFeaturedDescriptor
      Returns:
      the number of features.
    • getFeatureIndex Link icon

      public int getFeatureIndex(String aName)
      Description copied from interface: ILcdFeaturedDescriptor
      Returns the index of the given feature name if it exists, -1 otherwise.
      Specified by:
      getFeatureIndex in interface ILcdFeaturedDescriptor
      Parameters:
      aName - a feature name.
      Returns:
      the index of the given feature name if it exists, -1 otherwise.
    • getFeatureName Link icon

      public String getFeatureName(int aIndex)
      Description copied from interface: ILcdFeaturedDescriptor
      Returns the name of the feature at the given index.
      Specified by:
      getFeatureName in interface ILcdFeaturedDescriptor
      Parameters:
      aIndex - a valid feature index.
      Returns:
      the name of the feature at the given index.
    • getVPFFeatureType Link icon

      public int getVPFFeatureType()
      Returns the type of the VPF feature contained in this model. This is either POINT, LINE, AREA, TEXT, COMPLEX or MULTIPLE TYPE.
      Returns:
      the type of the VPF feature contained in this model.
    • getVPFFeatureClass Link icon

      public TLcdVPFFeatureClass getVPFFeatureClass()
      Returns the VPF feature class of the features contained in this model descriptor's model.
      Returns:
      the VPF feature class of the features contained in this model descriptor's model.
    • getBounds Link icon

      public ILcdBounds getBounds()
      Deprecated.
      All VPF models implement the ILcd2DBoundsIndexedModel interface. use the moddel.getBounds() method to retrieve the model's bounds.
      Returns the bounds of this model descriptor's model, in model coordinates.
      Returns:
      the bounds of this model descriptor's model, in model coordinates.
    • setDefaultFeatureCount Link icon

      public void setDefaultFeatureCount(int aDefaultFeatureCount)
      Sets the default feature count that should be returned if no feature class is associated with this model (default value is zero).
      Parameters:
      aDefaultFeatureCount - the default feature count to be used.