ANDS_Response_XML Class Reference

Inheritance diagram for ANDS_Response_XML:
ANDS_XML

List of all members.

Public Member Functions

 add2_verbNode ($nodeName, $value=null)
 create_record ()
 create_header ($identifier, $timestamp, $ands_class, $add_to_node=null)
 create_metadata ($mom_record_node)
 create_resumpToken ($token, $expirationdatetime, $num_rows, $cursor=null)

Public Attributes

 $verbNode

Protected Attributes

 $verb

Detailed Description

Generate an XML response to a request if no error has occured

This is the class to further develop to suits a publication need


Member Function Documentation

ANDS_Response_XML::add2_verbNode ( nodeName,
value = null 
)

Add direct child nodes to verb node (OAI-PMH), e.g. response to ListMetadataFormats. Different verbs can have different required child nodes.

See also:
create_record, create_header
http://www.openarchives.org/OAI/2.0/openarchivesprotocol.htm.
Parameters:
$nodeName Type: string. The name of appending node.
$value Type: string. The content of appending node.
ANDS_Response_XML::create_record (  ) 

Create an empty <record> node. Other nodes will be appended to it later.

ANDS_Response_XML::create_header ( identifier,
timestamp,
ands_class,
add_to_node = null 
)

Headers are enclosed inside of <record> to the query of ListRecords, ListIdentifiers and etc.

Parameters:
$identifier Type: string. The identifier string for node <identifier>.
$timestamp Type: timestamp. Timestapme in UTC format for node <datastamp>.
$ands_class Type: mix. Can be an array or just a string. Content of <setSpec>.
$add_to_node Type: DOMElement. Default value is null. In normal cases, $add_to_node is the <record> node created previously. When it is null, the newly created header node is attatched to $this->verbNode. Otherwise it will be attatched to the desired node defined in $add_to_node.
ANDS_Response_XML::create_metadata ( mom_record_node  ) 

Create metadata node for holding metadata. This is always added to <record> node.

Parameters:
$mom_record_node DOMElement. A node acts as the parent node.
Returns:
$meta_node Type: DOMElement. The newly created registryObject node which will be used for further expansion. metadata node itself is maintained by internally by the Class.
ANDS_Response_XML::create_resumpToken ( token,
expirationdatetime,
num_rows,
cursor = null 
)

If there are too many records request could not finished a resumpToken is generated to let harvester know

Parameters:
$token Type: string. A random number created somewhere?
$expirationdatetime Type: string. A string representing time.
$num_rows Type: integer. Number of records retrieved.
$cursor Type: string. Cursor can be used for database to retrieve next time.

Member Data Documentation

ANDS_Response_XML::$verbNode

Type: DOMElement. Verb node itself.

ANDS_Response_XML::$verb [protected]

Type: string. The verb in the request


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations
Generated on Thu Jun 16 12:49:22 2011 for OAI PHP by  doxygen 1.6.3