org.mycore.services.oai
Interface MCROAIQuery

All Known Implementing Classes:
MCROAIQueryImpl

public interface MCROAIQuery

Version:
$Revision: 1.7 $ $Date: 2003/01/31 11:56:25 $ This is an interface which encapsulates the functions needed for the communication with the datastore. All functions which are MyCoRe or Miless specific should be implemented here.
Author:
Werner Gresshoff

Method Summary
 boolean exists(String id)
          Method exists.
 List<Object> getRecord(String id, String metadataPrefix, String instance)
          Method getRecord.
 boolean hasMore()
          Method hasMore.
 List<String> listIdentifiers(String[] set, String[] from, String[] until, String metadataPrefix, String instance)
          Method listIdentifiers.
 List<String> listRecords(String[] set, String[] from, String[] until, String metadataPrefix, String instance)
          Method listRecords.
 List<String[]> listSets(String instance)
          Method listSets.
 

Method Detail

exists

boolean exists(String id)
Method exists. Checks if the given ID exists in the data repository

Parameters:
id - The ID to be checked
Returns:
boolean

listSets

List<String[]> listSets(String instance)
Method listSets. Gets a list of classificationId's and Labels for a given ID

Parameters:
instance - the Servletinstance
Returns:
List A list that contains an array of three Strings: the category id, the label and a description

listIdentifiers

List<String> listIdentifiers(String[] set,
                             String[] from,
                             String[] until,
                             String metadataPrefix,
                             String instance)
Method listIdentifiers. Gets a list of identifiers with max. STR_OAI_MAXRETURNS elements.

Parameters:
set - the category (if known) is in the first element
from - the date (if known) is in the first element
until - the date (if known) is in the first element
metadataPrefix - the requested metadata prefix
instance - the Servletinstance
Returns:
List A list that contains an array of three Strings: the identifier, a datestamp (modification date) and a string with a blank separated list of categories the element is classified in

getRecord

List<Object> getRecord(String id,
                       String metadataPrefix,
                       String instance)
Method getRecord. Gets a metadata record with the given id .

Parameters:
id - The id of the object.
metadataPrefix - the requested metadata prefix
instance - the Servletinstance
Returns:
List A list that contains an array of three Strings: the identifier, a datestamp (modification date) and a string with a blank separated list of categories the element is classified in and a JDOM element with the metadata of the record

listRecords

List<String> listRecords(String[] set,
                         String[] from,
                         String[] until,
                         String metadataPrefix,
                         String instance)
Method listRecords. Gets a list of metadata records with max. STR_OAI_MAXRETURNS elements.

Parameters:
set - the category (if known) is in the first element
from - the date (if known) is in the first element
until - the date (if known) is in the first element
metadataPrefix - the requested metadata prefix
instance - the Servletinstance
Returns:
List A list that contains an array of three Strings: the identifier, a datestamp (modification date) and a string with a blank separated list of categories the element is classified in

hasMore

boolean hasMore()
Method hasMore.

Returns:
true, if more results for the last query exists, else false