Class ObjectHelper

Description

Located in /ObjectHelper.inc (line 15)


	
			
Variable Summary
Method Summary
 static void warnIfMisconfigured ( $app)
 ObjectHelper ObjectHelper ()
 void createExtraFieldsets ( $pid,  $contentModel,  $page_number)
 void create_link_for_ds ($pid $pid, $dataStreamValue $dataStreamValue)
 void fedora_repository_access ( $op,  $pid)
 void getBreadcrumbs ( $pid,  &$breadcrumbs, [ $level = 10])
 void getCollectionInfo ( $pid, [ $query = NULL])
 void getDatastreamInfo ( $pid,  $dsID)
 void getFormattedDC ( $item)
 void getMimeType ( $pid,  $dsID)
 void getObject ( $pid, [ $context = 'archive'], [ $format = FOXML_11])
 String getQDC ($pid $pid)
 void getStream ( $pid,  $dsid, [ $showError = FALSE])
 void get_all_related_pids ( $pid)
 boolean get_and_do_datastream_rules (string $pid, string $dsid, [ $file = ''])
 void get_child_pids ( $pids)
 void get_content_models_list ( $pid, [ $include_fedora_system_content_models = FALSE])
 String get_formatted_datastream_list ($object_pid $object_pid,  $contentModels,  &$fedoraItem)
 unknown get_parent_objects (unknown_type $pid)
 void makeObject ($pid $pid, $dsID $dsID, [ $asAttachment = FALSE], [ $label = NULL], [ $filePath = FALSE], [ $version = NULL], [ $forceSoap = TRUE])
 void parseContent ($content $content,  $pid,  $dsId,  $collection, [ $pageNumber = NULL])
Variables
static mixed $ADD_FEDORA_STREAMS = 'add fedora datastreams' (line 21)
  • access: public
static mixed $DISPLAY_ALWAYS = 0 (line 25)
  • access: public
static mixed $DISPLAY_NEVER = 1 (line 26)
  • access: public
static mixed $DISPLAY_NO_MODEL_OUTPUT = 2 (line 27)
  • access: public
static mixed $EDIT_FEDORA_METADATA = 'edit fedora meta data' (line 19)
  • access: public
static mixed $EDIT_TAGS_DATASTREAM = 'edit tags datastream' (line 23)
  • access: public
static mixed $INGEST_FEDORA_OBJECTS = 'ingest new fedora objects' (line 22)
  • access: public
static mixed $OBJECT_HELPER_VIEW_FEDORA = 'view fedora collection' (line 18)
  • access: public
static mixed $PURGE_FEDORA_OBJECTSANDSTREAMS = 'purge objects and datastreams' (line 20)
  • access: public
static mixed $VIEW_DETAILED_CONTENT_LIST = 'view detailed list of content' (line 24)
  • access: public
mixed $availableDataStreamsText = 'Detailed list of content' (line 29)
  • access: public
Methods
static warnIfMisconfigured (line 892)
  • access: public
static void warnIfMisconfigured ( $app)
  • $app
Constructor ObjectHelper (line 31)
ObjectHelper ObjectHelper ()
createExtraFieldsets (line 730)

gets a list of datastreams and related function that we should use to show datastreams in their own fieldsets

from the content model associated with the object

void createExtraFieldsets ( $pid,  $contentModel,  $page_number)
  • $pid
  • $contentModel
  • $page_number
create_link_for_ds (line 257)

internal function

void create_link_for_ds ($pid $pid, $dataStreamValue $dataStreamValue)
  • $pid $pid: String
  • $dataStreamValue $dataStreamValue: Object
fedora_repository_access (line 554)
void fedora_repository_access ( $op,  $pid)
  • $op
  • $pid
getBreadcrumbs (line 853)

Builds an array of drupal links for use in breadcrumbs.

void getBreadcrumbs ( $pid,  &$breadcrumbs, [ $level = 10])
  • $pid
  • &$breadcrumbs
  • $level
getCollectionInfo (line 186)
void getCollectionInfo ( $pid, [ $query = NULL])
  • $pid
  • $query
getDatastreamInfo (line 224)
void getDatastreamInfo ( $pid,  $dsID)
  • $pid
  • $dsID
getFormattedDC (line 318)
void getFormattedDC ( $item)
  • $item
getMimeType (line 196)

returns the mime type

void getMimeType ( $pid,  $dsID)
  • $pid
  • $dsID
getObject (line 842)

Returns XML description of the object (export).

void getObject ( $pid, [ $context = 'archive'], [ $format = FOXML_11])
  • $pid
  • $context
  • $format
getQDC (line 364)

Queries fedora for what we call the qualified dublin core. Currently only dc.coverage has

any qualified fields Transforms the returned xml to html This is the default metadata view. With icons for searching a dublin core field

String getQDC ($pid $pid)
  • $pid $pid: String
getStream (line 479)

returns a stream from a fedora object given a pid and dsid

void getStream ( $pid,  $dsid, [ $showError = FALSE])
  • $pid
  • $dsid
  • $showError
get_all_related_pids (line 768)

Get a tree of related pids - for the basket functionality

void get_all_related_pids ( $pid)
  • $pid
get_and_do_datastream_rules (line 753)

Look in the content model for rules to run on the specified datastream.

boolean get_and_do_datastream_rules (string $pid, string $dsid, [ $file = ''])
  • string $pid
  • string $dsid
  • $file
get_child_pids (line 797)

Get children of PID - but only 2 levels deep

void get_child_pids ( $pids)
  • $pids
get_content_models_list (line 511)
void get_content_models_list ( $pid, [ $include_fedora_system_content_models = FALSE])
  • $pid
  • $include_fedora_system_content_models
get_formatted_datastream_list (line 402)

Gets a list of datastreams from an object using its pid

We make some assumptions here. We have implemented a policy that we ingest in our repository will have TN (thumbnail) datastream. Even audio will have a picture of a speaker or something. This is not critical but makes searches etc. look better if there is a TN stream. This diplays all the streams in a collapsed fieldset at the bottom of the object page. you can implement a content model if you would like certain streams displayed in certain ways.

String get_formatted_datastream_list ($object_pid $object_pid,  $contentModels,  &$fedoraItem)
  • $object_pid $object_pid: String
  • $contentModels
  • &$fedoraItem
get_parent_objects (line 688)

Gets the parent objects that this object is related to

unknown get_parent_objects (unknown_type $pid)
  • unknown_type $pid
get_parent_objects_asHTML (line 698)
void get_parent_objects_asHTML ( $pid)
  • $pid
makeObject (line 46)

Grabs a stream from fedora sets the mimetype and returns it. $dsID is the datastream id. If $forceSoap is set, the function will always buffer the datastream from fedora. Otherwise, it will try and use a redirect if possible.

void makeObject ($pid $pid, $dsID $dsID, [ $asAttachment = FALSE], [ $label = NULL], [ $filePath = FALSE], [ $version = NULL], [ $forceSoap = TRUE])
  • $pid $pid: String
  • $dsID $dsID: String
  • $asAttachment
  • $label
  • $filePath
  • $version
  • $forceSoap
parseContent (line 591)

internal function uses an xsl to parse the sparql xml returned from the ITQL query

void parseContent ($content $content,  $pid,  $dsId,  $collection, [ $pageNumber = NULL])
  • $content $content: String
  • $pid
  • $dsId
  • $collection
  • $pageNumber

Documentation generated on Thu, 14 Jul 2011 16:56:05 -0300 by phpDocumentor 1.4.3