|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.debellor.core.DataType
public class DataType
Subclasses of DataType describe common properties
of all DataObjects
generated by a given data Cell.Stream.
For example, may contain information about number and types of features
of a DataVector.
Contain also information necessary for correct interpretation
of data values, e.g. a dictionary of symbols that should be put
in the place of numeric codes in SymbolicFeature.
Usually, every new subclass of DataObject has
its corresponding DataType subclass which provides
type information specific to this DataObject subclass.
For example, common properties of DataVector objects
are described by an instance of DataVector.DataVectorType class.
Similarly to DataObject subclasses, also DataType subclasses can be nested.
Usually, the nesting structure of DataType objects
exactly mirrors the nesting structure of corresponding data objects.
Like DataObjects, DataType objects are also immutable,
so they can be freely shared by cells without risk of accidental modification.
| Field Summary | |
|---|---|
java.lang.Class<? extends DataObject> |
dataClass
If dataClass is not null, corresponding data objects in all samples
of the data set will be instances of the dataClass class
or will be missing (null references). |
static DataType |
NOT_PRESENT
Marks that a given part of data does not exist and the corresponding field will always have null value, in all samples of the data stream. |
static DataType |
UNKNOWN
Marks that type of a given part of data is unknown and consumer should expect everything. |
| Constructor Summary | |
|---|---|
DataType(java.lang.Class<? extends DataObject> dataClass)
|
|
| Method Summary | |
|---|---|
DataVector.DataVectorType |
asDataVectorType()
Returns this DataType casted to DataVector.DataVectorType. |
SymbolicFeature.SymbolicFeatureType |
asSymbolicFeatureType()
Returns this DataType casted to SymbolicFeature.SymbolicFeatureType. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final DataType UNKNOWN
public static final DataType NOT_PRESENT
null value, in all samples of the data stream.
Consumer of the data should treat this part of data as non-existent,
not only as all-nulls. For example, if Sample.SampleType.decision is NOT_PRESENT
it means that there is no decision attribute, which is something different than null decisions
(null might be treated as an unknown value of a decision).
public final java.lang.Class<? extends DataObject> dataClass
dataClass is not null, corresponding data objects in all samples
of the data set will be instances of the dataClass class
or will be missing (null references).
Otherwise, class of corresponding data objects is unknown.
Note that null dataClass does not mean that all corresponding
data objects will be missing!
| Constructor Detail |
|---|
public DataType(java.lang.Class<? extends DataObject> dataClass)
| Method Detail |
|---|
public DataVector.DataVectorType asDataVectorType()
throws DataCastException
DataVector.DataVectorType.
DataCastException
public final SymbolicFeature.SymbolicFeatureType asSymbolicFeatureType()
throws DataCastException
SymbolicFeature.SymbolicFeatureType.
DataCastException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||