Linkable.Analysis
Class ReferenceSection

java.lang.Object
  |
  +--Linkable.Analysis.ReferenceSection

public class ReferenceSection
extends java.lang.Object


Field Summary
private  int anchorIndex
           
private  java.lang.String[][] anchors
           
private  int contextHint
           
private  Context[] contexts
           
private static boolean DEBUG
           
private  boolean generatingOrdinals
           
private  int hint
           
private  java.lang.String[] inverted
           
private static java.lang.String ME
           
private  int n
           
private static int NULL
           
private static int NUMERALS
           
private  int ord
           
private  java.lang.String reference
           
private  java.util.Vector w
           
 
Constructor Summary
protected ReferenceSection()
          default constructor
 
Method Summary
protected  void addText(java.lang.String textString)
          addText appends a hunk of text to the reference being accrued
protected  Reference[] buildRefList(java.lang.String sourceURN, java.util.Vector contextTrees)
          Extracts the list of References held in this ReferenceSection object.
protected  void endText()
          endText() is called when one complete reference string has been handed to this object via (perhaps repeated) calls to addText();
private  java.lang.String findAnchor(java.lang.String listOfAnchors, int j)
           
protected  void generateOrdinals()
          generateOrdinals The parser has discovered that references are having their tags generated by list macros.
private static boolean isRefSection(java.lang.String text)
           
protected static boolean isRefSectionHeader(java.lang.String textString)
          isRefSectionHeader checks for reference section header.
private  void massageContexts(java.util.Vector contextTrees)
          extracts information from the sentences saved in "contextTrees".
private static boolean notAllDigits(java.lang.String tag)
          Determine whether a tag is all digits or not.
protected  int refCount()
          refCount returns the number of references collected so far
private  int tagIsIn(java.lang.String refString, java.lang.String tag, java.lang.String contextLinks)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

ME

private static final java.lang.String ME

DEBUG

private static final boolean DEBUG

hint

private int hint

contextHint

private int contextHint

NULL

private static final int NULL

NUMERALS

private static final int NUMERALS

w

private java.util.Vector w

inverted

private java.lang.String[] inverted

anchors

private java.lang.String[][] anchors

contexts

private Context[] contexts

reference

private java.lang.String reference

n

private int n

ord

private int ord

generatingOrdinals

private boolean generatingOrdinals

anchorIndex

private int anchorIndex
Constructor Detail

ReferenceSection

protected ReferenceSection()
default constructor
Method Detail

generateOrdinals

protected void generateOrdinals()
generateOrdinals The parser has discovered that references are having their tags generated by list macros. This procedure is called to get generation of ordinals turned on.

addText

protected void addText(java.lang.String textString)
addText appends a hunk of text to the reference being accrued
Parameters:
The - text to be added (an unmarked-up String)

endText

protected void endText()
endText() is called when one complete reference string has been handed to this object via (perhaps repeated) calls to addText();

buildRefList

protected Reference[] buildRefList(java.lang.String sourceURN,
                                   java.util.Vector contextTrees)
Extracts the list of References held in this ReferenceSection object.
Parameters:
URN - of the item for which this is the Reference Section
contextTrees - is a Vector of SentenceTrees that contained reference normalizations within the text of this document. If it is null, none of the Reference objects will have any context, which means they weren't references after all, probably.

refCount

protected int refCount()
refCount returns the number of references collected so far

isRefSectionHeader

protected static boolean isRefSectionHeader(java.lang.String textString)
isRefSectionHeader checks for reference section header.
Parameters:
A - String of text, trimmed, that should be a header

findAnchor

private java.lang.String findAnchor(java.lang.String listOfAnchors,
                                    int j)

tagIsIn

private int tagIsIn(java.lang.String refString,
                    java.lang.String tag,
                    java.lang.String contextLinks)

massageContexts

private void massageContexts(java.util.Vector contextTrees)
extracts information from the sentences saved in "contextTrees".
Parameters:
The - context sentences found while scanning the text. Note: these global variables become defined as a result of massageContexts: anchors - the array is allocated, one row per context Then each row is filled in with String[] sentence.getAnchors inverted[i] set to "References in this context: [ref1][ref2]..." for the i-th context

notAllDigits

private static boolean notAllDigits(java.lang.String tag)
Determine whether a tag is all digits or not.
Parameters:
is - the tag (a String)

isRefSection

private static boolean isRefSection(java.lang.String text)