salsa.corpora.elements
Class Feature

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

public class Feature
extends java.lang.Object

Represents a 'feature' in a SalsaXML corpus.

Author:
Fabian Shirokov

Constructor Summary
Feature(java.lang.String domain, java.lang.String name)
          Default constructor that takes the domain and the name of this Feature.
 
Method Summary
 void addValue(Value newValue)
          Adds a new Value to this Feature.
 java.lang.String getDomain()
          Returns the domain of this Feature.
 java.lang.String getName()
          Returns the name of this Feature.
 java.util.ArrayList<Value> getValues()
          Returns the list of Value elements of this Feature.
static java.lang.String getXmltag()
          Return the name of the XML element of Feature, i. e.
 void setDomain(java.lang.String domain)
          Sets the domain.
 void setName(java.lang.String name)
          Sets the name of this Feature.
 java.lang.String toString()
          Returns a recursively created XML representation of Feature.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Feature

public Feature(java.lang.String domain,
               java.lang.String name)
Default constructor that takes the domain and the name of this Feature.

Parameters:
domain -
name -
Method Detail

addValue

public void addValue(Value newValue)
Adds a new Value to this Feature.

Parameters:
newValue -

getDomain

public java.lang.String getDomain()
Returns the domain of this Feature.

Returns:
the domain

getName

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

Returns:
the name

getValues

public java.util.ArrayList<Value> getValues()
Returns the list of Value elements of this Feature.

Returns:
the values

getXmltag

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

Returns:
the xmltag

setDomain

public void setDomain(java.lang.String domain)
Sets the domain.

Parameters:
domain - the domain to set

setName

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

Parameters:
name - the name to set

toString

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

Overrides:
toString in class java.lang.Object