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)
 INSERT BRIEF DESCRIPTION HERE.

Private Member Functions

 loadXML ($xml)
 INSERT BRIEF DESCRIPTION HERE.
 mergeDefaults ($options)
 INSERT BRIEF DESCRIPTION HERE.
 processDataOptions ($req, $options)
 INSERT BRIEF DESCRIPTION HERE.
 processStandardOptions ($req, $options, $type=SDRContract::REQUEST_TYPE_ADVANCED)
 INSERT BRIEF DESCRIPTION HERE.


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)

Definition at line 12 of file SDRSearchService.php5.


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

Definition at line 266 of file SDRSearchService.php5.

References STimer::end(), loadXML(), mergeDefaults(), processDataOptions(), processStandardOptions(), query(), and STimer::start().

SDRSearchService::getAlignments ( options = array()  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 392 of file SDRSearchService.php5.

References SObject::setError().

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

Definition at line 221 of file SDRSearchService.php5.

References STimer::end(), loadXML(), mergeDefaults(), processDataOptions(), processStandardOptions(), query(), and STimer::start().

SDRSearchService::getDefault ( which  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 42 of file SDRSearchService.php5.

SDRSearchService::getLastRequest (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 452 of file SDRSearchService.php5.

SDRSearchService::getLastResponse (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 463 of file SDRSearchService.php5.

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

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 306 of file SDRSearchService.php5.

References STimer::end(), loadXML(), mergeDefaults(), processDataOptions(), processStandardOptions(), query(), and STimer::start().

SDRSearchService::getRelationships ( options = array()  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 405 of file SDRSearchService.php5.

References SObject::setError().

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

Definition at line 163 of file SDRSearchService.php5.

References STimer::end(), loadXML(), mergeDefaults(), processDataOptions(), processStandardOptions(), query(), and STimer::start().

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

Definition at line 207 of file SDRSearchService.php5.

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

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 420 of file SDRSearchService.php5.

References STimer::end(), loadXML(), mergeDefaults(), query(), and STimer::start().

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

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 351 of file SDRSearchService.php5.

References STimer::end(), loadXML(), mergeDefaults(), processDataOptions(), processStandardOptions(), query(), and STimer::start().

SDRSearchService::loadXML ( xml  )  [private]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

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

Definition at line 116 of file SDRSearchService.php5.

References SObject::setError().

Referenced by getAlignedTo(), getByMetadata(), getRelatedTo(), getResource(), getVocabulary(), and getWithAlignments().

SDRSearchService::mergeDefaults ( options  )  [private]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

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

Definition at line 57 of file SDRSearchService.php5.

Referenced by getAlignedTo(), getByMetadata(), getRelatedTo(), getResource(), getVocabulary(), and getWithAlignments().

SDRSearchService::processDataOptions ( req,
options 
) [private]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

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

Definition at line 91 of file SDRSearchService.php5.

Referenced by getAlignedTo(), getByMetadata(), getRelatedTo(), getResource(), and getWithAlignments().

SDRSearchService::processStandardOptions ( req,
options,
type = SDRContract::REQUEST_TYPE_ADVANCED 
) [private]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

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

Definition at line 71 of file SDRSearchService.php5.

Referenced by getAlignedTo(), getByMetadata(), getRelatedTo(), getResource(), and getWithAlignments().

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

Definition at line 143 of file SDRSearchService.php5.

Referenced by getAlignedTo(), getByMetadata(), getRelatedTo(), getResource(), getVocabulary(), and getWithAlignments().

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

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$url [TYPE]: DESCRIPTION
$XMLData [TYPE]: DESCRIPTION
$key [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from XSI.

Definition at line 477 of file SDRSearchService.php5.

SDRSearchService::setDefault ( which,
what 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 30 of file SDRSearchService.php5.


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

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