Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
DuraStore Class Reference
Inheritance diagram for DuraStore:
DuraCloudComponent

Public Member Functions

 _addMetadataPrefix ($metadata)
 
 _filterMetadata ($headers)
 
 createSpace ($spaceId, $metadata=array(), $storeId=DURACLOUD_DEFAULT_STORE)
 
 deleteContent ($spaceId, $contentId, $storeId=DURACLOUD_DEFAULT_STORE)
 
 deleteSpace ($spaceId, $storeId=DURACLOUD_DEFAULT_STORE)
 
 DuraStore (&$dcc)
 
getContent ($spaceId, $contentId, $storeId=DURACLOUD_DEFAULT_STORE)
 
 getContentMetadata ($spaceId, $contentId, $storeId=DURACLOUD_DEFAULT_STORE)
 
 getSpace ($spaceId, &$metadata, $storeId=DURACLOUD_DEFAULT_STORE, $prefix=null, $maxResults=null, $marker=null)
 
 getSpaceMetadata ($spaceId, $storeId=DURACLOUD_DEFAULT_STORE)
 
 getSpaces ($storeId=DURACLOUD_DEFAULT_STORE)
 
 getStores ()
 
 setContentMetadata ($spaceId, $contentId, $descriptor, $storeId=DURACLOUD_DEFAULT_STORE)
 
 setSpaceMetadata ($spaceId, $metadata, $storeId=DURACLOUD_DEFAULT_STORE)
 
 storeContent ($spaceId, $contentId, $content, $storeId=DURACLOUD_DEFAULT_STORE)
 
- Public Member Functions inherited from DuraCloudComponent
 DuraCloudComponent (&$dcc, $componentName)
 

Detailed Description

DuraStore client implementation.

Definition at line 30 of file DuraStore.inc.php.

Member Function Documentation

DuraStore::_addMetadataPrefix (   $metadata)

Used internally by createSpace and setSpaceMetadata to add the DuraCloud metadata prefix to a set of metadata, returning the result.

Parameters
$metadataarray
Returns
array

Definition at line 423 of file DuraStore.inc.php.

Referenced by createSpace(), setContentMetadata(), setSpaceMetadata(), and storeContent().

DuraStore::_filterMetadata (   $headers)

Used internally by getSpace and getSpaceMetadata to filter extaneous HTTP headers out of the metadata set and return only the DuraCloud-specific content.

Parameters
$headersarray
Returns
array

Definition at line 406 of file DuraStore.inc.php.

Referenced by getContent(), getContentMetadata(), getSpace(), and getSpaceMetadata().

DuraStore::createSpace (   $spaceId,
  $metadata = array(),
  $storeId = DURACLOUD_DEFAULT_STORE 
)

Create a space.

Parameters
$spaceIdstring
metadataarray optional
$storeIdint optional
Returns
Location of the new space iff success; false otherwise

Definition at line 189 of file DuraStore.inc.php.

References _addMetadataPrefix().

DuraStore::deleteContent (   $spaceId,
  $contentId,
  $storeId = DURACLOUD_DEFAULT_STORE 
)

Delete content.

Parameters
$spaceIdstring
$contentIdstring
$storeIdint optional
Returns
boolean success

Definition at line 382 of file DuraStore.inc.php.

DuraStore::deleteSpace (   $spaceId,
  $storeId = DURACLOUD_DEFAULT_STORE 
)

Delete a space.

Parameters
$spaceIdstring
$storeIdint optional
Returns
boolean success

Definition at line 236 of file DuraStore.inc.php.

DuraStore::DuraStore ( $dcc)

Constructor

Parameters
$dccDuraCloudConnection

Definition at line 35 of file DuraStore.inc.php.

& DuraStore::getContent (   $spaceId,
  $contentId,
  $storeId = DURACLOUD_DEFAULT_STORE 
)

Get content.

Parameters
$spaceIdstring
$contentIdstring
$storeIdint optional ID of store
Returns
object DuraCloudContent

Definition at line 294 of file DuraStore.inc.php.

References _filterMetadata().

DuraStore::getContentMetadata (   $spaceId,
  $contentId,
  $storeId = DURACLOUD_DEFAULT_STORE 
)

Get content metadata.

Parameters
$spaceIdstring
$contentIdstring
$storeIdint optional ID of store
Returns
mixed false iff failure; DuraCloudContentDescriptor otherwise

Definition at line 329 of file DuraStore.inc.php.

References _filterMetadata().

DuraStore::getSpace (   $spaceId,
$metadata,
  $storeId = DURACLOUD_DEFAULT_STORE,
  $prefix = null,
  $maxResults = null,
  $marker = null 
)

Get a list of a space's contents.

Parameters
$storeIdint optional ID of store
$metadataReference to variable that will receive metadata
$storeIdint optional
$prefixstring optional
$maxResultsint optional
$markerstring optional
Returns
array List of space IDs

Definition at line 124 of file DuraStore.inc.php.

References _filterMetadata().

DuraStore::getSpaceMetadata (   $spaceId,
  $storeId = DURACLOUD_DEFAULT_STORE 
)

Get a list of a space's metadata.

Parameters
$spaceIdstring
$storeIdint optional ID of store
Returns
array List of space metadata

Definition at line 165 of file DuraStore.inc.php.

References _filterMetadata().

DuraStore::getSpaces (   $storeId = DURACLOUD_DEFAULT_STORE)

Get a list of spaces.

Parameters
$storeIdint optional ID of store
Returns
array List of space IDs

Definition at line 88 of file DuraStore.inc.php.

DuraStore::getStores ( )

Get a list of stores.

Returns
array List of store IDs

Definition at line 48 of file DuraStore.inc.php.

DuraStore::setContentMetadata (   $spaceId,
  $contentId,
  $descriptor,
  $storeId = DURACLOUD_DEFAULT_STORE 
)

Set content metadata.

Parameters
$spaceIdstring
$contentIdstring
$contentTypestring MIME type
$md5string MD5 sum for content
metadataarray optional
$storeIdint optional
Returns
Location of the new space iff success; false otherwise

Definition at line 357 of file DuraStore.inc.php.

References _addMetadataPrefix().

DuraStore::setSpaceMetadata (   $spaceId,
  $metadata,
  $storeId = DURACLOUD_DEFAULT_STORE 
)

Set a space's metadata.

Parameters
$spaceIdstring
metadataarray optional
$storeIdint optional
Returns
Location of the new space iff success; false otherwise

Definition at line 215 of file DuraStore.inc.php.

References _addMetadataPrefix().

DuraStore::storeContent (   $spaceId,
  $contentId,
  $content,
  $storeId = DURACLOUD_DEFAULT_STORE 
)

Store content.

Parameters
$spaceIdstring
$contentIdstring
$contentobject DuraCloudContent
$storeIdint optional
Returns
Location of the new space iff success; false otherwise

Definition at line 263 of file DuraStore.inc.php.

References _addMetadataPrefix().


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