Modifier and Type | Method and Description |
---|---|
CollectionType |
createCollectionType(MeasureType valueMeasure)
Creates a new
CollectionType object. |
Column |
createColumn(java.lang.String name,
java.lang.String label,
Column sourceColumn)
Returns a
Column with the specified name and labels but with all
other attributes the same as source column. |
Column |
createColumn(java.lang.String name,
java.lang.String label,
ExtendedStorage extendedStorage)
Returns a
Column with the supplied attributes. |
Column |
createColumn(java.lang.String name,
java.lang.String label,
ExtendedStorage extendedStorage,
ExtendedMeasure extendedMeasure)
Returns a
Column with the supplied attributes. |
Column |
createColumn(java.lang.String name,
java.lang.String label,
StorageType storageType,
MeasureType measureType,
ModelingRole modelingRole)
Returns a
Column with the supplied attributes. |
DataModel |
createDataModel()
Returns an empty
DataModel . |
Column |
createFlagColumn(java.lang.String name,
java.lang.String label,
StorageType storageType,
java.lang.Object falseValue,
java.lang.Object trueValue)
Returns a
Column with the supplied attributes. |
GeoType |
createGeoType(GeometryType geometryType,
int coordinates,
int wellKnownID,
java.lang.String coordinateSystemName)
Creates a new
GeoType object. |
ListStorage |
createListStorage(int depth,
StorageType valueType)
Creates a new
ListStorage object. |
Column |
createModelOutputColumn(java.lang.String prefix,
java.lang.String basename,
Column sourceColumn,
ModelOutputMetadata modelOutputMetadata)
Returns a new
Column with the same type metadata as the
source column along with the associated model output metadata. |
Column |
createModelOutputColumn(java.lang.String prefix,
java.lang.String basename,
StorageType storageType,
MeasureType measureType,
ModelOutputMetadata modelOutputMetadata)
Returns a new
Column with the specified type metadata and
associated model output metadata. |
ModelOutputMetadata |
createModelOutputMetadata(ModelFieldRole modelFieldRole,
java.lang.String targetColumn,
java.lang.Object value,
java.util.List group,
java.lang.String tag)
Returns a new model output metadata object with the specified attributes.
|
Column |
createRangeColumn(java.lang.String name,
java.lang.String label,
StorageType storageType,
java.lang.Object lowerBound,
java.lang.Object upperBound)
Returns a
Column with the supplied attributes. |
Column |
createSetColumn(java.lang.String name,
java.lang.String label,
StorageType storageType,
java.lang.Object[] values)
Returns a
Column with the supplied attributes. |
java.lang.String |
dataModelToXML(DataModel dataModel)
Returns an XML format string containing the supplied data model in a
serializable format.
|
DataModel |
extendDataModel(Column[] columns,
DataModel initialDataModel)
Returns a
DataModel consisting of the columns appended to the
supplied data model. |
DataModel |
extendDataModel(Column column,
DataModel initialDataModel)
Returns a
DataModel consisting of the column appended to the
supplied data model. |
DataModel |
extendDataModel(DataModel addition,
DataModel initialDataModel)
Returns a
DataModel consisting of the initial data model with
the additions appended. |
DataModel |
extractDataModel(MeasureType[] measureTypes,
DataModel initialDataModel)
Returns a
DataModel consisting of columns in the
source data model that have the supplied measure type(s). |
DataModel |
extractDataModel(ModelingRole[] modelingRoles,
DataModel initialDataModel)
Returns a
DataModel consisting of columns in the
source data model that have the supplied modeling role(s). |
DataModel |
extractDataModel(StorageType[] storageTypes,
DataModel initialDataModel)
Returns a
DataModel consisting of columns in the
source data model that have the supplied storage type(s). |
DataModel |
extractDataModel(java.lang.String[] names,
DataModel initialDataModel)
Returns a
DataModel consisting of the named columns extracted from the
source data model. |
DataModel |
removeFromDataModel(MeasureType[] measureTypes,
DataModel initialDataModel)
Returns a
DataModel consisting of the source data model with
columns of the supplied measure type(s) removed. |
DataModel |
removeFromDataModel(ModelingRole[] modelingRoles,
DataModel initialDataModel)
Returns a
DataModel consisting of the source data model with
columns of the supplied modeling roles(s) removed. |
DataModel |
removeFromDataModel(StorageType[] storageTypes,
DataModel initialDataModel)
Returns a
DataModel consisting of the source data model with
columns of the supplied storage type(s) removed. |
DataModel |
removeFromDataModel(java.lang.String[] names,
DataModel initialDataModel)
Returns a
DataModel consisting of the source data model with the named columns removed. |
DataModel |
toDataModel(Column[] columns)
Returns a
DataModel containing the supplied columns. |
DataModel |
xmlToDataModel(java.lang.String xml)
Returns a
DataModel defined by the supplied XML string. |
DataModel createDataModel()
DataModel
.DataModel toDataModel(Column[] columns) throws DataModelException
DataModel
containing the supplied columns. The
columns are inserted in array order.DataModelException
- if the source columns are not
the system defined implementationColumn createColumn(java.lang.String name, java.lang.String label, StorageType storageType, MeasureType measureType, ModelingRole modelingRole)
Column
with the supplied attributes.name
- the column namelabel
- the column label (may be null
)storageType
- the storage definitionmeasureType
- the measure definition (may be null
)modelingRole
- the model role definition for each column (may be null
)Column
representing the columnColumn createColumn(java.lang.String name, java.lang.String label, ExtendedStorage extendedStorage)
Column
with the supplied attributes. The measure
type is set to MeasureType.TYPELESS
.name
- the column namelabel
- the column label (may be null
)extendedStorage
- the extended storage definitionColumn
representing the columncreateListStorage(int, StorageType)
Column createColumn(java.lang.String name, java.lang.String label, ExtendedStorage extendedStorage, ExtendedMeasure extendedMeasure)
Column
with the supplied attributes. The measure
type is set to MeasureType.TYPELESS
.name
- the column namelabel
- the column label (may be null
)extendedStorage
- the extended storage definitionextendedMeasure
- the extended measure definitionColumn
representing the columncreateListStorage(int, StorageType)
,
createCollectionType(MeasureType)
,
createGeoType(GeometryType, int, int, String)
Column createColumn(java.lang.String name, java.lang.String label, Column sourceColumn) throws DataModelException
Column
with the specified name and labels but with all
other attributes the same as source column.name
- the column namelabel
- the column label (may be null
)sourceColumn
- the source columnColumn
representing the columnDataModelException
- if the source column was not created
by the DataModelFactoryColumn createSetColumn(java.lang.String name, java.lang.String label, StorageType storageType, java.lang.Object[] values)
Column
with the supplied attributes.name
- the column namelabel
- the column label (may be null
)storageType
- the storage definitionvalues
- the valid values for the columnColumn
representing the columnColumn createFlagColumn(java.lang.String name, java.lang.String label, StorageType storageType, java.lang.Object falseValue, java.lang.Object trueValue)
Column
with the supplied attributes.name
- the column namelabel
- the column label (may be null
)storageType
- the storage definitionfalseValue
- the false valuetrueValue
- the true valueColumn
representing the columnColumn createRangeColumn(java.lang.String name, java.lang.String label, StorageType storageType, java.lang.Object lowerBound, java.lang.Object upperBound)
Column
with the supplied attributes.name
- the column namelabel
- the column label (may be null
)storageType
- the storage definitionlowerBound
- the lower range boundupperBound
- the upper range boundColumn
representing the columnModelOutputMetadata createModelOutputMetadata(ModelFieldRole modelFieldRole, java.lang.String targetColumn, java.lang.Object value, java.util.List group, java.lang.String tag)
modelFieldRole
- the mode column roletargetColumn
- the target column (may be null
)value
- the specific value associated with this column (may be null
).
If supplied, this must be an instance of String
, Integer
, or Double
.group
- the column group definition (may be null
).
If supplied this must be a list on Integer
values which are >= 1.tag
- the tag (may be null
)Column createModelOutputColumn(java.lang.String prefix, java.lang.String basename, StorageType storageType, MeasureType measureType, ModelOutputMetadata modelOutputMetadata) throws DataModelException
Column
with the specified type metadata and
associated model output metadata.prefix
- the column prefix (may not contain "-" characters)basename
- the column base namestorageType
- the storage typemeasureType
- the measure typemodelOutputMetadata
- the model output metadataDataModelException
- if the prefix is invalidColumn createModelOutputColumn(java.lang.String prefix, java.lang.String basename, Column sourceColumn, ModelOutputMetadata modelOutputMetadata) throws DataModelException
Column
with the same type metadata as the
source column along with the associated model output metadata.prefix
- the column prefix (may not contain "-" characters)basename
- the column base namesourceColumn
- the source column specifying the column typemodelOutputMetadata
- the model output metadataDataModelException
- if the source column was not created
by the DataModelFactory or the prefix is invalidDataModel extendDataModel(Column column, DataModel initialDataModel) throws DataModelException
DataModel
consisting of the column appended to the
supplied data model. The supplied array must not contain null
values.column
- the columnDataModel
containing the supplied columnsDataModelException
- if the column was
not created by the DataModelFactoryDataModel extendDataModel(DataModel addition, DataModel initialDataModel) throws DataModelException
DataModel
consisting of the initial data model with
the additions appended.addition
- the data model to be appendedDataModel
containing the supplied columnsDataModelException
- if the data models were
not created by the DataModelFactoryDataModel extendDataModel(Column[] columns, DataModel initialDataModel) throws DataModelException
DataModel
consisting of the columns appended to the
supplied data model. The supplied array must not contain null
values.columns
- the columnsDataModel
containing the supplied columnsDataModelException
- if the columns array
contains null
values.DataModel extractDataModel(java.lang.String[] names, DataModel initialDataModel) throws DataModelException
DataModel
consisting of the named columns extracted from the
source data model. If the source data model does not include a specified
column name, that column will be ignored.names
- the column namesinitialDataModel
- the source data modelDataModel
containing the supplied columnsDataModelException
- if the
array contains null
values.DataModel extractDataModel(StorageType[] storageTypes, DataModel initialDataModel) throws DataModelException
DataModel
consisting of columns in the
source data model that have the supplied storage type(s).storageTypes
- the storage typesinitialDataModel
- the source data modelDataModel
containing the supplied columnsDataModelException
- if the
array contains null
values.DataModel extractDataModel(MeasureType[] measureTypes, DataModel initialDataModel) throws DataModelException
DataModel
consisting of columns in the
source data model that have the supplied measure type(s).measureTypes
- the measure typesinitialDataModel
- the source data modelDataModel
containing the supplied columnsDataModelException
- if the
array contains null
values.DataModel extractDataModel(ModelingRole[] modelingRoles, DataModel initialDataModel) throws DataModelException
DataModel
consisting of columns in the
source data model that have the supplied modeling role(s).modelingRoles
- the modeling roles typesinitialDataModel
- the source data modelDataModel
containing the supplied columnsDataModelException
- if the
array contains null
values.DataModel removeFromDataModel(java.lang.String[] names, DataModel initialDataModel) throws DataModelException
DataModel
consisting of the source data model with the named columns removed.names
- the column namesinitialDataModel
- the source data modelDataModel
containing the supplied columnsDataModelException
- if the
array contains null
values.DataModel removeFromDataModel(StorageType[] storageTypes, DataModel initialDataModel) throws DataModelException
DataModel
consisting of the source data model with
columns of the supplied storage type(s) removed.storageTypes
- the storage typesinitialDataModel
- the source data modelDataModel
containing the supplied columnsDataModelException
- if the
array contains null
values.DataModel removeFromDataModel(MeasureType[] measureTypes, DataModel initialDataModel) throws DataModelException
DataModel
consisting of the source data model with
columns of the supplied measure type(s) removed.measureTypes
- the measure typesinitialDataModel
- the source data modelDataModel
containing the supplied columnsDataModelException
- if the
array contains null
values.DataModel removeFromDataModel(ModelingRole[] modelingRoles, DataModel initialDataModel) throws DataModelException
DataModel
consisting of the source data model with
columns of the supplied modeling roles(s) removed.modelingRoles
- the modeling roles typesinitialDataModel
- the source data modelDataModel
containing the supplied columnsDataModelException
- if the
array contains null
values.ListStorage createListStorage(int depth, StorageType valueType)
ListStorage
object. The definition specifies
the depth of the list starting at 0 for a list of simple values, and the
basic storage of the underlying values. The storage cannot be either
StorageType.UNKNOWN
or StorageType.LIST
.depth
- how deeply nested the simple values are in the listvalueType
- the type of the simple valuescreateCollectionType(MeasureType)
,
createGeoType(GeometryType, int, int, String)
CollectionType createCollectionType(MeasureType valueMeasure)
CollectionType
object. The definition specifies
the measurement associated with individual values in the list.
The storage cannot be either MeasureType.COLLECTION
or
MeasureType.GEOSPATIAL
, and should also be consistent with
the storage type associated with the simple values in the list column
that this metadata is to be associated with.valueMeasure
- the measure that should be applied to each value
in the list.createListStorage(int, StorageType)
,
createGeoType(GeometryType, int, int, String)
GeoType createGeoType(GeometryType geometryType, int coordinates, int wellKnownID, java.lang.String coordinateSystemName)
GeoType
object. The definition specifies the
type of geometry object, the number of coordinates (typically 2 or 3)
required to represent the geometry object, and the“well-known ID”
and/or the coordinate system name.geometryType
- the type of geometry objectcoordinates
- a positive integer representing the numberwellKnownID
- the “well-known ID” of the coordinate system
or 0 if this is not knowncoordinateSystemName
- the name of the coordinate system or the empty
string if this is not known.createListStorage(int, StorageType)
,
createCollectionType(MeasureType)
DataModel xmlToDataModel(java.lang.String xml) throws DataModelException
DataModel
defined by the supplied XML string.
It is assumed the string was generated by calling dataModelToXML
.xml
- the data model XMLDataModelException
- if the data model cannot be recreateddataModelToXML(DataModel)
java.lang.String dataModelToXML(DataModel dataModel) throws DataModelException
xmlToDataModel
.dataModel
- the data modelDataModelException
- if the data model XML cannot be createdxmlToDataModel(String)
Copyright © 2014 Integral Solutions Ltd. All Rights Reserved.