|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.instance.orient.OGroup
eu.esdihumboldt.hale.common.instance.orient.OInstance
public class OInstance
Instance implementation based on ODocument
s
Field Summary | |
---|---|
static String |
FIELD_METADATA
Name for the special field for MetaData documents |
static String |
FIELD_VALUE
Name for the special field for an instance value |
Fields inherited from class eu.esdihumboldt.hale.common.instance.orient.OGroup |
---|
db, document |
Constructor Summary | |
---|---|
OInstance(Instance org)
Copy constructor. |
|
OInstance(com.orientechnologies.orient.core.record.impl.ODocument document,
TypeDefinition typeDef,
com.orientechnologies.orient.core.db.record.ODatabaseRecord db,
DataSet dataSet)
Creates an instance based on the given document. |
|
OInstance(TypeDefinition typeDef,
DataSet dataSet)
Creates an empty instance associated with the given type. |
Method Summary | |
---|---|
DataSet |
getDataSet()
Get the data set the instance is associated to. |
TypeDefinition |
getDefinition()
Get the group definition |
List<Object> |
getMetaData(String key)
Get the metadata the instance my be associated with |
Set<String> |
getMetaDataNames()
Get all keys the metadata is associated with |
protected Collection<String> |
getSpecialFieldNames()
Get the special field names, e.g. |
Object |
getValue()
Get the instance value. The value is only present for certain types where the HasValueFlag or AugmentedValueFlag constraint is enabled. |
void |
putMetaData(String key,
Object obj)
add Data to the MetaData, which the Instance can be associated with If there is no MetaData in the Instance, a new container will be created |
void |
setDataSet(DataSet dataSet)
Set the data set the instance is associated to. |
void |
setMetaData(String key,
Object... values)
Sets the metadata of a certain key, may also delet or reset the value of the key if the values parameter is null or empty |
void |
setValue(Object value)
Set the instance value. |
Methods inherited from class eu.esdihumboldt.hale.common.instance.orient.OGroup |
---|
addProperty, addProperty, associatedDbWithThread, configureDocument, convertDocument, convertInstance, decodeProperty, encodeProperty, getDb, getDocument, getProperty, getProperty, getPropertyNames, getPropertyNames, setProperty, setPropertyInternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface eu.esdihumboldt.hale.common.instance.model.MutableGroup |
---|
addProperty, setProperty |
Methods inherited from interface eu.esdihumboldt.hale.common.instance.model.Group |
---|
getProperty, getPropertyNames |
Field Detail |
---|
public static final String FIELD_VALUE
public static final String FIELD_METADATA
Constructor Detail |
---|
public OInstance(TypeDefinition typeDef, DataSet dataSet)
typeDef
- the definition of the instance's typedataSet
- the data set the instance is associated topublic OInstance(com.orientechnologies.orient.core.record.impl.ODocument document, TypeDefinition typeDef, com.orientechnologies.orient.core.db.record.ODatabaseRecord db, DataSet dataSet)
document
- the documenttypeDef
- the definition of the instance's typedb
- the databasedataSet
- the data set the instance is associated topublic OInstance(Instance org)
org
- the instance to copyMethod Detail |
---|
public void setValue(Object value)
MutableInstance
Instance
.
setValue
in interface MutableInstance
value
- the instance value to setMutableInstance.setValue(Object)
public Object getValue()
Instance
HasValueFlag
or AugmentedValueFlag
constraint is enabled.
The Binding
constraint on the type definition defines the binding
of the value.Group
or Instance
).
getValue
in interface Instance
null
Instance.getValue()
protected Collection<String> getSpecialFieldNames()
OGroup
getSpecialFieldNames
in class OGroup
OGroup.getSpecialFieldNames()
public TypeDefinition getDefinition()
Group
getDefinition
in interface Group
getDefinition
in interface Instance
getDefinition
in class OGroup
Instance.getDefinition()
public DataSet getDataSet()
Instance
getDataSet
in interface Instance
null
if not setpublic void setDataSet(DataSet dataSet)
MutableInstance
setDataSet
in interface MutableInstance
dataSet
- the instance data setpublic List<Object> getMetaData(String key)
Instance
getMetaData
in interface Instance
key
- the key to access a certain metadata
Instance.getMetaData(java.lang.String)
public void putMetaData(String key, Object obj)
putMetaData
in interface MutableInstance
key
- a key the data to add will be associated withobj
- the Data to add, may not be Instance
or Group
public Set<String> getMetaDataNames()
Instance
getMetaDataNames
in interface Instance
Instance.getMetaDataNames()
public void setMetaData(String key, Object... values)
setMetaData
in interface MutableInstance
key
- the key the data is associated withvalues
- the values to set, may not contain Instance
or
Group
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |