What are the parts of a data model?


A data model is a collection of related data types.


A data type describes an object in terms of the properties that it has.


A data property describes a named value in an object. The value itself has a type as well.


A data annotation can be added to data models, types and properties to associate application knowledge with that item.


A data property path describes how to delve into a given data type to arrive at a potentially nested value.

Together, these allow you to describe the structure of the FeatureFeatureFeature objects provided by an IFeatureModelIFeatureModelIFeatureModel.

FeatureFeatureFeature objects have a DataTypeDataTypeDataType that describes what values can be retrieved from them. Next to the full DataModelDataModelDataModel, IFeatureModelIFeatureModelIFeatureModel objects also provide accessaccessaccess to the list of DataTypes of all features that actually appear in the model.

Creating a data model

You use the builder pattern to create data models, types, and properties. Data annotations are simple objects. You can create them like any other regular object type.

For example:

Program: Creating a data property
return DataProperty::newBuilder().name("geometry").valueType(DataType::getGeometryType()).build();
return DataProperty.NewBuilder().Name("geometry").ValueType(DataType.GeometryType).Build();
return DataProperty.newBuilder()
Program: Creating a data type with a property and an annotation
return DataType::newBuilder()
    .addAnnotation(IDataAnnotationFactory::create([&](const auto& dataType) {
      return std::make_shared<GeometryDataAnnotation>(DataPropertyPath::newBuilder().originType(dataType).property(geometryProperty).build());
return DataType.NewBuilder()
.AddAnnotation(new GeometryDataAnnotationFactory(geometryProperty))
return DataType.newBuilder()
               .addAnnotation(new GeometryDataAnnotationFactory(geometryProperty))
Program: Creating a data model with a data type
return DataModel::newBuilder().name("http://www.mydomain.com/datamodel/TestFeatureModel").addDataType(dataType).build();
return DataModel.NewBuilder()
return DataModel.newBuilder()