Textractor API textractor-720 (20091120123250)

textractor.datamodel.annotation
Class DoubleTermAnnotation

java.lang.Object
  extended by textractor.datamodel.annotation.TextFragmentAnnotation
      extended by textractor.datamodel.annotation.DoubleTermAnnotation
All Implemented Interfaces:
AnnotationSource

public final class DoubleTermAnnotation
extends TextFragmentAnnotation

Stores two annotations about a text fragment. Annotations are produced by humans and entered into the database. This class supports this _process. example: --- 1 --- A|B:interaction|bind < enter ...

Created by IntelliJ IDEA. User: lshi Date: Apr 6, 2004 Time: 11:20:13 AM To change this template use File | Settings | File Templates.


Field Summary
static String ANNOTATION_BIND
           
static String ANNOTATION_PHOSPHORYLATE
           
static int INT_ANNOTATION_BIND
           
static int INT_ANNOTATION_PHOSPHORYLATE
           
static Collection<String> isOneDirection
           
static int TERMA_NUMBER
           
static int TERMB_NUMBER
           
 
Fields inherited from interface textractor.datamodel.annotation.AnnotationSource
FIRST_TERM, SECOND_TERM
 
Constructor Summary
DoubleTermAnnotation()
          Creates a new Double Term Annotation.
DoubleTermAnnotation(int annotationBatch, int annotationNumber)
           
 
Method Summary
 Object2IntMap<String> getAnnotationMap()
           
 int getCenterPosition()
          Calculates and returns the center of the terms described in this annotation.
 String getStringType()
          Returns the type of this annotation as a String.
 AnnotatedTerm getTerm(int index)
          Returns one of the terms that are the focus of this annotation.
 AnnotatedTerm getTermA()
           
 AnnotatedTerm getTermB()
           
 AnnotatedTerm getTermByNumber(int termNumber)
           
 int getTermNumber()
          Returns the number of terms in this annotation.
 void switchTerms()
           
 
Methods inherited from class textractor.datamodel.annotation.TextFragmentAnnotation
createAnnotatedTerm, createIndexedTerms, getAnnotation, getAnnotationBatchNumber, getAnnotationNumber, getBooleanAnnotation, getBooleanAnnotation, getCurrentText, getIndexedTerms, getIsSingleTerm, getSentence, getSpaceDelimitedIndexFormatTerms, isAnnotationImported, isSet, isUseSentenceText, setAnnotation, setAnnotation, setAnnotationImported, setCurrentText, setIndexedTerms, setIsSingleTerm, setSentence, setUseSentenceText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TERMA_NUMBER

public static final int TERMA_NUMBER
See Also:
Constant Field Values

TERMB_NUMBER

public static final int TERMB_NUMBER
See Also:
Constant Field Values

ANNOTATION_BIND

public static final String ANNOTATION_BIND
See Also:
Constant Field Values

ANNOTATION_PHOSPHORYLATE

public static final String ANNOTATION_PHOSPHORYLATE
See Also:
Constant Field Values

INT_ANNOTATION_BIND

public static final int INT_ANNOTATION_BIND
See Also:
Constant Field Values

INT_ANNOTATION_PHOSPHORYLATE

public static final int INT_ANNOTATION_PHOSPHORYLATE
See Also:
Constant Field Values

isOneDirection

public static final Collection<String> isOneDirection
Constructor Detail

DoubleTermAnnotation

public DoubleTermAnnotation()
Creates a new Double Term Annotation.


DoubleTermAnnotation

public DoubleTermAnnotation(int annotationBatch,
                            int annotationNumber)
Method Detail

getStringType

public String getStringType()
Description copied from class: TextFragmentAnnotation
Returns the type of this annotation as a String. returns protein for SingleTermAnnotations when the term is annotated as a protein, mutation when the term is annotated as a mutation.

Specified by:
getStringType in class TextFragmentAnnotation
Returns:
The type of this annotation

getCenterPosition

public int getCenterPosition()
Calculates and returns the center of the terms described in this annotation. For double term annotations, the center is in the middle of the position of the two terms.

Returns:
The position of the "center" of this annotation.

getTerm

public AnnotatedTerm getTerm(int index)
Description copied from interface: AnnotationSource
Returns one of the terms that are the focus of this annotation.

Parameters:
index - Index of the term in this annotation.
Returns:
The term at this index in this annotation.

getTermNumber

public int getTermNumber()
Description copied from interface: AnnotationSource
Returns the number of terms in this annotation.

Returns:
the number of terms in this annotation.

getTermA

public AnnotatedTerm getTermA()

getTermB

public AnnotatedTerm getTermB()

getTermByNumber

public AnnotatedTerm getTermByNumber(int termNumber)

getAnnotationMap

public Object2IntMap<String> getAnnotationMap()
Specified by:
getAnnotationMap in class TextFragmentAnnotation

switchTerms

public void switchTerms()

Textractor API textractor-720 (20091120123250)

Copyright © 2003-2008 Institute for Computational Biomedicine, All Rights Reserved.