Modifier and Type | Field and Description |
---|---|
static String |
CURRENT_VERSION |
Constructor and Description |
---|
Graph(String id)
Constructs an empty graph with the given
id . |
Modifier and Type | Method and Description |
---|---|
void |
addNode(Node node)
Adds a
Node to the graph |
com.thoughtworks.xstream.io.xml.xppdom.XppDom |
getApplicationData(String appId)
Returns the Application data for the given application ID or null,
if for this id no application is available.
|
Header |
getHeader()
Gets the graph's header
|
String |
getId()
Gets the graph's id
|
Node |
getNode(int index)
Gets the
Node at the given index. |
Node |
getNode(String id)
|
int |
getNodeCount()
Gets the number nodes contained by this graph.
|
Node[] |
getNodes()
Returns an array containing all nodes in this graph.
|
String |
getVersion()
Gets the graph's version
|
boolean |
removeNode(String id)
Removes the
Node with the given id from this graph if present. |
void |
setAppData(String id,
com.thoughtworks.xstream.io.xml.xppdom.XppDom data)
Sets the application data for the given ID
|
public static final String CURRENT_VERSION
public Graph(String id)
id
.id
- the id of the graphpublic String getId()
public String getVersion()
public Header getHeader()
public int getNodeCount()
public void addNode(Node node)
Node
to the graphnode
- a nodeIllegalArgumentException
- if the id of the given node is already in usepublic boolean removeNode(String id)
Node
with the given id
from this graph if present.public Node getNode(int index)
Node
at the given index.index
- the indexpublic Node getNode(String id)
id
- the id of the Node to be removedtrue
if the graph contains a Node
with the given id
. Else false
.public Node[] getNodes()
public com.thoughtworks.xstream.io.xml.xppdom.XppDom getApplicationData(String appId)
appId
- the application IDpublic void setAppData(String id, com.thoughtworks.xstream.io.xml.xppdom.XppDom data)
id
- The application ID.data
- The application data as XppDom.Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.