org.mycore.services.fieldquery
Class MCRQueryClient

java.lang.Object
  extended by org.mycore.services.fieldquery.MCRQueryClient

public class MCRQueryClient
extends Object

Executes a query on remote hosts using a webservice

Author:
Frank L�tzenkirchen, Jens Kupferschmidt

Field Summary
static List<String> ALL_HOSTS
          A list containing the aliases of all hosts
 
Constructor Summary
MCRQueryClient()
           
 
Method Summary
static Document doRetrieveClassification(String hostAlias, String level, String type, String classID, String categID, String format)
          Retrieves an classification part from remote host using the WebService.
static Document doRetrieveLinks(String hostAlias, String from, String to, String type)
          Retrieves an link from remote host using the WebService.
static Document doRetrieveObject(String hostAlias, String ID)
          Retrieves an Object from remote host using the webservice.
(package private) static void search(MCRQuery query, MCRResults results)
          Executes a query on the given list of remote hosts and merges the results to the given result list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_HOSTS

public static final List<String> ALL_HOSTS
A list containing the aliases of all hosts

Constructor Detail

MCRQueryClient

public MCRQueryClient()
Method Detail

search

static void search(MCRQuery query,
                   MCRResults results)
Executes a query on the given list of remote hosts and merges the results to the given result list.

Parameters:
query - the query to execute
results - the result list to add the hits to

doRetrieveObject

public static Document doRetrieveObject(String hostAlias,
                                        String ID)
Retrieves an Object from remote host using the webservice.

Parameters:
hostAlias - the alias of the remote host as defined in hosts.xml
ID - the ID of the Object to retrieve

doRetrieveClassification

public static Document doRetrieveClassification(String hostAlias,
                                                String level,
                                                String type,
                                                String classID,
                                                String categID,
                                                String format)
Retrieves an classification part from remote host using the WebService.

Parameters:
hostAlias - the alias of the remote host as defined in hosts.xml
level - the level of the classification to retrieve
type - the type of the classification to retrieve
classID - the class ID of the classification to retrieve
categID - the category ID of the classification to retrieve
format - of retrieved classification, valid values are: editor['['formatAlias']']|metadata
Returns:
the classification document

doRetrieveLinks

public static Document doRetrieveLinks(String hostAlias,
                                       String from,
                                       String to,
                                       String type)
Retrieves an link from remote host using the WebService.

Parameters:
hostAlias - the alias of the remote host as defined in hosts.xml
from - the source of the link
to - the target of the link
type - the type of the link
Returns:
the mcr:result document