Package org.mycore.oai
Class MCROAIObjectManager
java.lang.Object
org.mycore.oai.MCROAIObjectManager
Provides an interface to the MyCoRe object engine.
- Author:
- Matthias Eichner
-
Field Summary
Modifier and TypeFieldDescriptionprotected MCROAIIdentify
protected static final Logger
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Checks if a mycore object with the given oai identifier exists.protected String
org.mycore.oai.pmh.Record
getDeletedRecord
(String mcrId) Returns a deleted record without metadata by given MyCoRe identifier or null, if the record is not deleted.protected Element
getJDOMRecord
(String mcrId, org.mycore.oai.pmh.MetadataFormat format) getMyCoReId
(String oaiId) Converts a oai identifier to a mycore id.Converts a mycore id to a oai id.org.mycore.oai.pmh.Record
getRecord
(org.mycore.oai.pmh.Header header, org.mycore.oai.pmh.MetadataFormat format) protected Element
void
init
(MCROAIIdentify identify) Initialize the object manager.
-
Field Details
-
LOGGER
-
identify
-
recordUriPattern
-
-
Constructor Details
-
MCROAIObjectManager
public MCROAIObjectManager()
-
-
Method Details
-
init
Initialize the object manager. Its important to call this method before you can retrieve records or headers!- Parameters:
identify
- oai repository identifier
-
getMyCoReId
Converts a oai identifier to a mycore id.- Parameters:
oaiId
- the oai identifier- Returns:
- the mycore identifier
-
getOAIId
Converts a mycore id to a oai id.- Parameters:
mcrId
- mycore identifier
-
getRecord
public org.mycore.oai.pmh.Record getRecord(org.mycore.oai.pmh.Header header, org.mycore.oai.pmh.MetadataFormat format) -
getDeletedRecord
Returns a deleted record without metadata by given MyCoRe identifier or null, if the record is not deleted.- Parameters:
mcrId
- id of the deleted record- Returns:
- deleted record
-
getJDOMRecord
-
getURI
-
formatURI
-
exists
Checks if a mycore object with the given oai identifier exists.- Parameters:
oaiId
- e.g. oai:www.mycore.de:Document_document_00000003- Returns:
- true if exists, otherwise false
-