Chris Beer
14 years ago
11 changed files with 1496 additions and 0 deletions
@ -0,0 +1,35 @@
|
||||
<?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="Video" dsid="ISLANDORACM" namespace="islandora" pid="islandora:qtCModel"/> |
||||
</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> |
||||
</search_terms> |
||||
<relationship> |
||||
isMemberOfCollection</relationship> |
||||
</collection_policy> |
||||
|
@ -0,0 +1,64 @@
|
||||
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
||||
<xsl:template match="/"> |
||||
<xsl:variable name="BASEURL"> |
||||
<xsl:value-of select="$baseUrl"/> |
||||
</xsl:variable> |
||||
<xsl:variable name="collTitle" select="/s:sparql/s:results/s:result/s:collTitle"/> |
||||
<xsl:variable name="collDesc" select="/s:sparql/s:results/s:result/s:collDesc"/> |
||||
|
||||
<center> |
||||
<font face="arial,helvetica"> |
||||
<h2> |
||||
<xsl:value-of select="$collTitle"/> |
||||
<br/> |
||||
<i> |
||||
<xsl:value-of select="$collDesc"/> |
||||
</i> |
||||
</h2> |
||||
</font> |
||||
</center> |
||||
<hr size="1"/> |
||||
<center> |
||||
<table border="0" cellpadding="5"> |
||||
<xsl:for-each select="/s:sparql/s:results/s:result"> |
||||
<xsl:variable name="pid" select="substring-after(s:member/@uri, '/')"/> |
||||
<tr> |
||||
<td> |
||||
<center> |
||||
<a> |
||||
<xsl:attribute name="href"> |
||||
<xsl:value-of select="$BASEURL"/> |
||||
<xsl:text>/fedora/repository/</xsl:text> |
||||
<xsl:value-of select="$pid"/> |
||||
</xsl:attribute> |
||||
<img height="120" width="160"> |
||||
<xsl:attribute name="src"> |
||||
<xsl:value-of select="$BASEURL"/> |
||||
<xsl:text>/fedora/repository/</xsl:text> |
||||
<xsl:value-of select="$pid"/> |
||||
<xsl:text>/THUMBNAIL</xsl:text> |
||||
</xsl:attribute> |
||||
</img> |
||||
</a> |
||||
</center> |
||||
</td> |
||||
<td> |
||||
<b> |
||||
<a> |
||||
<xsl:attribute name="href"> |
||||
<xsl:value-of select="$BASEURL"/> |
||||
<xsl:text>/fedora/repository/</xsl:text> |
||||
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:memberTitle"/> |
||||
</xsl:attribute> |
||||
<xsl:value-of select="s:memberTitle"/> |
||||
</a> |
||||
</b> |
||||
<br/> |
||||
<xsl:value-of select="s:memberDesc"/> |
||||
</td> |
||||
</tr> |
||||
</xsl:for-each> |
||||
</table> |
||||
</center> |
||||
</xsl:template> |
||||
</xsl:stylesheet> |
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<content_model name="standard_qt"> |
||||
<mimetypes> |
||||
<type>video/quicktime</type> |
||||
</mimetypes> |
||||
<display_in_fieldset> |
||||
<datastream id="OBJ"> |
||||
<method> |
||||
<file>plugins/qt_viewer.inc</file> |
||||
<class_name>ShowQtStreamsInFieldSets</class_name> |
||||
<method_name>showQt</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> |
||||
</display_in_fieldset> |
||||
<!-- ingest rules element is required and must have a rule that applies to the mimetypes above or ingest will fail even if the rule has no methods--> |
||||
<ingest_rules> |
||||
<rule> |
||||
<applies_to> |
||||
video/quicktime |
||||
</applies_to> |
||||
<methods/> |
||||
</rule> |
||||
</ingest_rules> |
||||
<ingest_form dsid="QDC" page="2"> |
||||
<form_builder_method> |
||||
<file>plugins/QtFormBuilder.php</file> |
||||
<class_name>QtFormBuilder</class_name> |
||||
<method_name>buildQDCForm</method_name> |
||||
<form_handler>handleQDCForm</form_handler> |
||||
<!--need validation method as well--> |
||||
</form_builder_method> |
||||
<form_elements> |
||||
<element> |
||||
<label>Title/Caption/Video Name</label> |
||||
<name>dc:title</name> |
||||
<type>textfield</type> |
||||
<description>The name given to the Video</description> |
||||
<required>true</required> |
||||
</element> |
||||
<element> |
||||
<label>Creator/</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> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<label>Subject</label> |
||||
<name>dc:subject</name> |
||||
<type>select</type> |
||||
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description> |
||||
<required>false</required> |
||||
<authoritative_list> |
||||
|
||||
<item> |
||||
<field>home recording</field> |
||||
<value>home recording</value> |
||||
</item> |
||||
<item> |
||||
<field>meeting</field> |
||||
<value>meeting</value> |
||||
</item> |
||||
<item> |
||||
<field>presentation</field> |
||||
<value>presentation</value> |
||||
</item> |
||||
<item> |
||||
<field>sound</field> |
||||
<value>sound</value> |
||||
</item> |
||||
|
||||
</authoritative_list> |
||||
</element> |
||||
<element> |
||||
<label>Description of Video</label> |
||||
<name>dc:description</name> |
||||
<type>textarea</type> |
||||
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description> |
||||
<required>true</required> |
||||
</element> |
||||
<element> |
||||
<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> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<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> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<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> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<label>Resource Type</label> |
||||
<name>dc:type</name> |
||||
<type>select</type> |
||||
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description> |
||||
<required>false</required> |
||||
<authoritative_list> |
||||
<item> |
||||
<field>none</field> |
||||
<value>none</value> |
||||
</item> |
||||
<item> |
||||
<field>video</field> |
||||
<value>video</value> |
||||
</item> |
||||
|
||||
<item> |
||||
<field>event</field> |
||||
<value>event</value> |
||||
</item> |
||||
<item> |
||||
<field>image</field> |
||||
<value>image</value> |
||||
</item> |
||||
<item> |
||||
<field>interactive resource</field> |
||||
<value>interactive resource</value> |
||||
</item> |
||||
<item> |
||||
<field>model</field> |
||||
<value>model</value> |
||||
</item> |
||||
<item> |
||||
<field>party</field> |
||||
<value>party</value> |
||||
</item> |
||||
<item> |
||||
<field>physical object</field> |
||||
<value>physical object</value> |
||||
</item> |
||||
<item> |
||||
<field>place</field> |
||||
<value>place</value> |
||||
</item> |
||||
<item> |
||||
<field>service</field> |
||||
<value>service</value> |
||||
</item> |
||||
<item> |
||||
<field>software</field> |
||||
<value>software</value> |
||||
</item> |
||||
<item> |
||||
<field>sound</field> |
||||
<value>sound</value> |
||||
</item> |
||||
<item> |
||||
<field>text</field> |
||||
<value>text</value> |
||||
</item> |
||||
</authoritative_list> |
||||
</element> |
||||
<element> |
||||
<label>Source</label> |
||||
<name>dc:source</name> |
||||
<type>textfield</type> |
||||
<description>A reference to a resource from which the present resource is derived.</description> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<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> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<label>Language</label> |
||||
<name>dc:language</name> |
||||
<type>select</type> |
||||
<description>The language of the intellectual content of the resource.</description> |
||||
<required>false</required> |
||||
<authoritative_list> |
||||
<item> |
||||
<field>eng</field> |
||||
<value>English</value> |
||||
</item> |
||||
<item> |
||||
<field>fre</field> |
||||
<value>French</value> |
||||
</item> |
||||
</authoritative_list> |
||||
</element> |
||||
<element> |
||||
<label>Relation</label> |
||||
<name>dc:relation</name> |
||||
<type>textfield</type> |
||||
<description>Reference to a related resource.</description> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<label>Rights Management</label> |
||||
<name>dc:rights</name> |
||||
<type>textarea</type> |
||||
<description>Information about intellectual property rights, copyright, and various property rights.</description> |
||||
<required>false</required> |
||||
</element> |
||||
</form_elements> |
||||
</ingest_form> |
||||
</content_model> |
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<content_model name="standard_qt"> |
||||
<mimetypes> |
||||
<type>video/quicktime</type> |
||||
</mimetypes> |
||||
<display_in_fieldset> |
||||
<datastream id="OBJ"> |
||||
<method> |
||||
<file>plugins/qt_viewer.inc</file> |
||||
<class_name>ShowQtStreamsInFieldSets</class_name> |
||||
<method_name>showQt</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> |
||||
</display_in_fieldset> |
||||
<!-- ingest rules element is required and must have a rule that applies to the mimetypes above or ingest will fail even if the rule has no methods--> |
||||
<ingest_rules> |
||||
<rule> |
||||
<applies_to> |
||||
video/quicktime |
||||
</applies_to> |
||||
<methods/> |
||||
</rule> |
||||
</ingest_rules> |
||||
<ingest_form dsid="QDC" page="2"> |
||||
<form_builder_method> |
||||
<file>plugins/QtFormBuilder.php</file> |
||||
<class_name>QtFormBuilder</class_name> |
||||
<method_name>buildQDCForm</method_name> |
||||
<form_handler>handleQDCForm</form_handler> |
||||
<!--need validation method as well--> |
||||
</form_builder_method> |
||||
<form_elements> |
||||
<element> |
||||
<label>Title/Caption/Video Name</label> |
||||
<name>dc:title</name> |
||||
<type>textfield</type> |
||||
<description>The name given to the Video</description> |
||||
<required>true</required> |
||||
</element> |
||||
<element> |
||||
<label>Creator/</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> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<label>Subject</label> |
||||
<name>dc:subject</name> |
||||
<type>select</type> |
||||
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description> |
||||
<required>false</required> |
||||
<authoritative_list> |
||||
|
||||
<item> |
||||
<field>home recording</field> |
||||
<value>home recording</value> |
||||
</item> |
||||
<item> |
||||
<field>meeting</field> |
||||
<value>meeting</value> |
||||
</item> |
||||
<item> |
||||
<field>presentation</field> |
||||
<value>presentation</value> |
||||
</item> |
||||
<item> |
||||
<field>sound</field> |
||||
<value>sound</value> |
||||
</item> |
||||
|
||||
</authoritative_list> |
||||
</element> |
||||
<element> |
||||
<label>Description of Video</label> |
||||
<name>dc:description</name> |
||||
<type>textarea</type> |
||||
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description> |
||||
<required>true</required> |
||||
</element> |
||||
<element> |
||||
<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> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<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> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<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> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<label>Resource Type</label> |
||||
<name>dc:type</name> |
||||
<type>select</type> |
||||
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description> |
||||
<required>false</required> |
||||
<authoritative_list> |
||||
<item> |
||||
<field>none</field> |
||||
<value>none</value> |
||||
</item> |
||||
<item> |
||||
<field>video</field> |
||||
<value>video</value> |
||||
</item> |
||||
|
||||
<item> |
||||
<field>event</field> |
||||
<value>event</value> |
||||
</item> |
||||
<item> |
||||
<field>image</field> |
||||
<value>image</value> |
||||
</item> |
||||
<item> |
||||
<field>interactive resource</field> |
||||
<value>interactive resource</value> |
||||
</item> |
||||
<item> |
||||
<field>model</field> |
||||
<value>model</value> |
||||
</item> |
||||
<item> |
||||
<field>party</field> |
||||
<value>party</value> |
||||
</item> |
||||
<item> |
||||
<field>physical object</field> |
||||
<value>physical object</value> |
||||
</item> |
||||
<item> |
||||
<field>place</field> |
||||
<value>place</value> |
||||
</item> |
||||
<item> |
||||
<field>service</field> |
||||
<value>service</value> |
||||
</item> |
||||
<item> |
||||
<field>software</field> |
||||
<value>software</value> |
||||
</item> |
||||
<item> |
||||
<field>sound</field> |
||||
<value>sound</value> |
||||
</item> |
||||
<item> |
||||
<field>text</field> |
||||
<value>text</value> |
||||
</item> |
||||
</authoritative_list> |
||||
</element> |
||||
<element> |
||||
<label>Source</label> |
||||
<name>dc:source</name> |
||||
<type>textfield</type> |
||||
<description>A reference to a resource from which the present resource is derived.</description> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<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> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<label>Language</label> |
||||
<name>dc:language</name> |
||||
<type>select</type> |
||||
<description>The language of the intellectual content of the resource.</description> |
||||
<required>false</required> |
||||
<authoritative_list> |
||||
<item> |
||||
<field>eng</field> |
||||
<value>English</value> |
||||
</item> |
||||
<item> |
||||
<field>fre</field> |
||||
<value>French</value> |
||||
</item> |
||||
</authoritative_list> |
||||
</element> |
||||
<element> |
||||
<label>Relation</label> |
||||
<name>dc:relation</name> |
||||
<type>textfield</type> |
||||
<description>Reference to a related resource.</description> |
||||
<required>false</required> |
||||
</element> |
||||
<element> |
||||
<label>Rights Management</label> |
||||
<name>dc:rights</name> |
||||
<type>textarea</type> |
||||
<description>Information about intellectual property rights, copyright, and various property rights.</description> |
||||
<required>false</required> |
||||
</element> |
||||
</form_elements> |
||||
</ingest_form> |
||||
</content_model> |
@ -0,0 +1,137 @@
|
||||
|
||||
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="standard_qt" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd"> |
||||
<mimetypes> |
||||
<type>video/quicktime</type> |
||||
<type>video/mp4</type> |
||||
|
||||
<type>audio/mp3</type> |
||||
<type>audio/x-aiff</type> |
||||
</mimetypes> |
||||
<ingest_rules> |
||||
<rule> |
||||
<applies_to>video/quicktime</applies_to> |
||||
<applies_to>video/mp4</applies_to> |
||||
|
||||
<applies_to>audio/mp3</applies_to> |
||||
<applies_to>audio/x-aiff</applies_to> |
||||
<ingest_methods> |
||||
<ingest_method file="plugins/Exiftool.inc" class="Exiftool" method="extractMetadata" dsid="OBJ_EXIFTOOL" modified_files_ext=""> |
||||
<parameters></parameters> |
||||
</ingest_method> |
||||
|
||||
<ingest_method class="Ffmpeg" dsid="FULL_SIZE" file="plugins/Ffmpeg.inc" method="extract_thumbnail" modified_files_ext="jpg"> |
||||
<parameters> |
||||
</parameters> |
||||
</ingest_method> |
||||
|
||||
<ingest_method class="Ffmpeg" dsid="TN" file="plugins/Ffmpeg.inc" method="extract_thumbnail" modified_files_ext="jpg"> |
||||
<parameters> |
||||
<parameter name="s">92x92</parameter> |
||||
</parameters> |
||||
</ingest_method> |
||||
</ingest_methods> |
||||
</rule> |
||||
</ingest_rules> |
||||
<datastreams> |
||||
<datastream dsid="OBJ"> |
||||
<display_method class="ShowQtStreamsInFieldSets" file="plugins/qt_viewer.inc" method="showQt" module=""></display_method> |
||||
</datastream> |
||||
<datastream dsid="PROXY"></datastream> |
||||
<datastream dsid="OBJ_EXIFTOOL"></datastream> |
||||
<datastream dsid="TN"></datastream> |
||||
<datastream dsid="FULL_SIZE"></datastream> |
||||
<datastream dsid="QDC"> |
||||
<display_method class="ShowStreamsInFieldSets" file="plugins/ShowStreamsInFieldSets.inc" method="showQdc" module=""></display_method> |
||||
</datastream> |
||||
</datastreams> |
||||
<ingest_form dsid="QDC" page="2"> |
||||
<form_builder_method class="QtFormBuilder" file="plugins/QtFormBuilder.php" handler="handleQDCForm" method="buildQDCForm" module=""></form_builder_method> |
||||
<form_elements> |
||||
<element label="Title/Caption/Media Name" name="dc:title" required="true" type="textfield"> |
||||
<description>The name given to the file</description> |
||||
</element> |
||||
<element label="Creator/" name="dc:creator" type="textfield"> |
||||
<description>An entity primarily responsible for making the |
||||
content of the resource such as a person, organization or |
||||
service.</description> |
||||
</element> |
||||
<element label="Subject" name="dc:subject" type="select"> |
||||
<description>An entity primarily responsible for making the |
||||
content of the resource such as a person, organization or |
||||
service.</description> |
||||
<authoritative_list> |
||||
<item>home recording</item> |
||||
<item>meeting</item> |
||||
<item>presentation</item> |
||||
<item>sound</item> |
||||
</authoritative_list> |
||||
</element> |
||||
<element label="Description of Media" name="dc:description" required="true" type="textarea"> |
||||
<description>Examples include an abstract, table of |
||||
contents, or free-text account of the content of the |
||||
resource.</description> |
||||
</element> |
||||
<element label="Publisher" name="dc:publisher" type="textfield"> |
||||
<description>An entity, (including persons, organizations, |
||||
or services), responsible for making the resource |
||||
available.</description> |
||||
</element> |
||||
<element label="Contributor" name="dc:contributor" type="textfield"> |
||||
<description>An entity responsible for contributing to the |
||||
content of the resource such as a person, organization or |
||||
service.</description> |
||||
</element> |
||||
<element label="Date" name="dc:date" type="textfield"> |
||||
<description>Temporal scope of the content if known. Date |
||||
format is YYYY-MM-DD (e.g. 1890,1910-10,or |
||||
2007-10-23)</description> |
||||
</element> |
||||
<element label="Resource Type" name="dc:type" type="select"> |
||||
<description>Genre of the content of the resource. Examples |
||||
include: home page, novel, poem, working paper, technical |
||||
report, essay, dictionary.</description> |
||||
<authoritative_list> |
||||
<item>none</item> |
||||
<item>video</item> |
||||
<item>event</item> |
||||
<item>image</item> |
||||
<item>interactive resource</item> |
||||
<item>model</item> |
||||
<item>party</item> |
||||
<item>physical object</item> |
||||
<item>place</item> |
||||
<item>service</item> |
||||
<item>software</item> |
||||
<item>sound</item> |
||||
<item>text</item> |
||||
</authoritative_list> |
||||
</element> |
||||
<element label="Source" name="dc:source" type="textfield"> |
||||
<description>A reference to a resource from which the |
||||
present resource is derived.</description> |
||||
</element> |
||||
<element label="Identifier" name="dc:identifier" type="textfield"> |
||||
<description>A unique reference to the resource; In this |
||||
instance, the accession number or collection |
||||
number.</description> |
||||
</element> |
||||
<element label="Language" name="dc:language" type="select"> |
||||
<description>The language of the intellectual content of |
||||
the resource.</description> |
||||
<authoritative_list> |
||||
<item field="eng">English</item> |
||||
<item field="fre">French</item> |
||||
</authoritative_list> |
||||
</element> |
||||
<element label="Relation" name="dc:relation" type="textfield"> |
||||
<description>Reference to a related resource.</description> |
||||
</element> |
||||
<element label="Rights Management" name="dc:rights" type="textarea"> |
||||
<description>Information about intellectual property |
||||
rights, copyright, and various property |
||||
rights.</description> |
||||
</element> |
||||
</form_elements> |
||||
</ingest_form> |
||||
</content_model> |
||||
|
@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<foxml:digitalObject VERSION="1.1" PID="islandora:qtCModel" |
||||
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"> |
||||
<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="Generic Content Model for Fedora Attach"/> |
||||
<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-03-11T21:01:44.921Z"/> |
||||
</foxml:objectProperties> |
||||
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> |
||||
<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"> |
||||
<foxml:xmlContent> |
||||
<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"> |
||||
<dc:title>Quicktime Content Model</dc:title> |
||||
<dc:identifier>islandora:qtCModel</dc:identifier> |
||||
</oai_dc:dc> |
||||
</foxml:xmlContent> |
||||
</foxml:datastreamVersion> |
||||
</foxml:datastream> |
||||
<foxml:datastream ID="ISLANDORACM" CONTROL_GROUP="X" STATE="A" > |
||||
<foxml:datastreamVersion ID="ISLANDORACM.0" MIMETYPE="application/xml" LABEL="ISLANDORACM.0"> |
||||
<foxml:xmlContent> |
||||
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="standard_qt" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd"> |
||||
<mimetypes> |
||||
<type>video/quicktime</type> |
||||
<type>video/mp4</type> |
||||
<type>audio/mp3</type> |
||||
<type>audio/x-aiff</type> |
||||
</mimetypes> |
||||
<ingest_rules> |
||||
<rule> |
||||
<applies_to>video/quicktime</applies_to> |
||||
<applies_to>video/mp4</applies_to> |
||||
|
||||
<applies_to>audio/mp3</applies_to> |
||||
<applies_to>audio/x-aiff</applies_to> |
||||
<ingest_methods> |
||||
<ingest_method file="plugins/Exiftool.inc" class="Exiftool" method="extractMetadata" dsid="OBJ_EXIFTOOL" modified_files_ext=""> |
||||
<parameters></parameters> |
||||
</ingest_method> |
||||
|
||||
<ingest_method class="Ffmpeg" dsid="FULL_SIZE" file="plugins/Ffmpeg.inc" method="extract_thumbnail" modified_files_ext="jpg"> |
||||
<parameters> |
||||
</parameters> |
||||
</ingest_method> |
||||
|
||||
<ingest_method class="Ffmpeg" dsid="TN" file="plugins/Ffmpeg.inc" method="extract_thumbnail" modified_files_ext="jpg"> |
||||
<parameters> |
||||
<parameter name="s">92x92</parameter> |
||||
</parameters> |
||||
</ingest_method> |
||||
</ingest_methods> |
||||
</rule> |
||||
</ingest_rules> |
||||
<datastreams> |
||||
<datastream dsid="OBJ"> |
||||
<display_method class="ShowQtStreamsInFieldSets" file="plugins/qt_viewer.inc" method="showQt" module=""></display_method> |
||||
</datastream> |
||||
<datastream dsid="PROXY"></datastream> |
||||
<datastream dsid="OBJ_EXIFTOOL"></datastream> |
||||
<datastream dsid="TN"></datastream> |
||||
<datastream dsid="FULL_SIZE"></datastream> |
||||
<datastream dsid="QDC"> |
||||
<display_method class="ShowStreamsInFieldSets" file="plugins/ShowStreamsInFieldSets.inc" method="showQdc" module=""></display_method> |
||||
</datastream> |
||||
</datastreams> |
||||
<ingest_form dsid="QDC" page="2"> |
||||
<form_builder_method class="QtFormBuilder" file="plugins/QtFormBuilder.php" handler="handleQDCForm" method="buildQDCForm" module=""></form_builder_method> |
||||
<form_elements> |
||||
<element label="Title/Caption/Media Name" name="dc:title" required="true" type="textfield"> |
||||
<description>The name given to the file</description> |
||||
</element> |
||||
<element label="Creator/" name="dc:creator" type="textfield"> |
||||
<description>An entity primarily responsible for making the |
||||
content of the resource such as a person, organization or |
||||
service.</description> |
||||
</element> |
||||
<element label="Subject" name="dc:subject" type="select"> |
||||
<description>An entity primarily responsible for making the |
||||
content of the resource such as a person, organization or |
||||
service.</description> |
||||
<authoritative_list> |
||||
<item>home recording</item> |
||||
<item>meeting</item> |
||||
<item>presentation</item> |
||||
<item>sound</item> |
||||
</authoritative_list> |
||||
</element> |
||||
<element label="Description of Media" name="dc:description" required="true" type="textarea"> |
||||
<description>Examples include an abstract, table of |
||||
contents, or free-text account of the content of the |
||||
resource.</description> |
||||
</element> |
||||
<element label="Publisher" name="dc:publisher" type="textfield"> |
||||
<description>An entity, (including persons, organizations, |
||||
or services), responsible for making the resource |
||||
available.</description> |
||||
</element> |
||||
<element label="Contributor" name="dc:contributor" type="textfield"> |
||||
<description>An entity responsible for contributing to the |
||||
content of the resource such as a person, organization or |
||||
service.</description> |
||||
</element> |
||||
<element label="Date" name="dc:date" type="textfield"> |
||||
<description>Temporal scope of the content if known. Date |
||||
format is YYYY-MM-DD (e.g. 1890,1910-10,or |
||||
2007-10-23)</description> |
||||
</element> |
||||
<element label="Resource Type" name="dc:type" type="select"> |
||||
<description>Genre of the content of the resource. Examples |
||||
include: home page, novel, poem, working paper, technical |
||||
report, essay, dictionary.</description> |
||||
<authoritative_list> |
||||
<item>none</item> |
||||
<item>video</item> |
||||
<item>event</item> |
||||
<item>image</item> |
||||
<item>interactive resource</item> |
||||
<item>model</item> |
||||
<item>party</item> |
||||
<item>physical object</item> |
||||
<item>place</item> |
||||
<item>service</item> |
||||
<item>software</item> |
||||
<item>sound</item> |
||||
<item>text</item> |
||||
</authoritative_list> |
||||
</element> |
||||
<element label="Source" name="dc:source" type="textfield"> |
||||
<description>A reference to a resource from which the |
||||
present resource is derived.</description> |
||||
</element> |
||||
<element label="Identifier" name="dc:identifier" type="textfield"> |
||||
<description>A unique reference to the resource; In this |
||||
instance, the accession number or collection |
||||
number.</description> |
||||
</element> |
||||
<element label="Language" name="dc:language" type="select"> |
||||
<description>The language of the intellectual content of |
||||
the resource.</description> |
||||
<authoritative_list> |
||||
<item field="eng">English</item> |
||||
<item field="fre">French</item> |
||||
</authoritative_list> |
||||
</element> |
||||
<element label="Relation" name="dc:relation" type="textfield"> |
||||
<description>Reference to a related resource.</description> |
||||
</element> |
||||
<element label="Rights Management" name="dc:rights" type="textarea"> |
||||
<description>Information about intellectual property |
||||
rights, copyright, and various property |
||||
rights.</description> |
||||
</element> |
||||
</form_elements> |
||||
</ingest_form> |
||||
</content_model> |
||||
</foxml:xmlContent> |
||||
</foxml:datastreamVersion> |
||||
</foxml:datastream> |
||||
</foxml:digitalObject> |
@ -0,0 +1,362 @@
|
||||
/* |
||||
|
||||
File: AC_QuickTime.js |
||||
|
||||
Abstract: This file contains functions to generate OBJECT and EMBED tags for QuickTime content. |
||||
|
||||
Version: <1.2> |
||||
|
||||
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple |
||||
Computer, Inc. ("Apple") in consideration of your agreement to the |
||||
following terms, and your use, installation, modification or |
||||
redistribution of this Apple software constitutes acceptance of these |
||||
terms. If you do not agree with these terms, please do not use, |
||||
install, modify or redistribute this Apple software. |
||||
|
||||
In consideration of your agreement to abide by the following terms, and |
||||
subject to these terms, Apple grants you a personal, non-exclusive |
||||
license, under Apple's copyrights in this original Apple software (the |
||||
"Apple Software"), to use, reproduce, modify and redistribute the Apple |
||||
Software, with or without modifications, in source and/or binary forms; |
||||
provided that if you redistribute the Apple Software in its entirety and |
||||
without modifications, you must retain this notice and the following |
||||
text and disclaimers in all such redistributions of the Apple Software.
|
||||
Neither the name, trademarks, service marks or logos of Apple Computer, |
||||
Inc. may be used to endorse or promote products derived from the Apple |
||||
Software without specific prior written permission from Apple. Except |
||||
as expressly stated in this notice, no other rights or licenses, express |
||||
or implied, are granted by Apple herein, including but not limited to |
||||
any patent rights that may be infringed by your derivative works or by |
||||
other works in which the Apple Software may be incorporated. |
||||
|
||||
The Apple Software is provided by Apple on an "AS IS" basis. APPLE |
||||
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION |
||||
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS |
||||
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND |
||||
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. |
||||
|
||||
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL |
||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
||||
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, |
||||
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED |
||||
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), |
||||
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE |
||||
POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
Copyright © 2006-2007 Apple Computer, Inc., All Rights Reserved |
||||
|
||||
*/ |
||||
|
||||
/* |
||||
* This file contains functions to generate OBJECT and EMBED tags for QuickTime content.
|
||||
*/ |
||||
|
||||
/************** LOCALIZABLE GLOBAL VARIABLES ****************/ |
||||
|
||||
var gArgCountErr = 'The "%%" function requires an even number of arguments.' |
||||
+ '\nArguments should be in the form "atttributeName", "attributeValue", ...'; |
||||
|
||||
/******************** END LOCALIZABLE **********************/ |
||||
|
||||
var gTagAttrs = null; |
||||
var gQTGeneratorVersion = 1.2; |
||||
var gQTBehaviorID = "qt_event_source"; |
||||
var gQTEventsEnabled = false; |
||||
|
||||
function AC_QuickTimeVersion() { return gQTGeneratorVersion; } |
||||
|
||||
function _QTComplain(callingFcnName, errMsg) |
||||
{ |
||||
errMsg = errMsg.replace("%%", callingFcnName); |
||||
alert(errMsg); |
||||
} |
||||
|
||||
function _QTIsMSIE() |
||||
{ |
||||
var ua = navigator.userAgent.toLowerCase(); |
||||
var msie = /msie/.test(ua) && !/opera/.test(ua); |
||||
|
||||
return msie; |
||||
} |
||||
|
||||
|
||||
function _QTGenerateBehavior() |
||||
{ |
||||
return objTag = '<!--[if IE]>' |
||||
+ '<object id="' + gQTBehaviorID + '" classid="clsid:CB927D12-4FF7-4a9e-A169-56E4B8A75598"></object>' |
||||
+ '<![endif]-->'; |
||||
} |
||||
|
||||
function _QTPageHasBehaviorObject(callingFcnName, args) |
||||
{ |
||||
var haveBehavior = false; |
||||
var objects = document.getElementsByTagName('object'); |
||||
|
||||
for ( var ndx = 0, obj; obj = objects[ndx]; ndx++ ) |
||||
{ |
||||
if ( obj.getAttribute('classid') == "clsid:CB927D12-4FF7-4a9e-A169-56E4B8A75598" ) |
||||
{ |
||||
if ( obj.getAttribute('id') == gQTBehaviorID ) |
||||
haveBehavior = false; |
||||
break; |
||||
} |
||||
} |
||||
|
||||
return haveBehavior; |
||||
} |
||||
|
||||
|
||||
function _QTShouldInsertBehavior() |
||||
{ |
||||
var shouldDo = false; |
||||
|
||||
if ( gQTEventsEnabled && _QTIsMSIE() && !_QTPageHasBehaviorObject() ) |
||||
shouldDo = true; |
||||
|
||||
return shouldDo; |
||||
} |
||||
|
||||
|
||||
function _QTAddAttribute(prefix, slotName, tagName) |
||||
{ |
||||
var value; |
||||
|
||||
value = gTagAttrs[prefix + slotName]; |
||||
if ( null == value ) |
||||
value = gTagAttrs[slotName]; |
||||
|
||||
if ( null != value ) |
||||
{ |
||||
if ( 0 == slotName.indexOf(prefix) && (null == tagName) ) |
||||
tagName = slotName.substring(prefix.length);
|
||||
if ( null == tagName )
|
||||
tagName = slotName; |
||||
return ' ' + tagName + '="' + value + '"'; |
||||
} |
||||
else |
||||
return ""; |
||||
} |
||||
|
||||
function _QTAddObjectAttr(slotName, tagName) |
||||
{ |
||||
// don't bother if it is only for the embed tag
|
||||
if ( 0 == slotName.indexOf("emb#") ) |
||||
return ""; |
||||
|
||||
if ( 0 == slotName.indexOf("obj#") && (null == tagName) ) |
||||
tagName = slotName.substring(4);
|
||||
|
||||
return _QTAddAttribute("obj#", slotName, tagName); |
||||
} |
||||
|
||||
function _QTAddEmbedAttr(slotName, tagName) |
||||
{ |
||||
// don't bother if it is only for the object tag
|
||||
if ( 0 == slotName.indexOf("obj#") ) |
||||
return ""; |
||||
|
||||
if ( 0 == slotName.indexOf("emb#") && (null == tagName) ) |
||||
tagName = slotName.substring(4);
|
||||
|
||||
return _QTAddAttribute("emb#", slotName, tagName); |
||||
} |
||||
|
||||
|
||||
function _QTAddObjectParam(slotName, generateXHTML) |
||||
{ |
||||
var paramValue; |
||||
var paramStr = ""; |
||||
var endTagChar = (generateXHTML) ? ' />' : '>'; |
||||
|
||||
if ( -1 == slotName.indexOf("emb#") ) |
||||
{ |
||||
// look for the OBJECT-only param first. if there is none, look for a generic one
|
||||
paramValue = gTagAttrs["obj#" + slotName]; |
||||
if ( null == paramValue ) |
||||
paramValue = gTagAttrs[slotName]; |
||||
|
||||
if ( 0 == slotName.indexOf("obj#") ) |
||||
slotName = slotName.substring(4);
|
||||
|
||||
if ( null != paramValue ) |
||||
paramStr = '<param name="' + slotName + '" value="' + paramValue + '"' + endTagChar; |
||||
} |
||||
|
||||
return paramStr; |
||||
} |
||||
|
||||
function _QTDeleteTagAttrs() |
||||
{ |
||||
for ( var ndx = 0; ndx < arguments.length; ndx++ ) |
||||
{ |
||||
var attrName = arguments[ndx]; |
||||
delete gTagAttrs[attrName]; |
||||
delete gTagAttrs["emb#" + attrName]; |
||||
delete gTagAttrs["obj#" + attrName]; |
||||
} |
||||
} |
||||
|
||||
|
||||
// generate an embed and object tag, return as a string
|
||||
function _QTGenerate(callingFcnName, generateXHTML, args) |
||||
{ |
||||
// is the number of optional arguments even?
|
||||
if ( args.length < 4 || (0 != (args.length % 2)) ) |
||||
{ |
||||
_QTComplain(callingFcnName, gArgCountErr); |
||||
return ""; |
||||
} |
||||
|
||||
// allocate an array, fill in the required attributes with fixed place params and defaults
|
||||
gTagAttrs = new Object(); |
||||
gTagAttrs["src"] = args[0]; |
||||
gTagAttrs["width"] = args[1]; |
||||
gTagAttrs["height"] = args[2]; |
||||
gTagAttrs["classid"] = "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"; |
||||
//Impportant note: It is recommended that you use this exact classid in order to ensure a seamless experience for all viewers
|
||||
gTagAttrs["pluginspage"] = "http://www.apple.com/quicktime/download/"; |
||||
|
||||
// set up codebase attribute with specified or default version before parsing args so
|
||||
// anything passed in will override
|
||||
var activexVers = args[3] |
||||
if ( (null == activexVers) || ("" == activexVers) ) |
||||
activexVers = "7,3,0,0"; |
||||
gTagAttrs["codebase"] = "http://www.apple.com/qtactivex/qtplugin.cab#version=" + activexVers; |
||||
|
||||
var attrName, |
||||
attrValue; |
||||
|
||||
// add all of the optional attributes to the array
|
||||
for ( var ndx = 4; ndx < args.length; ndx += 2) |
||||
{ |
||||
attrName = args[ndx].toLowerCase(); |
||||
attrValue = args[ndx + 1]; |
||||
|
||||
gTagAttrs[attrName] = attrValue; |
||||
|
||||
if ( ("postdomevents" == attrName) && (attrValue.toLowerCase() != "false") ) |
||||
{ |
||||
gQTEventsEnabled = true; |
||||
if ( _QTIsMSIE() ) |
||||
gTagAttrs["obj#style"] = "behavior:url(#" + gQTBehaviorID + ")"; |
||||
} |
||||
} |
||||
|
||||
// init both tags with the required and "special" attributes
|
||||
var objTag = '<object ' |
||||
+ _QTAddObjectAttr("classid") |
||||
+ _QTAddObjectAttr("width") |
||||
+ _QTAddObjectAttr("height") |
||||
+ _QTAddObjectAttr("codebase") |
||||
+ _QTAddObjectAttr("name") |
||||
+ _QTAddObjectAttr("id") |
||||
+ _QTAddObjectAttr("tabindex") |
||||
+ _QTAddObjectAttr("hspace") |
||||
+ _QTAddObjectAttr("vspace") |
||||
+ _QTAddObjectAttr("border") |
||||
+ _QTAddObjectAttr("align") |
||||
+ _QTAddObjectAttr("class") |
||||
+ _QTAddObjectAttr("title") |
||||
+ _QTAddObjectAttr("accesskey") |
||||
+ _QTAddObjectAttr("noexternaldata") |
||||
+ _QTAddObjectAttr("obj#style") |
||||
+ '>' |
||||
+ _QTAddObjectParam("src", generateXHTML); |
||||
var embedTag = '<embed ' |
||||
+ _QTAddEmbedAttr("src") |
||||
+ _QTAddEmbedAttr("width") |
||||
+ _QTAddEmbedAttr("height") |
||||
+ _QTAddEmbedAttr("pluginspage") |
||||
+ _QTAddEmbedAttr("name") |
||||
+ _QTAddEmbedAttr("id") |
||||
+ _QTAddEmbedAttr("align") |
||||
+ _QTAddEmbedAttr("tabindex"); |
||||
|
||||
// delete the attributes/params we have already added
|
||||
_QTDeleteTagAttrs("src","width","height","pluginspage","classid","codebase","name","tabindex", |
||||
"hspace","vspace","border","align","noexternaldata","class","title","accesskey","id","style"); |
||||
|
||||
// and finally, add all of the remaining attributes to the embed and object
|
||||
for ( var attrName in gTagAttrs ) |
||||
{ |
||||
attrValue = gTagAttrs[attrName]; |
||||
if ( null != attrValue ) |
||||
{ |
||||
embedTag += _QTAddEmbedAttr(attrName); |
||||
objTag += _QTAddObjectParam(attrName, generateXHTML); |
||||
} |
||||
}
|
||||
|
||||
// end both tags, we're done
|
||||
return objTag + embedTag + '></em' + 'bed></ob' + 'ject' + '>'; |
||||
} |
||||
|
||||
|
||||
// return the object/embed as a string
|
||||
function QT_GenerateOBJECTText() |
||||
{ |
||||
var txt = _QTGenerate("QT_GenerateOBJECTText", false, arguments); |
||||
if ( _QTShouldInsertBehavior() ) |
||||
txt = _QTGenerateBehavior() + txt; |
||||
return txt; |
||||
} |
||||
|
||||
function QT_GenerateOBJECTText_XHTML() |
||||
{ |
||||
var txt = _QTGenerate("QT_GenerateOBJECTText_XHTML", true, arguments); |
||||
if ( _QTShouldInsertBehavior() ) |
||||
txt = _QTGenerateBehavior() + txt; |
||||
return txt; |
||||
} |
||||
|
||||
function QT_WriteOBJECT() |
||||
{ |
||||
var txt = _QTGenerate("QT_WriteOBJECT", false, arguments); |
||||
if ( _QTShouldInsertBehavior() ) |
||||
document.writeln(_QTGenerateBehavior()); |
||||
document.writeln(txt); |
||||
} |
||||
|
||||
function QT_WriteOBJECT_XHTML() |
||||
{ |
||||
var txt = _QTGenerate("QT_WriteOBJECT_XHTML", true, arguments); |
||||
if ( _QTShouldInsertBehavior() ) |
||||
document.writeln(_QTGenerateBehavior()); |
||||
document.writeln(txt); |
||||
} |
||||
|
||||
function QT_GenerateBehaviorOBJECT() |
||||
{ |
||||
return _QTGenerateBehavior(); |
||||
} |
||||
|
||||
function QT_ReplaceElementContents() |
||||
{ |
||||
var element = arguments[0]; |
||||
var args = []; |
||||
|
||||
// copy all other arguments we want to pass through to the fcn
|
||||
for ( var ndx = 1; ndx < arguments.length; ndx++ ) |
||||
args.push(arguments[ndx]); |
||||
|
||||
var txt = _QTGenerate("QT_ReplaceElementContents", false, args); |
||||
if ( txt.length > 0 ) |
||||
element.innerHTML = txt; |
||||
} |
||||
|
||||
|
||||
function QT_ReplaceElementContents_XHTML() |
||||
{ |
||||
var element = arguments[0]; |
||||
var args = []; |
||||
|
||||
// copy all other arguments we want to pass through to the fcn
|
||||
for ( var ndx = 1; ndx < arguments.length; ndx++ ) |
||||
args.push(arguments[ndx]); |
||||
|
||||
var txt = _QTGenerate("QT_ReplaceElementContents_XHTML", true, args); |
||||
if ( txt.length > 0 ) |
||||
element.innerHTML = txt; |
||||
} |
||||
|
@ -0,0 +1,24 @@
|
||||
<?php |
||||
// $Id$ |
||||
|
||||
/* |
||||
* |
||||
* |
||||
* This Class implements the methods defined in the STANDARD_IMAGE content model |
||||
*/ |
||||
|
||||
class Exiftool { |
||||
function Exiftool() { |
||||
} |
||||
|
||||
function extractMetadata($parameterArray, $dsid, $file, $file_ext) { |
||||
$system = getenv('System'); |
||||
$file_suffix = '_'. $dsid . '.xml'; |
||||
$returnValue=TRUE; |
||||
$output=array(); |
||||
exec('exiftool -X ' . escapeshellarg($file) . '', $output); |
||||
file_put_contents($file.$file_suffix, implode("\n", $output)); |
||||
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_suffix; |
||||
return TRUE; |
||||
} |
||||
} |
@ -0,0 +1,35 @@
|
||||
<?php |
||||
// $Id$ |
||||
|
||||
/* |
||||
* |
||||
* |
||||
* This Class implements the methods defined in the STANDARD_QT content model |
||||
*/ |
||||
|
||||
class Ffmpeg { |
||||
function Ffmpeg() { |
||||
} |
||||
|
||||
function extract_thumbnail($parameterArray, $dsid, $file, $file_ext) { |
||||
$defaults = array('ss' => '00:00:10', 's' => null); |
||||
$params = array_merge($defaults, $parameterArray); |
||||
$system = getenv('System'); |
||||
$file_suffix = '_'. $dsid . '.' . $file_ext; |
||||
$returnValue=TRUE; |
||||
$output=array(); |
||||
$size = ''; |
||||
|
||||
if($params['s'] != null) { |
||||
$size = ' -s ' . escapeshellarg($params['s']); |
||||
} |
||||
exec('ffmpeg -i ' . escapeshellarg($file) . ' -r 1 -ss ' . escapeshellarg($params['ss']) . ' ' . $size . ' -t 1 ' . escapeshellarg($file . $file_suffix)); |
||||
|
||||
if (!file_exists($file . $file_suffix)) { |
||||
return false; |
||||
} |
||||
|
||||
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_suffix; |
||||
return TRUE; |
||||
} |
||||
} |
@ -0,0 +1,102 @@
|
||||
<?php |
||||
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); |
||||
/* |
||||
* |
||||
* |
||||
* |
||||
* implements methods from content model ingest form xml |
||||
* builds a dc metadata form |
||||
*/ |
||||
class QtFormBuilder extends FormBuilder{ |
||||
function QtFormBuilder(){ |
||||
module_load_include('php', 'Fedora_Repository', 'plugins/FormBuilder'); |
||||
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); |
||||
|
||||
} |
||||
|
||||
/* |
||||
* method overrides method in FormBuilder. We changed the dsid from OBJ to OBJ and added the TN datastream |
||||
*/ |
||||
function createFedoraDataStreams($form_values,&$dom, &$rootElement){ |
||||
module_load_include('inc', 'fedora_repository', 'MimeClass'); |
||||
global $base_url; |
||||
$mimetype = new MimeClass(); |
||||
$server=null; |
||||
$file=$form_values['ingest-file-location']; |
||||
$dformat = $mimetype->getType($file); |
||||
//$fileUrl = 'http://'.$_SERVER['HTTP_HOST'].$file; |
||||
$fileUrl = $base_url.'/'.drupal_urlencode($file); |
||||
$beginIndex = strrpos($fileUrl,'/'); |
||||
$dtitle = substr($fileUrl,$beginIndex+1); |
||||
$dtitle = substr($dtitle, 0, strpos($dtitle, ".")); |
||||
$ds1 = $dom->createElement("foxml:datastream"); |
||||
$ds1->setAttribute("ID","OBJ"); |
||||
$ds1->setAttribute("STATE","A"); |
||||
$ds1->setAttribute("CONTROL_GROUP","M"); |
||||
$ds1v= $dom->createElement("foxml:datastreamVersion"); |
||||
$ds1v->setAttribute("ID","OBJ.0"); |
||||
$ds1v->setAttribute("MIMETYPE","$dformat"); |
||||
$ds1v->setAttribute("LABEL","$dtitle"); |
||||
$ds1content = $dom->createElement('foxml:contentLocation'); |
||||
$ds1content->setAttribute("REF","$fileUrl"); |
||||
$ds1content->setAttribute("TYPE","URL"); |
||||
$ds1->appendChild($ds1v); |
||||
$ds1v->appendChild($ds1content); |
||||
$rootElement->appendChild($ds1); |
||||
|
||||
if(empty($_SESSION['fedora_ingest_files']) || !isset($_SESSION['fedora_ingest_files']['TN'])) { |
||||
$createdFile = drupal_get_path('module', 'Fedora_Repository').'/images/qtThumb.jpg'; |
||||
$fileUrl = $base_url.'/'.drupal_urlencode($createdFile);//'http://'.$_SERVER['HTTP_HOST'].'/'.$createdFile; |
||||
$ds1 = $dom->createElement("foxml:datastream"); |
||||
$ds1->setAttribute("ID","TN"); |
||||
$ds1->setAttribute("STATE","A"); |
||||
$ds1->setAttribute("CONTROL_GROUP","M"); |
||||
$ds1v= $dom->createElement("foxml:datastreamVersion"); |
||||
$ds1v->setAttribute("ID","TN.0"); |
||||
$ds1v->setAttribute("MIMETYPE","image/jpeg"); |
||||
$ds1v->setAttribute("LABEL","Thumbnail"); |
||||
$ds1content = $dom->createElement('foxml:contentLocation'); |
||||
$ds1content->setAttribute("REF","$fileUrl"); |
||||
$ds1content->setAttribute("TYPE","URL"); |
||||
$ds1->appendChild($ds1v); |
||||
$ds1v->appendChild($ds1content); |
||||
$rootElement->appendChild($ds1); |
||||
} |
||||
|
||||
if (!empty($_SESSION['fedora_ingest_files'])) { |
||||
|
||||
|
||||
|
||||
foreach ($_SESSION['fedora_ingest_files'] as $dsid => $createdFile) { |
||||
$createdFile = strstr($createdFile, $file); |
||||
$dformat = $mimetype->getType($createdFile); |
||||
$fileUrl = $base_url . '/'. drupal_urlencode($createdFile); |
||||
$beginIndex = strrpos($fileUrl, '/'); |
||||
$dtitle = substr($fileUrl, $beginIndex + 1); |
||||
$dtitle = urldecode($dtitle); |
||||
$dtitle = $dtitle; |
||||
$ds1 = $dom->createElement("foxml:datastream"); |
||||
$ds1->setAttribute("ID", "$dsid"); |
||||
$ds1->setAttribute("STATE", "A"); |
||||
$ds1->setAttribute("CONTROL_GROUP", "M"); |
||||
$ds1v= $dom->createElement("foxml:datastreamVersion"); |
||||
$ds1v->setAttribute("ID", "$dsid.0"); |
||||
$ds1v->setAttribute("MIMETYPE", "$dformat"); |
||||
$ds1v->setAttribute("LABEL", "$dtitle"); |
||||
$ds1content = $dom->createElement('foxml:contentLocation'); |
||||
$ds1content->setAttribute("REF", "$fileUrl"); |
||||
$ds1content->setAttribute("TYPE", "URL"); |
||||
$ds1->appendChild($ds1v); |
||||
$ds1v->appendChild($ds1content); |
||||
$rootElement->appendChild($ds1); |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
?> |
@ -0,0 +1,138 @@
|
||||
<?php |
||||
// $Id$ |
||||
|
||||
class ShowQtStreamsInFieldSets { |
||||
private $pid =NULL; |
||||
|
||||
function ShowQtStreamsInFieldSets($pid) { |
||||
$this->pid = $pid; |
||||
} |
||||
|
||||
function fedoraObject() { |
||||
return new fedora_item($this->pid); |
||||
} |
||||
|
||||
function technicalMetadata($defaults = array(), $dsid = 'OBJ_EXIFTOOL') { |
||||
$data = $defaults; |
||||
|
||||
try { |
||||
$src = ObjectHelper::getStream($this->pid, $dsid); |
||||
|
||||
$doc = new SimpleXMLElement($src); |
||||
$doc->registerXPathNamespace('File', 'http://ns.exiftool.ca/File/1.0/'); |
||||
$doc->registerXPathNamespace('Composite', 'http://ns.exiftool.ca/Composite/1.0/'); |
||||
$mime = reset($doc->xpath('//File:MIMEType')); |
||||
$data['mime'] = $mime; |
||||
if(strpos($mime, 'audio/') !== false) { |
||||
$data['width'] = 300; |
||||
$data['height'] = 0; |
||||
} else { |
||||
$size = reset($doc->xpath('//Composite:ImageSize/text()')); |
||||
list($width, $height) = explode('x', $size); |
||||
$data['width'] = $width; |
||||
$data['height'] = $height; |
||||
} |
||||
|
||||
$data['doc'] = $src; |
||||
} catch(Exception $e) { |
||||
$data = $defaults; |
||||
} |
||||
|
||||
return $data; |
||||
} |
||||
|
||||
function getPosterFrameDatastreamInfo($dsid = 'FULL_SIZE') { |
||||
$p = ObjectHelper::getDatastreamInfo($this->pid, $dsid); |
||||
if(empty($p) || $p == ' ' || $p === false) { |
||||
return false; |
||||
} |
||||
return $p; |
||||
} |
||||
|
||||
function getMediaDatastreamInfo($dsid = 'OBJ', $alt = array('')) { |
||||
$p = ObjectHelper::getDatastreamInfo($this->pid, $dsid); |
||||
if(empty($p) || $p == ' ' || $p === false) { |
||||
if(!empty($alt)) { |
||||
$ds = array_shift($alt); |
||||
return $this->getMediaDatastreamInfo($ds, $alt); |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
return $p; |
||||
} |
||||
|
||||
function enableDownload() { |
||||
return false; |
||||
} |
||||
|
||||
function showQt() { |
||||
module_load_include('inc', 'fedora_repository', 'plugins/tagging_form'); |
||||
module_load_include('inc', 'fedora_repository', 'plugins/ShowStreamsInFieldSets'); |
||||
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); |
||||
|
||||
$info = $this->technicalMetadata(array('width' => 640, 'height' => 480)); |
||||
$width = $info['width']; |
||||
$height = $info['height']; |
||||
|
||||
$pframe = $this->getPosterFrameDatastreamInfo(); |
||||
$media = $this->getMediaDatastreamInfo('PROXY', array('OBJ')); |
||||
if($media === false ) { |
||||
return ''; |
||||
} |
||||
global $base_url; |
||||
$path = drupal_get_path('module', 'Fedora_Repository'); |
||||
$fullPath=base_path().$path; |
||||
$content= ''; |
||||
$pathTojs = drupal_get_path('module', 'Fedora_Repository').'/js/AC_Quicktime.js'; |
||||
drupal_add_js($pathTojs); |
||||
|
||||
$divid = 'player'.md5($this->pid).'MOV'; |
||||
$content .= '<div class="player" id="' . $divid .'">'; |
||||
if($pframe !== false) { |
||||
$content .= '<div class="poster" style="cursor: pointer; position: relative; width: ' . $width .'px; min-height: ' . ($height) . 'px;">'; |
||||
$content .= '<img src="' . base_path().'fedora/repository/'.$this->pid.'/'. $pframe->ID . '/poster.jpg' . '" />'; |
||||
$content .= '<div class="play" style="font-size: 128px; color: white; position: absolute; top: 50%; left: 50%; margin-top: -0.085em; margin-left: -0.33em; opacity: 0.9; ">▶</div>'; |
||||
$content .= '</div>'; |
||||
} |
||||
$content .= '</div>'; |
||||
if($this->enableDownload()) { |
||||
$url = base_path().'fedora/repository/'.$this->pid.'/OBJ/MOV.mov'; |
||||
$content .= '<a class="download" href="' . $url . '">Download Media File</a>'; |
||||
} |
||||
$src = base_path().'fedora/repository/'.$this->pid.'/' . $media->ID. '/MOV.mov'; |
||||
$qtparams = ''; |
||||
$qtparams .= "'autostart', '" . ($pframe !== false ? 'true' : 'false') . "', "; |
||||
$init = <<<EOD |
||||
$(function() { |
||||
src = "$src"; |
||||
if(src.substring(0,4) != 'http') { |
||||
src = 'http://' + location.host + src; |
||||
} |
||||
str = QT_GenerateOBJECTText_XHTML(src, "$width", ($height+15), '', |
||||
$qtparams |
||||
'postdomevents', 'true', |
||||
'EnableJavaScript', 'true', |
||||
'bgcolor', 'black', |
||||
'controller', 'true', |
||||
'SCALE', 'aspect', |
||||
'LOOP', 'false' |
||||
); |
||||
if($('.poster', '#$divid').length ==0) { |
||||
$('#$divid').append(str); |
||||
} else { |
||||
$('#$divid .poster').one('click', function() { $(this).hide(); $('#$divid').append(str); }); |
||||
} |
||||
}); |
||||
EOD; |
||||
|
||||
drupal_add_js($init, 'inline', 'footer'); |
||||
|
||||
$collection_fieldset = array( |
||||
'#title' => t('Quicktime'), |
||||
'#collapsible' => TRUE, |
||||
'#collapsed' => FALSE, |
||||
'#value' => $content); |
||||
return theme('fieldset',$collection_fieldset); |
||||
} |
||||
} |
Loading…
Reference in new issue