org.eml.sir.gn
Class Synset

java.lang.Object
  extended byorg.eml.sir.gn.Synset
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class Synset
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Class representing a synset.

Version:
0.3
Author:
Hendrik Niederlich (EML-R)
See Also:
Serialized Form

Constructor Summary
Synset()
          Create a new instance of Synset.
 
Method Summary
 boolean addAssociation(Synset association)
          Add a association to the list of associations of this Synset.
 boolean addCausation(Synset causation)
          Add a causation to the list of causations of this Synset.
 boolean addEntailment(Synset entailment)
          Add a entailment to the list of entailments of this Synset.
 boolean addHolonym(Synset holonym)
          Add a holonym to the list of holonyms of this Synset.
 boolean addHyperonym(Synset hyperonym)
          Add a hyperonym to the list of hyperonyms of this Synset.
 boolean addHyponym(Synset hyponym)
          Add a hyponym to the list of hyponyms of this Synset.
 boolean addMeronym(Synset meronym)
          Add a meronym to the list of meronyms of this Synset.
 boolean addWordSense(WordSense wordsense)
          Add a WordSense to the list of WordSenses of this Synset.
 int compareTo(java.lang.Object otherSynset)
          Return a number representing the difference between this and an other synset.
 boolean equals(java.lang.Object otherSynset)
          Return wether this Synset is the same as the other one.
 java.util.ArrayList getAssociations()
          Get all associations of this Synset.
 java.util.ArrayList getCausations()
          Get all causations of this Synset.
 java.util.ArrayList getEntailments()
          Get Synsets that entail this Synset.
 java.util.ArrayList getHolonyms()
          Get all holonyms of this Synset.
 java.util.ArrayList getHyperonyms()
          Get all hyperonyms of this Synset.
 java.util.ArrayList getHyponyms()
          Get all hyponyms of this Synset.
 java.util.ArrayList getMeronyms()
          Get all meronyms of this Synset.
 char getPartOfSpeech()
          Return the part of speech of this Synset.
 java.util.ArrayList getWordSenses()
          Get all WordSenses that depend on this Synset.
 void printInfo()
          Prints a lot of information about this Synset in the standard output stream.
 void setAssociations(java.util.ArrayList associations)
          Set the associations of this Synset.
 void setCausations(java.util.ArrayList causations)
          Set the causations of this Synset.
 void setEntailments(java.util.ArrayList entailments)
          Set the Synsets that entail this Synset.
 void setHolonyms(java.util.ArrayList holonyms)
          Set the holonyms of this Synset.
 void setHyperonyms(java.util.ArrayList hyperonyms)
          Set the hyperonyms of this Synset.
 void setHyponyms(java.util.ArrayList hyponyms)
          Set the hyponyms of this Synset.
 void setMeronyms(java.util.ArrayList meronyms)
          Set the meronyms of this Synset.
 void setPartOfSpeech(char pos)
          Set the part of speech of this Synset.
 void setWordSenses(java.util.ArrayList wordSenses)
          Set the WordSenses that depend on this Synset.
 java.lang.String toAssociationsString()
          Return a string that contains the graphemic representations of the WordSenses of the hyperonyms of this Synset.
 java.lang.String toCausationsString()
          Return a string that contains the graphemic representations of the WordSenses of the causations of this Synset.
 java.lang.String toEntailmentsString()
          Return a string that contains the graphemic representations of the WordSenses of the entailments of this Synset.
 java.lang.String toHolonymsString()
          Return a string that contains the graphemic representations of the WordSenses of the holonyms of this Synset.
 java.lang.String toHyperonymsString()
          Return a string that contains the graphemic representations of the WordSenses of the hyperonyms of this Synset.
 java.lang.String toHyponymsString()
          Return a string that contains the graphemic representations of the WordSenses of the hyponyms of this Synset.
 java.lang.String toLexemeString()
          Return a string that contains the graphemic representations of the WordSenses of this Synset.
 java.lang.String toMeronymsString()
          Return a string that contains the graphemic representations of the WordSenses of the meronyms of this Synset.
 java.lang.String toString()
          Return a string representation of this Synset.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Synset

public Synset()
Create a new instance of Synset.

Method Detail

getWordSenses

public java.util.ArrayList getWordSenses()
Get all WordSenses that depend on this Synset.

Returns:
An ArrayList of WordSenses. Or null if no WordSenses exist.

setWordSenses

public void setWordSenses(java.util.ArrayList wordSenses)
Set the WordSenses that depend on this Synset.

Parameters:
wordSenses - An ArrayList of WordSenses.

addWordSense

public boolean addWordSense(WordSense wordsense)
Add a WordSense to the list of WordSenses of this Synset.

Returns:
Wether the addition of the WordSense was successfull.

getHyperonyms

public java.util.ArrayList getHyperonyms()
Get all hyperonyms of this Synset.

Returns:
An ArrayList of Synsets or null if this Synset has no hyperonym.

setHyperonyms

public void setHyperonyms(java.util.ArrayList hyperonyms)
Set the hyperonyms of this Synset.

Parameters:
hyperonyms - An ArrayList of Synsets.

addHyperonym

public boolean addHyperonym(Synset hyperonym)
Add a hyperonym to the list of hyperonyms of this Synset.

Returns:
Wether the addition of the hyperonym was successfull.

getHyponyms

public java.util.ArrayList getHyponyms()
Get all hyponyms of this Synset.

Returns:
An ArrayList of Synsets or null if this Synset has no hyponym.

setHyponyms

public void setHyponyms(java.util.ArrayList hyponyms)
Set the hyponyms of this Synset.

Parameters:
hyponyms - An ArrayList of Synsets.

addHyponym

public boolean addHyponym(Synset hyponym)
Add a hyponym to the list of hyponyms of this Synset.

Returns:
Wether the addition of the hyponym was successfull.

getHolonyms

public java.util.ArrayList getHolonyms()
Get all holonyms of this Synset.

Returns:
An ArrayList of Synsets or null if this Synset has no holonym.

setHolonyms

public void setHolonyms(java.util.ArrayList holonyms)
Set the holonyms of this Synset.

Parameters:
holonyms - An ArrayList of Synsets.

addHolonym

public boolean addHolonym(Synset holonym)
Add a holonym to the list of holonyms of this Synset.

Returns:
Wether the addition of the holonym was successfull.

getMeronyms

public java.util.ArrayList getMeronyms()
Get all meronyms of this Synset.

Returns:
An ArrayList of Synsets or null if this Synset has no meronym.

setMeronyms

public void setMeronyms(java.util.ArrayList meronyms)
Set the meronyms of this Synset.

Parameters:
meronyms - An ArrayList of Synsets.

addMeronym

public boolean addMeronym(Synset meronym)
Add a meronym to the list of meronyms of this Synset.

Returns:
Wether the addition of the meronym was successfull.

getEntailments

public java.util.ArrayList getEntailments()
Get Synsets that entail this Synset.

Returns:
An ArrayList of Synsets or null if this Synset has no entailment.

setEntailments

public void setEntailments(java.util.ArrayList entailments)
Set the Synsets that entail this Synset.

Parameters:
entailments - An ArrayList of Synsets.

addEntailment

public boolean addEntailment(Synset entailment)
Add a entailment to the list of entailments of this Synset.

Returns:
Wether the addition of the entailment was successfull.

getCausations

public java.util.ArrayList getCausations()
Get all causations of this Synset.

Returns:
An ArrayList of Synsets or null if this Synset has no causation.

setCausations

public void setCausations(java.util.ArrayList causations)
Set the causations of this Synset.

Parameters:
causations - An ArrayList of Synsets.

addCausation

public boolean addCausation(Synset causation)
Add a causation to the list of causations of this Synset.

Returns:
Wether the addition of the causation was successfull.

getAssociations

public java.util.ArrayList getAssociations()
Get all associations of this Synset.

Returns:
An ArrayList of Synsets or null if this Synset has no association.

setAssociations

public void setAssociations(java.util.ArrayList associations)
Set the associations of this Synset.

Parameters:
associations - An ArrayList of Synsets.

addAssociation

public boolean addAssociation(Synset association)
Add a association to the list of associations of this Synset.

Returns:
Wether the addition of the association was successfull.

getPartOfSpeech

public char getPartOfSpeech()
Return the part of speech of this Synset.

Returns:
A char representing the part of speech. Use part of speech constants of the Constant class.

setPartOfSpeech

public void setPartOfSpeech(char pos)
Set the part of speech of this Synset.

Parameters:
pos - A char representing the part of speech. Use part of speech constants of the Constant class.

equals

public boolean equals(java.lang.Object otherSynset)
Return wether this Synset is the same as the other one. This is the case if they contain exactly the same WordSenses.


toString

public java.lang.String toString()
Return a string representation of this Synset.


toLexemeString

public java.lang.String toLexemeString()
Return a string that contains the graphemic representations of the WordSenses of this Synset.


toHyperonymsString

public java.lang.String toHyperonymsString()
Return a string that contains the graphemic representations of the WordSenses of the hyperonyms of this Synset.


toHyponymsString

public java.lang.String toHyponymsString()
Return a string that contains the graphemic representations of the WordSenses of the hyponyms of this Synset.


toHolonymsString

public java.lang.String toHolonymsString()
Return a string that contains the graphemic representations of the WordSenses of the holonyms of this Synset.


toMeronymsString

public java.lang.String toMeronymsString()
Return a string that contains the graphemic representations of the WordSenses of the meronyms of this Synset.


toEntailmentsString

public java.lang.String toEntailmentsString()
Return a string that contains the graphemic representations of the WordSenses of the entailments of this Synset.


toCausationsString

public java.lang.String toCausationsString()
Return a string that contains the graphemic representations of the WordSenses of the causations of this Synset.


toAssociationsString

public java.lang.String toAssociationsString()
Return a string that contains the graphemic representations of the WordSenses of the hyperonyms of this Synset.


compareTo

public int compareTo(java.lang.Object otherSynset)
Return a number representing the difference between this and an other synset.

Specified by:
compareTo in interface java.lang.Comparable

printInfo

public void printInfo()
Prints a lot of information about this Synset in the standard output stream.