Package com.luciad.model
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
Default implementation of
ILcdModelDescriptor
.- See Also:
-
Constructor Summary
ConstructorDescriptionConstructs a newTLcdModelDescriptor
with default source name, type name, and display name.TLcdModelDescriptor
(String aSourceName, String aTypeName, String aDisplayName) Constructs a newTLcdModelDescriptor
with the specified source name, type name, and display name. -
Method Summary
Modifier and TypeMethodDescriptionReturns a displayable name for the data source, suitable for usage in user interfaces.Returns the full name that uniquely identifies the data source.Returns the type/format name of the data source.void
setDisplayName
(String aDisplayName) Sets the display name of this model descriptor (i.e.void
setSourceName
(String aSourceName) Sets the source name of this model descriptor.protected void
setTypeName
(String aTypeName) Sets the type name of this model descriptor (i.e.static String
sourceNameToDisplayName
(String aSourceName, String... aExtensions) Convenience method to calculate a display name based on the source name.
-
Constructor Details
-
TLcdModelDescriptor
public TLcdModelDescriptor()Constructs a newTLcdModelDescriptor
with default source name, type name, and display name. -
TLcdModelDescriptor
Constructs a newTLcdModelDescriptor
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
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 interfaceILcdModelDescriptor
- Returns:
- the full name of the data source.
-
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 interfaceILcdModelDescriptor
- Returns:
- the type name of the data source.
-
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 interfaceILcdModelDescriptor
- Returns:
- a displayable name for the data source.
-
setSourceName
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
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
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
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 nameaExtensions
- 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 benull
. 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
-