Class TLcdMIFModelDescriptor

All Implemented Interfaces:
ILcdDataModelDescriptor, ILcdModelDescriptor, ILcdClassContentDescriptor, ILcdContentDescriptor, ILcdFeaturedDescriptor, ILcdFeaturedDescriptorProvider, Serializable

This ILcdModelDescriptor can be used to describe model constructed from MapInfo Interchange Format data.

This class implements both the ILcdFeaturedDescriptor and the ILcdDataModelDescriptor interfaces. ILcdFeaturedDescriptor is included for backwards compatibility, but it is recommended to use the methods from the ILcdDataModelDescriptor interface when possible.

In addition to the functionality described by these interfaces this descriptor contains the lists of geometry types and classes that are present in the model.

See Also:
  • Field Details Link icon

    • TYPE_NAME Link icon

      public static final String TYPE_NAME
      The model type, "MIF".
      See Also:
    • POINT Link icon

      public static final short POINT
      The identifier for the POINT type.
      See Also:
    • LINE Link icon

      public static final short LINE
      The identifier for the LINE type.
      See Also:
    • PLINE Link icon

      public static final short PLINE
      The identifier for the PLINE type.
      See Also:
    • REGION Link icon

      public static final short REGION
      The identifier for the REGION type.
      See Also:
    • ARC Link icon

      public static final short ARC
      The identifier for the ARC type.
      See Also:
    • TEXT Link icon

      public static final short TEXT
      The identifier for the TEXT type.
      See Also:
    • RECT Link icon

      public static final short RECT
      The identifier for the RECT type.
      See Also:
    • ROUNDRECT Link icon

      public static final short ROUNDRECT
      The identifier for the ROUNDRECT type.
      See Also:
    • ELLIPSE Link icon

      public static final short ELLIPSE
      The identifier for the ELLIPSE type.
      See Also:
    • MULTIPOINT Link icon

      public static final short MULTIPOINT
      The identifier for the MULTIPOINT type.
      See Also:
    • COLLECTION Link icon

      public static final short COLLECTION
      The identifier for the COLLECTION type.
      See Also:
  • Constructor Details Link icon

    • TLcdMIFModelDescriptor Link icon

      @Deprecated public TLcdMIFModelDescriptor(String aSourceName, String aDisplayName, short[] aMIFGeometryTypes, String[] aFeatureNames)
      Constructs a descriptor for a model containing MapInfo Interchange Format data.
      Parameters:
      aSourceName - identifies the source of the models data.
      aDisplayName - the display name of the model.
      aMIFGeometryTypes - an array of shorts representing the geometries present in the source.
      aFeatureNames - an array with the names of the features the data holds.
    • TLcdMIFModelDescriptor Link icon

      @Deprecated public TLcdMIFModelDescriptor(String aSourceName, String aDisplayName, short[] aMIFGeometryTypes, String[] aFeatureNames, Class[] aFeatureClasses)
      Constructs a descriptor for a model containing MapInfo Interchange Format data.
      Parameters:
      aSourceName - identifies the source of the models data.
      aDisplayName - the display name of the model.
      aMIFGeometryTypes - an array of shorts representing the geometries present in the source.
      aFeatureNames - an array with the names of the features the data holds.
      aFeatureClasses - an array with the classes of the features.
    • TLcdMIFModelDescriptor Link icon

      public TLcdMIFModelDescriptor(String aSourceName, String aDisplayName, short[] aMIFGeometryTypes, TLcdDataType aDataType)
      Constructs a descriptor for a model containing MapInfo Interchange Format data.
      Parameters:
      aSourceName - identifies the source of the models data.
      aDisplayName - the display name of the model.
      aMIFGeometryTypes - an array of shorts representing the geometries present in the source.
      aDataType - the data model of the model descriptor
  • Method Details Link icon

    • getShapeType Link icon

      public short[] getShapeType()
      Deprecated.
      Returns the property MIFGeometryTypes.
      Returns:
      an array of short integers that represents the types present in the model.
    • getShapeTypes Link icon

      public short[] getShapeTypes()
      Deprecated.
      Returns the property MIFGeometryTypes.
      Returns:
      an array of short integers that represents the types present in the model.
    • getMIFGeometryTypes Link icon

      public short[] getMIFGeometryTypes()
      Returns the property MIFGeometryTypes.
      Returns:
      an array of short integers that represents the types present in the model.
    • getContentClassCount Link icon

      public int getContentClassCount()
      Description copied from interface: ILcdContentDescriptor
      Returns the number of distinct Classes contained in an object container..
      Specified by:
      getContentClassCount in interface ILcdContentDescriptor
      Returns:
      the number of distinct Classes contained in an object container..
    • getContentClass Link icon

      public Class getContentClass(int aIndex)
      Description copied from interface: ILcdContentDescriptor
      Returns the content class at index aIndex in the object container..
      Specified by:
      getContentClass in interface ILcdContentDescriptor
      Parameters:
      aIndex - the number of the content class.
      Returns:
      the content class at index aIndex in the object container..
    • contentContainsClass Link icon

      public boolean contentContainsClass(Class aClass)
      Description copied from interface: ILcdClassContentDescriptor
      Returns whether at least one object in the container is an instance of the given class.
      Specified by:
      contentContainsClass in interface ILcdClassContentDescriptor
      Parameters:
      aClass - the class to check.
      Returns:
      true when at least one instance of the class is in the object container.
    • 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