|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.datasource.StepwiseDatasource
public class StepwiseDatasource
Composite Datasource aggregates nodes
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,
Variant 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 |
java.util.Collection<Variant> |
step(java.util.Collection<Variant> monitorSet)
Go to the next step of value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StepwiseDatasource()
Method Detail |
---|
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, Variant value) throws DatasourceException
IStepwiseDatasource
getValue
in interface IStepwiseDatasource
value
- variant where the value is written to
DatasourceException
- if node does not existpublic 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.util.Collection<Variant> step(java.util.Collection<Variant> monitorSet) throws DatasourceException
IStepwiseDatasource
step
in interface IStepwiseDatasource
monitorSet
- a collection of nodes that are monitored for change, or null
DatasourceException
- if error occurspublic 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 |