Class TLcdFeaturedDescriptorDataModelBuilder

java.lang.Object
com.luciad.datamodel.TLcdFeaturedDescriptorDataModelBuilder

public class TLcdFeaturedDescriptorDataModelBuilder extends Object
This builder is introduced to simplify the construction of data models from one or more ILcdFeaturedDescriptor instances.
Since:
10.1
  • Constructor Details

    • TLcdFeaturedDescriptorDataModelBuilder

      public TLcdFeaturedDescriptorDataModelBuilder(String aName)
      Constructs a new instance that only uses TLcdCoreDataTypes.getDataModel() as dependency.
      Parameters:
      aName - the name of the data model that is to be built
    • TLcdFeaturedDescriptorDataModelBuilder

      public TLcdFeaturedDescriptorDataModelBuilder(String aName, TLcdDataModel... aDependencies)
      Constructs a new instance with a number of dependencies.
      Parameters:
      aName - the name of the data model that is to be built
      aDependencies - the dependencies for this builder
      See Also:
  • Method Details

    • createDataModel

      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.

      Parameters:
      aDataModelName - the name of the data model that is to be created
      aTypeName - the name of the type that is to be created
      aFeaturedDescriptor - the featured descriptor that defines the properties of the type
      Returns:
      a data model with a single data object type that maps on the featured descriptor
    • buildType

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

      Parameters:
      aTypeName - the name of the type that is built
      aFeaturedDescriptor - the featured descriptor that is used to add the properties to the type
      Returns:
      the data type builder with properties according to the given featured descriptor
    • createDataModel

      public TLcdDataModel createDataModel()
      Creates the data model. After this method has been called, no more types can be built with this object.
      Returns:
      the data model that this builder created