Class Fedora_Item

Description

Located in /api/fedora_item.inc (line 13)


	
			
Variable Summary
 mixed $datastreams
 mixed $pid
Method Summary
 static void create_object_FOXML ([string $pid = ''], [string $state = 'A'], [ $label = 'Untitled'], [ $owner = ''])
 static void fedora_item_exists ( $pid)
 static Array find_objects_by_pattern ([string $pattern = '*'], [string $field = 'pid'], [int $max_results = 100], [ $resultFields = array()])
 static void get_next_PID_in_namespace ([ $pid_namespace = ''])
 static void ingest_from_FOXML ( $foxml)
 static void ingest_from_FOXML_file ( $foxml_file)
 static void ingest_from_FOXML_files_in_directory ( $path)
 static void ingest_new_item ([ $pid = ''], [ $state = 'A'], [ $label = ''], [ $owner = ''])
 static void soap_call ( $function_name,  $params_array, [ $quiet = FALSE])
 Fedora_Item __construct (string $pid)
 void add_datastream_from_file ( $datastream_file,  $datastream_id, [ $datastream_label = NULL], [ $datastream_mimetype = ''], [ $controlGroup = 'M'], [ $logMessage = null])
 void add_datastream_from_string ( $str,  $datastream_id, [ $datastream_label = NULL], [ $datastream_mimetype = 'text/xml'], [ $controlGroup = 'M'], [ $logMessage = null])
 void add_datastream_from_url ( $datastream_url,  $datastream_id, [ $datastream_label = NULL], [ $datastream_mimetype = ''], [ $controlGroup = 'M'], [ $logMessage = null])
 void add_relationship (string $relationship,  $object, [ $namespaceURI = RELS_EXT_URI])
 void exists ()
 void export_as_foxml ()
 void get_datastream ( $dsid, [ $as_of_date_time = ""])
 SimpleXMLElement get_datastreams_list_as_SimpleXML ()
 void get_datastream_dissemination ( $dsid, [ $as_of_date_time = ""])
 void get_datastream_history ( $dsid)
 datastream get_datastream_info (string $dsid, [ $as_of_date_time = ""])
 void get_dissemination ( $service_definition_pid,  $method_name, [ $parameters = array()], [ $as_of_date_time = null])
 string get_mimetype_of_datastream (string $dsid)
 void get_relationships ([String $relationship = NULL])
 void modify_datastream_by_reference ( $external_url,  $dsid,  $label,  $mime_type, [ $force = FALSE], [ $logMessage = 'Modified by Islandora API'], [ $quiet = FALSE])
 void modify_datastream_by_value ( $content,  $dsid,  $label,  $mime_type, [ $force = FALSE], [ $logMessage = 'Modified by Islandora API'], [ $quiet = FALSE])
 void modify_object ([ $label = ''], [ $state = null], [ $ownerId = null], [ $logMessage = 'Modified by Islandora API'], [ $quiet = TRUE])
 void purge ([ $log_message = 'Purged using Islandora API.'], [ $force = FALSE])
 void purge_datastream ( $dsID, [ $start_date = NULL], [ $end_date = NULL], [ $log_message = 'Purged datastream using Islandora API'], [ $force = FALSE])
 void purge_relationship (string $relationship, string $object)
 void save_relationships ( $relationships)
 void url ()
Variables
mixed $datastreams = NULL (line 18)
  • access: public
mixed $objectProfile = NULL (line 16)
  • access: public
mixed $pid = NULL (line 15)
  • access: public
Methods
static create_object_FOXML (line 739)

Creates the minimal FOXML for a new Fedora object, which is then passed to ingest_from_FOXML to be added to the repository.

static void create_object_FOXML ([string $pid = ''], [string $state = 'A'], [ $label = 'Untitled'], [ $owner = ''])
  • string $pid: if none given, getnextpid will be called.
  • string $state: The initial state, A - Active, I - Inactive, D - Deleted
  • $label
  • $owner
static fedora_item_exists (line 790)
static void fedora_item_exists ( $pid)
  • $pid
static find_objects_by_pattern (line 240)

Does a search using the "query" format followed by the Fedora REST APi.

  • return: of pid => title pairs that match the results
static Array find_objects_by_pattern ([string $pattern = '*'], [string $field = 'pid'], [int $max_results = 100], [ $resultFields = array()])
  • string $pattern: to search for, including wildcards.
  • string $field: The field to search on, e.g. pid, title, cDate. See http://www.fedora-commons.org/confluence/display/FCR30/REST+API#RESTAPI-findObjects for details
  • int $max_results: not used at this time
  • $resultFields
static get_next_PID_in_namespace (line 566)
static void get_next_PID_in_namespace ([ $pid_namespace = ''])
  • $pid_namespace
static ingest_from_FOXML (line 589)
static void ingest_from_FOXML ( $foxml)
  • $foxml
static ingest_from_FOXML_file (line 595)
static void ingest_from_FOXML_file ( $foxml_file)
  • $foxml_file
static ingest_from_FOXML_files_in_directory (line 601)
static void ingest_from_FOXML_files_in_directory ( $path)
  • $path
static ingest_new_item (line 786)
static void ingest_new_item ([ $pid = ''], [ $state = 'A'], [ $label = ''], [ $owner = ''])
  • $pid
  • $state
  • $label
  • $owner
static soap_call (line 667)
static void soap_call ( $function_name,  $params_array, [ $quiet = FALSE])
  • $function_name
  • $params_array
  • $quiet
Constructor __construct (line 29)

Create an object to represent an item in the Fedora repository.

Throws a SOAPException if the PID is not in the repository.

Fedora_Item __construct (string $pid)
  • string $pid
add_datastream_from_file (line 63)
void add_datastream_from_file ( $datastream_file,  $datastream_id, [ $datastream_label = NULL], [ $datastream_mimetype = ''], [ $controlGroup = 'M'], [ $logMessage = null])
  • $datastream_file
  • $datastream_id
  • $datastream_label
  • $datastream_mimetype
  • $controlGroup
  • $logMessage
add_datastream_from_string (line 110)
void add_datastream_from_string ( $str,  $datastream_id, [ $datastream_label = NULL], [ $datastream_mimetype = 'text/xml'], [ $controlGroup = 'M'], [ $logMessage = null])
  • $str
  • $datastream_id
  • $datastream_label
  • $datastream_mimetype
  • $controlGroup
  • $logMessage
add_datastream_from_url (line 84)
void add_datastream_from_url ( $datastream_url,  $datastream_id, [ $datastream_label = NULL], [ $datastream_mimetype = ''], [ $controlGroup = 'M'], [ $logMessage = null])
  • $datastream_url
  • $datastream_id
  • $datastream_label
  • $datastream_mimetype
  • $controlGroup
  • $logMessage
add_relationship (line 127)

Add a relationship string to this object's RELS-EXT.

does not support rels-int yet.

void add_relationship (string $relationship,  $object, [ $namespaceURI = RELS_EXT_URI])
  • string $relationship
  • $object
  • $namespaceURI
exists (line 59)
void exists ()
export_as_foxml (line 222)
void export_as_foxml ()
get_datastream (line 315)
void get_datastream ( $dsid, [ $as_of_date_time = ""])
  • $dsid
  • $as_of_date_time
get_datastreams_list_as_array (line 422)

Returns an associative array of this object's datastreams. Results look like this:

'DC' => array 'label' => string 'Dublin Core Record for this object' (length=34) 'MIMEType' => string 'text/xml' (length=8) 'RELS-EXT' => array 'label' => string 'RDF Statements about this object' (length=32) 'MIMEType' => string 'application/rdf+xml' (length=19)

array get_datastreams_list_as_array ()
get_datastreams_list_as_SimpleXML (line 365)

Retrieves and returns a SimpleXML list of this item's datastreams, and stores them as an instance variable for caching purposes.

SimpleXMLElement get_datastreams_list_as_SimpleXML ()
get_datastream_dissemination (line 298)
void get_datastream_dissemination ( $dsid, [ $as_of_date_time = ""])
  • $dsid
  • $as_of_date_time
get_datastream_history (line 326)
void get_datastream_history ( $dsid)
  • $dsid
get_datastream_info (line 398)

* DatastreamControlGroup controlGroup - String restricted to the values of "X", "M", "R", or "E" (InlineXML,Managed Content,Redirect, or External Referenced).

String ID - The datastream ID (64 characters max). String versionID - The ID of the most recent datastream version String[] altIDs - Alternative IDs for the datastream, if any. String label - The Label of the datastream. boolean versionable - Whether the datastream is versionable. String MIMEType - The mime-type for the datastream, if set. String formatURI - The format uri for the datastream, if set. String createDate - The date the first version of the datastream was created. long size - The size of the datastream in Fedora. Only valid for inline XML metadata and managed content datastreams. String state - The state of the datastream. Will be "A" (active), "I" (inactive) or "D" (deleted). String location - If the datastream is an external reference or redirect, the url to the contents. TODO: Managed? String checksumType - The algorithm used to compute the checksum. One of "DEFAULT", "DISABLED", "MD5", "SHA-1", "SHA-256", "SHA-385", "SHA-512". String checksum - The value of the checksum represented as a hexadecimal string.

  • return: object get the mimetype size etc. in one shot. instead of iterating throught the datastream list for what we need
datastream get_datastream_info (string $dsid, [ $as_of_date_time = ""])
  • string $dsid
  • $as_of_date_time
get_dissemination (line 340)
void get_dissemination ( $service_definition_pid,  $method_name, [ $parameters = array()], [ $as_of_date_time = null])
  • $service_definition_pid
  • $method_name
  • $parameters
  • $as_of_date_time
get_mimetype_of_datastream (line 458)

Returns a MIME type string for the given Datastream ID.

string get_mimetype_of_datastream (string $dsid)
  • string $dsid
get_relationships (line 479)

Currently the Fedora API call getRelationships is reporting an uncaught exception so we will parse the RELS-EXT ourselves and simulate the documented behaviour.

void get_relationships ([String $relationship = NULL])
  • String $relationship: - filter the results to match this string.
modify_datastream_by_reference (line 633)
void modify_datastream_by_reference ( $external_url,  $dsid,  $label,  $mime_type, [ $force = FALSE], [ $logMessage = 'Modified by Islandora API'], [ $quiet = FALSE])
  • $external_url
  • $dsid
  • $label
  • $mime_type
  • $force
  • $logMessage
  • $quiet
modify_datastream_by_value (line 650)
void modify_datastream_by_value ( $content,  $dsid,  $label,  $mime_type, [ $force = FALSE], [ $logMessage = 'Modified by Islandora API'], [ $quiet = FALSE])
  • $content
  • $dsid
  • $label
  • $mime_type
  • $force
  • $logMessage
  • $quiet
modify_object (line 620)
void modify_object ([ $label = ''], [ $state = null], [ $ownerId = null], [ $logMessage = 'Modified by Islandora API'], [ $quiet = TRUE])
  • $label
  • $state
  • $ownerId
  • $logMessage
  • $quiet
purge (line 539)

Removes this object form the repository.

void purge ([ $log_message = 'Purged using Islandora API.'], [ $force = FALSE])
  • $log_message
  • $force
purge_datastream (line 549)
void purge_datastream ( $dsID, [ $start_date = NULL], [ $end_date = NULL], [ $log_message = 'Purged datastream using Islandora API'], [ $force = FALSE])
  • $dsID
  • $start_date
  • $end_date
  • $log_message
  • $force
purge_relationship (line 177)

Removes the given relationship from the item's RELS-EXT and re-saves it.

void purge_relationship (string $relationship, string $object)
  • string $relationship
  • string $object
save_relationships (line 516)

Creates a RELS-EXT XML stream from the supplied array and saves it to the item on the server.

void save_relationships ( $relationships)
  • $relationships
url (line 561)
void url ()

Documentation generated on Thu, 14 Jul 2011 16:29:54 -0300 by phpDocumentor 1.4.3