updated prov attribute elements to have a required order so ORM tools can generate cleaner class methods
authorStephan Zednik <zednis@rpi.edu>
Thu, 07 Feb 2013 13:27:48 -0700
changeset 5509 3f1e31b0df28
parent 5508 ae85f08dcda4
child 5510 f95aa1566db7
updated prov attribute elements to have a required order so ORM tools can generate cleaner class methods
xml/schema/prov-core.xsd
--- a/xml/schema/prov-core.xsd	Thu Feb 07 18:26:51 2013 +0000
+++ b/xml/schema/prov-core.xsd	Thu Feb 07 13:27:48 2013 -0700
@@ -24,122 +24,114 @@
   
   <xs:complexType name="Entity">
     <xs:sequence>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="prov:location"/>
-        <xs:element ref="prov:value"/>
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<!-- prov attributes -->
+		<xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:location" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:value" minOccurs="0"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>  
 
   <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:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="prov:location"/>
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="startTime" type="xs:dateTime" minOccurs="0"/> 
+		<xs:element name="endTime" type="xs:dateTime" minOccurs="0"/>
+		<!-- prov attributes --> 
+		<xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:location" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
   <xs:complexType name="Generation">
     <xs:sequence>
-      <xs:element name="entity" type="prov:IDRef"/>
-      <xs:element name="activity" type="prov:IDRef" 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"/>
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="entity" type="prov:IDRef"/>
+		<xs:element name="activity" type="prov:IDRef" minOccurs="0"/>
+		<xs:element name="time" type="xs:dateTime" minOccurs="0"/>
+		<!-- prov attributes -->
+		<xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:location" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
   <xs:complexType name="Usage">
     <xs:sequence>
-      <xs:element name="activity" type="prov:IDRef"/>
-      <xs:element name="entity" type="prov:IDRef" 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"/>
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="activity" type="prov:IDRef"/>
+		<xs:element name="entity" type="prov:IDRef" minOccurs="0"/>
+		<xs:element name="time" type="xs:dateTime" minOccurs="0"/>
+		<!-- prov attributes -->
+		<xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:location" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
   <xs:complexType name="Communication">
     <xs:sequence>
-      <xs:element name="informed" type="prov:IDRef"/>
-      <xs:element name="informant" type="prov:IDRef"/>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="informed" type="prov:IDRef"/>
+		<xs:element name="informant" type="prov:IDRef"/>
+		<!-- prov attributes -->
+        <xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
   <xs:complexType name="Start">
     <xs:sequence>
-      <xs:element name="activity" type="prov:IDRef"/>
-      <xs:element name="trigger" type="prov:IDRef" minOccurs="0"/>
-      <xs:element name="starter" type="prov:IDRef" 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"/>
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="activity" type="prov:IDRef"/>
+		<xs:element name="trigger" type="prov:IDRef" minOccurs="0"/>
+		<xs:element name="starter" type="prov:IDRef" minOccurs="0"/>
+		<xs:element name="time" type="xs:dateTime" minOccurs="0"/>
+		<!-- prov attributes -->
+		<xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:location" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
   <xs:complexType name="End">
     <xs:sequence>
-      <xs:element name="activity" type="prov:IDRef"/>
-      <xs:element name="trigger" type="prov:IDRef"  minOccurs="0"/>
-      <xs:element name="ender" type="prov:IDRef" 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"/>
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="activity" type="prov:IDRef"/>
+		<xs:element name="trigger" type="prov:IDRef"  minOccurs="0"/>
+		<xs:element name="ender" type="prov:IDRef" minOccurs="0"/>
+		<xs:element name="time" type="xs:dateTime" minOccurs="0"/>
+		<!-- prov attributes -->
+		<xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:location" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
   <xs:complexType name="Invalidation">
     <xs:sequence>
-      <xs:element name="entity" type="prov:IDRef"/>
-      <xs:element name="activity" type="prov:IDRef" 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"/>
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="entity" type="prov:IDRef"/>
+		<xs:element name="activity" type="prov:IDRef" minOccurs="0"/>
+		<xs:element name="time" type="xs:dateTime" minOccurs="0"/>
+		<!-- prov attributes -->
+		<xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:location" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
@@ -148,16 +140,15 @@
   
   <xs:complexType name="Derivation">
     <xs:sequence>
-      <xs:element name="generatedEntity" type="prov:IDRef"/>
-      <xs:element name="usedEntity" type="prov:IDRef"/>
-      <xs:element name="activity" type="prov:IDRef" minOccurs="0"/>
-      <xs:element name="generation" type="prov:IDRef" minOccurs="0"/>
-      <xs:element name="usage" type="prov:IDRef" minOccurs="0"/>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="generatedEntity" type="prov:IDRef"/>
+		<xs:element name="usedEntity" type="prov:IDRef"/>
+		<xs:element name="activity" type="prov:IDRef" minOccurs="0"/>
+		<xs:element name="generation" type="prov:IDRef" minOccurs="0"/>
+		<xs:element name="usage" type="prov:IDRef" minOccurs="0"/>
+		<!-- prov attributes -->
+        <xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
@@ -187,12 +178,11 @@
   
   <xs:complexType name="Agent">
     <xs:sequence>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="prov:location"/>
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<!-- prov attributes -->
+		<xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:location" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
@@ -220,55 +210,51 @@
 
   <xs:complexType name="Attribution">
     <xs:sequence>
-      <xs:element name="entity" type="prov:IDRef"/>
-      <xs:element name="agent" type="prov:IDRef"/>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="entity" type="prov:IDRef"/>
+		<xs:element name="agent" type="prov:IDRef"/>
+		<!-- prov attributes -->
+        <xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
   <xs:complexType name="Association">
     <xs:sequence>
-      <xs:element name="activity" type="prov:IDRef"/>
-      <xs:element name="agent" type="prov:IDRef" minOccurs="0"/>
-      <xs:element name="plan" type="prov:IDRef" minOccurs="0"/>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="prov:role"/>
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="activity" type="prov:IDRef"/>
+		<xs:element name="agent" type="prov:IDRef" minOccurs="0"/>
+		<xs:element name="plan" type="prov:IDRef" minOccurs="0"/>
+		<!-- prov attributes -->
+		<xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
   <xs:complexType name="Delegation">
     <xs:sequence>
-      <xs:element name="delegate" type="prov:IDRef"/>
-      <xs:element name="responsible" type="prov:IDRef"/>
-      <xs:element name="activity" type="prov:IDRef" minOccurs="0"/>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="delegate" type="prov:IDRef"/>
+		<xs:element name="responsible" type="prov:IDRef"/>
+		<xs:element name="activity" type="prov:IDRef" minOccurs="0"/>
+		<!-- prov attributes -->
+        <xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
 
   <xs:complexType name="Influence">
     <xs:sequence>
-      <xs:element name="influencee" type="prov:IDRef"/>
-      <xs:element name="influencer" type="prov:IDRef"/>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="prov:label"/>
-        <xs:element ref="prov:type"/>
-        <xs:any namespace="##other"/>
-      </xs:choice>
+		<xs:element name="influencee" type="prov:IDRef"/>
+		<xs:element name="influencer" type="prov:IDRef"/>
+		<!-- prov attributes -->
+        <xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute ref="prov:id"/>
   </xs:complexType>
@@ -280,10 +266,8 @@
   <xs:complexType name="Bundle">
 	<xs:complexContent>
 	  <xs:extension base="prov:Entity">
-		<xs:sequence>
-			<xs:choice maxOccurs="unbounded">
-				<xs:group ref="prov:documentElements"/>
-			</xs:choice>
+		<xs:sequence maxOccurs="unbounded">
+			<xs:group ref="prov:documentElements"/>
 	    </xs:sequence>
 	  </xs:extension>
 	</xs:complexContent>
@@ -416,47 +400,43 @@
   <!-- document elements -->
 
   <xs:group name="documentElements">
-    <xs:sequence>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element ref="prov:entity"/>
-        <xs:element ref="prov:activity"/>
-        <xs:element ref="prov:wasGeneratedBy"/>
-        <xs:element ref="prov:used"/>
-        <xs:element ref="prov:wasInformedBy"/>
-        <xs:element ref="prov:wasStartedBy"/>
-        <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:choice>
-      <xs:element ref="prov:abstractElement" minOccurs="0" maxOccurs="unbounded" />
+	<xs:sequence>
+		<xs:element ref="prov:entity" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:activity" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasGeneratedBy" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:used" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasInformedBy" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasStartedBy" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasEndedBy" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasInvalidatedBy" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasDerivedFrom" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasRevisionOf" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasQuotedFrom" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:hadPrimarySource" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:agent" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:person" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:organization" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:softwareAgent" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasAttributedTo" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasAssociatedWith" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:actedOnBehalfOf" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:wasInfluencedBy" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:bundle" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:specializationOf" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:alternateOf" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:collection" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:emptyCollection" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:hadMember" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:plan" minOccurs="0" maxOccurs="unbounded"/>
+		<xs:element ref="prov:abstractElement" minOccurs="0" maxOccurs="unbounded" />
     </xs:sequence>
   </xs:group>
 
   <xs:element name="document" type="prov:Document" />
   <xs:complexType name="Document">
-    <xs:sequence>
-      <xs:choice maxOccurs="unbounded">
-        <xs:group ref="prov:documentElements"/>
-		<xs:any namespace="##other"/>
-      </xs:choice>
+    <xs:sequence maxOccurs="unbounded">
+		<xs:group ref="prov:documentElements" minOccurs="0"/>
+		<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
   </xs:complexType>