public interface DataModel
Column
,
DataModelFactory
Modifier and Type | Method and Description |
---|---|
java.util.Iterator |
columnGroupIterator()
Returns an iterator that returns each column group in turn.
|
java.util.Iterator |
columnIterator()
Returns an iterator that returns each column in the
"natural" insert order.
|
boolean |
contains(java.lang.String name)
Returns
true if a column with the supplied name exists in this DataModel,
false otherwise. |
Column |
getColumn(java.lang.String name)
Returns the column with the specified name.
|
int |
getColumnCount()
Returns the number of columns in this set.
|
ColumnGroup |
getColumnGroup(java.lang.String name)
Returns the named column group or
null if no such column group
exists. |
int |
getColumnGroupCount()
Returns the number of column groups in this data model.
|
java.lang.String |
getColumnLabel(java.lang.String name)
Returns the label of the named column or an empty string
if there is no label associated with the column.
|
ExtendedMeasure |
getExtendedMeasure(java.lang.String name)
Returns additional metadata that is specific for this field.
|
ExtendedStorage |
getExtendedStorage(java.lang.String name)
Returns additional metadata for this field's storage or
null
if no additional storage metadata is defined. |
java.lang.Object |
getFalseFlag(java.lang.String name)
Returns the "false" indicator value for the column, or
null if either
the value is not known or the column is not a flag. |
java.lang.Object |
getLowerBound(java.lang.String name)
Returns the lower bound value for the values in the named column, or
null
if either the value is not known or the column is not continuous. |
MeasureType |
getMeasureType(java.lang.String name)
Returns the measure type for values in the named column.
|
MissingValueDefinition |
getMissingValueDefinition(java.lang.String name)
Returns the missing value definition for the column or
null . |
ModelingRole |
getModelingRole(java.lang.String name)
Returns the modeling role for the named column.
|
java.lang.Object[] |
getSetValues(java.lang.String name)
Returns an array of valid values for the column, or
null
if either the values are not known or the column is not a set. |
StorageType |
getStorageType(java.lang.String name)
Returns the storage type for values in the named column.
|
java.lang.Object |
getTrueFlag(java.lang.String name)
Returns the "true" indicator value for the column, or
null if either
the value is not known or the column is not a flag. |
java.lang.Object |
getUpperBound(java.lang.String name)
Returns the upper bound value for the values in the named column, or
null
if either the value is not known or the column is not continuous. |
java.lang.String |
getValueLabel(java.lang.String name,
java.lang.Object value)
Returns the label for the value in the named column or an empty string
if there is no label associated with the value.
|
boolean |
hasMissingValueDefinition(java.lang.String name)
Returns
true if the column has a missing value definition. |
boolean |
isList(java.lang.String name)
Returns
true if this field is a list field. |
boolean |
isMeasureDiscrete(java.lang.String name)
Returns
true if the column is discrete. |
boolean |
isModelOutputColumn(java.lang.String name)
Returns
true if this is a model output column. |
boolean |
isStorageDatetime(java.lang.String name)
Returns
true if the column's storage is a time, date or timestamp value. |
boolean |
isStorageNumeric(java.lang.String name)
Returns
true if the column's storage is an integer or a real number. |
boolean |
isValidValue(java.lang.String name,
java.lang.Object value)
Returns
true if the specified value is valid for this
storage and valid when the valid column values are known. |
DataModel |
modifyColumns(java.util.Collection<Column> modifiedColumns)
Creates and returns a new data model based on this data model with the specified columns
modified.
|
java.util.Iterator |
nameIterator()
Returns an iterator that returns the name of each column in the
"natural" insert order.
|
DataModel |
removeColumns(java.util.Collection<java.lang.String> columnNames)
Creates and returns a new data model based on this data model with the specified columns
modified.
|
DataModel |
renameColumns(java.util.Map<java.lang.String,java.lang.String> modifiedNames)
Creates and returns a new data model based on this data model with the specified columns
renamed.
|
Column[] |
toArray()
Returns the data model as an array of columns.
|
int getColumnCount()
java.util.Iterator nameIterator()
java.util.Iterator columnIterator()
Column
boolean contains(java.lang.String name)
true
if a column with the supplied name exists in this DataModel,
false
otherwise.name
- the column nametrue
if the column with the supplied name exists in this DataModel,
false
otherwiseColumn getColumn(java.lang.String name) throws DataModelException
DataModelException
- if the named column does not existcontains(String)
Column[] toArray()
StorageType getStorageType(java.lang.String name) throws DataModelException
name
- the column nameDataModelException
- if the named column does not existMeasureType getMeasureType(java.lang.String name) throws DataModelException
name
- the column nameDataModelException
- if the named column does not existModelingRole getModelingRole(java.lang.String name) throws DataModelException
name
- the column nameDataModelException
- if the named column does not existboolean isMeasureDiscrete(java.lang.String name) throws DataModelException
true
if the column is discrete. Columns that are either a set
or a flag are considered discrete.name
- the column nametrue
if the column is either a set or a flag type,
false
otherwise.DataModelException
- if the named column does not existboolean isStorageNumeric(java.lang.String name) throws DataModelException
true
if the column's storage is an integer or a real number.name
- the column nametrue
if the column's storage is an integer or a real number,
false
otherwise.DataModelException
- if the named column does not existboolean isStorageDatetime(java.lang.String name) throws DataModelException
true
if the column's storage is a time, date or timestamp value.name
- the column nametrue
if the column's storage is a time, date or timestamp value,
false
otherwise.DataModelException
- if the named column does not existjava.lang.Object getLowerBound(java.lang.String name) throws DataModelException
null
if either the value is not known or the column is not continuous.name
- the column namenull
DataModelException
- if the named column does not existjava.lang.Object getUpperBound(java.lang.String name) throws DataModelException
null
if either the value is not known or the column is not continuous.name
- the column namenull
DataModelException
- if the named column does not existjava.lang.Object[] getSetValues(java.lang.String name) throws DataModelException
null
if either the values are not known or the column is not a set.name
- the column namenull
DataModelException
- if the named column does not existjava.lang.Object getTrueFlag(java.lang.String name) throws DataModelException
null
if either
the value is not known or the column is not a flag.name
- the column namenull
DataModelException
- if the named column does not existjava.lang.Object getFalseFlag(java.lang.String name) throws DataModelException
null
if either
the value is not known or the column is not a flag.name
- the column namenull
DataModelException
- if the named column does not existboolean isValidValue(java.lang.String name, java.lang.Object value) throws DataModelException
true
if the specified value is valid for this
storage and valid when the valid column values are known.name
- the column namevalue
- the valuetrue
if the specified value is valid for this
storage and valid when the valid column values are knownDataModelException
- if the named column does not existboolean hasMissingValueDefinition(java.lang.String name) throws DataModelException
true
if the column has a missing value definition.name
- the column nametrue
if the column has missing value definitionDataModelException
- if the named column does not existMissingValueDefinition getMissingValueDefinition(java.lang.String name) throws DataModelException
null
.name
- the column namenull
DataModelException
- if the named column does not existjava.lang.String getColumnLabel(java.lang.String name) throws DataModelException
name
- the column nameDataModelException
- if the named column does not existjava.lang.String getValueLabel(java.lang.String name, java.lang.Object value) throws DataModelException
name
- the column namevalue
- the valueDataModelException
- if the named column does not existboolean isModelOutputColumn(java.lang.String name) throws DataModelException
true
if this is a model output column.name
- the column nametrue
if this is a model output columnDataModelException
- if the named column does not existint getColumnGroupCount()
java.util.Iterator columnGroupIterator()
ColumnGroup getColumnGroup(java.lang.String name)
null
if no such column group
exists.name
- null
boolean isList(java.lang.String name) throws DataModelException
true
if this field is a list field.true
if this field is a list field, false
otherwise.DataModelException
getExtendedStorage(String)
,
getExtendedMeasure(String)
ExtendedStorage getExtendedStorage(java.lang.String name) throws DataModelException
null
if no additional storage metadata is defined.name
- the field namenull
DataModelException
isList(String)
,
getExtendedMeasure(String)
ExtendedMeasure getExtendedMeasure(java.lang.String name) throws DataModelException
name
- the column namenull
DataModelException
- if the named column does not existisList(String)
DataModel modifyColumns(java.util.Collection<Column> modifiedColumns) throws DataModelException
modifiedColumns
- the columns to be modifiedDataModelException
- if the modified columns are invalidrenameColumns(Map)
,
removeColumns(Collection)
DataModel renameColumns(java.util.Map<java.lang.String,java.lang.String> modifiedNames) throws DataModelException
modifiedNames
- a map containing the original column names as the
key and the new name as the associated valueDataModelException
- if the new column names are invalid, for example
cause the data model to have duplicate names.modifyColumns(Collection)
,
removeColumns(Collection)
DataModel removeColumns(java.util.Collection<java.lang.String> columnNames) throws DataModelException
modifiedColumns
- the columns to be modifiedDataModelException
- if the modified columns are invalidrenameColumns(Map)
,
modifyColumns(Collection)
Copyright © 2014 Integral Solutions Ltd. All Rights Reserved.