chemaxon.naming
Class DocumentExtractor.Hit

java.lang.Object
  extended by chemaxon.naming.DocumentExtractor.Hit
Enclosing class:
DocumentExtractor

public class DocumentExtractor.Hit
extends java.lang.Object

An occurrence of a chemical name in the processed document.

Author:
Daniel Bonniot

Field Summary
 int position
          Character offset of the name in the document (base 1).
 Molecule structure
          The chemical structure corresponding to the name.
 java.lang.String text
          The structure's name occurring in the document.
 
Method Summary
 int[] getAllPositions()
           
 int getPageNumber()
          For document formats that have a notion of page (for instance PDF), this method returns the page the hit occurs on.
 java.lang.String getPositionsString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

text

public final java.lang.String text
The structure's name occurring in the document.


structure

public final Molecule structure
The chemical structure corresponding to the name. structure.getName() will return the OCR corrected version of text.


position

public final int position
Character offset of the name in the document (base 1).

Method Detail

getAllPositions

public final int[] getAllPositions()

getPositionsString

public java.lang.String getPositionsString()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPageNumber

public int getPageNumber()
For document formats that have a notion of page (for instance PDF), this method returns the page the hit occurs on.

Returns:
the number of the page this hit occurs on, or -1 if unknown.