salsa.corpora.elements
Class Target

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

public class Target
extends java.lang.Object

Represents the 'target' section in a SalsaXML corpus.

Author:
Fabian Shirokov

Constructor Summary
Target()
          Zero-argumented constructor.
Target(java.lang.String lemma)
          Default constructor that takes the value of the 'lemma' attribute as an argument.
 
Method Summary
 void addFenode(Fenode newFenode)
          Adds a new Fenode to this Target.
 java.util.ArrayList<Fenode> getFenodes()
          Returns the list of Fenode elements of this Target.
 java.lang.String getHeadlemma()
          Returns the headlemma.
 Id getId()
          Returns the Id of this Target.
 java.lang.String getLemma()
          Returns the lemma.
static java.lang.String getXmltag()
          Returns the XML element name of Target, i. e.
 void setHeadlemma(java.lang.String headlemma)
          Sets the headlemma.
 void setId(Id id)
          Sets the Id of this target.
 void setLemma(java.lang.String lemma)
          Sets the lemma.
 java.lang.String toString()
          Returns a recursively created XML representation of this Target.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Target

public Target()
Zero-argumented constructor. According to the SalsaXML.dtd each 'target' element is required to have a 'lemma' attribute, but there are corpora that do not conform to this rule.


Target

public Target(java.lang.String lemma)
Default constructor that takes the value of the 'lemma' attribute as an argument.

Parameters:
lemma -
Method Detail

addFenode

public void addFenode(Fenode newFenode)
Adds a new Fenode to this Target.


getFenodes

public java.util.ArrayList<Fenode> getFenodes()
Returns the list of Fenode elements of this Target.

Returns:
the fenodes

getHeadlemma

public java.lang.String getHeadlemma()
Returns the headlemma.

Returns:
the headlemma

getId

public Id getId()
Returns the Id of this Target.

Returns:
the id

getLemma

public java.lang.String getLemma()
Returns the lemma.

Returns:
the lemma

getXmltag

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

Returns:
the xmltag

setHeadlemma

public void setHeadlemma(java.lang.String headlemma)
Sets the headlemma.

Parameters:
headlemma - the headlemma to set

setId

public void setId(Id id)
Sets the Id of this target.

Parameters:
id - the id to set

setLemma

public void setLemma(java.lang.String lemma)
Sets the lemma.

Parameters:
lemma - the lemma to set

toString

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

Overrides:
toString in class java.lang.Object