org.mycore.services.oai
Class MCROAIQueryImpl

java.lang.Object
  extended by org.mycore.services.oai.MCROAIQueryImpl
All Implemented Interfaces:
MCROAIQuery

public class MCROAIQueryImpl
extends Object
implements MCROAIQuery

Version:
$Revision$ $Date$ This is the MyCoRe-Implementation of the MCROAIQuery -Interface.
Author:
Heiko Helmbrecht

Constructor Summary
MCROAIQueryImpl()
          Method MCROAIQueryService.
 
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.Gets a list of identifiers
 List<String> listRecords(String[] set, String[] from, String[] until, String metadataPrefix, String instance)
          Method listRecords.Gets a list of metadata records
 List<String[]> listSets(String instance)
          Method listSets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCROAIQueryImpl

public MCROAIQueryImpl()
Method MCROAIQueryService.

Method Detail

exists

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

Specified by:
exists in interface MCROAIQuery
Parameters:
id - The ID to be checked
Returns:
boolean

listSets

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

Specified by:
listSets in interface MCROAIQuery
Parameters:
classificationId -
instance - the Servletinstance
Returns:
List a list that contains an array of three Strings: the category id, the label and a description

listIdentifiers

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

Specified by:
listIdentifiers in interface MCROAIQuery
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

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

Specified by:
getRecord in interface MCROAIQuery
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

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

Specified by:
listRecords in interface MCROAIQuery
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

public boolean hasMore()
Method hasMore.

Specified by:
hasMore in interface MCROAIQuery
Returns:
true, if more results for the last query exists, else false