Linkable.API
Class Reference
java.lang.Object
|
+--Linkable.API.Reference
- public class Reference
- extends java.lang.Object
This class encapsulates a single reference in a given document.
Usually this class is instantiated once sufficient bibliographic
data has been extracted from a reference string. Instances of
this class make up the Reference[] array that is part of the local
data within a Surrogate object.
Method Summary |
Context[] |
getContexts()
returns a copy of the Contexts in which this reference occurred |
Creation |
getDocID()
returns the Creation (i.e. |
java.lang.String |
getLiteral()
getLiteral - return the literal |
java.lang.String |
getTag()
|
private java.lang.String |
listContexts(java.lang.String pad)
|
protected static Reference |
reconstruct(org.w3c.dom.Document doc)
Returns one specified reference from the DOM tree given it. |
protected static Reference[] |
reconstruct(java.lang.String filename)
Reconstructs an entire reference list from inside a saved Surrogate. |
protected void |
save(java.lang.String doi)
|
java.lang.String |
toString()
|
java.lang.String |
toXML(java.lang.String pad)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
ME
private static final java.lang.String ME
DEBUG
private static final boolean DEBUG
referenceData
private Creation referenceData
ordinalNumber
private int ordinalNumber
origRef
private java.lang.String origRef
context
private Context[] context
tag
private java.lang.String tag
Reference
public Reference(Creation bd,
int n,
java.lang.String _tag,
java.lang.String ref,
Context[] c)
throws SurrogateException
getDocID
public Creation getDocID()
- returns the Creation (i.e. doc id) of this reference
getTag
public java.lang.String getTag()
getContexts
public Context[] getContexts()
- returns a copy of the Contexts in which this reference occurred
getLiteral
public java.lang.String getLiteral()
- getLiteral - return the literal
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toXML
public java.lang.String toXML(java.lang.String pad)
save
protected void save(java.lang.String doi)
reconstruct
protected static Reference reconstruct(org.w3c.dom.Document doc)
- Returns one specified reference from the DOM tree given it.
The DOM tree corresponds to a Surrogate/refList file.
- Parameters:
Document
- for the fileindex
- of which reference is desired
reconstruct
protected static Reference[] reconstruct(java.lang.String filename)
throws SurrogateException
- Reconstructs an entire reference list from inside a saved Surrogate.
- Parameters:
Name
- of the refList file that contains the info
listContexts
private java.lang.String listContexts(java.lang.String pad)