salsa.corpora.elements
Class Graph

java.lang.Object
  extended by salsa.corpora.elements.Graph

public class Graph
extends java.lang.Object

Represents the 'graph' section in a SalsaXML corpus.

Author:
Fabian Shirokov

Constructor Summary
Graph(Id root)
          Default constructor that takes the value of 'root' as an argument.
 
Method Summary
 Nonterminals getNonterminals()
          Returns the Nonterminals of this Graph.
 Id getRoot()
          Returns the value of 'root'.
 Terminals getTerminals()
          Returns the Terminals of this Graph.
static java.lang.String getXmltag()
          Returns the name of the XML element of Graph, i. e.
 void setNonterminals(Nonterminals nonterminals)
          Sets the Nonterminals of this Graph.
 void setRoot(Id root)
          Sets the value of 'root'.
 void setTerminals(Terminals terminals)
          Sets the Terminals of this Graph.
 java.lang.String toString()
          Returns a recursively created XML representation of this Graph.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Graph

public Graph(Id root)
Default constructor that takes the value of 'root' as an argument.

Parameters:
root -
Method Detail

getNonterminals

public Nonterminals getNonterminals()
Returns the Nonterminals of this Graph.

Returns:
the nonterminals

getRoot

public Id getRoot()
Returns the value of 'root'.

Returns:
the root

getTerminals

public Terminals getTerminals()
Returns the Terminals of this Graph. If it has not been set, then null is returned.

Returns:
the terminals

getXmltag

public static java.lang.String getXmltag()
Returns the name of the XML element of Graph, i. e. 'graph'.

Returns:
the xmltag

setNonterminals

public void setNonterminals(Nonterminals nonterminals)
Sets the Nonterminals of this Graph.

Parameters:
nonterminals - the nonterminals to set

setRoot

public void setRoot(Id root)
Sets the value of 'root'.

Parameters:
root - the root to set

setTerminals

public void setTerminals(Terminals terminals)
Sets the Terminals of this Graph.

Parameters:
terminals - the terminals to set

toString

public java.lang.String toString()
Returns a recursively created XML representation of this Graph.

Overrides:
toString in class java.lang.Object