salsa.corpora.elements
Class Corpus

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

public class Corpus
extends java.lang.Object

Represents a corpus in the SalsaXML format.

Author:
Fabian Shirokov

Constructor Summary
Corpus(java.lang.String corpusname, java.lang.String target)
          Default constructor that takes the name of the corpus and its target as arguments.
 
Method Summary
 Body getBody()
          Returns the Body of this Corpus.
 java.lang.String getCorpusname()
          Returns the name of this Corpus, e. g.
 Head getHead()
          Returns the Head of this Corpus.
 java.lang.String getTarget()
          Returns the target of this Corpus, e. g.
static java.lang.String getXmltag()
          Returns the name of the XML element of the Corpus class, i. e.
 void setBody(Body body)
          Sets the Body of this Corpus.
 void setCorpusname(java.lang.String corpusname)
          Sets the name of the Corpus.
 void setHead(Head head)
          Sets the Head of this Corpus.
 void setTarget(java.lang.String target)
          Sets the target of this Corpus.
 java.lang.String toString()
          Returns a recursively created XML representation of a SALSA corpus, including the header <?
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Corpus

public Corpus(java.lang.String corpusname,
              java.lang.String target)
Default constructor that takes the name of the corpus and its target as arguments.

Parameters:
corpusname -
target -
Method Detail

getBody

public Body getBody()
Returns the Body of this Corpus. null is returned if no Body has been set.

Returns:
the body

getCorpusname

public java.lang.String getCorpusname()
Returns the name of this Corpus, e. g. 'TIGER-Gesamt-Juli03'

Returns:

getHead

public Head getHead()
Returns the Head of this Corpus. null is returned if no Head has been set.

Returns:
the head

getTarget

public java.lang.String getTarget()
Returns the target of this Corpus, e. g. 'gehen'.

Returns:

getXmltag

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

Returns:
the xmltag

setBody

public void setBody(Body body)
Sets the Body of this Corpus.

Parameters:
body - the body to set

setCorpusname

public void setCorpusname(java.lang.String corpusname)
Sets the name of the Corpus.

Parameters:
corpusname - the corpusname to set

setHead

public void setHead(Head head)
Sets the Head of this Corpus.

Parameters:
head - the head to set

setTarget

public void setTarget(java.lang.String target)
Sets the target of this Corpus.

Parameters:
target - the target to set

toString

public java.lang.String toString()
Returns a recursively created XML representation of a SALSA corpus, including the header <?xml version="1.0" encoding="UTF-8"?>

Overrides:
toString in class java.lang.Object