Package org.dlese.dpc.services.mmd
Class MmdRec
java.lang.Object
org.dlese.dpc.services.mmd.MmdRec
- All Implemented Interfaces:
Comparable
Describes a single metadata record.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]static final intMetadata style: adnstatic final intMetadata style: briefmetastatic final intMetadata style: dc_qualstatic final intMetadata style: dc_simplestatic final intMetadata style: dlese_annostatic final intMetadata style: dlese_collectstatic final intMetadata style: dlese_imsstatic final intMetadata style: news_oppsstatic final intMetadata style: nsdl_dcstatic final intMetadata style: oai_dcstatic final intMetadata style: unknown (error)static final intRecord status: accessioned and discoverablestatic final intRecord status: accessioned and not discoverablestatic final intRecord status: deaccessionedstatic final intRecord status: newstatic final intRecord status: rejectedstatic final intRecord status: unknown (error)static final String[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidChecks that the specified nm is valid; if not throws MmdException.intImplement Comparable interfacebooleanDefine equality for HashMapReturns the collection key.Returns the file name of the record's XML file.longReturns the date this record was first accessioned.getId()Returns the record id.longReturns the date this record was last changed.intReturns the metadata format: for example, MS_ADN.Returns a string representing the metadata style, for example, "adn".Gets the primaryContent attribute of the MmdRec object and returns it after cleaning up the illegal character sequences "0x000d" and "0x0009"Gets the primaryContentType attribute of the MmdRec objectlongReturns the date this record was last checked by the idmapper.intReturns the record status: for example, STATUS_ACCESSIONED_DISCOVERABLE.Returns a string representing the record status, for example, "accessioneddiscoverable".Returns an array of MmdWarning for messages generated during the most recent Idmapper run.toString()
-
Field Details
-
STATUS_UNKNOWN
public static final int STATUS_UNKNOWNRecord status: unknown (error)- See Also:
-
STATUS_ACCESSIONED_DISCOVERABLE
public static final int STATUS_ACCESSIONED_DISCOVERABLERecord status: accessioned and discoverable- See Also:
-
STATUS_ACCESSIONED_NONDISCOVERABLE
public static final int STATUS_ACCESSIONED_NONDISCOVERABLERecord status: accessioned and not discoverable- See Also:
-
STATUS_DEACCESSIONED
public static final int STATUS_DEACCESSIONEDRecord status: deaccessioned- See Also:
-
STATUS_NEW
public static final int STATUS_NEWRecord status: new- See Also:
-
STATUS_REJECTED
public static final int STATUS_REJECTEDRecord status: rejected- See Also:
-
statusNames
-
MS_UNKNOWN
public static final int MS_UNKNOWNMetadata style: unknown (error)- See Also:
-
MS_ADN
public static final int MS_ADNMetadata style: adn- See Also:
-
MS_BRIEFMETA
public static final int MS_BRIEFMETAMetadata style: briefmeta- See Also:
-
MS_DC_QUAL
public static final int MS_DC_QUALMetadata style: dc_qual- See Also:
-
MS_DC_SIMPLE
public static final int MS_DC_SIMPLEMetadata style: dc_simple- See Also:
-
MS_DLESE_ANNO
public static final int MS_DLESE_ANNOMetadata style: dlese_anno- See Also:
-
MS_DLESE_COLLECT
public static final int MS_DLESE_COLLECTMetadata style: dlese_collect- See Also:
-
MS_DLESE_IMS
public static final int MS_DLESE_IMSMetadata style: dlese_ims- See Also:
-
MS_NSDL_DC
public static final int MS_NSDL_DCMetadata style: nsdl_dc- See Also:
-
MS_NEWS_OPPS
public static final int MS_NEWS_OPPSMetadata style: news_opps- See Also:
-
MS_OAI_DC
public static final int MS_OAI_DCMetadata style: oai_dc- See Also:
-
metastyleNames
-
-
Constructor Details
-
MmdRec
public MmdRec(String collKey, String id, String fileName, String statusStg, String metastyleStg, long firstAccessionDate, long lastMetaModDate, long recCheckDate, String primaryContent, String primarycontentType, MmdWarning[] warnings) throws MmdException Creates new MmdRec with the specified values.- Parameters:
collKey- DESCRIPTIONid- DESCRIPTIONfileName- DESCRIPTIONstatusStg- DESCRIPTIONmetastyleStg- DESCRIPTIONfirstAccessionDate- DESCRIPTIONlastMetaModDate- DESCRIPTIONrecCheckDate- DESCRIPTIONprimaryContent- DESCRIPTIONprimarycontentType- DESCRIPTIONwarnings- DESCRIPTION- Throws:
MmdException- DESCRIPTION
-
-
Method Details
-
toString
-
getPrimaryContent
Gets the primaryContent attribute of the MmdRec object and returns it after cleaning up the illegal character sequences "0x000d" and "0x0009"- Returns:
- The primaryContent value
-
getPrimaryContentType
Gets the primaryContentType attribute of the MmdRec object- Returns:
- The primaryContentType value
-
getCollKey
Returns the collection key.- Returns:
- The collKey value
-
getId
Returns the record id.- Returns:
- The id value
-
getFileName
Returns the file name of the record's XML file.- Returns:
- The fileName value
-
getStatus
public int getStatus()Returns the record status: for example, STATUS_ACCESSIONED_DISCOVERABLE. Must be one of the STATUS_ values above.- Returns:
- The status value
-
getStatusString
Returns a string representing the record status, for example, "accessioneddiscoverable".- Returns:
- The statusString value
-
checkStatusString
Checks that the specified nm is valid; if not throws MmdException.- Parameters:
nm- DESCRIPTION- Throws:
MmdException- DESCRIPTION
-
getMetastyle
public int getMetastyle()Returns the metadata format: for example, MS_ADN. Must be one of the MS_ values above.- Returns:
- The metastyle value
-
getMetastyleString
Returns a string representing the metadata style, for example, "adn".- Returns:
- The metastyleString value
-
getFirstAccessionDate
public long getFirstAccessionDate()Returns the date this record was first accessioned.- Returns:
- The firstAccessionDate value
-
getLastMetaModDate
public long getLastMetaModDate()Returns the date this record was last changed.- Returns:
- The lastMetaModDate value
-
getRecCheckDate
public long getRecCheckDate()Returns the date this record was last checked by the idmapper.- Returns:
- The recCheckDate value
-
getWarnings
Returns an array of MmdWarning for messages generated during the most recent Idmapper run.- Returns:
- The warnings value
-
equals
Define equality for HashMap -
compareTo
Implement Comparable interface- Specified by:
compareToin interfaceComparable- Parameters:
obj- DESCRIPTION- Returns:
- DESCRIPTION
-