Browse Source

Merge branch 'master' of github.com:Islandora/islandora

pull/105/head
mroy 14 years ago
parent
commit
46e9f92fbc
  1. 4
      ObjectHelper.inc
  2. 273
      content_models/islandora_largeimages.xml
  3. 2
      fedora_repository.module
  4. 2
      formClass.inc

4
ObjectHelper.inc

@ -430,7 +430,7 @@ class ObjectHelper {
$dataStreamBody = "<br /><table>\n";
$cmDatastreams = array();
if (variable_get('fedora_object_restrict_datastreams', TRUE) == TRUE && ($cm = ContentModel::loadFromObject($object_pid)) !== FALSE) {
if (variable_get('fedora_object_restrict_datastreams', FALSE) == TRUE && ($cm = ContentModel::loadFromObject($object_pid)) !== FALSE) {
$cmDatastreams = $cm->listDatastreams();
}
@ -439,7 +439,7 @@ class ObjectHelper {
foreach ($object as $datastream) {
foreach ($datastream as $datastreamValue) {
if (variable_get('fedora_object_restrict_datastreams', TRUE) == FALSE || ((isset($user) && in_array('administrator',$user->roles)) || in_array($datastreamValue->ID,$cmDatastreams))) {
if (variable_get('fedora_object_restrict_datastreams', FALSE) == FALSE || ((isset($user) && in_array('administrator',$user->roles)) || in_array($datastreamValue->ID,$cmDatastreams))) {
if ($datastreamValue->ID == 'OBJ') {
$hasOBJStream = '1';
$mainStreamLabel = $datastreamValue->label;

273
content_models/islandora_largeimages.xml

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Large Image Collection"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Large Images Collection"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-01-26T21:29:20.416Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-12-10T17:32:17.345Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-12-20T16:02:16.800Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-12-20T16:09:32.544Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2010-01-26T21:29:20.416Z"
<foxml:datastreamVersion CREATED="2010-12-20T16:02:16.800Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
@ -17,48 +17,48 @@
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-01-26T21:29:20.416Z</audit:date>
<audit:justification>Created with Admin GUI "New Object" command</audit:justification>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:02:16.800Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:componentID>COLLECTION_POLICY</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-01-26T21:30:55.607Z</audit:date>
<audit:justification>DatastreamsPane generated this logMessage.</audit:justification>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:02:17.020Z</audit:date>
<audit:justification>Ingested object RELS-EXT</audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-01-26T21:33:14.125Z</audit:date>
<audit:justification/>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:02:17.091Z</audit:date>
<audit:justification>Modified by Islandora API</audit:justification>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>COLLECTION_POLICY</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-04T12:50:05.983Z</audit:date>
<audit:justification/>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:02:17.142Z</audit:date>
<audit:justification>Modified by Islandora API</audit:justification>
</audit:record>
<audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:action>addDatastream</audit:action>
<audit:componentID>COLLECTION_POLICY</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-11T21:01:44.921Z</audit:date>
<audit:justification/>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:02:17.213Z</audit:date>
<audit:justification>Ingested object COLLECTION_POLICY</audit:justification>
</audit:record>
<audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-10T17:29:47.073Z</audit:date>
<audit:date>2010-12-20T16:08:27.075Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
<audit:record ID="AUDREC7">
@ -66,15 +66,23 @@
<audit:action>addDatastream</audit:action>
<audit:componentID>TN</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-10T17:29:47.200Z</audit:date>
<audit:date>2010-12-20T16:08:27.131Z</audit:date>
<audit:justification>Ingested object TN</audit:justification>
</audit:record>
<audit:record ID="AUDREC8">
<audit:process type="Fedora API-M"/>
<audit:action>purgeDatastream</audit:action>
<audit:componentID>TN</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-12-20T16:09:24.726Z</audit:date>
<audit:justification>DatastreamPane generated this logMessage. . . . Purged datastream (ID=TN), versions ranging from 2010-12-20T12:08:27.131Z to 2010-12-20T12:08:27.131Z. This resulted in the permanent removal of 1 datastream version(s) (2010-12-20T12:08:27.131Z) and all associated audit records.</audit:justification>
</audit:record>
<audit:record ID="AUDREC9">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>COLLECTION_POLICY</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-12-10T17:32:17.345Z</audit:date>
<audit:date>2010-12-20T16:09:32.544Z</audit:date>
<audit:justification/>
</audit:record>
</audit:auditTrail>
@ -82,172 +90,68 @@
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-01-26T21:29:20.416Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="396">
<foxml:datastreamVersion CREATED="2010-12-20T16:02:16.800Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="397">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Large Image Collection</dc:title>
<dc:title>Large Images Collection</dc:title>
<dc:identifier>islandora:largeimages</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="COLLECTION_POLICY" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-01-26T21:30:55.607Z" ID="COLLECTION_POLICY.0" LABEL="Collection Policy.xml"
MIMETYPE="text/xml" SIZE="1558">
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-12-20T16:02:17.020Z" ID="RELS-EXT.0"
LABEL="Fedora object-to-object relationship metadata" MIMETYPE="text/xml" SIZE="178">
<foxml:xmlContent>
<collection_policy>
<contentmodels>
<contentmodel name="SLIDE_CMODEL">
<pid_namespace>islandora:slide</pid_namespace>
<pid>islandora:slideCModel</pid>
<dsid>ISLANDORACM</dsid>
</contentmodel>
</contentmodels>
<relationship>isMemberOfCollection</relationship>
<search_terms>
<default>dc.description</default>
<term>
<field>dc.title</field>
<value>dc.title</value>
</term>
<term>
<field>dc.creator</field>
<value>dc.creator</value>
</term>
<term>
<field>dc.description</field>
<value>dc.description</value>
</term>
<term>
<field>dc.date</field>
<value>dc.date</value>
</term>
<term>
<field>dc.identifier</field>
<value>dc.identifier</value>
</term>
<term>
<field>dc.language</field>
<value>dc.language</value>
</term>
<term>
<field>dc.publisher</field>
<value>dc.publisher</value>
</term>
<term>
<field>dc.rights</field>
<value>dc.rights</value>
</term>
<term>
<field>dc.subject</field>
<value>dc.subject</value>
</term>
<term>
<field>dc.relation</field>
<value>dc.relation</value>
</term>
<term>
<field>dcterms.temporal</field>
<value>dcterms.temporal</value>
</term>
<term>
<field>dcterms.spatial</field>
<value>dcterms.spatial</value>
</term>
<term>
<field>fgs.DS.first.text</field>
<value>Full Text</value>
</term>
</search_terms>
</collection_policy>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:largeimages"/>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-12-20T16:02:17.091Z" ID="RELS-EXT.1"
LABEL="Fedora Object-to-Object Relationship Metadata" MIMETYPE="text/xml" SIZE="361">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:largeimages">
<fedora-model:hasModel rdf:resource="info:fedora/islandora:collectionCModel" xmlns:fedora-model="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-12-20T16:02:17.142Z" ID="RELS-EXT.2"
LABEL="Fedora Object-to-Object Relationship Metadata" MIMETYPE="text/xml" SIZE="520">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:largeimages">
<fedora-model:hasModel rdf:resource="info:fedora/islandora:collectionCModel" xmlns:fedora-model="info:fedora/fedora-system:def/model#"/>
<isMemberOfCollection rdf:resource="info:fedora/islandora:demos" xmlns="info:fedora/fedora-system:def/relations-external#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-03-04T12:50:05.983Z" ID="COLLECTION_POLICY.1" LABEL="Collection Policy.xml"
MIMETYPE="text/xml" SIZE="1739">
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="COLLECTION_POLICY" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-12-20T16:02:17.213Z" ID="COLLECTION_POLICY.0" LABEL="Large Images Collection"
MIMETYPE="text/xml" SIZE="2533">
<foxml:xmlContent>
<collection_policy>
<collection_policy name="Large Images Collection">
<contentmodels>
<contentmodel name="SLIDE_CMODEL">
<pid_namespace>islandora:slide</pid_namespace>
<pid>islandora:slideCModel</pid>
<dsid>ISLANDORACM</dsid>
</contentmodel>
<contentmodel name="HERBARIUM_CMODEL">
<pid_namespace>islandora:herb</pid_namespace>
<pid>islandora:herbCModel</pid>
<contentmodel name="MAP_CMODEL">
<pid_namespace>islandora:map</pid_namespace>
<pid>islandora:mapCModel</pid>
<dsid>ISLANDORACM</dsid>
</contentmodel>
</contentmodels>
<relationship>isMemberOfCollection</relationship>
<search_terms>
<default>dc.description</default>
<term>
<field>dc.title</field>
<value>dc.title</value>
</term>
<term>
<field>dc.creator</field>
<value>dc.creator</value>
</term>
<term>
<field>dc.description</field>
<value>dc.description</value>
</term>
<term>
<field>dc.date</field>
<value>dc.date</value>
</term>
<term>
<field>dc.identifier</field>
<value>dc.identifier</value>
</term>
<term>
<field>dc.language</field>
<value>dc.language</value>
</term>
<term>
<field>dc.publisher</field>
<value>dc.publisher</value>
</term>
<term>
<field>dc.rights</field>
<value>dc.rights</value>
</term>
<term>
<field>dc.subject</field>
<value>dc.subject</value>
</term>
<term>
<field>dc.relation</field>
<value>dc.relation</value>
</term>
<term>
<field>dcterms.temporal</field>
<value>dcterms.temporal</value>
</term>
<term>
<field>dcterms.spatial</field>
<value>dcterms.spatial</value>
</term>
<term>
<field>fgs.DS.first.text</field>
<value>Full Text</value>
</term>
</search_terms>
</collection_policy>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-03-11T21:01:44.921Z" ID="COLLECTION_POLICY.2" LABEL="Collection Policy.xml"
MIMETYPE="text/xml" SIZE="1555">
<foxml:xmlContent>
<collection_policy>
<contentmodels>
<contentmodel name="SLIDE_CMODEL">
<pid_namespace>islandora:slide</pid_namespace>
<pid>islandora:slideCModel</pid>
<contentmodel name="HERB_CMODEL">
<pid_namespace>islandora:herb</pid_namespace>
<pid>islandora:herbCModel</pid>
<dsid>ISLANDORACM</dsid>
</contentmodel>
</contentmodels>
@ -310,12 +214,15 @@
</collection_policy>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-12-10T17:32:17.345Z" ID="COLLECTION_POLICY.3" LABEL="Collection Policy.xml"
MIMETYPE="text/xml" SIZE="1152">
<foxml:datastreamVersion CREATED="2010-12-20T16:09:32.544Z" ID="COLLECTION_POLICY.1" LABEL="Large Images Collection"
MIMETYPE="text/xml" SIZE="1428">
<foxml:xmlContent>
<collection_policy name="" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<collection_policy name="Large Images Collection" xmlns="http://www.islandora.ca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="SLIDE_CMODEL" namespace="islandora:slide" pid="islandora:slideCModel"/>
<content_model dsid="ISLANDORACM" name="MAP_CMODEL" namespace="islandora:map" pid="islandora:mapCModel"/>
<content_model dsid="ISLANDORACM" name="HERB_CMODEL" namespace="islandora:herb" pid="islandora:herbCModel"/>
</content_models>
<search_terms>
<term field="dc.title">dc.title</term>
@ -337,22 +244,4 @@
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-01-26T21:33:14.125Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="441">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:largeimages">
<isMemberOfCollection rdf:resource="info:fedora/islandora:demos" xmlns="info:fedora/fedora-system:def/relations-external#"/>
<hasModel rdf:resource="info:fedora/islandora:collectionCModel" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="M" ID="TN" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-12-10T17:29:47.200Z" ID="TN.0" LABEL="Thumbnail.png" MIMETYPE="image/png">
<foxml:contentLocation REF="http://localhost:8080/fedora/get/islandora:largeimages/TN/2010-12-10T17:29:47.200Z" TYPE="INTERNAL_ID"/>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

2
fedora_repository.module

@ -1410,7 +1410,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
try {
$item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'fedora_repository') . '/content_models/islandora_largeimages.xml');
$tn = $item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:largeImages\">islandora:largeImages</a>.", 'message');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:largeimages\">islandora:largeimages</a>.", 'message');
} catch (exception $e) {
$error .= " - Problem ingesting islandora:largeimages collection";
}

2
formClass.inc

@ -396,7 +396,7 @@ class formClass {
$form['fedora_object_restrict_datastreams'] = array(
'#type' => 'checkbox',
'#title' => t('Restrict Access to Fedora Object Datastreams'),
'#default_value'=> variable_get('fedora_object_restrict_datastreams', TRUE),
'#default_value'=> variable_get('fedora_object_restrict_datastreams', FALSE),
'#description' => t('When enabled, restricts access to fedora object datastreams that are not listed in the Islandora Content Model for the object (unless the user is an administrator).'),
);

Loading…
Cancel
Save