public class TLcdFeaturedDescriptorDataModelBuilder extends Object
ILcdFeaturedDescriptor
instances.Constructor and Description |
---|
TLcdFeaturedDescriptorDataModelBuilder(String aName)
Constructs a new instance that only uses
TLcdCoreDataTypes.getDataModel()
as dependency. |
TLcdFeaturedDescriptorDataModelBuilder(String aName,
TLcdDataModel... aDependencies)
Constructs a new instance with a number of dependencies.
|
Modifier and Type | Method and Description |
---|---|
TLcdDataTypeBuilder |
buildType(String aTypeName,
ILcdFeaturedDescriptor aFeaturedDescriptor)
Builds a new data object type with the given name.
|
TLcdDataModel |
createDataModel()
Creates the data model.
|
static TLcdDataModel |
createDataModel(String aDataModelName,
String aTypeName,
ILcdFeaturedDescriptor aFeaturedDescriptor)
Creates a data model based on a
ILcdFeaturedDescriptor . |
public TLcdFeaturedDescriptorDataModelBuilder(String aName)
TLcdCoreDataTypes.getDataModel()
as dependency.aName
- the name of the data model that is to be builtpublic TLcdFeaturedDescriptorDataModelBuilder(String aName, TLcdDataModel... aDependencies)
aName
- the name of the data model that is to be builtaDependencies
- the dependencies for this builderbuildType(String, ILcdFeaturedDescriptor)
public static TLcdDataModel createDataModel(String aDataModelName, String aTypeName, ILcdFeaturedDescriptor aFeaturedDescriptor)
Creates a data model based on a ILcdFeaturedDescriptor
. This data model
will have one data object type (with the given name). This type will have one property
for each feature in the featured descriptor.
This method is a convenience method that constructs a TLcdFeaturedDescriptorDataModelBuilder
,
builds one type with the given featured descriptor and finally returns the created data model.
aDataModelName
- the name of the data model that is to be createdaTypeName
- the name of the type that is to be createdaFeaturedDescriptor
- the featured descriptor that defines the properties of the typepublic TLcdDataTypeBuilder buildType(String aTypeName, ILcdFeaturedDescriptor aFeaturedDescriptor)
Builds a new data object type with the given name. This type gets one property for each feature in the featured descriptor. The name of the property is equal to the name of the feature. If one of this builder's dependencies declares a type with as instance class the feature class of the feature the this type is used as the type of the property. Otherwise, a new primitive type is declared in the data model that is being built.
Characters in the feature name that are invalid for property names are replaced by underscores. In such a case, the display name of the property is set to the original feature name. The same is done for the given type name.
aTypeName
- the name of the type that is builtaFeaturedDescriptor
- the featured descriptor that is used to add the properties
to the typepublic TLcdDataModel createDataModel()