Package edu.ucsb.nceas.metacat
Class AccessionNumber
java.lang.Object
edu.ucsb.nceas.metacat.AccessionNumber
(on insert of XML document)
Generates a unique Accession Number or if provided check it
for uniqueness and register it into the db connection
(on update or delete of XML document)
Check for existance of provided Accession Number
-
Constructor Summary
ConstructorDescriptionAccessionNumber
(String accnum, String action) NEW - WHEN CLIENT ALWAYS PROVIDE ACCESSION NUMBER INCLUDING REV IN IT Construct an AccessionNumber -
Method Summary
-
Constructor Details
-
AccessionNumber
public AccessionNumber(String accnum, String action) throws AccessionNumberException, SQLException, NumberFormatException NEW - WHEN CLIENT ALWAYS PROVIDE ACCESSION NUMBER INCLUDING REV IN IT Construct an AccessionNumber- Parameters:
conn
- the db connection to read Accession number fromaccnum
- the accession number to be checked for validness- Throws:
AccessionNumberException
SQLException
NumberFormatException
-
-
Method Details
-
accNumberUsed
check for existence of Accesssion Number xml_acc_numbers table- Throws:
SQLException
-
getDocid
returns the docid encoded in this accession number -
getRev
returns the revision number encoded in this accession number
-