SDR Class Reference

Manage connections to/information about the SDR (Shodor Data Repository) database, and perform simple queries relating to metadata records. More...

Inheritance diagram for SDR:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 getResourceIdForURL ($url)
 Get the resource id (CSERD id) of an item given its URL.
 getURLForResourceId ($id)
 Get the URL of an item given its resource id (CSERD id).
 resourceIdExists ($id)
 Check to see whether a resource with a given ID exists in SDR.
 URLExists ($url)
 Check to see whether a resource with a given URL exists in SDR.

Static Public Member Functions

static getDBI ()
 Get the DBI to access the SDR database.
static init ()
 Initialize the SDR/CSERD services.
static isInitialized ()
 Check to see if SDR is initialized.


Detailed Description

Manage connections to/information about the SDR (Shodor Data Repository) database, and perform simple queries relating to metadata records.

This class keeps track of the database connections to SDR. You can call getDBI() to get a direct connection to the Shodor metadata database. You can also use this class to look up basic information about metadata items, and access SDR-related constants, such as what methods the service provides.

Author:
jwsm@shodor.org

Member Function Documentation

static SDR::getDBI (  )  [static]

Get the DBI to access the SDR database.

Returns:
[DBI]: The SDR Database Interface (DBI) object

SDR::getResourceIdForURL ( url  ) 

Get the resource id (CSERD id) of an item given its URL.

Parameters:
$url [string]: The URL of the item
Returns:
[mixed]: The resource id of the item if it exists; false if it is not found

SDR::getURLForResourceId ( id  ) 

Get the URL of an item given its resource id (CSERD id).

Parameters:
$id [int]: The resource id of the item
Returns:
[mixed]: The URL of the item if it exists; false if it is not found

static SDR::init (  )  [static]

Initialize the SDR/CSERD services.

Connect to SDR database and store the DBI for other services/ applications to connect to SDR.

static SDR::isInitialized (  )  [static]

Check to see if SDR is initialized.

Returns:
[bool]: True if initialized, false if not

SDR::resourceIdExists ( id  ) 

Check to see whether a resource with a given ID exists in SDR.

Parameters:
$id [string]: The ResourceId (CSERD id) in question
Returns:
[bool]: True if the resource exists, false if not

SDR::URLExists ( url  ) 

Check to see whether a resource with a given URL exists in SDR.

Parameters:
$url [string]: The URL in question
Returns:
[bool]: True if the resource exists, false if not


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

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