Class AbstractOaiPmhDatabase

java.lang.Object
org.opencastproject.oaipmh.persistence.impl.AbstractOaiPmhDatabase
All Implemented Interfaces:
OaiPmhDatabase
Direct Known Subclasses:
OaiPmhDatabaseImpl

public abstract class AbstractOaiPmhDatabase extends Object implements OaiPmhDatabase
  • Constructor Details

    • AbstractOaiPmhDatabase

      public AbstractOaiPmhDatabase()
  • Method Details

    • getDBSession

      public abstract org.opencastproject.db.DBSession getDBSession()
    • getSecurityService

      public abstract org.opencastproject.security.api.SecurityService getSecurityService()
    • getWorkspace

      public abstract org.opencastproject.workspace.api.Workspace getWorkspace()
    • store

      public void store(org.opencastproject.mediapackage.MediaPackage mediaPackage, String repository) throws OaiPmhDatabaseException
      Description copied from interface: OaiPmhDatabase
      Stores or updates a mediapackage from the OAI-PMH persistence
      Specified by:
      store in interface OaiPmhDatabase
      Parameters:
      mediaPackage - the mediapackage
      repository - the OAI-PMH repository ID
      Throws:
      OaiPmhDatabaseException - if there is a problem communicating with the underlying data store
    • updateEntity

      public void updateEntity(OaiPmhEntity entity, org.opencastproject.mediapackage.MediaPackage mediaPackage, String repository)
    • delete

      public void delete(String mediaPackageId, String repository) throws OaiPmhDatabaseException, org.opencastproject.util.NotFoundException
      Description copied from interface: OaiPmhDatabase
      Marks a existing mediapackage as deleted
      Specified by:
      delete in interface OaiPmhDatabase
      Parameters:
      mediaPackageId - the mediapackage id
      repository - the OAI-PMH repository ID
      Throws:
      OaiPmhDatabaseException - if there is a problem communicating with the underlying data store
      org.opencastproject.util.NotFoundException - if the mediapackage does not exist
    • search

      public SearchResult search(Query query)
      Description copied from interface: OaiPmhDatabase
      Searches mediapackages from the OAI-PMH persistence storage
      Specified by:
      search in interface OaiPmhDatabase
      Parameters:
      query - the query
      Returns:
      a search result
    • matchSetDef

      protected boolean matchSetDef(OaiPmhSetDefinition setDef, List<SearchResultElementItem> elements)
      Returns true if all set definition filters matches.
      Parameters:
      setDef - set definition to test
      elements - media package elements to test
      Returns:
      returns true if all set definition filters matches, otherwise false