Class GAbstract

java.lang.Object
  extended by GAbstract

public class GAbstract
extends java.lang.Object

Class to hold GEvents, GSentences, sentence counter and a hash table over terms.

See Also:
GEvent, GSentence, Hashtable

Field Summary
 java.util.ArrayList<GEvent> Gevents
           
 java.util.ArrayList<GSentence> Gsentences
           
 java.util.Hashtable<java.lang.String,java.lang.String> ht_lex
           
 java.util.Hashtable<java.lang.String,java.lang.String> ht_sem
           
 java.lang.String PMID
           
 int sentence_counter
           
 
Constructor Summary
GAbstract()
          This class does not need anything to be instantiated.
 
Method Summary
 void addEvent(GEvent ge)
          Adding an event to the array of events, and setting this abstract as parent for the GEvent.
 void addSentence(GSentence gs)
          Adding asentence to the array of sentences and incrementing the counter.
 void buildTerms()
          Traverses the list of Terms in each Sentence, and adds key,value-pair to this abstracts hashtable.
 int countEvents()
          Returns the size of this abstracts event array.
 int countSentences()
          Returns the number of sentences in this abstract.
 java.util.ArrayList getEvents()
          Returns this abstracts list of events.
 java.lang.String getEventTheme(java.lang.String eventID)
          Get the theme of an event, given it's PMID.
 java.lang.String getEventType(java.lang.String eventID)
          Get the type of an event, given it's PMID.
 java.util.ArrayList getSentences()
          Get the sentences in this abstract.
 void hello()
          Method to echo the contents of this abstract to stdout.
 java.lang.String resolveReference(java.lang.String ref)
          Find the most likely resolve of a reference (term, event theme or semantic expression in prioritized sequence)
 java.lang.String resolveTermLex(java.lang.String term)
          Tries to look up the lexical interpretation of a term code in this abstracts hashtable.
 void setPMID(java.lang.String s)
          Setting the unique medline identification number for this abstract.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PMID

public java.lang.String PMID

Gevents

public java.util.ArrayList<GEvent> Gevents

Gsentences

public java.util.ArrayList<GSentence> Gsentences

ht_lex

public java.util.Hashtable<java.lang.String,java.lang.String> ht_lex

ht_sem

public java.util.Hashtable<java.lang.String,java.lang.String> ht_sem

sentence_counter

public int sentence_counter
Constructor Detail

GAbstract

public GAbstract()
This class does not need anything to be instantiated.

Method Detail

addSentence

public void addSentence(GSentence gs)
Adding asentence to the array of sentences and incrementing the counter.

Parameters:
gs - The GSentence to be added

addEvent

public void addEvent(GEvent ge)
Adding an event to the array of events, and setting this abstract as parent for the GEvent.

Parameters:
ge - The event to be added

setPMID

public void setPMID(java.lang.String s)
Setting the unique medline identification number for this abstract.

Parameters:
s - the Medline IDentificator

countEvents

public int countEvents()
Returns the size of this abstracts event array.

Returns:
the number of events in this abstract

countSentences

public int countSentences()
Returns the number of sentences in this abstract.

Returns:
number of sentences in this abstract.

resolveTermLex

public java.lang.String resolveTermLex(java.lang.String term)
Tries to look up the lexical interpretation of a term code in this abstracts hashtable.

Parameters:
term - the term to be looked up
Returns:
the lexical representation for this term

buildTerms

public void buildTerms()
Traverses the list of Terms in each Sentence, and adds key,value-pair to this abstracts hashtable. It also calls resolveTermPermanent() on each GEvent.


getEvents

public java.util.ArrayList getEvents()
Returns this abstracts list of events. ®return an arraylist of events


getEventTheme

public java.lang.String getEventTheme(java.lang.String eventID)
Get the theme of an event, given it's PMID. If the PMID does not exist, it returns null.

Parameters:
eventID - the unique identification number for this event
Returns:
theme of the event or null

getEventType

public java.lang.String getEventType(java.lang.String eventID)
Get the type of an event, given it's PMID. If the PMID does not exist, it returns null.

Parameters:
eventID - the unique identification number for this event
Returns:
type of the event or null

getSentences

public java.util.ArrayList getSentences()
Get the sentences in this abstract.

Returns:
the sentences in this abstract

hello

public void hello()
Method to echo the contents of this abstract to stdout.


resolveReference

public java.lang.String resolveReference(java.lang.String ref)
Find the most likely resolve of a reference (term, event theme or semantic expression in prioritized sequence)

Parameters:
ref - the reference value
Returns:
the resolved reference or null