salsa.corpora.elements
Class Variable

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

public class Variable
extends java.lang.Object

Represents the 'variable' section in a SalsaXML corpus.

Author:
Fabian Shirokov

Constructor Summary
Variable(java.lang.String name, Id id)
          Default constructor that takes the value of the 'name' attribute and the Id (value of the 'idref' attribute) as arguments.
 
Method Summary
 Id getId()
          Returns the Id (value of the 'idref' attribute).
 java.lang.String getName()
          Returns the value of the 'name' attribute.
 java.lang.String getText()
          Returns the text (PCDATA in XML).
static java.lang.String getXmltag()
          Returns the XML element name of Variable, i. e.
 void setId(Id id)
          Sets the Id (value of the 'idref' attribute).
 void setName(java.lang.String name)
          Sets the value of the 'name' attribute.
 void setText(java.lang.String text)
          Sets the text (PCDATA in XML).
 java.lang.String toString()
          Returns a recursively created XML representation of this Variable.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Variable

public Variable(java.lang.String name,
                Id id)
Default constructor that takes the value of the 'name' attribute and the Id (value of the 'idref' attribute) as arguments.

Parameters:
name -
id -
Method Detail

getId

public Id getId()
Returns the Id (value of the 'idref' attribute).

Returns:
the id

getName

public java.lang.String getName()
Returns the value of the 'name' attribute.

Returns:
the name

getText

public java.lang.String getText()
Returns the text (PCDATA in XML).

Returns:
the text

getXmltag

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

Returns:
the xmltag

setId

public void setId(Id id)
Sets the Id (value of the 'idref' attribute).

Parameters:
id - the id to set

setName

public void setName(java.lang.String name)
Sets the value of the 'name' attribute.

Parameters:
name - the name to set

setText

public void setText(java.lang.String text)
Sets the text (PCDATA in XML).

Parameters:
text - the text to set

toString

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

Overrides:
toString in class java.lang.Object