updates to PROV-XML schema that introduce elements and complexTypes for PROV-defined specializations of agent, entity, and derivation.
authorStephan Zednik <zednis@rpi.edu>
Mon, 14 Jan 2013 13:41:48 -0700
changeset 5423 fb3e3ef40222
parent 5422 31e095b65310
child 5424 33a576fb0b32
updates to PROV-XML schema that introduce elements and complexTypes for PROV-defined specializations of agent, entity, and derivation.
xml/schema/prov.xsd
--- a/xml/schema/prov.xsd	Fri Jan 11 17:23:07 2013 +0000
+++ b/xml/schema/prov.xsd	Mon Jan 14 13:41:48 2013 -0700
@@ -1,19 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!-- 
-     *warning*
-     transformation of the opm opmx schema into prov compatible.
-     purely tentative at this stage. 
-
      In PROV-DM, all ids are qualified names, specified as prov:QualifiedName in PROV-N.
      In this schema, all ids are instead defined as xsd:QNames. 
-
-
-     ISSUES to tackle:
-     - How do we support internationalization? 
-       There is explicit support for internationalization for label.
-       How can we support xml:lang for any string, as per prov-dm?
-
   -->
 
 
@@ -48,8 +37,8 @@
 
   <xs:complexType name="Activity">
     <xs:sequence>
-      <xs:element name="startTime"    type="xs:dateTime" minOccurs="0"/> 
-      <xs:element name="endTime"      type="xs:dateTime" minOccurs="0"/> 
+      <xs:element name="startTime" type="xs:dateTime" minOccurs="0"/> 
+      <xs:element name="endTime" type="xs:dateTime" minOccurs="0"/> 
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:location"/>
         <xs:element ref="prov:label"/>
@@ -62,9 +51,9 @@
 
   <xs:complexType name="Generation">
     <xs:sequence>
-      <xs:element name="entity"   type="prov:EntityRef"/>
+      <xs:element name="entity" type="prov:EntityRef"/>
       <xs:element name="activity" type="prov:ActivityRef" minOccurs="0"/>
-      <xs:element name="time"     type="xs:dateTime" minOccurs="0"/>
+      <xs:element name="time" type="xs:dateTime" minOccurs="0"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:location"/>
         <xs:element ref="prov:role"/>
@@ -79,8 +68,8 @@
   <xs:complexType name="Usage">
     <xs:sequence>
       <xs:element name="activity" type="prov:ActivityRef"/>
-      <xs:element name="entity"   type="prov:EntityRef" minOccurs="0"/>
-      <xs:element name="time"     type="xs:dateTime" minOccurs="0"/>
+      <xs:element name="entity" type="prov:EntityRef" minOccurs="0"/>
+      <xs:element name="time" type="xs:dateTime" minOccurs="0"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:location"/>
         <xs:element ref="prov:role"/>
@@ -94,7 +83,7 @@
 
   <xs:complexType name="Communication">
     <xs:sequence>
-      <xs:element name="informed"  type="prov:ActivityRef"/>
+      <xs:element name="informed" type="prov:ActivityRef"/>
       <xs:element name="informant" type="prov:ActivityRef"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:label"/>
@@ -108,9 +97,9 @@
   <xs:complexType name="Start">
     <xs:sequence>
       <xs:element name="activity" type="prov:ActivityRef"/>
-      <xs:element name="trigger"  type="prov:EntityRef" minOccurs="0"/>
-      <xs:element name="starter"  type="prov:ActivityRef" minOccurs="0"/>
-      <xs:element name="time"     type="xs:dateTime" minOccurs="0"/>
+      <xs:element name="trigger" type="prov:EntityRef" minOccurs="0"/>
+      <xs:element name="starter" type="prov:ActivityRef" minOccurs="0"/>
+      <xs:element name="time" type="xs:dateTime" minOccurs="0"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:location"/>
         <xs:element ref="prov:role"/>
@@ -125,9 +114,9 @@
   <xs:complexType name="End">
     <xs:sequence>
       <xs:element name="activity" type="prov:ActivityRef"/>
-      <xs:element name="trigger"  type="prov:EntityRef"  minOccurs="0"/>
-      <xs:element name="ender"    type="prov:ActivityRef" minOccurs="0"/>
-      <xs:element name="time"     type="xs:dateTime" minOccurs="0"/>
+      <xs:element name="trigger" type="prov:EntityRef"  minOccurs="0"/>
+      <xs:element name="ender" type="prov:ActivityRef" minOccurs="0"/>
+      <xs:element name="time" type="xs:dateTime" minOccurs="0"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:location"/>
         <xs:element ref="prov:role"/>
@@ -141,9 +130,9 @@
 
   <xs:complexType name="Invalidation">
     <xs:sequence>
-      <xs:element name="entity"   type="prov:EntityRef"/>
+      <xs:element name="entity" type="prov:EntityRef"/>
       <xs:element name="activity" type="prov:ActivityRef" minOccurs="0"/>
-      <xs:element name="time"     type="xs:dateTime" minOccurs="0"/>
+      <xs:element name="time" type="xs:dateTime" minOccurs="0"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:location"/>
         <xs:element ref="prov:role"/>
@@ -159,11 +148,11 @@
   
   <xs:complexType name="Derivation">
     <xs:sequence>
-      <xs:element name="generatedEntity"  type="prov:EntityRef"/>
-      <xs:element name="usedEntity"       type="prov:EntityRef"/>
-      <xs:element name="activity"         type="prov:ActivityRef" minOccurs="0"/>
-      <xs:element name="generation"       type="prov:GenerationRef" minOccurs="0"/>
-      <xs:element name="usage"            type="prov:UsageRef" minOccurs="0"/>
+      <xs:element name="generatedEntity" type="prov:EntityRef"/>
+      <xs:element name="usedEntity" type="prov:EntityRef"/>
+      <xs:element name="activity" type="prov:ActivityRef" minOccurs="0"/>
+      <xs:element name="generation" type="prov:GenerationRef" minOccurs="0"/>
+      <xs:element name="usage" type="prov:UsageRef" minOccurs="0"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:label"/>
         <xs:element ref="prov:type"/>
@@ -173,6 +162,27 @@
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
+  <xs:complexType name="Revision">
+	<xs:complexContent>
+      <xs:extension base="prov:Derivation">
+	  </xs:extension>
+	</xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="Quotation">
+    <xs:complexContent>
+	  <xs:extension base="prov:Derivation">
+	  </xs:extension>
+	</xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="PrimarySource">
+    <xs:complexContent>
+	  <xs:extension base="prov:Derivation">
+	  </xs:extension>
+	</xs:complexContent>
+  </xs:complexType>
+
   <!-- Component 3 -->
   
   <xs:complexType name="Agent">
@@ -187,10 +197,31 @@
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
+  <xs:complexType name="Person">
+    <xs:complexContent>
+	  <xs:extension base="prov:Agent">
+	  </xs:extension>
+	</xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="Organization">
+    <xs:complexContent>
+	  <xs:extension base="prov:Agent">
+	  </xs:extension>
+	</xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="SoftwareAgent">
+    <xs:complexContent>
+	  <xs:extension base="prov:Agent">
+	  </xs:extension>
+	</xs:complexContent>
+  </xs:complexType>
+
   <xs:complexType name="Attribution">
     <xs:sequence>
       <xs:element name="entity" type="prov:EntityRef"/>
-      <xs:element name="agent"    type="prov:AgentRef"/>
+      <xs:element name="agent" type="prov:AgentRef"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:label"/>
         <xs:element ref="prov:type"/>
@@ -203,8 +234,8 @@
   <xs:complexType name="Association">
     <xs:sequence>
       <xs:element name="activity" type="prov:ActivityRef"/>
-      <xs:element name="agent"    type="prov:AgentRef" minOccurs="0"/>
-      <xs:element name="plan"     type="prov:EntityRef" minOccurs="0"/>
+      <xs:element name="agent" type="prov:AgentRef" minOccurs="0"/>
+      <xs:element name="plan" type="prov:PlanRef" minOccurs="0"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:role"/>
         <xs:element ref="prov:label"/>
@@ -219,7 +250,7 @@
     <xs:sequence>
       <xs:element name="delegate" type="prov:AgentRef"/>
       <xs:element name="responsible" type="prov:AgentRef"/>
-      <xs:element name="activity"    type="prov:ActivityRef" minOccurs="0"/>
+      <xs:element name="activity" type="prov:ActivityRef" minOccurs="0"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:label"/>
         <xs:element ref="prov:type"/>
@@ -231,8 +262,8 @@
 
   <xs:complexType name="Influence">
     <xs:sequence>
-      <xs:element name="influencee"     type="prov:AnyRef"/>
-      <xs:element name="influencer"     type="prov:AnyRef"/>
+      <xs:element name="influencee" type="prov:AnyRef"/>
+      <xs:element name="influencer" type="prov:AnyRef"/>
       <xs:choice minOccurs="0" maxOccurs="unbounded">
         <xs:element ref="prov:label"/>
         <xs:element ref="prov:type"/>
@@ -245,37 +276,61 @@
   <!-- Component 4 -->
 
   <xs:complexType name="Bundle">
-    <xs:sequence>
-      <xs:group ref="prov:documentElements"/>
-    </xs:sequence>
-    <xs:attribute ref="prov:id"/>
+	<xs:complexContent>
+	  <xs:extension base="prov:Entity">
+		<xs:sequence>
+	      <xs:group ref="prov:documentElements"/>
+	    </xs:sequence>
+	  </xs:extension>
+	</xs:complexContent>
   </xs:complexType>
 
   <!-- Component 5 -->
 
   <xs:complexType name="Specialization">
     <xs:sequence>
-      <xs:element name="specificEntity"   type="prov:EntityRef"/>
-      <xs:element name="generalEntity"   type="prov:EntityRef"/>
+      <xs:element name="specificEntity" type="prov:EntityRef"/>
+      <xs:element name="generalEntity" type="prov:EntityRef"/>
     </xs:sequence>
   </xs:complexType>
 
   <xs:complexType name="Alternate">
     <xs:sequence>
-      <xs:element name="alternate1"   type="prov:EntityRef"/>
-      <xs:element name="alternate2"   type="prov:EntityRef"/>
+      <xs:element name="alternate1" type="prov:EntityRef"/>
+      <xs:element name="alternate2" type="prov:EntityRef"/>
     </xs:sequence>
   </xs:complexType>
   
   <!-- Component 6 -->
 
+  <xs:complexType name="Collection">
+    <xs:complexContent>
+	  <xs:extension base="prov:Entity">
+	  </xs:extension>
+	</xs:complexContent>
+  </xs:complexType>
+
+  <xs:complexType name="EmptyCollection">
+    <xs:complexContent>
+	  <xs:extension base="prov:Collection">
+	  </xs:extension>
+	</xs:complexContent>
+  </xs:complexType>
+
   <xs:complexType name="Membership">
     <xs:sequence>
-      <xs:element name="collection"          type="prov:EntityRef"/>
-      <xs:element name="entity"          type="prov:EntityRef" maxOccurs="unbounded"/>
+      <xs:element name="collection" type="prov:CollectionRef"/>
+      <xs:element name="entity" type="prov:EntityRef" maxOccurs="unbounded"/>
     </xs:sequence>
   </xs:complexType>
 
+  <xs:complexType name="Plan">
+    <xs:complexContent>
+	  <xs:extension base="prov:Entity">
+	  </xs:extension>
+	</xs:complexContent>
+  </xs:complexType>
+
   <xs:complexType name="InternationalizedString">
     <xs:simpleContent>
       <xs:extension base="xs:string">
@@ -291,11 +346,11 @@
 
        -->
   
-  <xs:element name="label"    type="prov:InternationalizedString"/>
-  <xs:element name="role"     type="xs:anySimpleType"/>
-  <xs:element name="type"     type="xs:anySimpleType"/>
+  <xs:element name="label" type="prov:InternationalizedString"/>
+  <xs:element name="role" type="xs:anySimpleType"/>
+  <xs:element name="type" type="xs:anySimpleType"/>
   <xs:element name="location" type="xs:anySimpleType"/>
-  <xs:element name="value"    type="xs:anySimpleType"/>
+  <xs:element name="value" type="xs:anySimpleType"/>
 
   <!-- See comment in preamble.
        These should be prov:QualifiedName
@@ -307,7 +362,7 @@
   <xs:attribute name="ref" type="xs:anyURI"/>
   -->
 
-  <xs:attribute name="id"  type="xs:QName"/>
+  <xs:attribute name="id" type="xs:QName"/>
   <xs:attribute name="ref" type="xs:QName"/>
 
   <xs:complexType name="ActivityRef">
@@ -316,6 +371,12 @@
   <xs:complexType name="EntityRef">
     <xs:attribute ref="prov:ref" use="required"/>
   </xs:complexType>
+  <xs:complexType name="CollectionRef">
+    <xs:attribute ref="prov:ref" use="required"/>
+  </xs:complexType>
+  <xs:complexType name="PlanRef">
+	<xs:attribute ref="prov:ref" use="required"/>
+  </xs:complexType>
   <xs:complexType name="AgentRef">
     <xs:attribute ref="prov:ref" use="required"/>
   </xs:complexType>
@@ -348,10 +409,16 @@
   <!-- Component 2 elements -->
 
   <xs:element name="wasDerivedFrom"       type="prov:Derivation"/>
+  <xs:element name="wasRevisionOf"        type="prov:Revision"/>
+  <xs:element name="wasQuotedFrom"        type="prov:Quotation"/>
+  <xs:element name="hadPrimarySource"     type="prov:PrimarySource"/>
 
   <!-- Component 3 elements -->
 
   <xs:element name="agent"                type="prov:Agent"/>
+  <xs:element name="person"               type="prov:Person"/>
+  <xs:element name="organization"         type="prov:Organization"/>
+  <xs:element name="softwareAgent"        type="prov:SoftwareAgent"/>
   <xs:element name="wasAttributedTo"      type="prov:Attribution"/>
   <xs:element name="wasAssociatedWith"    type="prov:Association"/>
   <xs:element name="actedOnBehalfOf"      type="prov:Delegation"/>
@@ -359,16 +426,21 @@
   
   <!-- Component 5 elements -->
 
+  <xs:element name="bundle"               type="prov:Bundle"/>
   <xs:element name="specializationOf"     type="prov:Specialization"/>
   <xs:element name="alternateOf"          type="prov:Alternate"/>
 
   <!-- Component 6 elements -->
 
   <xs:element name="hadMember"            type="prov:Membership"/>
-
+  <xs:element name="collection"           type="prov:Collection"/>
+  <xs:element name="emptyCollection"      type="prov:EmptyCollection"/>
 
+  <!-- Component 7 elements -->
 
-  <!-- doucment elements -->
+  <xs:element name="plan"                 type="prov:Plan"/>
+
+  <!-- document elements -->
 
   <xs:group name="documentElements">
     <xs:sequence>
@@ -382,14 +454,24 @@
         <xs:element ref="prov:wasEndedBy"/>
         <xs:element ref="prov:wasInvalidatedBy"/>
         <xs:element ref="prov:wasDerivedFrom"/>
+        <xs:element ref="prov:wasRevisionOf"/>
+        <xs:element ref="prov:wasQuotedFrom"/>
+        <xs:element ref="prov:hadPrimarySource"/>
         <xs:element ref="prov:agent"/>
+        <xs:element ref="prov:person"/>
+        <xs:element ref="prov:organization"/>
+        <xs:element ref="prov:softwareAgent"/>
         <xs:element ref="prov:wasAttributedTo"/>
         <xs:element ref="prov:wasAssociatedWith"/>
         <xs:element ref="prov:actedOnBehalfOf"/>
         <xs:element ref="prov:wasInfluencedBy"/>
+        <xs:element ref="prov:bundle"/>
         <xs:element ref="prov:specializationOf"/>
         <xs:element ref="prov:alternateOf"/>
+	    <xs:element ref="prov:collection"/>
+	    <xs:element ref="prov:emptyCollection"/>
         <xs:element ref="prov:hadMember"/>
+        <xs:element ref="prov:plan"/>
 		<xs:any namespace="##other"/>
       </xs:choice>
     </xs:sequence>
@@ -400,7 +482,7 @@
     <xs:sequence>
       <xs:choice maxOccurs="unbounded">
         <xs:group ref="prov:documentElements"/>
-        <xs:element name="bundle" type="prov:Bundle"/>
+        <xs:element ref="prov:bundle"/>
       </xs:choice>
     </xs:sequence>
   </xs:complexType>