SDRSearchService Class Reference

Query the SDR Search Service for metadata resources. More...

Inheritance diagram for SDRSearchService:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 getAlignedTo ($nodeType, $nodeId, $options=array())
 INSERT BRIEF DESCRIPTION HERE.
 getAlignments ($options=array())
 INSERT BRIEF DESCRIPTION HERE.
 getByMetadata ($constraints, $options=array())
 Query the search service and return a SDRResourceResponse (for advanced search).
 getDefault ($which)
 INSERT BRIEF DESCRIPTION HERE.
 getLastRequest ()
 INSERT BRIEF DESCRIPTION HERE.
 getLastResponse ()
 INSERT BRIEF DESCRIPTION HERE.
 getRelatedTo ($cserdId, $options=array())
 INSERT BRIEF DESCRIPTION HERE.
 getRelationships ($options=array())
 INSERT BRIEF DESCRIPTION HERE.
 getResource ($id, $options=array())
 Query the search service and return an SDRResourceResult object.
 getResourceResponse ($request)
 Query the search service and return a SDRResourceResponse (for a quick search).
 getVocabulary ($field, $options=array())
 INSERT BRIEF DESCRIPTION HERE.
 getWithAlignments ($types, $options=array())
 INSERT BRIEF DESCRIPTION HERE.
 query ($request)
 Query the search service and return raw XML.
 setDefault ($which, $what)
 INSERT BRIEF DESCRIPTION HERE.

Static Protected Member Functions

static queryURL ($url, $XMLData=null, $key=null)
 Run a CURL command on an XML service URL and return the result.


Detailed Description

Query the SDR Search Service for metadata resources.

This class extends the XML Service Interface to allow querying of a particular XML service -- the SDR Search Service. Use this class to search the SDR Catalog based on a quick search string, an advanced

Author:
AUTHOR (DATE)

Member Function Documentation

SDRSearchService::getAlignedTo ( nodeType,
nodeId,
options = array() 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$nodeType [TYPE]: DESCRIPTION
$nodeId [TYPE]: DESCRIPTION
$options [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

SDRSearchService::getAlignments ( options = array()  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$options [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

SDRSearchService::getByMetadata ( constraints,
options = array() 
)

Query the search service and return a SDRResourceResponse (for advanced search).

Define a query URL using a set of constraints (i.e., advanced search). Run the query with the search service, and then return an SDRResourceResponse object.

Parameters:
$constraints [array]: An array of constraints to be added to the search request URL
$options [array]: Additional options to append to the search request URL
Returns:
[string]: The XML response from the search service

SDRSearchService::getDefault ( which  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$which [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

SDRSearchService::getLastRequest (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

SDRSearchService::getLastResponse (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

SDRSearchService::getRelatedTo ( cserdId,
options = array() 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$cserdId [TYPE]: DESCRIPTION
$options [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

SDRSearchService::getRelationships ( options = array()  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$options [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

SDRSearchService::getResource ( id,
options = array() 
)

Query the search service and return an SDRResourceResult object.

Build a URL request to the search service by starting with the base path to the service (defined in common) and appending all the request constraints (generated by the request object). Call query() to query the service, then build an SDRResourceResponse based on the result. If there are no resources returned, return null rather than an object.

Parameters:
$id [int]: The cserdId of a desired resource
$options [array]: An associative array of additional options to attach to the search URL (i.e., metadata => true, relationships => true) (optional)
Returns:
[SDRResourceResponse]: The response from the service, or null if there are no results

SDRSearchService::getResourceResponse ( request  ) 

Query the search service and return a SDRResourceResponse (for a quick search).

Build a search service request, run it using query(), and return an SDRResourceResponse object representing the result.

Parameters:
$request [SDRServiceRequest]: The object representing the search service request
Returns:
[SDRResourceResponse]: The response from the query

SDRSearchService::getVocabulary ( field,
options = array() 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$field [TYPE]: DESCRIPTION
$options [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

SDRSearchService::getWithAlignments ( types,
options = array() 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$types [TYPE]: DESCRIPTION
$options [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

SDRSearchService::query ( request  ) 

Query the search service and return raw XML.

Build a URL request to the search service by starting with the base path to the service (defined in common) and appending all the request constraints (generated by the request object). CURL this URL and return the resulting XML.

Parameters:
$request [SDRServiceRequest]: The object representing the search service request
Returns:
[string]: The XML response from the search service

static SDRSearchService::queryURL ( url,
XMLData = null,
key = null 
) [static, protected]

Run a CURL command on an XML service URL and return the result.

This is called by either query() (when URLs are passed directly), or querySearchRequest() (when a request object is passed). It simply runs a CURL command and returns the result. If either the $key or $XMLData params are passed, it includes a POST section on the request and sends those variables through POST.

Parameters:
$url [string]: The URL of the XML service
$XMLData [string]: An XML data section to POST with the request
$key [string]: An authentication key to POST with the request
Returns:
[string]: The XML response from the service (or false on error)

Reimplemented from XSI.

SDRSearchService::setDefault ( which,
what 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$which [TYPE]: DESCRIPTION
$what [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:02:51 2010 for Common by  doxygen 1.5.6