org.mycore.services.fieldquery
Class MCRQueryClientBase

java.lang.Object
  extended by org.mycore.services.fieldquery.MCRQueryClientBase
All Implemented Interfaces:
MCRQueryClientInterface
Direct Known Subclasses:
MCRQueryClientWebService

public class MCRQueryClientBase
extends Object
implements MCRQueryClientInterface


Field Summary
protected  String access
          The access mode for the remote host
protected  String alias
          The host alias
protected static Logger LOGGER
          The logger
protected  String servicepath
          The URL path for the remote host service
protected  String url
          The base URL for the remote host
 
Constructor Summary
MCRQueryClientBase()
           
 
Method Summary
 Document doRetrieveClassification(String level, String type, String classID, String categID, String format)
          Retrieves an classification part from remote host using the WebService.
 Document doRetrieveLinks(String from, String to, String type)
          Retrieves an link from remote host using the WebService.
 Document doRetrieveObject(String ID)
          Retrieves an Object from remote host using the defined service.
 String getAlias()
           
 void init(Element xmlhost)
           
 void search(Document inDoc, MCRResults results)
          Executes a query on a single remote host using the defined service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final Logger LOGGER
The logger


alias

protected String alias
The host alias


url

protected String url
The base URL for the remote host


access

protected String access
The access mode for the remote host


servicepath

protected String servicepath
The URL path for the remote host service

Constructor Detail

MCRQueryClientBase

public MCRQueryClientBase()
Method Detail

init

public void init(Element xmlhost)
Specified by:
init in interface MCRQueryClientInterface

getAlias

public final String getAlias()
Specified by:
getAlias in interface MCRQueryClientInterface

search

public void search(Document inDoc,
                   MCRResults results)
Executes a query on a single remote host using the defined service.

Specified by:
search in interface MCRQueryClientInterface
Parameters:
inDoc - the query as W3C DOM document
results - the result list to add the hits to

doRetrieveObject

public Document doRetrieveObject(String ID)
Retrieves an Object from remote host using the defined service.

Specified by:
doRetrieveObject in interface MCRQueryClientInterface
Parameters:
hostAlias - the alias of the remote host as defined in hosts.xml
ID - the ID of the Object to retrieve
Returns:
the object document

doRetrieveClassification

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

Specified by:
doRetrieveClassification in interface MCRQueryClientInterface
Parameters:
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 Document doRetrieveLinks(String from,
                                String to,
                                String type)
Retrieves an link from remote host using the WebService.

Specified by:
doRetrieveLinks in interface MCRQueryClientInterface
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