|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.datasource.StepwiseDatasource
public abstract class StepwiseDatasource
This is an implementation that composes nodes and forms a datasource.
Nested Class Summary | |
---|---|
static interface |
StepwiseDatasource.Node
|
Nested classes/interfaces inherited from interface org.simantics.databoard.datasource.IStepwiseDatasource |
---|
IStepwiseDatasource.DatasourceListener |
Constructor Summary | |
---|---|
StepwiseDatasource()
Create new stepwise data source |
Method Summary | |
---|---|
void |
addListener(IStepwiseDatasource.DatasourceListener listener)
Add datamodel listener |
void |
addNode(StepwiseDatasource.Node node)
|
void |
addRoot(StepwiseDatasource.Node node)
|
void |
getAll(java.util.Collection<Variant> list)
Get a list of all node identifiers. |
void |
getChildren(Variant nodeId,
java.util.Collection<Variant> children)
Get children of a node |
java.lang.String |
getLabel(Variant nodeId,
java.lang.String locale)
Get all labels of a node. |
void |
getLabels(Variant nodeId,
java.util.Map<java.lang.String,java.lang.String> labels)
Get all labels of a node. |
Datatype |
getNodeType(Variant nodeId)
Get the value type of a node. |
boolean |
getValue(Variant nodeId,
MutableVariant value)
Get value of a node |
boolean |
hasNode(Variant nodeId)
Verifies that the datasource has a node |
void |
removeListener(IStepwiseDatasource.DatasourceListener listener)
Remove datamodel listener |
boolean |
setValue(Variant nodeId,
Variant value)
Write value to datasource |
void |
step()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StepwiseDatasource()
Method Detail |
---|
public void step() throws DatasourceException
DatasourceException
public void addNode(StepwiseDatasource.Node node)
public void addRoot(StepwiseDatasource.Node node)
public boolean hasNode(Variant nodeId)
IStepwiseDatasource
hasNode
in interface IStepwiseDatasource
true
if node exists, false if notpublic void getAll(java.util.Collection<Variant> list)
IStepwiseDatasource
getAll
in interface IStepwiseDatasource
list
- to be filled with identifiers.public void getChildren(Variant nodeId, java.util.Collection<Variant> children) throws DatasourceException
IStepwiseDatasource
getChildren
in interface IStepwiseDatasource
children
- a collection to be filled with children
DatasourceException
- if the node does not existpublic boolean getValue(Variant nodeId, MutableVariant value) throws DatasourceException
IStepwiseDatasource
getValue
in interface IStepwiseDatasource
value
- variant where the value is written to
DatasourceException
- if node does not existpublic boolean setValue(Variant nodeId, Variant value) throws DatasourceException
IStepwiseDatasource
setValue
in interface IStepwiseDatasource
nodeId
- nodevalue
- value
DatasourceException
public Datatype getNodeType(Variant nodeId) throws DatasourceException
IStepwiseDatasource
getNodeType
in interface IStepwiseDatasource
null
if there is no value
DatasourceException
- if the node does not existpublic java.lang.String getLabel(Variant nodeId, java.lang.String locale) throws DatasourceException
IStepwiseDatasource
getLabel
in interface IStepwiseDatasource
locale
- ISO-639 coded locale.
null
if there is no label for the locale. "en" is available.
DatasourceException
- if error occurspublic void getLabels(Variant nodeId, java.util.Map<java.lang.String,java.lang.String> labels) throws DatasourceException
IStepwiseDatasource
getLabels
in interface IStepwiseDatasource
labels
- a collection to be filled
DatasourceException
- if error occurspublic void addListener(IStepwiseDatasource.DatasourceListener listener)
IStepwiseDatasource
addListener
in interface IStepwiseDatasource
public void removeListener(IStepwiseDatasource.DatasourceListener listener)
IStepwiseDatasource
removeListener
in interface IStepwiseDatasource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |