|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Linkable.API.Creation
The Creation object represents a single work, in the abstract sense. It contains the work's title, urn, authors, publication date, urls if any are known, and its DOI, if known. The database key is the urn.
Field Summary | |
private Author[] |
authors
|
private java.lang.String |
date
|
static boolean |
DEBUG
|
private java.util.Vector |
displayID
|
private java.lang.String |
doi
|
private boolean |
hasURN
|
int |
iExtended
|
static java.lang.String |
ME
|
private java.lang.String |
myURN
|
private java.lang.String |
title
|
Constructor Summary | |
Creation()
Constructor |
|
Creation(java.lang.String docURN)
Constructor |
Method Summary | |
void |
addAuthor(Author a)
addAuthor - appends this Author object to the list of authors for this work. |
protected static Creation |
doWork(org.w3c.dom.Node work)
Reconstructs a Creation out of XML DOM tree with root |
boolean |
equals(Creation c)
returns true if the specified creation is consistent with this one. |
boolean |
extendUrn()
returns true if this URN is synthetic and another title word could be appended to it for uniqueness |
protected static java.util.Vector |
fetchURN(java.lang.String urn)
fetchURN returns a vector of creations that might match this name |
protected static java.util.Vector |
fetchURN(java.lang.String author,
java.lang.String date,
java.lang.String title)
fetchURN - given an author, date (year), and title, return zero or more Creations from the database. |
Author[] |
getAuthors()
|
java.lang.String |
getDate()
|
java.lang.String |
getDoi()
|
java.lang.String |
getFirstAuthorLastName()
|
java.lang.String |
getTitle()
|
java.lang.String[] |
getURLs()
get URLs - returns a String[] array which contains all the currently known URLs for this work; initially it is the archive's display ID, if known. |
java.lang.String |
getURN()
get URN - returns a URN, either synthetic of DOI, for this work |
private boolean |
merge(Creation c)
Merge this creation with the given one. |
static Creation |
reconstruct(java.lang.String doi,
java.lang.String urn)
Reconstructs a Creation object from XML data stored in files. |
protected void |
save(java.lang.String doi)
|
void |
setAuthors(Author[] alist)
sets the entire author list |
void |
setDate(java.lang.String s)
defines the publication date for this Creation object |
void |
setDisplayID(java.lang.String url)
adds a url to this work's display list |
void |
setDoi(java.lang.String d)
sets the DOI for this work |
void |
setTitle(java.lang.String s)
sets the title for this work |
void |
setUrn(java.lang.String u)
sets the URN for this work |
static java.lang.String |
synthesizeURN(java.lang.String author,
java.lang.String date,
java.lang.String title)
synthesizeURN - this is THE single place in the entire system where document ID's are synthesized. |
java.lang.String |
toString()
see toXML |
java.lang.String |
toXML(java.lang.String pad)
returns DublinCore XML string for this creation - we don't know displayID? However, if this Creation corresponds to an archive item that is being analyzed, then we should know that one URL. |
java.lang.String |
toXML(java.lang.String pad,
java.lang.String id)
like toXML, but adds an "id" attribute to the |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final java.lang.String ME
public static boolean DEBUG
private java.lang.String myURN
private java.lang.String title
private Author[] authors
private java.lang.String date
private boolean hasURN
private java.util.Vector displayID
private java.lang.String doi
public int iExtended
Constructor Detail |
public Creation()
public Creation(java.lang.String docURN)
String
- giving the document's URNMethod Detail |
public void setDisplayID(java.lang.String url)
the
- url, as a String http://public void setDoi(java.lang.String d)
the
- DOI, as a String (without the "doi:" prefix)public void setUrn(java.lang.String u)
the
- URN, as a String (without the "urn:" prefix).
The URN is currently author+year+title (see synthesizeURN)public void setTitle(java.lang.String s)
the
- title, as a Stringpublic void addAuthor(Author a)
the
- Author to be added.public void setAuthors(Author[] alist)
the
- array of Author objects to be stored in this Creation
object. This is assigned by reference, so it is possible to
change the Author list elsewhere in the system, behind the
Creation's back.public void setDate(java.lang.String s)
The
- date, in yyyy-mm-dd format.public java.lang.String getURN()
public java.lang.String getTitle()
public java.lang.String getDate()
public Author[] getAuthors()
public java.lang.String getFirstAuthorLastName()
public static java.lang.String synthesizeURN(java.lang.String author, java.lang.String date, java.lang.String title)
author
- is the first author's last namedate
- is the date in oams format: yyyy-mm-dd or just the yeartitle
- is the String containing the complete titlepublic java.lang.String[] getURLs()
public java.lang.String getDoi()
public boolean equals(Creation c)
-
- the Creation object to be matched
returns boolean if the Creations were the same or consistentpublic boolean extendUrn()
public static Creation reconstruct(java.lang.String doi, java.lang.String urn)
String
- that is the "DOI" for the surrogate who knows about this
Creationint
- that is 0 if the creation corresponds to the DOI itself,
or i>0 for the i-th reference in the DOI SurrogateUrn
- that is requestiong this reconstruction (may be incomplete)protected static Creation doWork(org.w3c.dom.Node work)
The
- root of the public java.lang.String toXML(java.lang.String pad)
A
- string containing zero or more blanks to be used as a padpublic java.lang.String toXML(java.lang.String pad, java.lang.String id)
pad,
- passed on to vanilla toXMLthe
- id, which could be a repository name and idpublic java.lang.String toString()
toString
in class java.lang.Object
protected void save(java.lang.String doi)
protected static java.util.Vector fetchURN(java.lang.String author, java.lang.String date, java.lang.String title)
author
- is the first author's last namedate
- is the date in oams format: yyyy-mm-dd or just the yeartitle
- is the String containing the complete titleprotected static java.util.Vector fetchURN(java.lang.String urn)
String
- that is a synthetic URNprivate boolean merge(Creation c)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |