Class 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.
      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
      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
      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
      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.

      aSourceName - The new source name
    • setDisplayName

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

      protected void setTypeName(String aTypeName)
      Sets the type name of this model descriptor (i.e. the format of the model) .
      aTypeName - The new type name
    • 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(
           TLcdModelDescriptor.sourceNameToDisplayName(sourceName, extension)
      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.
      A name suited to be shown in the UI, based on the source name