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 void
fedora_item_exists
( $pid)
Does a search using the "query" format followed by the Fedora REST APi.
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 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 = ''])
-
$pid
-
$state
-
$label
-
$owner
static void
soap_call
( $function_name, $params_array, [ $quiet = FALSE])
-
$function_name
-
$params_array
-
$quiet
Create an object to represent an item in the Fedora repository.
Throws a SOAPException if the PID is not in the repository.
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
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
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 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
void
get_datastream
( $dsid, [ $as_of_date_time = ""])
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
()
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
()
void
get_datastream_dissemination
( $dsid, [ $as_of_date_time = ""])
void
get_datastream_history
( $dsid)
* 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.
datastream
get_datastream_info
(string $dsid, [ $as_of_date_time = ""])
-
string
$dsid
-
$as_of_date_time
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
Returns a MIME type string for the given Datastream ID.
string
get_mimetype_of_datastream
(string $dsid)
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.
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
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
void
modify_object
([ $label = ''], [ $state = null], [ $ownerId = null], [ $logMessage = 'Modified by Islandora API'], [ $quiet = TRUE])
-
$label
-
$state
-
$ownerId
-
$logMessage
-
$quiet
Removes this object form the repository.
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])
-
$dsID
-
$start_date
-
$end_date
-
$log_message
-
$force
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
Creates a RELS-EXT XML stream from the supplied array and saves it to the item on the server.
void
save_relationships
( $relationships)