Class TLcdHanaModelDescriptor
- All Implemented Interfaces:
ILcdDataModelDescriptor
,ILcdModelDescriptor
,Serializable
Model descriptor for hana models.
WARNING: beta. This class may be modified or removed in subsequent releases.
- Since:
- 2014.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic TLcdHanaModelDescriptor
createModelDescriptor
(String aUrl, String aTableName, String[] aColumnNames, String[] aColumnClassNames, String aGeometryColumnName) Creates a new hana model descriptor using the given parameters.Returns the data model that describes the elements of the model.Returns a displayable name for the data source, suitable for usage in user interfaces.Returns the name of the column in which the geometry is stored.Returns the data type of the model elements.Returns a set containing all the data types of which instances can be elements in the model associated with this descriptor.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.Returns the full name that uniquely identifies the data source.Returns the name of the database table.Returns the type/format name of the data source.getURL()
Returns the JDBC connection URL.
-
Method Details
-
createModelDescriptor
public static TLcdHanaModelDescriptor createModelDescriptor(String aUrl, String aTableName, String[] aColumnNames, String[] aColumnClassNames, String aGeometryColumnName) Creates a new hana model descriptor using the given parameters.- Parameters:
aUrl
- the JDBC connection URL.aTableName
- the database table name.aColumnNames
- the column names of the data properties that should be retrieved.aColumnClassNames
- the class names that represent the type of the values in the columns that should be retrievedaGeometryColumnName
- the column name where the geometry is stored- Returns:
- a hana model descriptor
-
getURL
Returns the JDBC connection URL.- Returns:
- the JDBC connection URL.
-
getTableName
Returns the name of the database table.- Returns:
- the name of the database table.
-
getModelElementType
Returns the data type of the model elements.- Returns:
- the data type of the model elements.
-
getGeometryColumn
Returns the name of the column in which the geometry is stored.- Returns:
- the name of the column in which the geometry is stored.
-
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 interfaceILcdDataModelDescriptor
- Returns:
- the data model that describes the elements of the model
-
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 interfaceILcdDataModelDescriptor
- Returns:
- a set containing all the data types of which instances can be elements in the model associated with this descriptor
-
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 interfaceILcdDataModelDescriptor
- Returns:
- a set containing all the data types of which instances can be used in the model associated with this descriptor
-
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.
-
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.
-