DLESE Tools
v1.6.0

org.dlese.dpc.serviceclients.cat
Class CATWebService

java.lang.Object
  extended by org.dlese.dpc.serviceclients.cat.CATWebService
Direct Known Subclasses:
GetAllStandardsDocuments, GetStandard, SuggestStandards

public abstract class CATWebService
extends Object

Author:
Jonathan Ostwald

Field Summary
protected  String baseUrl
           
protected  String password
           
protected  String username
           
 
Constructor Summary
CATWebService()
           
CATWebService(String username, String password, String baseUrl)
          Constructor for the CATWebService object
 
Method Summary
protected  String getErrorMsg(Element errorElement)
          Gets the errorMsg attribute of the CATWebService object
protected abstract  String getMethod()
          Gets the method attribute of the CATWebService object
 Document getResponse(CATRequestConstraints constraints)
          Submit a request to the CAT service and return the response as a Document
 Document getResponse(Map argMap)
          Gets the response attribute of the CATWebService object
protected static void pp(Node node)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseUrl

protected String baseUrl

username

protected String username

password

protected String password
Constructor Detail

CATWebService

public CATWebService()

CATWebService

public CATWebService(String username,
                     String password,
                     String baseUrl)
Constructor for the CATWebService object

Parameters:
username - username for authenticating to the CAT Web Service
password - password for authenticating to the CAT Web Service
Method Detail

getMethod

protected abstract String getMethod()
Gets the method attribute of the CATWebService object

Returns:
The method value

getResponse

public Document getResponse(CATRequestConstraints constraints)
                     throws Exception
Submit a request to the CAT service and return the response as a Document

Parameters:
constraints - constraints submitted to CAT Web Service
Returns:
The response value
Throws:
Exception - if a response could not be obtained, or if the response contains an error from the server.

getResponse

public Document getResponse(Map argMap)
                     throws Exception
Gets the response attribute of the CATWebService object

Parameters:
argMap - query parameters as key/value pairs
Returns:
The response value
Throws:
Exception - if a response could not be obtained, or if the response contains an error from the server.

getErrorMsg

protected String getErrorMsg(Element errorElement)
Gets the errorMsg attribute of the CATWebService object

Parameters:
errorElement - error element from a CAT Service response
Returns:
The errorMsg value

pp

protected static void pp(Node node)
Description of the Method

Parameters:
node - Description of the Parameter

DLESE Tools
v1.6.0