]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
Reflects significant changes in the CollectionObject schema per work by Richard and...
authorAron Roberts <aron@socrates.berkeley.edu>
Thu, 5 Mar 2009 20:46:32 +0000 (20:46 +0000)
committerAron Roberts <aron@socrates.berkeley.edu>
Thu, 5 Mar 2009 20:46:32 +0000 (20:46 +0000)
sandbox/aron/schema/collectionObject.rng [new file with mode: 0644]
sandbox/aron/schema/collectionObject.xml [new file with mode: 0644]
sandbox/aron/schema/defaultCollectionObject.rng [new file with mode: 0644]
sandbox/aron/schema/sampleMmiCollectionObject.rng [new file with mode: 0644]
sandbox/aron/schema/serviceMetadata.rng [new file with mode: 0644]
sandbox/aron/schema/serviceResponse.rng [new file with mode: 0644]
sandbox/aron/schema/serviceResponse.xml [new file with mode: 0644]

diff --git a/sandbox/aron/schema/collectionObject.rng b/sandbox/aron/schema/collectionObject.rng
new file mode 100644 (file)
index 0000000..15c6229
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+       collectionObject.rng
+       
+       A schema defining the structure of an CollectionObject entity.
+
+       This schema was created for the CollectionSpace system,
+       http://www.collectionspace.org/
+       
+       It is written in the XML syntax of the RELAX NG schema language,
+       http://relaxng.org/
+
+-->
+
+<element
+       name="collectionObject" 
+       xmlns="http://relaxng.org/ns/structure/1.0">
+       
+       <!-- Data elements common to every entity object in the CollectionSpace system. -->
+       <externalRef href="serviceMetadata.rng"/>
+       
+       <!-- The default CollectionSpace schema for an entity object (extremely simplified). -->
+       <externalRef href="defaultCollectionObject.rng"/>
+       
+       <!-- A reference to a domain- or community-provided schema, if available, would go here -->
+       
+       <!-- An example of a site- or instance-provided schema (extremely simplified). -->
+       <externalRef href="sampleMmiCollectionObject.rng"/>
+    
+</element>
diff --git a/sandbox/aron/schema/collectionObject.xml b/sandbox/aron/schema/collectionObject.xml
new file mode 100644 (file)
index 0000000..919e73c
--- /dev/null
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+       collectionObject.xml
+
+       A hypothetical, skeletal instance of an CollectionObject payload,
+       represented as an XML document.
+       
+       This is created for the CollectionSpace system, http://www.collectionspace.org/
+
+-->
+
+<collectionObject>
+
+       <serviceMetadata>
+               <collectionSpaceId>1</collectionSpaceId>
+       </serviceMetadata>
+
+       <defaultCollectionObject>
+               <!-- Linebreaks were added to the following description for readability -->
+               <description>Radio News, August 1928. The cover of this issue features an
+illustration of a man and woman watching an early "radio movie." Text on
+the cover reads, "Radio's Greatest Magazine / Radio News / August 25
+Cents / Over 200 illustrations / Edited by Hugo Gernsback / Radio Movies
+and Television for the Home / Experimenter Publishing Company, 230 Fifth
+Avenue, New York."
+
+In addition to articles about radios and radio technology, the magazine
+also contains several articles about developments in the field of
+television. The issue begins with an editorial about the future of
+television by the magazine's editor, Hugo Gernsback, which is followed
+by an article about the radio movie receiver system invented by C.
+Francis Jenkins. The article includes drawings illustrating the layout
+of the sytem.</description>
+       </defaultCollectionObject>
+
+  <sampleMmiCollectionObject>
+       <artifactClass>Books, literature, and periodicals</artifactClass>
+       <material>Paper</material>
+       <overallDimensions>
+               <height>11.75</height>
+               <width>8.75</width>
+               <measurementUnit>in</measurementUnit>
+       </overallDimensions>
+  </sampleMmiCollectionObject>
+  
+</collectionObject>
diff --git a/sandbox/aron/schema/defaultCollectionObject.rng b/sandbox/aron/schema/defaultCollectionObject.rng
new file mode 100644 (file)
index 0000000..52cbb2a
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+       defaultCollectionObject.rng
+       
+       A schema defining the structure of an default, "out of the box" CollectionObject.
+
+       This schema was created for the CollectionSpace system,
+       http://www.collectionspace.org/
+       
+       It is written in the XML syntax of the RELAX NG schema language,
+       http://relaxng.org/
+
+-->
+
+<element
+       name="defaultCollectionObject" 
+       xmlns="http://relaxng.org/ns/structure/1.0"
+       datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+       <!--
+               Description appears here as an initial, sample data element.
+               There are a number of other data elements which must be added
+               to this schema to support the requirements of Release 0.1.
+       -->
+       <element name="description">
+               <choice>
+                       <data type="string" />
+                       <empty />
+               </choice>
+       </element>
+           
+</element>
diff --git a/sandbox/aron/schema/sampleMmiCollectionObject.rng b/sandbox/aron/schema/sampleMmiCollectionObject.rng
new file mode 100644 (file)
index 0000000..1f733e1
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+       sampleMmiCollectionObject.rng
+       
+       A schema defining the structure of a completely hypothetical CollectionObject
+       for the Museum of the Moving Image (MMI) in Astoria, New York.  This is a minimal
+       example created for a system demo.
+
+       This schema was created for the CollectionSpace system,
+       http://www.collectionspace.org/
+       
+       It is written in the XML syntax of the RELAX NG schema language,
+       http://relaxng.org/
+
+-->
+
+<element
+       name="sampleMmiCollectionObject" 
+       xmlns="http://relaxng.org/ns/structure/1.0"
+       datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+       
+       <!--
+               These initial choices were inspired by the following item in the
+               museum's online catalog:
+               
+               http://collection.movingimage.us/index.php?g=detail&object_id=64117
+               
+               and in turn by William Gibson's short story, The Gernsback Continuum.
+       -->
+
+       <optional>
+               <element name="artifactClass">
+                       <choice>
+                               <data type="string" />
+                               <empty />
+                       </choice>
+               </element>
+       </optional>
+
+       <optional>
+               <element name="material">
+                       <choice>
+                               <data type="string" />
+                               <empty />
+                       </choice>
+               </element>
+       </optional>
+               
+       <!--
+               The following is a somewhat awkward construction, because I
+               don't know how yet to make the value of an attribute dependent on
+               the value of its corresponding element, as in "if the value of
+               this element is non-empty, then the attribute value must also be non-empty - Aron.
+       -->
+       <optional>
+               <element name="overallDimensions">
+                       <element name="height">
+                               <choice>
+                                       <data type="decimal" />
+                                       <empty />
+                               </choice>
+                       </element>
+                       <element name="width">
+                               <choice>
+                                       <data type="decimal" />
+                                       <empty />
+                               </choice>
+                       </element>
+                       <element name="measurementUnit">
+                               <choice>
+                                       <value>in</value>
+                                       <value>mm</value>
+                                       <empty />
+                               </choice>
+                       </element>
+               </element>
+       </optional>
+           
+</element>
diff --git a/sandbox/aron/schema/serviceMetadata.rng b/sandbox/aron/schema/serviceMetadata.rng
new file mode 100644 (file)
index 0000000..79f453d
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+       serviceMetadata.rng
+       
+       A schema defining the structure of service metadata:
+       data elements that are associated with every entity object.
+
+       This schema was created for the CollectionSpace system,
+       http://www.collectionspace.org/
+       
+       It is written in the XML syntax of the RELAX NG schema language,
+       http://relaxng.org/
+
+-->
+
+<element
+       name="serviceMetadata" 
+       xmlns="http://relaxng.org/ns/structure/1.0"
+       datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+       
+       <!--
+               A unique CollectionSpace system identifier (ID) for this
+               entity record.  This is distinguished from any museum-created
+               or other identifiers that might also be associated with it.
+                       
+               Note: We may wish to think further about what this element name should be.
+       -->
+       <element name="collectionSpaceId">
+               <!--
+                       Note: We may potentially wish to specify a regex-type pattern
+                       here for further validating these IDs.
+               -->
+               <data type="string" />
+       </element>
+       
+       <!--
+               All of the data elements after this point are fully optional.
+               
+               It's possible we may never want or need to pass these in
+               routine message payloads, and if so, this merely constitutes
+               notes/documentation on a few representative types of data that
+               we might additionally store as system metadata, beyond an identifier.
+               
+               It's also possible that we might offer a service to provide this
+               system metadata for any object, so that, for instance, a client
+               might be able to retrieve the full modification history for an object.
+               This *may* even already be envisioned for an already defined or
+               candidate service ...
+       -->
+       
+               <!-- ######################### -->
+               <!-- Creation                  -->
+               <!-- ######################### -->
+       
+               <!--
+                       A timestamp for the creation of this entity record, as specified in
+                       http://www.w3.org/TR/xmlschema-2/#dateTime
+               -->
+               <optional>
+                       <element name="created">
+                               <choice>
+                                       <data type="dateTime" />
+                                       <empty />
+                               </choice>
+                       </element>
+               </optional>
+       
+               <!-- The system Principal that created this entity record -->
+               <optional>
+                       <element name="createdBy">
+                               <choice>
+                                       <data type="string" />
+                                       <empty />
+                               </choice>
+                       </element>
+               </optional>
+
+               <!-- 
+                       Note: Do we also need 'acting as designate for' information here,
+                       for cases where one system Principal created this entity while
+                       acting as a designate for another Principal?
+               -->
+       
+               <!-- ######################### -->
+               <!-- Last modification         -->
+               <!-- ######################### -->
+               
+               <!--
+                       A timestamp for the last modification of this entity record, as specified in
+                       http://www.w3.org/TR/xmlschema-2/#dateTime
+               -->
+               <optional>
+                       <element name="lastModified">
+                               <choice>
+                                       <data type="dateTime" />
+                                       <empty />
+                               </choice>
+                       </element>
+               </optional>
+       
+               <!-- The system Principal that created this entity record -->
+               <optional>
+                       <element name="lastModifiedBy">
+                               <choice>
+                                       <data type="string" />
+                                       <empty />
+                               </choice>
+                       </element>
+               </optional>
+
+               <!-- 
+                       Note: Do we also need 'acting as designate for' information here,
+                       for cases where one system Principal modified this entity while
+                       acting as a designate for another Principal?
+               -->
+
+               <!-- ######################### -->
+               <!-- Valid from/to             -->
+               <!-- ######################### -->
+               
+               <!--
+                       Patrick mentioned the concept of 'valid to/from' timestamps.
+                       If this applied to entity objects, not to schema, we might
+                       explore that further as another possible type of system metadata. 
+               -->
+    
+</element>
diff --git a/sandbox/aron/schema/serviceResponse.rng b/sandbox/aron/schema/serviceResponse.rng
new file mode 100644 (file)
index 0000000..c4d759d
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+       serviceResponse.rng
+
+       A schema defining the representation of the data returned in
+       response to a request.  This may include a result code and
+       message, as well as a block containing any arbitrary XML-based data.
+       
+       This schema was created for the CollectionSpace system,
+       http://www.collectionspace.org/
+       
+       It is written in the XML syntax of the RELAX NG schema language,
+       http://relaxng.org/
+
+-->
+
+<grammar
+       xmlns="http://relaxng.org/ns/structure/1.0"
+       datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+       <start>
+    
+               <element
+                       name="response">
+               
+                       <!-- ######################### -->
+                       <!-- Result                    -->
+                       <!-- ######################### -->
+                       
+                       <!-- The result of the operation. -->
+                       <element name="result">
+                       
+                               <!--
+                                       A service-dependent result code, which must be
+                                       at least one character in length.
+                               -->
+                               <element name="resultCode">
+                                       <data type="normalizedString">
+                                               <param name="minLength">1</param>
+                                       </data>
+                               </element>
+                               
+                               <!--
+                                       An (optional) service-dependent message,
+                                       presumably corresponding to the result code.
+                               -->
+                               <element name="resultMessage">
+                                       <choice>
+                                               <empty/>
+                                               <data type="normalizedString" />
+                                       </choice>
+                               </element>
+                               
+                       </element>
+               
+               
+                       <!-- ######################### -->
+                       <!-- Data                      -->
+                       <!-- ######################### -->
+               
+                       <!--
+                               The data returned to the caller after performing the operation.
+
+                               The data may be any one of the following:
+                               - Empty (blank);
+                               - Any text; or
+                               - Any combination of elements, each of which may have attributes,
+                                 text nodes, and child elements.
+                       -->
+                       
+                       <!--
+                               Note: we may want to add a MIME type attribute, and to consider how to
+                               structure this for potentially returning multipart MIME data or the like,
+                               for use cases where we might need to return multiple media objects, etc.
+                       -->
+                       <element name="data">
+                               <choice>
+                                       <empty/>
+                                       <text/>
+                                       <ref name="anyElement"/>
+                               </choice>
+                       </element>
+
+               </element>
+       
+       </start>
+       
+       <!--
+               See the "Name Classes" section in the RELAX NG tutorial,
+               http://relaxng.org/tutorial-20011203.html#IDAFLZR
+       -->
+  <define name="anyElement">
+    <element>
+      <anyName/>
+      <zeroOrMore>
+                               <choice>
+                                       <attribute>
+                                               <anyName/>
+                                       </attribute>
+                                       <text/>
+                                       <ref name="anyElement"/>
+                               </choice>
+      </zeroOrMore>
+    </element>
+  </define>
+       
+</grammar>
+
diff --git a/sandbox/aron/schema/serviceResponse.xml b/sandbox/aron/schema/serviceResponse.xml
new file mode 100644 (file)
index 0000000..daeed3d
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+       serviceResponse.xml
+
+       A hypothetical instance of an serviceResponse document.
+
+       This document was created for the CollectionSpace system,
+       http://www.collectionspace.org/
+
+-->
+
+<!-- Note: this root element may require a namespace. -->
+<response>
+       <result>
+               <resultCode>1005</resultCode>
+               <resultMessage></resultMessage>
+       </result>
+       <!--
+               The 'data' element below may be empty, contain any text,
+               or consist of any XML element, which may have attributes,
+               text nodes, and child elements.
+       -->
+       <data>foo</data>
+</response>