]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-269: Adding XML Schema for relation entity.
authorRichard Millet <richard.millet@berkeley.edu>
Thu, 30 Jul 2009 06:54:50 +0000 (06:54 +0000)
committerRichard Millet <richard.millet@berkeley.edu>
Thu, 30 Jul 2009 06:54:50 +0000 (06:54 +0000)
services/common/src/main/resources/relation.xsd [new file with mode: 0644]

diff --git a/services/common/src/main/resources/relation.xsd b/services/common/src/main/resources/relation.xsd
new file mode 100644 (file)
index 0000000..0aea066
--- /dev/null
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<!--\r
+    Copyright 2009 University of California at Berkeley\r
+    Licensed under the Educational Community License (ECL), Version 2.0.\r
+    You may not use this file except in compliance with this License.\r
+    \r
+    You may obtain a copy of the ECL 2.0 License at\r
+    https://source.collectionspace.org/collection-space/LICENSE.txt\r
+\r
+    Document   : relation.xsd\r
+    Revision   : $LastChangedRevision: $\r
+    Created on : $LastChangedDate: $\r
+    Author     : $LastChangedBy: $\r
+    Description:\r
+-->\r
+<xs:schema\r
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"\r
+    xmlns="http://services.collectionspace.org/relation"\r
+    xmlns:rel="http://services.collectionspace.org/relation"\r
+    targetNamespace="http://services.collectionspace.org/relation"\r
+    >\r
+\r
+    <!-- Relation -->\r
+    <xs:element name="relation">\r
+        <xs:complexType>\r
+            <xs:sequence>\r
+               <xs:element name="csid" type="xs:string" />            \r
+                <xs:element name="documentId1" type="xs:string" minOccurs="1" maxOccurs="1"/>\r
+                <xs:element name="documentType1" type="xs:string" minOccurs="1" maxOccurs="1"/>\r
+                <xs:element name="documentId2" type="xs:string" minOccurs="1" maxOccurs="1"/>\r
+                <xs:element name="documentType2" type="xs:string" minOccurs="1" maxOccurs="1"/>\r
+                <!-- type of relatinoship between two entities -->\r
+                <xs:element name="relationshipType" type="rel:RelationshipType" minOccurs="1" maxOccurs="1"/>\r
+            </xs:sequence>\r
+        </xs:complexType>\r
+    </xs:element>\r
+\r
+    <!-- enumeration defining the type of relationship between two entities -->\r
+    <xs:simpleType name="RelationshipType">\r
+        <xs:restriction base="xs:string">\r
+            <!-- document with id as document-id-1 is associated with document with id as document-id-2 -->\r
+            <xs:enumeration value="association"/>\r
+            <!-- document with id as document-id-1 contains one or more document with id as document-id-2 -->\r
+            <xs:enumeration value="contains"/>\r
+        </xs:restriction>\r
+    </xs:simpleType>\r
+\r
+    <!-- collection objects as in nuxeo repository -->\r
+    <xs:element name="relation-list">\r
+        <xs:complexType>\r
+            <xs:sequence>\r
+                <xs:element name="relation-list-item" maxOccurs="unbounded">\r
+                    <xs:complexType>\r
+                        <xs:sequence>\r
+                            <!-- uri to retrive collection object details -->\r
+                            <xs:element name="uri" type="xs:anyURI" minOccurs="1"/>\r
+                            <xs:element name="csid" type="xs:string" minOccurs="1"/>\r
+                        </xs:sequence>\r
+                    </xs:complexType>\r
+                </xs:element>\r
+            </xs:sequence>\r
+        </xs:complexType>\r
+    </xs:element>\r
+\r
+</xs:schema>\r
+\r
+\r
+\r
+\r
+\r
+\r