salsa.corpora.noelement
Class Id

java.lang.Object
  extended by salsa.corpora.noelement.Id

public class Id
extends java.lang.Object

This class represents an 'id' or 'idref' in the salsa corpora. It overwrites the equals() and the getHash() method so that two Id objects are the same if they have the same id.

Author:
Fabian Shirokov

Constructor Summary
Id(java.lang.String id)
          Default constructor that takes the id as an argument.
Id(java.lang.String id, boolean isTerminal)
          Constructor that takes the id and isTerminal as an argument.
 
Method Summary
 java.lang.String getId()
          Returns the id.
 boolean getIsTerminal()
          Returns true if this Id belongs to a terminal node in the given corpus.
 void setId(java.lang.String id)
          Sets the id.
 void setIsTerminal(boolean isTerminal)
          Set isTerminal to true if this Id belongs to a terminal node in the given corpus.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Id

public Id(java.lang.String id)
Default constructor that takes the id as an argument.

Parameters:
id -

Id

public Id(java.lang.String id,
          boolean isTerminal)
Constructor that takes the id and isTerminal as an argument. Set isTerminal to false if this Id belongs to a nonterminal in the corpus.

Parameters:
id -
Method Detail

getId

public java.lang.String getId()
Returns the id.

Returns:

getIsTerminal

public boolean getIsTerminal()
Returns true if this Id belongs to a terminal node in the given corpus.

Returns:

setId

public void setId(java.lang.String id)
Sets the id.


setIsTerminal

public void setIsTerminal(boolean isTerminal)
Set isTerminal to true if this Id belongs to a terminal node in the given corpus.

Parameters:
isTerminal -