public interface ValueContext
Adaptation
Modifier and Type | Method and Description |
---|---|
Adaptation |
getAdaptationInstance()
Returns the current dataset.
|
AdaptationTable |
getAdaptationTable()
If this context is for a table record, returns the table that contains it;
returns
null if this is for a dataset or a user service data context object
that are not a record. |
AdaptationHome |
getHome()
Returns the current dataspace or snapshot.
|
SchemaNode |
getNode()
Returns the current data model node of this context.
|
SchemaNode |
getNode(Path aPath)
Returns the data model node at the specified path.
|
Object |
getValue()
Returns the value of the current node of this context.
|
Object |
getValue(Path aPath)
Returns the value of the specified node.
|
Object |
getValue(SchemaNode aNode)
Returns the value of the specified node.
|
AdaptationHome getHome()
For a user service data context object that is not a record or a dataset, always returns the reference dataspace.
SchemaNode getNode()
getValue(Path)
SchemaNode getNode(Path aPath) throws PathAccessException
PathAccessException
getNode()
Object getValue(SchemaNode aNode)
IllegalArgumentException
- if the specified node does not belong
to the data model of the current content.IllegalArgumentException
- if the current content is a table record
and the specified node is not in the same table as the
one of the current record.IllegalArgumentException
- if the current content is a dataset
and the specified node is a table record node.getValue(Path)
,
Adaptation.get(SchemaNode)
Object getValue(Path aPath) throws PathAccessException
The resolution of the value is done according to the following rules:
osd:inheritance
inheritance property, returns the locally defined value
if a local value is defined (or "overwritten"/null
);
if no local value is defined,
looks up the first locally defined value,
according to the osd:inheritance
properties.null
);
otherwise, looks up the first locally defined value
according to the built-in child-to-parent relationship of datasets;
if no locally defined value is found,
the data model default value is returned (null
is returned
if the data model does not define a default value).The access and mapping rules between XML Schema and Java are described in the chapter Mapping to Java.
PathAccessException
- if aPath
does not refer to an existing node in the underlying
type tree structure, or the specified node is above a terminal node.Adaptation
,
Adaptation.get(Path)
Object getValue() throws PathAccessException
This method is equivalent to getValue(Path.SELF)
.
PathAccessException
Adaptation getAdaptationInstance()
If this context is on a table record, returns the current
dataset that contains the table. Never returns null
if current value is from a dataset or record.
Returns null
for user service data context objects that are not a record or a dataset.
getAdaptationTable()
AdaptationTable getAdaptationTable()
null
if this is for a dataset or a user service data context object
that are not a record.Adaptation.getContainerTable()