Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
378 lines (312 sloc) 14.4 KB
<?xml version="1.0" encoding="utf-8"?>
<!-- authors: luc moreau
*warning*
transformation of the opm opmx schema into prov compatible.
purely tentative at this stage. still some opmx legacy.
prov-dm not fully encoded yet.
only work in progress.
In this schema, all ids are encoded as qnames. The ProvToolbox
implementation uses these schema in non-validating mode, so that
CURIEs are represented as java QName, and the xml tool properly
manages the prefixes occurring in the CURIEs.
-->
<xs:schema targetNamespace="http://openprovenance.org/prov-xml#"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:prov="http://openprovenance.org/prov-xml#"
xmlns:cu="http://www.w3.org/1999/xhtml/datatypes/"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:import namespace="http://www.w3.org/1999/xhtml/datatypes/" schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml-datatypes-1.xsd"/>
<!-- Component 1 -->
<xs:element name="entity" type="prov:Entity"/>
<xs:complexType name="Entity">
<xs:sequence>
<xs:element ref="prov:label" minOccurs="0"/>
<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:element name="activity" type="prov:Activity"/>
<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 ref="prov:label" minOccurs="0"/>
<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="Used">
<xs:sequence>
<xs:element name="time" type="xs:dateTime" minOccurs="0"/>
<xs:element name="activity" type="prov:ActivityRef"/>
<xs:element name="entity" type="prov:EntityRef"/>
<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:complexType name="WasGeneratedBy">
<xs:sequence>
<xs:element name="time" type="xs:dateTime" minOccurs="0"/>
<xs:element name="entity" type="prov:EntityRef"/>
<xs:element name="activity" type="prov:ActivityRef" minOccurs="0"/>
<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:complexType name="WasStartedBy">
<xs:sequence>
<xs:element name="time" type="xs:dateTime" minOccurs="0"/>
<xs:element name="activity" type="prov:ActivityRef"/>
<xs:element name="trigger" type="prov:EntityRef" minOccurs="0"/>
<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:complexType name="WasEndedBy">
<xs:sequence>
<xs:element name="time" type="xs:dateTime" minOccurs="0"/>
<xs:element name="activity" type="prov:ActivityRef"/>
<xs:element name="trigger" type="prov:EntityRef" minOccurs="0"/>
<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:complexType name="WasInformedBy">
<xs:sequence>
<xs:element name="time" type="xs:dateTime" minOccurs="0"/>
<xs:element name="effect" type="prov:ActivityRef"/>
<xs:element name="cause" type="prov:ActivityRef"/>
<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:complexType name="WasStartedByActivity">
<xs:sequence>
<xs:element name="started" type="prov:ActivityRef"/>
<xs:element name="starter" type="prov:ActivityRef"/>
<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<!-- Component 2 -->
<xs:element name="agent" type="prov:Agent"/>
<xs:complexType name="Agent">
<xs:sequence>
<xs:element ref="prov:label" minOccurs="0"/>
<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="WasAssociatedWith">
<xs:sequence>
<xs:element name="activity" type="prov:ActivityRef"/>
<xs:element name="agent" type="prov:AgentRef"/>
<xs:element name="plan" type="prov:EntityRef" minOccurs="0"/>
<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:complexType name="WasAttributedTo">
<xs:sequence>
<xs:element name="entity" type="prov:EntityRef"/>
<xs:element name="agent" type="prov:AgentRef"/>
<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:complexType name="ActedOnBehalfOf">
<xs:sequence>
<xs:element name="subordinate" type="prov:AgentRef"/>
<xs:element name="responsible" type="prov:AgentRef"/>
<xs:element name="activity" type="prov:ActivityRef"/>
<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<!-- Component 3 -->
<xs:complexType name="WasDerivedFrom">
<xs:sequence>
<xs:element name="generation" type="prov:DependencyRef" minOccurs="0"/>
<xs:element name="usage" type="prov:DependencyRef" minOccurs="0"/>
<xs:element name="activity" type="prov:ActivityRef" minOccurs="0"/>
<xs:element name="generatedEntity" type="prov:EntityRef"/>
<xs:element name="usedEntity" type="prov:EntityRef"/>
<xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:role" minOccurs="0" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:complexType name="WasRevisionOf">
<xs:sequence>
<xs:element name="newer" type="prov:EntityRef"/>
<xs:element name="older" type="prov:EntityRef"/>
<xs:element name="responsibility" type="prov:AgentRef" minOccurs="0"/>
<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="WasQuotedFrom">
<xs:sequence>
<xs:element name="quote" type="prov:EntityRef"/>
<xs:element name="original" type="prov:EntityRef"/>
<xs:element name="quoterAgent" type="prov:AgentRef" minOccurs="0"/>
<xs:element name="quotedAgent" type="prov:AgentRef" minOccurs="0"/>
<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="HadOriginalSource">
<xs:sequence>
<xs:element name="derived" type="prov:EntityRef"/>
<xs:element name="source" type="prov:EntityRef"/>
<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="TracedTo">
<xs:sequence>
<xs:element name="entity" type="prov:EntityRef"/>
<xs:element name="ancestor" type="prov:EntityRef"/>
<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>
<!-- Component 4 -->
<xs:complexType name="AlternateOf">
<xs:sequence>
<xs:element name="entity2" type="prov:EntityRef"/>
<xs:element name="entity1" type="prov:EntityRef"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SpecializationOf">
<xs:sequence>
<xs:element name="specializedEntity" type="prov:EntityRef"/>
<xs:element name="generalEntity" type="prov:EntityRef"/>
</xs:sequence>
</xs:complexType>
<!-- Component 5 -->
<!-- Component 6 -->
<xs:element name="note" type="prov:Note"/>
<xs:complexType name="Note">
<xs:sequence>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:complexType name="HasAnnotation">
<xs:sequence>
<xs:element name="thing" type="prov:NoteRef" minOccurs="1"/> <!-- note, just a ref to anything, really -->
<xs:element name="note" type="prov:NoteRef" minOccurs="1"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<!--
Typed literals are encoded by means
of xsi:type that represent the prov:datatype.
-->
<xs:element name="label" type="xs:string"/>
<xs:element name="role" type="xs:anySimpleType"/>
<xs:element name="type" type="xs:anySimpleType"/>
<xs:attribute name="id" type="xs:QName"/>
<xs:attribute name="ref" type="xs:QName"/>
<xs:complexType name="ActivityRef">
<xs:attribute ref="prov:ref"/>
</xs:complexType>
<xs:complexType name="EntityRef">
<xs:attribute ref="prov:ref"/>
</xs:complexType>
<xs:complexType name="AgentRef">
<xs:attribute ref="prov:ref"/>
</xs:complexType>
<xs:complexType name="DependencyRef">
<xs:attribute ref="prov:ref"/>
</xs:complexType>
<xs:complexType name="NoteRef">
<xs:attribute ref="prov:ref"/>
</xs:complexType>
<xs:complexType name="Dependencies">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="used" type="prov:Used"/>
<xs:element name="wasGeneratedBy" type="prov:WasGeneratedBy"/>
<xs:element name="wasStartedBy" type="prov:WasStartedBy"/>
<xs:element name="wasEndedBy" type="prov:WasEndedBy"/>
<xs:element name="wasInformedBy" type="prov:WasInformedBy"/>
<xs:element name="wasStartedByActivity" type="prov:WasStartedByActivity"/>
<xs:element name="wasAttributedTo" type="prov:WasAttributedTo"/>
<xs:element name="wasAssociatedWith" type="prov:WasAssociatedWith"/>
<xs:element name="actedOnBehalfOf" type="prov:ActedOnBehalfOf"/>
<xs:element name="wasDerivedFrom" type="prov:WasDerivedFrom"/>
<xs:element name="wasRevisionOf" type="prov:WasRevisionOf"/>
<xs:element name="wasQuotedFrom" type="prov:WasQuotedFrom"/>
<xs:element name="hadOriginalSource" type="prov:HadOriginalSource"/>
<xs:element name="tracedTo" type="prov:TracedTo"/>
<xs:element name="alternateOf" type="prov:AlternateOf"/>
<xs:element name="specializationOf" type="prov:SpecializationOf"/>
<xs:element name="hasAnnotation" type="prov:HasAnnotation"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<!-- BUNDLES -->
<xs:element name="account" type="prov:Account"/>
<xs:complexType name="Account">
<xs:sequence>
<xs:element name="asserter" type="prov:AgentRef" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:records" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:element name="container" type="prov:Container">
<xs:annotation>
<xs:documentation>A set of assertions about the provenance of things</xs:documentation>
</xs:annotation>
</xs:element>
<!-- a wrapper element for all records, used in Container or Account -->
<xs:element name="records" type="prov:Records"/>
<xs:complexType name="Records">
<xs:sequence>
<xs:element ref="prov:account" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:activity" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:entity" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:agent" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="prov:note" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="dependencies" type="prov:Dependencies" minOccurs="0"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
</xs:complexType>
<xs:complexType name="Container">
<xs:sequence>
<xs:element ref="prov:records" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute ref="prov:id"/>
<!-- tentative, this could allow us to annotate containers ... -->
</xs:complexType>
</xs:schema>