public final class DataModel extends Object implements AutoCloseable
Conceptually this is similar to a UML package or an XML schema.
A data model is identified by its name. Two data models are considered to be equal if they have the same name and data types.
DataModel
provides access to its types (see getDataTypes()
).
Instances of this class are thread safe. Once an instance has been created, there is no public API to modify it.
Data models are created using a DataModel.Builder
(see newBuilder()
).
Modifier and Type | Class and Description |
---|---|
static class |
DataModel.Builder
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(Object other) |
protected void |
finalize() |
DataType |
findDataType(String name)
Searches for a data type by name.
|
static DataModel |
getCoreDataModel()
Gets a data model containing the supported
DataProperty value types. |
List<DataType> |
getDataTypes()
Gets the data types of this data model.
|
String |
getName()
Gets the name of this data model.
|
int |
hashCode() |
static DataModel.Builder |
newBuilder()
Creates a new builder.
|
String |
toString() |
public void close()
close
in interface AutoCloseable
@NotNull public static DataModel getCoreDataModel()
DataProperty
value types.DataProperty
value types.@NotNull public static DataModel.Builder newBuilder()
@NotNull public String getName()
@NotNull public List<DataType> getDataTypes()
@Nullable public DataType findDataType(@NotNull String name)
name
- the name for a data type.