Browse Source

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

pull/105/head
root 14 years ago
parent
commit
1a7e59d551
  1. 24
      MimeClass.inc
  2. 25
      ObjectHelper.inc
  3. 654
      content_models/islandora_largeimages.xml
  4. 38
      formClass.inc
  5. 11
      plugins/pidfield/pidfield.module

24
MimeClass.inc

@ -163,6 +163,9 @@ class MimeClass {
"mpeg" => "video/mpeg", "mpeg" => "video/mpeg",
"mpe" => "video/mpeg", "mpe" => "video/mpeg",
"mpg" => "video/mpeg", "mpg" => "video/mpeg",
"m4v" => "video/mp4",
"mp4" => "video/mp4",
"ogv" => "video/ogg",
"qt" => "video/quicktime", "qt" => "video/quicktime",
"mov" => "video/quicktime", "mov" => "video/quicktime",
"mxu" => "video/vnd.mpegurl", "mxu" => "video/vnd.mpegurl",
@ -170,12 +173,20 @@ class MimeClass {
"movie" => "video/x-sgi-movie", "movie" => "video/x-sgi-movie",
"flv" => "video/x-flv", "flv" => "video/x-flv",
"swf" => "application/x-shockwave-flash", "swf" => "application/x-shockwave-flash",
// audio:
"mp3" => "audio/mpeg",
"mp4a" => "audio/mp4",
"m4a" => "audio/mp4",
"oga" => "audio/ogg",
"ogg" => "audio/ogg",
"flac" => "audio/x-flac",
"wav" => "audio/vnd.wave",
// compressed formats: (note: http://svn.cleancode.org/svn/email/trunk/mime.types) // compressed formats: (note: http://svn.cleancode.org/svn/email/trunk/mime.types)
"tgz" => "application/x-gzip", "tgz" => "application/x-gzip",
"gz" => "application/x-gzip", "gz" => "application/x-gzip",
"tar" => "application/x-tar", "tar" => "application/x-tar",
"gtar" => "application/x-gtar", "gtar" => "application/x-gtar",
"zip" => "application/x-zip", "zip" => "application/x-zip",
// others: // others:
'bin' => 'application/octet-stream', 'bin' => 'application/octet-stream',
); );
@ -323,14 +334,3 @@ class MimeClass {
} }
/*
$helper = new MimeClass();
print "get_extension('application/x-gzip'): \n";
echo print_r( $helper->get_extension('application/x-gzip', true), true ) . "\n";
print "get_extension('text/plain'): \n";
echo print_r( $helper->get_extension('text/plain', true), true ) . "\n";
print "get_mimetype('fucker/asdf.tar.gz'): \n";
echo print_r( $helper->get_mimetype('fucker/asdf.tar.gz', true), true ) . "\n";
print "get_mimetype('blah.tsp'): \n";
echo print_r( $helper->get_mimetype('blah.tsp', true), true ) . "\n";
/* */

25
ObjectHelper.inc

@ -54,25 +54,26 @@ class ObjectHelper {
return ' '; return ' ';
} }
if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) {
drupal_set_message(t("You do not have access Fedora objects within the attempted namespace."), 'error'); drupal_set_message(t("You do not have access Fedora objects within the attempted namespace."), 'error');
drupal_access_denied(); drupal_access_denied();
return ' '; return ' ';
} }
if (($cm = ContentModel::loadFromObject($pid)) == FALSE) {
drupal_set_message(t("You do not have access to objects without an Islandora Content Model."), 'error');
drupal_access_denied();
return ' ';
}
$cmDatastreams = $cm->listDatastreams();
if (variable_get('fedora_object_restrict_datastreams', TRUE) == TRUE ) {
if (($cm = ContentModel::loadFromObject($pid)) == FALSE) {
drupal_set_message(t("You do not have access to objects without an Islandora Content Model."), 'error');
drupal_access_denied();
return ' ';
}
if ( !((isset($user) && in_array('administrator',$user->roles)) || in_array($dsID,$cmDatastreams))) { $cmDatastreams = $cm->listDatastreams();
drupal_set_message(t("You do not have access to the specified datastream."), 'error'); if ( !((isset($user) && in_array('administrator',$user->roles)) || in_array($dsID,$cmDatastreams))) {
drupal_access_denied(); drupal_set_message(t("You do not have access to the specified datastream."), 'error');
return ' '; drupal_access_denied();
return ' ';
}
} }
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');

654
content_models/islandora_largeimages.xml

@ -1,298 +1,358 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject VERSION="1.1" PID="islandora:largeimages" <foxml:digitalObject PID="islandora:largeimages" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:foxml="info:fedora/fedora-system:def/foxml#" 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">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <foxml:objectProperties>
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd"> <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:objectProperties> <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Large Image Collection"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/> <foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Large Image Collection"/> <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/model#ownerId" VALUE="fedoraAdmin"/> <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-01-26T21:29:20.416Z"/> </foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-03-11T21:01:44.921Z"/> <foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
</foxml:objectProperties> <foxml:datastreamVersion CREATED="2010-01-26T21:29:20.416Z"
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false"> FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:datastreamVersion ID="AUDIT.0" LABEL="Audit Trail for this object" CREATED="2010-01-26T21:29:20.416Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit"> <foxml:xmlContent>
<foxml:xmlContent> <audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#"> <audit:record ID="AUDREC1">
<audit:record ID="AUDREC1"> <audit:process type="Fedora API-M"/>
<audit:process type="Fedora API-M"/> <audit:action>ingest</audit:action>
<audit:action>ingest</audit:action> <audit:componentID/>
<audit:componentID></audit:componentID> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:date>2010-01-26T21:29:20.416Z</audit:date>
<audit:date>2010-01-26T21:29:20.416Z</audit:date> <audit:justification>Created with Admin GUI "New Object" command</audit:justification>
<audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification> </audit:record>
</audit:record> <audit:record ID="AUDREC2">
<audit:record ID="AUDREC2"> <audit:process type="Fedora API-M"/>
<audit:process type="Fedora API-M"/> <audit:action>addDatastream</audit:action>
<audit:action>addDatastream</audit:action> <audit:componentID>COLLECTION_POLICY</audit:componentID>
<audit:componentID>COLLECTION_POLICY</audit:componentID> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:date>2010-01-26T21:30:55.607Z</audit:date>
<audit:date>2010-01-26T21:30:55.607Z</audit:date> <audit:justification>DatastreamsPane generated this logMessage.</audit:justification>
<audit:justification>DatastreamsPane generated this logMessage.</audit:justification> </audit:record>
</audit:record> <audit:record ID="AUDREC3">
<audit:record ID="AUDREC3"> <audit:process type="Fedora API-M"/>
<audit:process type="Fedora API-M"/> <audit:action>addDatastream</audit:action>
<audit:action>addDatastream</audit:action> <audit:componentID>RELS-EXT</audit:componentID>
<audit:componentID>RELS-EXT</audit:componentID> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:date>2010-01-26T21:33:14.125Z</audit:date>
<audit:date>2010-01-26T21:33:14.125Z</audit:date> <audit:justification/>
<audit:justification></audit:justification> </audit:record>
</audit:record> <audit:record ID="AUDREC4">
<audit:record ID="AUDREC4"> <audit:process type="Fedora API-M"/>
<audit:process type="Fedora API-M"/> <audit:action>modifyDatastreamByValue</audit:action>
<audit:action>modifyDatastreamByValue</audit:action> <audit:componentID>COLLECTION_POLICY</audit:componentID>
<audit:componentID>COLLECTION_POLICY</audit:componentID> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:date>2010-03-04T12:50:05.983Z</audit:date>
<audit:date>2010-03-04T12:50:05.983Z</audit:date> <audit:justification/>
<audit:justification></audit:justification> </audit:record>
</audit:record> <audit:record ID="AUDREC5">
<audit:record ID="AUDREC5"> <audit:process type="Fedora API-M"/>
<audit:process type="Fedora API-M"/> <audit:action>modifyDatastreamByValue</audit:action>
<audit:action>modifyDatastreamByValue</audit:action> <audit:componentID>COLLECTION_POLICY</audit:componentID>
<audit:componentID>COLLECTION_POLICY</audit:componentID> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:date>2010-03-11T21:01:44.921Z</audit:date>
<audit:date>2010-03-11T21:01:44.921Z</audit:date> <audit:justification/>
<audit:justification></audit:justification> </audit:record>
</audit:record> <audit:record ID="AUDREC6">
</audit:auditTrail> <audit:process type="Fedora API-M"/>
</foxml:xmlContent> <audit:action>ingest</audit:action>
</foxml:datastreamVersion> <audit:componentID/>
</foxml:datastream> <audit:responsibility>admin</audit:responsibility>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <audit:date>2010-12-10T17:29:47.073Z</audit:date>
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2010-01-26T21:29:20.416Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="396"> <audit:justification>Fedora Object Ingested</audit:justification>
<foxml:xmlContent> </audit:record>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" 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"> <audit:record ID="AUDREC7">
<dc:title>Large Image Collection</dc:title> <audit:process type="Fedora API-M"/>
<dc:identifier>islandora:largeimages</dc:identifier> <audit:action>addDatastream</audit:action>
</oai_dc:dc> <audit:componentID>TN</audit:componentID>
</foxml:xmlContent> <audit:responsibility>admin</audit:responsibility>
</foxml:datastreamVersion> <audit:date>2010-12-10T17:29:47.200Z</audit:date>
</foxml:datastream> <audit:justification>Ingested object TN</audit:justification>
<foxml:datastream ID="COLLECTION_POLICY" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> </audit:record>
<foxml:datastreamVersion ID="COLLECTION_POLICY.0" LABEL="Collection Policy.xml" CREATED="2010-01-26T21:30:55.607Z" MIMETYPE="text/xml" SIZE="1558"> <audit:record ID="AUDREC8">
<foxml:xmlContent> <audit:process type="Fedora API-M"/>
<collection_policy> <audit:action>modifyDatastreamByValue</audit:action>
<contentmodels> <audit:componentID>COLLECTION_POLICY</audit:componentID>
<contentmodel name="SLIDE_CMODEL"> <audit:responsibility>fedoraAdmin</audit:responsibility>
<pid_namespace>islandora:slide</pid_namespace> <audit:date>2010-12-10T17:32:17.345Z</audit:date>
<pid>islandora:slideCModel</pid> <audit:justification/>
<dsid>ISLANDORACM</dsid> </audit:record>
</contentmodel> </audit:auditTrail>
</contentmodels> </foxml:xmlContent>
</foxml:datastreamVersion>
<relationship>isMemberOfCollection</relationship> </foxml:datastream>
<search_terms> <foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<default>dc.description</default> <foxml:datastreamVersion CREATED="2010-01-26T21:29:20.416Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
<term> ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="396">
<field>dc.title</field> <foxml:xmlContent>
<value>dc.title</value> <oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
</term> xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
<term> 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">
<field>dc.creator</field> <dc:title>Large Image Collection</dc:title>
<value>dc.creator</value> <dc:identifier>islandora:largeimages</dc:identifier>
</term> </oai_dc:dc>
<term> </foxml:xmlContent>
<field>dc.description</field> </foxml:datastreamVersion>
<value>dc.description</value> </foxml:datastream>
</term> <foxml:datastream CONTROL_GROUP="X" ID="COLLECTION_POLICY" STATE="A" VERSIONABLE="true">
<term> <foxml:datastreamVersion CREATED="2010-01-26T21:30:55.607Z" ID="COLLECTION_POLICY.0" LABEL="Collection Policy.xml"
<field>dc.date</field> MIMETYPE="text/xml" SIZE="1558">
<value>dc.date</value> <foxml:xmlContent>
</term> <collection_policy>
<term> <contentmodels>
<field>dc.identifier</field> <contentmodel name="SLIDE_CMODEL">
<value>dc.identifier</value> <pid_namespace>islandora:slide</pid_namespace>
</term> <pid>islandora:slideCModel</pid>
<term> <dsid>ISLANDORACM</dsid>
<field>dc.language</field> </contentmodel>
<value>dc.language</value> </contentmodels>
</term> <relationship>isMemberOfCollection</relationship>
<term> <search_terms>
<field>dc.publisher</field> <default>dc.description</default>
<value>dc.publisher</value> <term>
</term> <field>dc.title</field>
<term> <value>dc.title</value>
<field>dc.rights</field> </term>
<value>dc.rights</value> <term>
</term> <field>dc.creator</field>
<term> <value>dc.creator</value>
<field>dc.subject</field> </term>
<value>dc.subject</value> <term>
</term> <field>dc.description</field>
<term> <value>dc.description</value>
<field>dc.relation</field> </term>
<value>dc.relation</value> <term>
</term> <field>dc.date</field>
<term> <value>dc.date</value>
<field>dcterms.temporal</field> </term>
<value>dcterms.temporal</value> <term>
</term> <field>dc.identifier</field>
<term> <value>dc.identifier</value>
<field>dcterms.spatial</field> </term>
<value>dcterms.spatial</value> <term>
</term> <field>dc.language</field>
<term> <value>dc.language</value>
<field>fgs.DS.first.text</field> </term>
<value>Full Text</value> <term>
</term> <field>dc.publisher</field>
</search_terms> <value>dc.publisher</value>
</collection_policy> </term>
</foxml:xmlContent> <term>
</foxml:datastreamVersion> <field>dc.rights</field>
<foxml:datastreamVersion ID="COLLECTION_POLICY.1" LABEL="Collection Policy.xml" CREATED="2010-03-04T12:50:05.983Z" MIMETYPE="text/xml" SIZE="1739"> <value>dc.rights</value>
<foxml:xmlContent> </term>
<collection_policy> <term>
<contentmodels> <field>dc.subject</field>
<contentmodel name="SLIDE_CMODEL"> <value>dc.subject</value>
<pid_namespace>islandora:slide</pid_namespace> </term>
<pid>islandora:slideCModel</pid> <term>
<dsid>ISLANDORACM</dsid> <field>dc.relation</field>
</contentmodel> <value>dc.relation</value>
<contentmodel name="HERBARIUM_CMODEL"> </term>
<pid_namespace>islandora:herb</pid_namespace> <term>
<pid>islandora:herbCModel</pid> <field>dcterms.temporal</field>
<dsid>ISLANDORACM</dsid> <value>dcterms.temporal</value>
</contentmodel> </term>
</contentmodels> <term>
<relationship>isMemberOfCollection</relationship> <field>dcterms.spatial</field>
<search_terms> <value>dcterms.spatial</value>
<default>dc.description</default> </term>
<term> <term>
<field>dc.title</field> <field>fgs.DS.first.text</field>
<value>dc.title</value> <value>Full Text</value>
</term> </term>
<term> </search_terms>
<field>dc.creator</field> </collection_policy>
<value>dc.creator</value> </foxml:xmlContent>
</term> </foxml:datastreamVersion>
<term> <foxml:datastreamVersion CREATED="2010-03-04T12:50:05.983Z" ID="COLLECTION_POLICY.1" LABEL="Collection Policy.xml"
<field>dc.description</field> MIMETYPE="text/xml" SIZE="1739">
<value>dc.description</value> <foxml:xmlContent>
</term> <collection_policy>
<term> <contentmodels>
<field>dc.date</field> <contentmodel name="SLIDE_CMODEL">
<value>dc.date</value> <pid_namespace>islandora:slide</pid_namespace>
</term> <pid>islandora:slideCModel</pid>
<term> <dsid>ISLANDORACM</dsid>
<field>dc.identifier</field> </contentmodel>
<value>dc.identifier</value> <contentmodel name="HERBARIUM_CMODEL">
</term> <pid_namespace>islandora:herb</pid_namespace>
<term> <pid>islandora:herbCModel</pid>
<field>dc.language</field> <dsid>ISLANDORACM</dsid>
<value>dc.language</value> </contentmodel>
</term> </contentmodels>
<term> <relationship>isMemberOfCollection</relationship>
<field>dc.publisher</field> <search_terms>
<value>dc.publisher</value> <default>dc.description</default>
</term> <term>
<term> <field>dc.title</field>
<field>dc.rights</field> <value>dc.title</value>
<value>dc.rights</value> </term>
</term> <term>
<term> <field>dc.creator</field>
<field>dc.subject</field> <value>dc.creator</value>
<value>dc.subject</value> </term>
</term> <term>
<term> <field>dc.description</field>
<field>dc.relation</field> <value>dc.description</value>
<value>dc.relation</value> </term>
</term> <term>
<term> <field>dc.date</field>
<field>dcterms.temporal</field> <value>dc.date</value>
<value>dcterms.temporal</value> </term>
</term> <term>
<term> <field>dc.identifier</field>
<field>dcterms.spatial</field> <value>dc.identifier</value>
<value>dcterms.spatial</value> </term>
</term> <term>
<term> <field>dc.language</field>
<field>fgs.DS.first.text</field> <value>dc.language</value>
<value>Full Text</value> </term>
</term> <term>
</search_terms> <field>dc.publisher</field>
</collection_policy> <value>dc.publisher</value>
</foxml:xmlContent> </term>
</foxml:datastreamVersion> <term>
<foxml:datastreamVersion ID="COLLECTION_POLICY.2" LABEL="Collection Policy.xml" CREATED="2010-03-11T21:01:44.921Z" MIMETYPE="text/xml" SIZE="1915"> <field>dc.rights</field>
<foxml:xmlContent> <value>dc.rights</value>
<collection_policy> </term>
<contentmodels> <term>
<contentmodel name="SLIDE_CMODEL"> <field>dc.subject</field>
<pid_namespace>islandora:slide</pid_namespace> <value>dc.subject</value>
<pid>islandora:slideCModel</pid> </term>
<dsid>ISLANDORACM</dsid> <term>
</contentmodel> <field>dc.relation</field>
</contentmodels> <value>dc.relation</value>
<relationship>isMemberOfCollection</relationship> </term>
<search_terms> <term>
<default>dc.description</default> <field>dcterms.temporal</field>
<term> <value>dcterms.temporal</value>
<field>dc.title</field> </term>
<value>dc.title</value> <term>
</term> <field>dcterms.spatial</field>
<term> <value>dcterms.spatial</value>
<field>dc.creator</field> </term>
<value>dc.creator</value> <term>
</term> <field>fgs.DS.first.text</field>
<term> <value>Full Text</value>
<field>dc.description</field> </term>
<value>dc.description</value> </search_terms>
</term> </collection_policy>
<term> </foxml:xmlContent>
<field>dc.date</field> </foxml:datastreamVersion>
<value>dc.date</value> <foxml:datastreamVersion CREATED="2010-03-11T21:01:44.921Z" ID="COLLECTION_POLICY.2" LABEL="Collection Policy.xml"
</term> MIMETYPE="text/xml" SIZE="1555">
<term> <foxml:xmlContent>
<field>dc.identifier</field> <collection_policy>
<value>dc.identifier</value> <contentmodels>
</term> <contentmodel name="SLIDE_CMODEL">
<term> <pid_namespace>islandora:slide</pid_namespace>
<field>dc.language</field> <pid>islandora:slideCModel</pid>
<value>dc.language</value> <dsid>ISLANDORACM</dsid>
</term> </contentmodel>
<term> </contentmodels>
<field>dc.publisher</field> <relationship>isMemberOfCollection</relationship>
<value>dc.publisher</value> <search_terms>
</term> <default>dc.description</default>
<term> <term>
<field>dc.rights</field> <field>dc.title</field>
<value>dc.rights</value> <value>dc.title</value>
</term> </term>
<term> <term>
<field>dc.subject</field> <field>dc.creator</field>
<value>dc.subject</value> <value>dc.creator</value>
</term> </term>
<term> <term>
<field>dc.relation</field> <field>dc.description</field>
<value>dc.relation</value> <value>dc.description</value>
</term> </term>
<term> <term>
<field>dcterms.temporal</field> <field>dc.date</field>
<value>dcterms.temporal</value> <value>dc.date</value>
</term> </term>
<term> <term>
<field>dcterms.spatial</field> <field>dc.identifier</field>
<value>dcterms.spatial</value> <value>dc.identifier</value>
</term> </term>
<term> <term>
<field>fgs.DS.first.text</field> <field>dc.language</field>
<value>Full Text</value> <value>dc.language</value>
</term> </term>
</search_terms> <term>
</collection_policy> <field>dc.publisher</field>
</foxml:xmlContent> <value>dc.publisher</value>
</foxml:datastreamVersion> </term>
</foxml:datastream> <term>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <field>dc.rights</field>
<foxml:datastreamVersion ID="RELS-EXT.0" LABEL="RDF Statements about this object" CREATED="2010-01-26T21:33:14.125Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="439"> <value>dc.rights</value>
<foxml:xmlContent> </term>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <term>
<rdf:Description rdf:about="info:fedora/islandora:largeimages"> <field>dc.subject</field>
<isMemberOfCollection xmlns="info:fedora/fedora-system:def/relations-external#" rdf:resource="info:fedora/islandora:demos"></isMemberOfCollection> <value>dc.subject</value>
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:collectionCModel"></hasModel> </term>
</rdf:Description> <term>
</rdf:RDF> <field>dc.relation</field>
</foxml:xmlContent> <value>dc.relation</value>
</foxml:datastreamVersion> </term>
</foxml:datastream> <term>
</foxml:digitalObject> <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-12-10T17:32:17.345Z" ID="COLLECTION_POLICY.3" LABEL="Collection Policy.xml"
MIMETYPE="text/xml" SIZE="1152">
<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">
<content_models>
<content_model dsid="ISLANDORACM" name="SLIDE_CMODEL" namespace="islandora:slide" pid="islandora:slideCModel"/>
</content_models>
<search_terms>
<term field="dc.title">dc.title</term>
<term field="dc.creator">dc.creator</term>
<term default="true" field="dc.description">dc.description</term>
<term field="dc.date">dc.date</term>
<term field="dc.identifier">dc.identifier</term>
<term field="dc.language">dc.language</term>
<term field="dc.publisher">dc.publisher</term>
<term field="dc.rights">dc.rights</term>
<term field="dc.subject">dc.subject</term>
<term field="dc.relation">dc.relation</term>
<term field="dcterms.temporal">dcterms.temporal</term>
<term field="dcterms.spatial">dcterms.spatial</term>
<term field="fgs.DS.first.text">Full Text</term>
</search_terms>
<relationship>isMemberOfCollection</relationship>
</collection_policy>
</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>

38
formClass.inc

@ -77,8 +77,14 @@ class formClass {
'access arguments' => array('view fedora collection'), 'access arguments' => array('view fedora collection'),
// 'access' => TRUE // 'access' => TRUE
); );
$repository_title = variable_get('fedora_repository_title','Digital repository');
if (trim($repository_title)!= '') {
$respository_title=t($repository_title);
} else {
$repository_title= NULL;
}
$items['fedora/repository'] = array( $items['fedora/repository'] = array(
// 'title' => t('Digital repository'), 'title' => $repository_title,
'page callback' => 'repository_page', 'page callback' => 'repository_page',
'type' => MENU_NORMAL_ITEM, 'type' => MENU_NORMAL_ITEM,
// 'page arguments'=>array(1), // 'page arguments'=>array(1),
@ -361,13 +367,22 @@ class formClass {
); );
*/ */
$form['fedora_object_display_title'] = array( $form['fedora_repository_title'] = array(
'#type' => 'select', '#type' => 'textfield',
'#title' => t('Display Object Title Behaviour'), '#title' => t('Fedora Repository Title'),
'#default_value'=> variable_get('fedora_object_display_title', ObjectHelper::$DISPLAY_ALWAYS), '#default_value'=> variable_get('fedora_repository_title', 'Digital Repository'),
'#options' => array(ObjectHelper::$DISPLAY_ALWAYS=>t('Always'),ObjectHelper::$DISPLAY_NEVER=>t('Never'),ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT=>t('Only if no Content Model display output.')), '#description' => t('The title displayed when viewing collections and objects in /fedora/repository. Leave blank to display no title. Note that the menus must be rebuilt after changing this variable.'),
'#description' => t('Determines when to display the object (or collection) title when viewing an object/collection page.'), );
);
$form['fedora_object_display_title'] = array(
'#type' => 'select',
'#title' => t('Display Object Title Behaviour'),
'#default_value'=> variable_get('fedora_object_display_title', ObjectHelper::$DISPLAY_ALWAYS),
'#options' => array(ObjectHelper::$DISPLAY_ALWAYS=>t('Always'),ObjectHelper::$DISPLAY_NEVER=>t('Never'),ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT=>t('Only if no Content Model display output.')),
'#description' => t('Determines when to display the object (or collection) title when viewing an object/collection page.'),
);
$form['fedora_object_display_description'] = array( $form['fedora_object_display_description'] = array(
@ -377,6 +392,13 @@ class formClass {
'#options' => array(ObjectHelper::$DISPLAY_ALWAYS=>t('Always'),ObjectHelper::$DISPLAY_NEVER=>t('Never'),ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT=>t('Only if no Content Model display output.')), '#options' => array(ObjectHelper::$DISPLAY_ALWAYS=>t('Always'),ObjectHelper::$DISPLAY_NEVER=>t('Never'),ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT=>t('Only if no Content Model display output.')),
'#description' => t('Determines when to display the default object (or collection) description fieldset when viewing an object/collection page.'), '#description' => t('Determines when to display the default object (or collection) description fieldset when viewing an object/collection page.'),
); );
$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),
'#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).'),
);
$form['fedora_collection_display_list'] = array( $form['fedora_collection_display_list'] = array(
'#type' => 'select', '#type' => 'select',

11
plugins/pidfield/pidfield.module

@ -276,11 +276,14 @@ function theme_pidfield_formatter_default($element) {
//return $element['#item']['safe']; //return $element['#item']['safe'];
$pid = $element['#item']['safe']; $pid = $element['#item']['safe'];
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); if(!empty($pid)) {
$item = new Fedora_Item($pid); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$item = new Fedora_Item($pid);
return fedora_repository_get_items($pid); return fedora_repository_get_items($pid);
//return $item->objectProfile->objLabel; //return $item->objectProfile->objLabel;
}
return null;
} }
/** /**

Loading…
Cancel
Save