Using Classic Shadow Files

From Wiki
Jump to: navigation, search

Contents

Shadow (XML) Files Without Media File

  • Adding a XML file will create a new content with the meta data from the file (file specifications below)
  • Deleting a XML file will mark the content as deleted
  • Renaming the XML file name will not have any effect on the content record
  • Changing the XML file can have two distinct effects:
    • Changing the "primaryTitle" value will create a new content and mark the old content as deleted
    • Changing any other values will update the existing content record with the data from the file

The XML file does not have to be complete or even have anything in it. Here are the guidelines for using shadow files:

  • An empty XML file will create a blank content record by using the name of the XML file as the content title
  • An incomplete XML file (missing the root "metaData" node) will also create a blank content record by using the name of the XML file as the content title
  • A partial XML file (having the root "metaData" node but not all the individual element) will use the values in the available elements as the meta data for the content record. This means that you can specify only the value of the "primaryTitle" or the "dateProduced" element and either leave everything else blank or not even create nodes for the elements you do not care about.

Media with Shadow File

  • Adding a media file with a shadow file will create a new content with meta data from the shadow file and the file as the media
  • Deleting can have three distinct effects:
    • Deleting a shadow file and leaving the media file will update the content with data from the media file
    • Deleting the media file and leaving the shadow file will remove the media associated with the content and use a generic image for the thumbnails and preview
    • Deleting both shadow file and media file(s) will remove the media associated with the content and mark the content as deleted
  • Renaming and/or updating the media and/or the shadow file will have the same effect as described above for the media and/or shadow file

Shadow File Format Example

<video xmlns="http://ensembleVideo.com/xmlSchemas/video">
  <metaData>
    <primaryTitle>Ellen-Miller-Sunlight</primaryTitle>
    <abstract>Some abstract text</abstract>
    <subjectKeywords>doh, doh, doh</subjectKeywords>
    <duration>10:06:02</duration>
    <dateProduced>2008-03-25</dateProduced>
    <copyright>Mine</copyright>
  </metaData>
</video>

Shadow File Schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="video">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="metaData">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="primaryTitle" type="xs:string" />
              <xs:element name="abstract" type="xs:string" />
              <xs:element name="subjectKeywords" type="xs:string" />
              <xs:element name="duration" type="xs:string" />
              <xs:element name="dateProduced" type="xs:dateTime" />
              <xs:element name="copyright" type="xs:string" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>