kr.ac.kaist.swrc.jhannanum.comm
Class CommObject

java.lang.Object
  extended by kr.ac.kaist.swrc.jhannanum.comm.CommObject
Direct Known Subclasses:
PlainSentence, Sentence, SetOfSentences

public class CommObject
extends java.lang.Object

CommObject is used by a work flow and plug-ins that are expected to communicate with each other. This object contains the meta data of input documents and sentences. The input and output data types of HanNanum plug-ins such as PlainSentence, Sentence, and SetOfSentences inherit this class.

Author:
Sangwon Park (hudoni@world.kaist.ac.kr), CILab, SWRC, KAIST

Field Summary
private  int documentID
          ID of the document which this object belong to.
private  boolean endOfDocument
          Flag for notifying the end of document.
private  int sentenceID
          ID of the sentence which this object belong to.
 
Constructor Summary
CommObject()
           
 
Method Summary
 int getDocumentID()
          It returns the ID of the document which this object is belong to.
 int getSentenceID()
          Get the sentence ID for this object.
 boolean isEndOfDocument()
          It returns true when it is the last element of the document.
 void setDocumentID(int documentID)
          Set the document ID for this object.
 void setEndOfDocument(boolean endOfDocument)
          Set the end of document flag of this object.
 void setSentenceID(int sentenceID)
          Set the sentence ID for this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

documentID

private int documentID
ID of the document which this object belong to.


sentenceID

private int sentenceID
ID of the sentence which this object belong to.


endOfDocument

private boolean endOfDocument
Flag for notifying the end of document.

Constructor Detail

CommObject

public CommObject()
Method Detail

isEndOfDocument

public boolean isEndOfDocument()
It returns true when it is the last element of the document.

Returns:
true - when it is the end of document, otherwise false

setEndOfDocument

public void setEndOfDocument(boolean endOfDocument)
Set the end of document flag of this object.

Parameters:
endOfDocument - - true: when it is the end of document, otherwise false

getDocumentID

public int getDocumentID()
It returns the ID of the document which this object is belong to.

Returns:
documentID

setDocumentID

public void setDocumentID(int documentID)
Set the document ID for this object.

Parameters:
documentID -

getSentenceID

public int getSentenceID()
Get the sentence ID for this object.

Returns:
sentenceID

setSentenceID

public void setSentenceID(int sentenceID)
Set the sentence ID for this object.

Parameters:
sentenceID -