Package edu.ucsb.nceas.metacat
Class DocumentIdentifier
java.lang.Object
edu.ucsb.nceas.metacat.DocumentIdentifier
A class to parse document ids
The docid is of the form siteCode.uniqueId.rev
-
Constructor Summary
ConstructorDescriptionDocumentIdentifier
(String docid) Constructor to build a docid object and parse an incoming string. -
Method Summary
Modifier and TypeMethodDescriptionreturnsgetRev()
returns the revision number encoded in this docidreturns the separator used in the accession numberreturns the siteCode encoded in this docidreturns the uniqueId encoded in this docidstatic void
Test driver.toString()
returns the whole docid as a string
-
Constructor Details
-
DocumentIdentifier
Constructor to build a docid object and parse an incoming string.- Throws:
AccessionNumberException
-
-
Method Details
-
getRev
returns the revision number encoded in this docid -
getUniqueId
returns the uniqueId encoded in this docid -
getSiteCode
returns the siteCode encoded in this docid -
getSeparator
returns the separator used in the accession number -
getIdentifier
returns -
toString
returns the whole docid as a string -
main
Test driver. The first command line argument is the docid you want to create an object for. For instance ">java DocumentIdentifer nceas.1.2" will return "rev: 2 \n uniqueId: 1 \n siteCode: nceas \n"
-