Linkable.API
Class BibData
java.lang.Object
|
+--Linkable.API.BibData
- public class BibData
- extends java.lang.Object
This class represents an instance of a work. The primary job of this
class is to keep trans of work identification elements, such as its
DOI, synthetic URN, and most importantly, its "key" in the Creation
database, which should have a unique record for each work encountered.
Different BibData object instances may well point to the same Creation
record. Methods in this class are mainly construct, reconstruct, get
and put.
Constructor Summary |
BibData(java.lang.String DOI,
java.lang.String URN)
constructor
Creations can be made with or without its URN initialized
It is possible to set the URN later on. |
Method Summary |
void |
cook(java.lang.String mf)
cook - document has been parsed, and local text fragments are here |
java.lang.String |
dump()
|
Creation |
getCreation()
getCreation - table lookup to find URL and BibData |
java.lang.String |
getURN()
getURN - return the URN of the work associated with this surrogate |
protected void |
save(java.lang.String doi)
save - called by Surrogate to update CreationDatabase
with a fileIndex record. |
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
myDOI
private java.lang.String myDOI
myURN
private java.lang.String myURN
creationPointer
private Creation creationPointer
BibData
public BibData(java.lang.String DOI,
java.lang.String URN)
throws SurrogateException
- constructor
Creations can be made with or without its URN initialized
It is possible to set the URN later on. So, URN can be null.
Invariant: DOI != null because DOI points to where the repository is.
- Parameters:
The
- String which is the DOI for this article. May be our own
invention, but may not be null.An
- optional string containing the synthetic urn or partial
urns for a work. If a urn is provided, then there must be a record
in the database at that key. If the urn is null, then a dummy
creation is instantiated, to be filled in as the document is parsed.- Throws:
SurrogateException
-
getURN
public java.lang.String getURN()
- getURN - return the URN of the work associated with this surrogate
getCreation
public Creation getCreation()
- getCreation - table lookup to find URL and BibData
cook
public void cook(java.lang.String mf)
- cook - document has been parsed, and local text fragments are here
- Parameters:
-
- the String containing the local metadata. Cook it.
Upon return, the Author database will have been updated by this
items authors, and the creation database by the work in creationPointer
and this BibData object *will* have a URN.
toXML
public java.lang.String toXML(java.lang.String pad)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
save
protected void save(java.lang.String doi)
- save - called by Surrogate to update CreationDatabase
with a fileIndex record.
dump
public java.lang.String dump()