Browse Source

Merge branch 'ISLANDORA-171' of github.com:Islandora/islandora into ISLANDORA-171

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
e4f5d35c52
  1. 7
      ObjectHelper.inc
  2. 71
      collection_policies/JPG-COLLECTION POLICY.xml
  3. 14
      content_models/COLLECTIONCM.xml
  4. 193
      content_models/STANDARD JPG.xml
  5. 193
      content_models/STANDARD_JPG.xml
  6. 9
      fedora_repository.module
  7. 4
      ilives/book.inc
  8. 23
      plugins/herbarium.inc

7
ObjectHelper.inc

@ -566,11 +566,14 @@ class ObjectHelper {
} }
$cmodels = array(); $cmodels = array();
foreach ($sxml->xpath('//@uri') as $uri) { foreach ($sxml->xpath('//@uri') as $uri) {
if (strpos($uri, 'fedora-system') != FALSE && $include_fedora_system_content_models == FALSE) { if (strpos($uri, 'fedora-system:fedoraObject-3.0') != FALSE && $include_fedora_system_content_models == FALSE) {
continue; continue;
} }
$cmodel_pid = substr(strstr($uri, '/'), 1); $cmodel_pid = substr(strstr($uri, '/'), 1);
$cmodels[] = ContentModel::loadFromModel($cmodel_pid); $cm = ContentModel::loadFromModel($cmodel_pid);
if ($cm) {
$cmodels[] = $cm;
}
} }
return $cmodels; return $cmodels;

71
collection_policies/JPG-COLLECTION POLICY.xml

@ -1,70 +1 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="utf-8"?> <collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd"> <content_models> <content_model name="STANDARD_JPEG" dsid="ISLANDORACM" namespace="demo:Smiley" pid="demo:DualResImage"/> </content_models> <search_terms> <term field="dc.title">dc.title</term> <term field="dc.creator">dc.creator</term> <term field="dc.description" default="true">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>isMemberOf</relationship> </collection_policy>
<collection_policy>
<!---we will define allowed mimetypes and what to do with various types as part of the content model-->
<contentmodels>
<contentmodel name="STANDARD_JPEG">
<pid_namespace>demo:Smiley</pid_namespace>
<pid>demo:DualResImage</pid>
<dsid>ISLANDORACM</dsid>
</contentmodel>
</contentmodels>
<!--if we define a query for an object the relationship we ask for may not be isMemberOfCollection. So when we ingest in th
Collection we will want the relationship to match the query. If this element is null we will use the isMemberOfCollection relationship-->
<relationship>isMemberOf</relationship>
<search_terms>
<!--define what fields we can query as part of the advanced search for this collection, not used yet-->
<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>

14
content_models/COLLECTIONCM.xml

@ -1,20 +1,20 @@
<content_model name="Collection" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Collection" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes> <mimetypes>
<type>text/xml</type> <type>text/xml</type>
<type>text/plain</type> <type>text/plain</type>
<type>application/xml</type> <type>application/xml</type>
</mimetypes> </mimetypes>
<ingest_rules></ingest_rules> <ingest_rules/>
<datastreams> <datastreams>
<datastream dsid="DC"> <datastream dsid="DC">
<display_method class="CollectionClass" file="CollectionClass.inc" method="showFieldSets" module=""></display_method> <display_method class="CollectionClass" file="CollectionClass.inc" method="showFieldSets" module=""/>
</datastream> </datastream>
<datastream dsid="TN"></datastream> <datastream dsid="TN"/>
<datastream dsid="COLLECTION_POLICY"></datastream> <datastream dsid="COLLECTION_POLICY"/>
</datastreams> </datastreams>
<ingest_form dsid="QDC" page="2"> <ingest_form dsid="QDC" page="2">
<form_builder_method class="CollectionFormBuilder" file="plugins/CollectionFormBuilder.inc" handler="handleQDCForm" method="buildQDCForm" module=""></form_builder_method> <form_builder_method class="CollectionFormBuilder" file="plugins/CollectionFormBuilder.inc" handler="handleQDCForm"
method="buildQDCForm" module=""/>
<form_elements> <form_elements>
<element label="Title/Caption/Object Name" name="dc:title" required="true" type="textfield"> <element label="Title/Caption/Object Name" name="dc:title" required="true" type="textfield">
<description>The name given to the resource</description> <description>The name given to the resource</description>

193
content_models/STANDARD JPG.xml

@ -1,197 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="utf-8"?>
<content_model name="standard_jpeg"> <content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="standard_jpeg" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes> <mimetypes>
<type>image/jpeg</type> <type>image/jpeg</type>
</mimetypes> </mimetypes>
<display_in_fieldset>
<datastream id="MEDIUM_SIZE">
<method>
<file>plugins/ShowDemoStreamsInFieldSets.inc</file>
<class_name>ShowDemoStreamsInFieldSets</class_name>
<method_name>showMediumSize</method_name>
</method>
</datastream>
<datastream id="QDC">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showQdc</method_name>
</method>
</datastream>
<datastream id="FULL_SIZE">
<allowed_mime_type>image/jpeg</allowed_mime_type>
<add_datastream_method>
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>manipulateImage</method_name>
<modified_files_ext>jpg</modified_files_ext>
<datastream_id>MEDIUM_SIZE</datastream_id>
<parameters>
<parameter name="width">120</parameter>
<parameter name="height">160</parameter>
</parameters>
</add_datastream_method>
</datastream>
</display_in_fieldset>
<ingest_rules> <ingest_rules>
<rule> <rule>
<applies_to> <applies_to>image/jpeg</applies_to>
image/jpeg <ingest_methods>
</applies_to> <ingest_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="MEDIUM_SIZE" modified_files_ext="jpg">
<methods>
<method>
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>manipulateImage</method_name>
<modified_files_ext>jpg</modified_files_ext>
<datastream_id>MEDIUM_SIZE</datastream_id>
<parameters> <parameters>
<parameter name="width">160</parameter> <parameter name="width">160</parameter>
<parameter name="height">120</parameter> <parameter name="height">120</parameter>
</parameters> </parameters>
</method> </ingest_method>
<method> <ingest_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="TN" modified_files_ext="jpg">
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>manipulateImage</method_name>
<modified_files_ext>jpg</modified_files_ext>
<datastream_id>TN</datastream_id>
<parameters> <parameters>
<parameter name="width">120</parameter> <parameter name="width">120</parameter>
<parameter name="height">120</parameter> <parameter name="height">120</parameter>
</parameters> </parameters>
</method> </ingest_method>
</methods> </ingest_methods>
</rule> </rule>
</ingest_rules> </ingest_rules>
<datastreams>
<datastream dsid="MEDIUM_SIZE">
<display_method module="" file="plugins/ShowDemoStreamsInFieldSets.inc" class="ShowDemoStreamsInFieldSets" method="showMediumSize"/>
</datastream>
<datastream dsid="QDC">
<display_method module="" file="plugins/ShowStreamsInFieldSets.inc" class="ShowStreamsInFieldSets" method="showQdc"/>
</datastream>
<datastream dsid="FULL_SIZE">
<add_datastream_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="MEDIUM_SIZE" modified_files_ext="jpg">
<parameters>
<parameter name="width">120</parameter>
<parameter name="height">160</parameter>
</parameters>
</add_datastream_method>
</datastream>
</datastreams>
<ingest_form dsid="QDC" page="2"> <ingest_form dsid="QDC" page="2">
<form_builder_method> <form_builder_method module="" file="plugins/DemoFormBuilder.inc" class="DemoFormBuilder" method="buildQDCForm" handler="handleQDCForm"/>
<file>plugins/DemoFormBuilder.inc</file>
<class_name>DemoFormBuilder</class_name>
<method_name>buildQDCForm</method_name>
<form_handler>handleQDCForm</form_handler>
<!--need validation method as well-->
</form_builder_method>
<form_elements> <form_elements>
<element> <element label="Title/Caption/Image Name" name="dc:title" type="textfield" required="true">
<label>Title/Caption/Image Name</label>
<name>dc:title</name>
<type>textfield</type>
<description>The name given to the resource</description> <description>The name given to the resource</description>
<required>true</required>
</element> </element>
<element> <element label="Creator/Photographer" name="dc:creator" type="textfield">
<label>Creator/Photographer</label>
<name>dc:creator</name>
<type>textfield</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description> <description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element> </element>
<element> <element label="Subject" name="dc:subject" type="select">
<label>Subject</label>
<name>dc:subject</name>
<type>select</type>
<description>Subject</description> <description>Subject</description>
<required>false</required>
<authoritative_list> <authoritative_list>
<item> <item>image</item>
<field>image</field> <item>photograph</item>
<value>image</value> <item>presentation</item>
</item> <item>art</item>
<item>
<field>photograph</field>
<value>photograph</value>
</item>
<item>
<field>presentation</field>
<value>presentation</value>
</item>
<item>
<field>art</field>
<value>art</value>
</item>
</authoritative_list> </authoritative_list>
</element> </element>
<element> <element label="Description" name="dc:description" type="textarea" required="true">
<label>Description</label>
<name>dc:description</name>
<type>textarea</type>
<description>Description of the Image</description> <description>Description of the Image</description>
<required>true</required>
</element> </element>
<element> <element label="Publisher" name="dc:publisher" type="textfield">
<label>Publisher</label>
<name>dc:publisher</name>
<type>textfield</type>
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description> <description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
<required>false</required>
</element> </element>
<element> <element label="Contributor" name="dc:contributor" type="textfield">
<label>Contributor</label>
<name>dc:contributor</name>
<type>textfield</type>
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description> <description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element> </element>
<element> <element label="Date" name="dc:date" type="textfield">
<label>Date</label>
<name>dc:date</name>
<type>textfield</type>
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description> <description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
<required>false</required>
</element> </element>
<element> <element label="Resource Type" name="dc:type" type="textfield">
<label>Resource Type</label>
<name>dc:type</name>
<type>textfield</type>
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description> <description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<required>false</required>
</element> </element>
<element> <element label="Source" name="dc:source" type="textfield">
<label>Source</label>
<name>dc:source</name>
<type>textfield</type>
<description>A reference to a resource from which the present resource is derived.</description> <description>A reference to a resource from which the present resource is derived.</description>
<required>false</required>
</element> </element>
<element> <element label="Identifier" name="dc:identifier" type="textfield">
<label>Identifier</label>
<name>dc:identifier</name>
<type>textfield</type>
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description> <description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
<required>false</required>
</element> </element>
<element> <element label="Language" name="dc:language" type="select">
<label>Language</label>
<name>dc:language</name>
<type>select</type>
<description>The language of the intellectual content of the resource.</description> <description>The language of the intellectual content of the resource.</description>
<required>false</required>
<authoritative_list> <authoritative_list>
<item> <item field="eng">English</item>
<field>eng</field> <item field="fre">French</item>
<value>English</value>
</item>
<item>
<field>fre</field>
<value>French</value>
</item>
</authoritative_list> </authoritative_list>
</element> </element>
<element> <element label="Relation" name="dc:relation" type="textfield">
<label>Relation</label>
<name>dc:relation</name>
<type>textfield</type>
<description>Reference to a related resource.</description> <description>Reference to a related resource.</description>
<required>false</required>
</element> </element>
<element> <element label="Rights Management" name="dc:rights" type="textarea">
<label>Rights Management</label>
<name>dc:rights</name>
<type>textarea</type>
<description>Information about intellectual property rights, copyright, and various property rights.</description> <description>Information about intellectual property rights, copyright, and various property rights.</description>
<required>false</required>
</element> </element>
</form_elements> </form_elements>
</ingest_form> </ingest_form>

193
content_models/STANDARD_JPG.xml

@ -1,197 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="utf-8"?>
<content_model name="standard_jpeg"> <content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="standard_jpeg" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes> <mimetypes>
<type>image/jpeg</type> <type>image/jpeg</type>
</mimetypes> </mimetypes>
<display_in_fieldset>
<datastream id="MEDIUM_SIZE">
<method>
<file>plugins/ShowDemoStreamsInFieldSets.inc</file>
<class_name>ShowDemoStreamsInFieldSets</class_name>
<method_name>showMediumSize</method_name>
</method>
</datastream>
<datastream id="QDC">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showQdc</method_name>
</method>
</datastream>
<datastream id="FULL_SIZE">
<allowed_mime_type>image/jpeg</allowed_mime_type>
<add_datastream_method>
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>manipulateImage</method_name>
<modified_files_ext>jpg</modified_files_ext>
<datastream_id>MEDIUM_SIZE</datastream_id>
<parameters>
<parameter name="width">120</parameter>
<parameter name="height">160</parameter>
</parameters>
</add_datastream_method>
</datastream>
</display_in_fieldset>
<ingest_rules> <ingest_rules>
<rule> <rule>
<applies_to> <applies_to>image/jpeg</applies_to>
image/jpeg <ingest_methods>
</applies_to> <ingest_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="MEDIUM_SIZE" modified_files_ext="jpg">
<methods>
<method>
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>manipulateImage</method_name>
<modified_files_ext>jpg</modified_files_ext>
<datastream_id>MEDIUM_SIZE</datastream_id>
<parameters> <parameters>
<parameter name="width">160</parameter> <parameter name="width">160</parameter>
<parameter name="height">120</parameter> <parameter name="height">120</parameter>
</parameters> </parameters>
</method> </ingest_method>
<method> <ingest_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="TN" modified_files_ext="jpg">
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>manipulateImage</method_name>
<modified_files_ext>jpg</modified_files_ext>
<datastream_id>TN</datastream_id>
<parameters> <parameters>
<parameter name="width">120</parameter> <parameter name="width">120</parameter>
<parameter name="height">120</parameter> <parameter name="height">120</parameter>
</parameters> </parameters>
</method> </ingest_method>
</methods> </ingest_methods>
</rule> </rule>
</ingest_rules> </ingest_rules>
<datastreams>
<datastream dsid="MEDIUM_SIZE">
<display_method module="" file="plugins/ShowDemoStreamsInFieldSets.inc" class="ShowDemoStreamsInFieldSets" method="showMediumSize"/>
</datastream>
<datastream dsid="QDC">
<display_method module="" file="plugins/ShowStreamsInFieldSets.inc" class="ShowStreamsInFieldSets" method="showQdc"/>
</datastream>
<datastream dsid="FULL_SIZE">
<add_datastream_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="MEDIUM_SIZE" modified_files_ext="jpg">
<parameters>
<parameter name="width">120</parameter>
<parameter name="height">160</parameter>
</parameters>
</add_datastream_method>
</datastream>
</datastreams>
<ingest_form dsid="QDC" page="2"> <ingest_form dsid="QDC" page="2">
<form_builder_method> <form_builder_method module="" file="plugins/DemoFormBuilder.inc" class="DemoFormBuilder" method="buildQDCForm" handler="handleQDCForm"/>
<file>plugins/DemoFormBuilder.inc</file>
<class_name>DemoFormBuilder</class_name>
<method_name>buildQDCForm</method_name>
<form_handler>handleQDCForm</form_handler>
<!--need validation method as well-->
</form_builder_method>
<form_elements> <form_elements>
<element> <element label="Title/Caption/Image Name" name="dc:title" type="textfield" required="true">
<label>Title/Caption/Image Name</label>
<name>dc:title</name>
<type>textfield</type>
<description>The name given to the resource</description> <description>The name given to the resource</description>
<required>true</required>
</element> </element>
<element> <element label="Creator/Photographer" name="dc:creator" type="textfield">
<label>Creator/Photographer</label>
<name>dc:creator</name>
<type>textfield</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description> <description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element> </element>
<element> <element label="Subject" name="dc:subject" type="select">
<label>Subject</label>
<name>dc:subject</name>
<type>select</type>
<description>Subject</description> <description>Subject</description>
<required>false</required>
<authoritative_list> <authoritative_list>
<item> <item>image</item>
<field>image</field> <item>photograph</item>
<value>image</value> <item>presentation</item>
</item> <item>art</item>
<item>
<field>photograph</field>
<value>photograph</value>
</item>
<item>
<field>presentation</field>
<value>presentation</value>
</item>
<item>
<field>art</field>
<value>art</value>
</item>
</authoritative_list> </authoritative_list>
</element> </element>
<element> <element label="Description" name="dc:description" type="textarea" required="true">
<label>Description</label>
<name>dc:description</name>
<type>textarea</type>
<description>Description of the Image</description> <description>Description of the Image</description>
<required>true</required>
</element> </element>
<element> <element label="Publisher" name="dc:publisher" type="textfield">
<label>Publisher</label>
<name>dc:publisher</name>
<type>textfield</type>
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description> <description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
<required>false</required>
</element> </element>
<element> <element label="Contributor" name="dc:contributor" type="textfield">
<label>Contributor</label>
<name>dc:contributor</name>
<type>textfield</type>
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description> <description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element> </element>
<element> <element label="Date" name="dc:date" type="textfield">
<label>Date</label>
<name>dc:date</name>
<type>textfield</type>
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description> <description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
<required>false</required>
</element> </element>
<element> <element label="Resource Type" name="dc:type" type="textfield">
<label>Resource Type</label>
<name>dc:type</name>
<type>textfield</type>
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description> <description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<required>false</required>
</element> </element>
<element> <element label="Source" name="dc:source" type="textfield">
<label>Source</label>
<name>dc:source</name>
<type>textfield</type>
<description>A reference to a resource from which the present resource is derived.</description> <description>A reference to a resource from which the present resource is derived.</description>
<required>false</required>
</element> </element>
<element> <element label="Identifier" name="dc:identifier" type="textfield">
<label>Identifier</label>
<name>dc:identifier</name>
<type>textfield</type>
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description> <description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
<required>false</required>
</element> </element>
<element> <element label="Language" name="dc:language" type="select">
<label>Language</label>
<name>dc:language</name>
<type>select</type>
<description>The language of the intellectual content of the resource.</description> <description>The language of the intellectual content of the resource.</description>
<required>false</required>
<authoritative_list> <authoritative_list>
<item> <item field="eng">English</item>
<field>eng</field> <item field="fre">French</item>
<value>English</value>
</item>
<item>
<field>fre</field>
<value>French</value>
</item>
</authoritative_list> </authoritative_list>
</element> </element>
<element> <element label="Relation" name="dc:relation" type="textfield">
<label>Relation</label>
<name>dc:relation</name>
<type>textfield</type>
<description>Reference to a related resource.</description> <description>Reference to a related resource.</description>
<required>false</required>
</element> </element>
<element> <element label="Rights Management" name="dc:rights" type="textarea">
<label>Rights Management</label>
<name>dc:rights</name>
<type>textarea</type>
<description>Information about intellectual property rights, copyright, and various property rights.</description> <description>Information about intellectual property rights, copyright, and various property rights.</description>
<required>false</required>
</element> </element>
</form_elements> </form_elements>
</ingest_form> </ingest_form>

9
fedora_repository.module

@ -223,7 +223,6 @@ function fedora_repository_ingest_form_validate($form, &$form_state) {
function fedora_repository_ingest_form(&$form_state, $collection_pid, $collection_label = NULL, $content_model = NULL) { function fedora_repository_ingest_form(&$form_state, $collection_pid, $collection_label = NULL, $content_model = NULL) {
module_load_include('inc', 'fedora_repository', 'formClass'); module_load_include('inc', 'fedora_repository', 'formClass');
//$client = getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl'));
// For the sake of easily maintaining the module in different core versions create our own form_values variable. // For the sake of easily maintaining the module in different core versions create our own form_values variable.
if (empty($form_state['storage']['step'])) { if (empty($form_state['storage']['step'])) {
$form_state['storage']['step'] = 1; $form_state['storage']['step'] = 1;
@ -771,7 +770,6 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
$objectHelper->getBreadcrumbs($pid, $breadcrumbs); $objectHelper->getBreadcrumbs($pid, $breadcrumbs);
drupal_set_breadcrumb(array_reverse($breadcrumbs)); drupal_set_breadcrumb(array_reverse($breadcrumbs));
$offset = $limit * $page_number; $offset = $limit * $page_number;
//$results = $collectionClass->getRelatedObjects($pid, $limit, $offset, NULL); //updated so we can do paging in query not in xslt //$results = $collectionClass->getRelatedObjects($pid, $limit, $offset, NULL); //updated so we can do paging in query not in xslt
//$results = $collectionClass->getRelatedItems($pid, NULL); //$results = $collectionClass->getRelatedItems($pid, NULL);
@ -1384,9 +1382,16 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$smiley_stuff->add_relationship('isMemberOfCollection', 'info:fedora/islandora:demos'); $smiley_stuff->add_relationship('isMemberOfCollection', 'info:fedora/islandora:demos');
$tn = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/smileytn.png', 'TN', 'Thumbnail.png', 'image/png', 'M'); $tn = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/smileytn.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
$cp = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/JPG-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy.xml', 'application/xml', 'X'); $cp = $smiley_stuff->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/JPG-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy.xml', 'application/xml', 'X');
$cm = new Fedora_Item('demo:DualResImage'); $cm = new Fedora_Item('demo:DualResImage');
try { try {
$cmstream = $cm->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/STANDARD JPG.xml', 'ISLANDORACM', 'Content Model.xml', 'application/xml', 'X'); $cmstream = $cm->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/STANDARD JPG.xml', 'ISLANDORACM', 'Content Model.xml', 'application/xml', 'X');
} catch (exception $e) {
}
$dual_res_image_collection_cmodel = new Fedora_Item('demo:DualResImageCollection');
try {
$cmstream = $dual_res_image_collection_cmodel->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/COLLECTIONCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/demo:SmileyStuff\">demo:SmileyStuff</a> collection view.", 'message'); drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/demo:SmileyStuff\">demo:SmileyStuff</a> collection view.", 'message');
} catch (exception $e) { } catch (exception $e) {

4
ilives/book.inc

@ -169,7 +169,7 @@ class IslandoraBook {
$html = '<iframe src="'. $viewer_url . '" scrolling="0" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>'; $html = '<iframe src="'. $viewer_url . '" scrolling="0" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>';
$tabset['second_tab'] = array( $tabset['second_tab'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Full-size'), '#title' => t('Read'),
'#content' => $html '#content' => $html
); );
$tabset['first_tab'] = array( $tabset['first_tab'] = array(
@ -180,11 +180,13 @@ class IslandoraBook {
'#content' => fedora_ilives_create_book_view($this->pid), '#content' => fedora_ilives_create_book_view($this->pid),
); );
if (user_access('ingest new fedora objects')) {
$tabset['add_pages'] = array( $tabset['add_pages'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Add pages'), '#title' => t('Add pages'),
'#content' => drupal_get_form('book_add_pages_form', $this->pid), '#content' => drupal_get_form('book_add_pages_form', $this->pid),
); );
}
return $tabset; return $tabset;
} }
} }

23
plugins/herbarium.inc

@ -107,10 +107,6 @@ class Herbarium {
$tabset = array(); $tabset = array();
$tabset['my_tabset'] = array(
'#type' => 'tabset',
);
global $user; global $user;
$qs = ''; $qs = '';
if ($user->uid != 0) { if ($user->uid != 0) {
@ -119,13 +115,13 @@ class Herbarium {
$viewer_url = variable_get('fedora_base_url', '') . '/get/'. $this->pid . '/ilives:viewerSdef/getViewer'. $qs; $viewer_url = variable_get('fedora_base_url', '') . '/get/'. $this->pid . '/ilives:viewerSdef/getViewer'. $qs;
$html = '<iframe src="'. $viewer_url . '" scrolling="no" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>'; $html = '<iframe src="'. $viewer_url . '" scrolling="no" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>';
$tabset['my_tabset']['second_tab'] = array( $tabset['second_tab'] = array(
// $collection_fieldset = array ( // $collection_fieldset = array (
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Full-size'), '#title' => t('Full-size'),
'#content' => $html '#content' => $html
); );
$tabset['my_tabset']['first_tab'] = array( $tabset['first_tab'] = array(
// #type and #title are the minimum requirements. // #type and #title are the minimum requirements.
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('View'), '#title' => t('View'),
@ -135,15 +131,15 @@ class Herbarium {
); );
$dwc = new DarwinCore($this->item); $dwc = new DarwinCore($this->item);
$tabset['my_tabset']['third_tab'] = array( $tabset['third_tab'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Description'), '#title' => t('Description'),
); );
$tabset['my_tabset']['third_tab']['tabset'] = array( $tabset['third_tab']['tabset'] = array(
'#type' => 'tabset', '#type' => 'tabset',
); );
$tabset['my_tabset']['third_tab']['tabset']['view'] = array( $tabset['third_tab']['tabset']['view'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Darwin Core'), '#title' => t('Darwin Core'),
'#content' => $dwc->asHTML(), '#content' => $dwc->asHTML(),
@ -152,17 +148,17 @@ class Herbarium {
$obj = new ObjectHelper(); $obj = new ObjectHelper();
if (fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { if (fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) {
$editform = drupal_get_form('fedora_repository_edit_qdc_form', $this->pid, 'DARWIN_CORE'); $editform = drupal_get_form('fedora_repository_edit_qdc_form', $this->pid, 'DARWIN_CORE');
$tabset['my_tabset']['third_tab']['tabset']['edit'] = array( $tabset['third_tab']['tabset']['edit'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Edit'), '#title' => t('Edit'),
'#content' => $editform, '#content' => $editform,
); );
$tabset['my_tabset']['third_tab']['tabset']['source'] = array( $tabset['third_tab']['tabset']['source'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Vew Source'), '#title' => t('Vew Source'),
); );
$xmlsrc = $dwc->asXML(); $xmlsrc = $dwc->asXML();
$tabset['my_tabset']['third_tab']['tabset']['source']['srctext'] = array( $tabset['third_tab']['tabset']['source']['srctext'] = array(
'#name' => 'source', '#name' => 'source',
'#type' => 'textarea', '#type' => 'textarea',
'#value' => $xmlsrc, '#value' => $xmlsrc,
@ -170,7 +166,6 @@ class Herbarium {
'#height' => 50, '#height' => 50,
); );
} }
return $tabset;
return tabs_render($tabset);
} }
} }

Loading…
Cancel
Save