salsa.corpora.elements
Class Element

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

public class Element
extends java.lang.Object

Represents the 'element' section in SalsaXML corpora.

Author:
Fabian Shirokov

Constructor Summary
Element(java.lang.String name, java.lang.String optional)
          Default constructor that takes name (e. g.
 
Method Summary
 java.lang.String getName()
          Returns the name of this Element.
 java.lang.String getOptional()
          Returns the value of 'optional'.
static java.lang.String getXmltag()
          Returns the name of the XML element, i. e.
 void setName(java.lang.String name)
          Sets the name of this Element.
 void setOptional(java.lang.String optional)
          Sets the value of 'optional'.
 java.lang.String toString()
          Returns a recursively created XML representation of this Element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Element

public Element(java.lang.String name,
               java.lang.String optional)
Default constructor that takes name (e. g. 'Agent') and optional (e. g. 'true') as attributes.

Parameters:
corpusname -
target -
Method Detail

getName

public java.lang.String getName()
Returns the name of this Element.

Returns:
the name

getOptional

public java.lang.String getOptional()
Returns the value of 'optional'.

Returns:
the optional

getXmltag

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

Returns:
the xmltag

setName

public void setName(java.lang.String name)
Sets the name of this Element.

Parameters:
name - the name to set

setOptional

public void setOptional(java.lang.String optional)
Sets the value of 'optional'.

Parameters:
optional -

toString

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

Overrides:
toString in class java.lang.Object