Class MCROAIObjectManager

java.lang.Object
org.mycore.oai.MCROAIObjectManager

public class MCROAIObjectManager extends Object
Provides an interface to the MyCoRe object engine.
Author:
Matthias Eichner
  • Field Details

    • LOGGER

      protected static final Logger LOGGER
    • identify

      protected MCROAIIdentify identify
    • recordUriPattern

      protected String recordUriPattern
  • Constructor Details

    • MCROAIObjectManager

      public MCROAIObjectManager()
  • Method Details

    • init

      public void init(MCROAIIdentify identify)
      Initialize the object manager. Its important to call this method before you can retrieve records or headers!
      Parameters:
      identify - oai repository identifier
    • getMyCoReId

      public String getMyCoReId(String oaiId)
      Converts a oai identifier to a mycore id.
      Parameters:
      oaiId - the oai identifier
      Returns:
      the mycore identifier
    • getOAIId

      public String getOAIId(String mcrId)
      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

      public 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.
      Parameters:
      mcrId - id of the deleted record
      Returns:
      deleted record
    • getJDOMRecord

      protected Element getJDOMRecord(String mcrId, org.mycore.oai.pmh.MetadataFormat format)
    • getURI

      protected Element getURI(String uri)
    • formatURI

      protected String formatURI(String uri, String id, String metadataPrefix)
    • exists

      protected boolean exists(String oaiId)
      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