Class TLcdModelDescriptor

java.lang.Object
com.luciad.model.TLcdModelDescriptor
All Implemented Interfaces:
ILcdModelDescriptor, Serializable
Direct Known Subclasses:
ALcdLIDARModelDescriptor, TLcdCGMModelDescriptor, TLcdCoverageModelDescriptor, TLcdDataModelDescriptor, TLcdDBModelDescriptor, TLcdDGNModelDescriptor, TLcdDWGModelDescriptor, TLcdEarthAssetModelDescriptor, TLcdEarthModelDescriptor, TLcdEditableModelListDescriptor, TLcdFeaturedModelDescriptor, TLcdGDFDatasetModelDescriptor, TLcdGDFLayerModelDescriptor, TLcdGDFSectionModelDescriptor, TLcdGeoPackageModelDescriptor, TLcdGML3ModelDescriptor, TLcdHashedFeaturedModelDescriptor, TLcdImageModelDescriptor, TLcdLVDBModelDescriptor, TLcdMBTilesModelDescriptor, TLcdMultilevelRasterModelDescriptor, TLcdMultivaluedRasterModelDescriptor, TLcdOBJModelDescriptor, TLcdOpenFlightModelDescriptor, TLcdRasterModelDescriptor, TLcdS57CatalogueModelDescriptor, TLcdS57ModelDescriptor, TLcdSVGModelDescriptor, TLcdVPFModelDescriptor, TLcdWFSProxyModelDescriptor, TLcdWMSProxyModelDescriptor, TLcdWMTSModelDescriptor, TLfnTileStoreModelDescriptor

public class TLcdModelDescriptor extends Object implements ILcdModelDescriptor
Default implementation of ILcdModelDescriptor.
See Also:
  • Constructor Details

    • TLcdModelDescriptor

      public TLcdModelDescriptor()
      Constructs a new TLcdModelDescriptor with default source name, type name, and display name.
    • TLcdModelDescriptor

      public TLcdModelDescriptor(String aSourceName, String aTypeName, String aDisplayName)
      Constructs a new TLcdModelDescriptor with the specified source name, type name, and display name.
      Parameters:
      aSourceName - the name of the data source.
      aTypeName - the type name of the data source.
      aDisplayName - the display name of the data source.
  • Method Details

    • 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.
    • 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.
    • setSourceName

      public void setSourceName(String aSourceName)
      Sets the source name of this model descriptor.

      A typical use-case of this method is when you use a ILcdModelEncoder to save a model to a new location. In this case, you probably want to update the source name of the model as well to match this new location.

      Parameters:
      aSourceName - The new source name
      Since:
      2016.1
    • setDisplayName

      public void setDisplayName(String aDisplayName)
      Sets the display name of this model descriptor (i.e. the title of the model).
      Parameters:
      aDisplayName - The new display name
      Since:
      2018.0
    • setTypeName

      protected void setTypeName(String aTypeName)
      Sets the type name of this model descriptor (i.e. the format of the model) .
      Parameters:
      aTypeName - The new type name
      Since:
      2018.0
    • sourceNameToDisplayName

      public static String sourceNameToDisplayName(String aSourceName, String... aExtensions)
      Convenience method to calculate a display name based on the source name. Typical usage of this method is when creating a new model descriptor for a model that does not include a title, e.g.
      
         String sourceName = "Data/some_model.csv";
         String extension =  "csv";
         TLcdModelDescriptor md = new TLcdModelDescriptor(
           sourceName,
           "CSV_TYPE",
           TLcdModelDescriptor.sourceNameToDisplayName(sourceName, extension)
         );
       
      Parameters:
      aSourceName - The source name
      aExtensions - The possible extensions for the format, if available. The casing does not matter. It doesn't matter either whether the extension starts with a "." or not. None of these extensions should be null. Specify no extensions when the extensions are unknown.
      Returns:
      A name suited to be shown in the UI, based on the source name
      Since:
      2017.0