com.indexdata.masterkey.pazpar2.client
Class Pazpar2ServiceDefinition

java.lang.Object
  extended by com.indexdata.masterkey.pazpar2.client.Pazpar2ServiceDefinition

public class Pazpar2ServiceDefinition
extends Object

Defines the Pazpar2 service definition to use, based on the configuration in the service proxy's property file

There are three ways to define the service:

  1. Use service settings as defined in provided XML file
  2. If no XML file provided: Use service settings as identified by provided ID
  3. If no ID provided: Use default service as defined in pazpar2.cfg

Author:
Niels Erik

Field Summary
static int UNDEFINED
           
 
Constructor Summary
Pazpar2ServiceDefinition(Pazpar2ClientConfiguration configuration)
           
 
Method Summary
 String getDescription()
          Returns description of the chosen service definition type (for log statements)
 int getServiceDefinitionType()
          Returns the chosen service defintion type (XML, ID or default)
 String getServiceId()
          Returns the identifier pointing to a statically loaded pazpar2 service definition
 String getServiceXml()
          Returns the XML content of the pazpar2 service definition as read from a definition file
 boolean usesId()
           
 boolean usesPz2DefaultService()
           
 boolean usesXml()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDEFINED

public static final int UNDEFINED
See Also:
Constant Field Values
Constructor Detail

Pazpar2ServiceDefinition

public Pazpar2ServiceDefinition(Pazpar2ClientConfiguration configuration)
                         throws ProxyErrorException
Throws:
ProxyErrorException
Method Detail

getServiceDefinitionType

public int getServiceDefinitionType()
Returns the chosen service defintion type (XML, ID or default)

Returns:
Indicator for either "uses xml", "uses ID", "uses Pazpar2 default", or "undefined"

usesXml

public boolean usesXml()

usesId

public boolean usesId()

usesPz2DefaultService

public boolean usesPz2DefaultService()

getServiceId

public String getServiceId()
Returns the identifier pointing to a statically loaded pazpar2 service definition

Returns:
ID if service definition type is "uses ID", otherwise the empty String.

getServiceXml

public String getServiceXml()
Returns the XML content of the pazpar2 service definition as read from a definition file

Returns:

getDescription

public String getDescription()
Returns description of the chosen service definition type (for log statements)

Returns:
Description of service definition


Copyright © 2012. All Rights Reserved.