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
ConstructorsConstructorDescriptionConstructs a newTLcdModelDescriptorwith default source name, type name, and display name.TLcdModelDescriptor(String aSourceName, String aTypeName, String aDisplayName) Constructs a newTLcdModelDescriptorwith 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.voidsetDisplayName(String aDisplayName) Sets the display name of this model descriptor (i.e.voidsetSourceName(String aSourceName) Sets the source name of this model descriptor.protected voidsetTypeName(String aTypeName) Sets the type name of this model descriptor (i.e.static StringsourceNameToDisplayName(String aSourceName, String... aExtensions) Convenience method to calculate a display name based on the source name.
-
Constructor Details
-
TLcdModelDescriptor
public TLcdModelDescriptor()Constructs a newTLcdModelDescriptorwith default source name, type name, and display name. -
TLcdModelDescriptor
Constructs a newTLcdModelDescriptorwith 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:ILcdModelDescriptorReturns 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:
getSourceNamein interfaceILcdModelDescriptor- Returns:
- the full name of the data source.
-
getTypeName
Description copied from interface:ILcdModelDescriptorReturns 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:
getTypeNamein interfaceILcdModelDescriptor- Returns:
- the type name of the data source.
-
getDisplayName
Description copied from interface:ILcdModelDescriptorReturns 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:
getDisplayNamein 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
ILcdModelEncoderto 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
-