Skip to content
Snippets Groups Projects
Commit e9064ef5 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Added XSD files and minor changes

parent c1effa06
No related branches found
No related tags found
No related merge requests found
...@@ -13,15 +13,11 @@ ...@@ -13,15 +13,11 @@
<dependencies> <dependencies>
<!-- JAXB dependency --> <!-- JAXB dependency -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency> <dependency>
<groupId>org.glassfish.jaxb</groupId> <groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId> <artifactId>jaxb-runtime</artifactId>
<version>2.3.2</version> <version>2.3.2</version>
<scope>runtime</scope>
</dependency> </dependency>
<!-- Jackson-JAXB compatibility --> <!-- Jackson-JAXB compatibility -->
<dependency> <dependency>
......
package net.ivoa.xml;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
public class VOSpaceXmlTestUtil {
public static Document loadDocument(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setNamespaceAware(true);
DocumentBuilder builder = factory.newDocumentBuilder();
try ( InputStream in = new ByteArrayInputStream(xml.getBytes())) {
return builder.parse(in);
}
}
}
package net.ivoa.xml.uws.v1; package net.ivoa.xml.vospace.v2;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.StringReader; import java.io.StringReader;
...@@ -7,14 +7,11 @@ import java.util.ArrayList; ...@@ -7,14 +7,11 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.function.Function; import java.util.function.Function;
import javax.xml.bind.JAXB; import javax.xml.bind.JAXB;
import net.ivoa.xml.vospace.v2.ContainerNode;
import net.ivoa.xml.vospace.v2.DataNode;
import net.ivoa.xml.vospace.v2.Node;
import net.ivoa.xml.vospace.v2.Property;
import net.ivoa.xml.vospace.v2.PropertyList;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.w3c.dom.Document;
import static net.ivoa.xml.VOSpaceXmlTestUtil.loadDocument;
public class NodeTest { public class NodeTest {
...@@ -34,7 +31,10 @@ public class NodeTest { ...@@ -34,7 +31,10 @@ public class NodeTest {
System.out.println(xml); System.out.println(xml);
} }
assertTrue(xml.contains("<vos:node")); Document doc = loadDocument(xml);
assertEquals("vos:node", doc.getDocumentElement().getNodeName());
//assertEquals("vos:ContainerNode", doc.getDocumentElement().getAttribute("xsi:type"));
assertTrue(xml.contains("<vos:nodes>")); assertTrue(xml.contains("<vos:nodes>"));
assertTrue(xml.contains("xsi:type=\"vos:DataNode\"")); assertTrue(xml.contains("xsi:type=\"vos:DataNode\""));
assertTrue(xml.contains("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"")); assertTrue(xml.contains("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""));
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Revision: 3660 $ $Date: 2016-10-24 16:42:22 +0100 (Mon, 24 Oct 2016) $ $HeadURL: https://volute.g-vo.org/svn/trunk/projects/grid/uws/doc/UWS.xsd $ -->
<!-- UWS schema - Paul Harrison May 2008 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.ivoa.net/xml/UWS/v1.0" xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0"
xmlns:xlink="http://www.w3.org/1999/xlink" elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="1.1-REC-20161024"
>
<xs:import namespace="http://www.w3.org/1999/xlink"
schemaLocation="./xlink.xsd"/>
<xs:complexType name="ShortJobDescription">
<xs:sequence>
<xs:element name="phase" type="uws:ExecutionPhase">
<xs:annotation>
<xs:documentation>
the execution phase - returned at
/{jobs}/{job-id}/phase
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="runId" type="xs:string" maxOccurs="1"
minOccurs="0" >
<xs:annotation>
<xs:documentation>
this is a client supplied identifier - the UWS system
does nothing other than to return it as part of the
description of the job
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ownerId" type="xs:string" nillable="true" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
the owner (creator) of the job - this should be
expressed as a string that can be parsed in accordance
with IVOA security standards. If there was no
authenticated job creator then this should be set to
NULL.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="creationTime" type="xs:dateTime"
nillable="false"
maxOccurs="1" minOccurs="0">
<xs:annotation>
<xs:documentation>
The instant at which the job was created.
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="uws:JobIdentifier"
use="required"
>
</xs:attribute>
<xs:attributeGroup ref="uws:reference"></xs:attributeGroup>
</xs:complexType>
<xs:attributeGroup name="reference">
<xs:annotation>
<xs:documentation>standard xlink references
</xs:documentation>
</xs:annotation>
<xs:attribute ref="xlink:type" use="optional"
default="simple" />
<xs:attribute ref="xlink:href" use="optional" />
</xs:attributeGroup>
<xs:simpleType name="ExecutionPhase">
<xs:annotation>
<xs:documentation>
Enumeration of possible phases of job execution
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="PENDING">
<xs:annotation>
<xs:documentation>
The first phase a job is entered into - this is where
a job is being set up but no request to run has
occurred.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="QUEUED">
<xs:annotation>
<xs:documentation>
A job has been accepted for execution but is waiting
in a queue
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="EXECUTING">
<xs:annotation>
<xs:documentation>A job is running</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="COMPLETED">
<xs:annotation>
<xs:documentation>
A job has completed successfully
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ERROR">
<xs:annotation>
<xs:documentation>
Some form of error has occurred
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="UNKNOWN">
<xs:annotation>
<xs:documentation>
The job is in an unknown state.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="HELD">
<xs:annotation>
<xs:documentation>
The job is HELD pending execution and will not
automatically be executed - can occur after a
PHASE=RUN request has been made (cf PENDING).
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="SUSPENDED">
<xs:annotation>
<xs:documentation>
The job has been suspended by the system during
execution
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ABORTED">
<xs:annotation>
<xs:documentation>
The job has been aborted, either by user request or by
the server because of lack or overuse of resources.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="ARCHIVED">
<xs:annotation>
<xs:documentation>
The job has been archived by the server at destruction time. An archived job
may have deleted the results to reclaim resources, but must have job metadata preserved.
This is an alternative that the server may choose in contrast to completely destroying all record of the job.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="JobSummary">
<xs:annotation>
<xs:documentation>
The complete representation of the state of a job
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="jobId" type="uws:JobIdentifier" />
<xs:element name="runId" type="xs:string" maxOccurs="1"
minOccurs="0"
>
<xs:annotation>
<xs:documentation>
this is a client supplied identifier - the UWS system
does nothing other than to return it as part of the
description of the job
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ownerId" type="xs:string" nillable="true">
<xs:annotation>
<xs:documentation>
the owner (creator) of the job - this should be
expressed as a string that can be parsed in accordance
with IVOA security standards. If there was no
authenticated job creator then this should be set to
NULL.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="phase" type="uws:ExecutionPhase">
<xs:annotation>
<xs:documentation>
the execution phase - returned at
/{jobs}/{job-id}/phase
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="quote" type="xs:dateTime" nillable="true"
maxOccurs="1" minOccurs="0"
>
<xs:annotation>
<xs:documentation>
A Quote predicts when the job is likely to complete -
returned at /{jobs}/{job-id}/quote "don't know" is
encoded by setting to the XML null value
xsi:nil="true"
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="creationTime" type="xs:dateTime"
nillable="false"
maxOccurs="1" minOccurs="0">
<xs:annotation>
<xs:documentation>
The instant at which the job was created.
</xs:documentation>
<xs:documentation>
Note that the version 1.1 of the specification requires that this element be present.
It is optional only in versions 1.x of the schema for backwards compatibility.
2.0+ versions of the schema will make this formally mandatory in an XML sense.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="startTime" type="xs:dateTime"
nillable="true"
>
<xs:annotation>
<xs:documentation>
The instant at which the job started execution.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="endTime" type="xs:dateTime"
nillable="true"
>
<xs:annotation>
<xs:documentation>
The instant at which the job finished execution
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="executionDuration" type="xs:int"
nillable="false"
>
<xs:annotation>
<xs:documentation>
The duration (in seconds) for which the job should be
allowed to run - a value of 0 is intended to mean
unlimited - returned at
/{jobs}/{job-id}/executionduration
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="destruction" type="xs:dateTime"
nillable="true"
>
<xs:annotation>
<xs:documentation>
The time at which the whole job + records + results
will be destroyed. returned at
/{jobs}/{job-id}/destruction
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="uws:parameters" maxOccurs="1" minOccurs="0">
<xs:annotation>
<xs:documentation>
The parameters to the job (where appropriate) can also
be retrieved at /{jobs}/{job-id}/parameters
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="uws:results">
<xs:annotation>
<xs:documentation>
The results for the job - can also be retrieved at
/{jobs}/{job-id}/results
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="errorSummary" type="uws:ErrorSummary"
maxOccurs="1" minOccurs="0"
>
</xs:element>
<xs:element name="jobInfo" maxOccurs="1" minOccurs="0">
<xs:annotation>
<xs:documentation>
This is arbitrary information that can be added to the
job description by the UWS implementation.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:any namespace="##any" processContents="lax"
minOccurs="0" maxOccurs="unbounded"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="uws:UWSVersion" use="optional">
<xs:annotation>
<xs:documentation>note that this attribute is actually required by the 1.1 specification - however remains optional in the schema
for backwards compatibility. It will be formally required in the next major revision.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="JobIdentifier">
<xs:annotation>
<xs:documentation> The identifier for the job
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string" />
</xs:simpleType>
<xs:simpleType name="UWSVersion">
<xs:annotation>
<xs:documentation>The version of the UWS standard that the server complies with.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string" />
</xs:simpleType>
<xs:element name="job" type="uws:JobSummary">
<xs:annotation>
<xs:documentation> This is the information that is returned
when a GET is made for a single job resource - i.e.
/{jobs}/{job-id}</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="jobs">
<xs:annotation>
<xs:documentation> The list of job references returned at
/(jobs)</xs:documentation>
<xs:documentation>The list presented may be affected by the current security context and may be filtered</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="jobref" type="uws:ShortJobDescription"
maxOccurs="unbounded" minOccurs="0"
>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="uws:UWSVersion" use="optional">
<xs:annotation>
<xs:documentation>note that this attribute is actually required by the 1.1 specification - however remains optional in the schema
for backwards compatibility. It will be formally required in the next major revision.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:complexType name="ResultReference" mixed="false">
<xs:annotation>
<xs:documentation> A reference to a UWS result.
</xs:documentation>
</xs:annotation>
<xs:attribute name="id" type="xs:string" use="required"></xs:attribute>
<xs:attributeGroup ref="uws:reference"></xs:attributeGroup>
<xs:attribute name="size" type="xs:long" use="optional" ></xs:attribute>
<xs:attribute name="mime-type" type="xs:string" use="optional"></xs:attribute>
<xs:anyAttribute namespace="urn:uwscustom" processContents="lax" />
</xs:complexType>
<xs:element name="results">
<xs:annotation>
<xs:documentation> The element returned for
/{jobs}/{job-id}/results</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="result" type="uws:ResultReference"
maxOccurs="unbounded" minOccurs="0"
></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ErrorSummary">
<xs:annotation>
<xs:documentation>
A short summary of an error - a fuller representation of the
error may be retrieved from /{jobs}/{job-id}/error
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="message" type="xs:string"></xs:element>
</xs:sequence>
<xs:attribute name="type" type="uws:ErrorType" use="required">
<xs:annotation>
<xs:documentation>
characterization of the type of the error
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="hasDetail" type="xs:boolean" use="required">
<xs:annotation>
<xs:documentation>if true then there is a more detailed error message available at /{jobs}/{job-id}/error</xs:documentation>
</xs:annotation></xs:attribute>
</xs:complexType>
<xs:simpleType name="ErrorType">
<xs:restriction base="xs:string">
<xs:enumeration value="transient"></xs:enumeration>
<xs:enumeration value="fatal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Parameter" mixed="true">
<xs:annotation>
<xs:documentation> the list of input parameters to the job - if
the job description language does not naturally have
parameters, then this list should contain one element which
is the content of the original POST that created the job.
</xs:documentation>
</xs:annotation>
<xs:attribute name="byReference" type="xs:boolean"
default="false"
>
<xs:annotation>
<xs:documentation> if this attribute is true then the
content of the parameter represents a URL to retrieve the
actual parameter value.</xs:documentation>
<xs:documentation> It is up to the implementation to decide
if a parameter value cannot be returned directly as the
content - the basic rule is that the representation of
the parameter must allow the whole job element to be
valid XML. If this cannot be achieved then the parameter
value must be returned by reference.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="id" type="xs:string" use="required">
<xs:annotation>
<xs:documentation> the identifier for the parameter
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="isPost" type="xs:boolean"></xs:attribute>
</xs:complexType>
<xs:element name="parameters">
<xs:complexType>
<xs:sequence>
<xs:element name="parameter" type="uws:Parameter"
maxOccurs="unbounded" minOccurs="0"
></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<!-- -->
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.ivoa.net/xml/VOSpace/v2.0" elementFormDefault="qualified"
attributeFormDefault="unqualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:vos="http://www.ivoa.net/xml/VOSpace/v2.0"
xmlns:uws="http://www.ivoa.net/xml/UWS/v1.0"
xmlns:xlink="http://www.w3.org/1999/xlink">
<xsd:import namespace="http://www.ivoa.net/xml/UWS/v1.0" schemaLocation="./uws.xsd"/>
<!-- ======== Node types ======== -->
<xsd:complexType name="Node">
<xsd:annotation>
<xsd:documentation>
The base class for all nodes.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="properties" type="vos:PropertyList" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The list of node properties.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="uri" type="xsd:anyURI" use="required">
<xsd:annotation>
<xsd:documentation>
The node identifier URI.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="DataNode">
<xsd:annotation>
<xsd:documentation>
The base class for data nodes.
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="vos:Node">
<xsd:sequence>
<xsd:element name="accepts" type="vos:ViewList" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The list of views or data formats that this node can accept.
A simple unstructured node may accept data in any format.
A structured node may only accept data in specific formats.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="provides" type="vos:ViewList" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The list of views or data formats that this node can provide.
A simple unstructured node may only provide access to the data in the original format.
A structured node may provide different views of the data generated by the service.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="capabilities" type="vos:CapabilityList" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The list of capabilities that this node can support.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="busy" type="xsd:boolean" use="optional" default="false">
<xsd:annotation>
<xsd:documentation>
A flag to indicate if the node content is available.
This will be set to false while the data is being imported,
or if the underlying service is busy.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="UnstructuredDataNode">
<xsd:annotation>
<xsd:documentation>
An unstructured data node, containing unspecified content.
The service does not need to understand or interpret the content.
This type of node can accept any format, and only provides one view returning the original data.
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="vos:DataNode"/>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="StructuredDataNode">
<xsd:annotation>
<xsd:documentation>
A structured data node, containing a specific data format that the service has understands.
This type of node may only accept specific data formats, and provide different views of the
data generated by the service.
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="vos:DataNode"/>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ContainerNode">
<xsd:annotation>
<xsd:documentation>
A container node containing any type of node.
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="vos:DataNode">
<xsd:sequence>
<xsd:element name="nodes" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
A list of the direct children that the container has.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="node" type="vos:Node" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="LinkNode">
<xsd:annotation>
<xsd:documentation>
A node that points to another resource.
</xsd:documentation>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="vos:Node">
<xsd:sequence>
<xsd:element name="target" type="xsd:anyURI" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The identifier for the object that the LinkNode points to.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- ======== Property types ======== -->
<xsd:complexType name="Property">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attributeGroup ref="vos:PropertyAttributeGroup"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="PropertyList">
<xsd:annotation>
<xsd:documentation>
A container element for a list of properties.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="property" type="vos:Property" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PropertyReference">
<xsd:annotation>
<xsd:documentation>
A reference to a property description.
</xsd:documentation>
</xsd:annotation>
<xsd:attributeGroup ref="vos:PropertyAttributeGroup"/>
</xsd:complexType>
<xsd:complexType name="PropertyReferenceList">
<xsd:annotation>
<xsd:documentation>
A container element for a list of property references.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="property" type="vos:PropertyReference" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
<xsd:attributeGroup name="PropertyAttributeGroup">
<xsd:attribute name="uri" type="xsd:anyURI" use="required">
<xsd:annotation>
<xsd:documentation>
If the property has been registered, then the URI should point to the registration document. Third party
tools may use the urn:xxxx syntax to add unregistered properties.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="readOnly" type="xsd:boolean" use="optional" default
="false">
<xsd:annotation>
<xsd:documentation>
A flag to indicate if the property is considered read-only. Attempting to modify a read-only property
should generate a PermissionDenied fault.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:attributeGroup>
<xsd:complexType name="GetPropertiesResponse">
<xsd:sequence>
<xsd:element name="accepts" type="vos:PropertyReferenceList">
<xsd:annotation>
<xsd:documentation>
A list of identifiers for the properties that the service accepts and understands.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="provides" type="vos:PropertyReferenceList">
<xsd:annotation>
<xsd:documentation>
A list of identifiers for the properties that the service provides.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="contains" type="vos:PropertyReferenceList">
<xsd:annotation>
<xsd:documentation>
A list of identifiers for all the properties currently used by nodes within the service.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- ======== View types ======== -->
<xsd:complexType name="Param">
<xsd:annotation>
<xsd:documentation>
A view or protocol parameter.
</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="View">
<xsd:annotation>
<xsd:documentation>
An element describing a view of a data-set.
A view may just provide the original data, or it could be server generated.
Examples of server generated views could include a votable view of data in a database table,
or a conversion from one image format to another.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="param" type="vos:Param" minOccurs="0" maxOccurs="unbounded" nillable="true">
<xsd:annotation>
<xsd:documentation>
A list of parameters for the view.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="uri" type="xsd:anyURI" use="required">
<xsd:annotation>
<xsd:documentation>
The view URI.
This should point to a resource describing the view format and what parameters it requires.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="original" type="xsd:boolean" use="optional" default="true">
<xsd:annotation>
<xsd:documentation>
A flag to indicate if the view provides access to the original data content or a derived form.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="ViewList">
<xsd:annotation>
<xsd:documentation>
A container element for a list of views.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="view" type="vos:View" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="GetViewsResponse">
<xsd:sequence>
<xsd:element name="accepts" type="vos:ViewList">
<xsd:annotation>
<xsd:documentation>
A list of identifiers for the views that the service can accept.
A simple file based system may accept data in 'any' format.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="provides" type="vos:ViewList">
<xsd:annotation>
<xsd:documentation>
A list of identifiers for the views that the service can provide.
A simple file based system may only provide data in the original format.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- ======== Protocol types ======== -->
<xsd:complexType name="Protocol">
<xsd:annotation>
<xsd:documentation>
A protocol element, containing the protocol URI, the endpoint and any protocol specific parameters.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="endpoint" type="xsd:anyURI" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The target endpoint to use for a data transfer.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="param" type="vos:Param" minOccurs="0" maxOccurs="unbounded" nillable="true">
<xsd:annotation>
<xsd:documentation>
Any additional protocol specific parameters required to use the endpoint.
For example, the user name or password to use for ftp access.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="uri" type="xsd:anyURI" use="required">
<xsd:annotation>
<xsd:documentation>
The protocol identifier.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="ProtocolList">
<xsd:annotation>
<xsd:documentation>
A container element for a list of protocols.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="protocol" type="vos:Protocol" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="GetProtocolsResponse">
<xsd:sequence>
<xsd:element name="accepts" type="vos:ProtocolList">
<xsd:annotation>
<xsd:documentation>
A list of identifiers for the protocols that the service can accept.
This means that the service can act as a client for the protocol.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="provides" type="vos:ProtocolList">
<xsd:annotation>
<xsd:documentation>
A list of identifiers for the protocols that the service can provide.
This means that the service can act as a server for the protocol.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- ======== Capability types ======== -->
<xsd:complexType name="Capability">
<xsd:annotation>
<xsd:documentation>
A capability element, containing the capability URI, the
endpoint and any capability specific parameters(?).
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="endpoint" type="xsd:anyURI" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The target endpoint to use for the third-part interface.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<!--+
| Uncommented Capability params.
+-->
<xsd:element name="param" type="vos:Param" minOccurs="0" maxOccurs="unbounded" nillable="true">
<xsd:annotation>
<xsd:documentation>
Any additional capability specific parameters required to use the endpoint.
For example, the user name or password to use for access.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="uri" type="xsd:anyURI" use="required">
<xsd:annotation>
<xsd:documentation>
The capability identifier.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="CapabilityList">
<xsd:annotation>
<xsd:documentation>
A container element for a list of capabilities.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="capability" type="vos:Capability" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
<!-- ======== Node list type ======== -->
<xsd:complexType name="NodeList">
<xsd:annotation>
<xsd:documentation>
A container element for search responses.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="nodes" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The list of nodes.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="node" type="vos:Node" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
At the maximum level of detail this will be replaced by the full element for the extended type,
using xsi:type to indicate the node type/
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- ======== Transfer type ======== -->
<xsd:complexType name="Transfer">
<xsd:annotation>
<xsd:documentation>
A container element for transfer operations.
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="target" type="xsd:anyURI" minOccurs="1" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The target of a transfer operation - the node to/from which data is to be transferred.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="direction" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The direction of a data transfer - either a URI or one of the specified directions
</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:union>
<xsd:simpleType>
<xsd:restriction base="xsd:anyURI"/>
</xsd:simpleType>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="pushToVoSpace"/>
<xsd:enumeration value="pushFromVoSpace"/>
<xsd:enumeration value="pullToVoSpace"/>
<xsd:enumeration value="pullFromVoSpace"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
</xsd:element>
<xsd:element name="view" type="vos:View" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The requested view for the transfer.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="protocol" type="vos:Protocol" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>
The transfer protocol(s) to use.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="keepBytes" type="xsd:boolean" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
Indicates whether the source object is to be kept in an internal transfer, i.e., distinguishes between a move and a copy.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- ======== Response representations ======== -->
<xsd:element name="protocols" type="vos:ProtocolList"/>
<xsd:element name="views" type="vos:ViewList"/>
<xsd:element name="properties" type="vos:PropertyList"/>
<xsd:element name="transfer" type="vos:Transfer"/>
<xsd:element name="searchDetails" type="vos:NodeList"/>
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--$Id: xlink.xsd,v 1.2 2006/03/01 21:55:31 arots Exp arots $-->
<!-- Schema definition for Xlink for the SpaceTimeCoords -->
<!--Change Log:
$Log: xlink.xsd,v $
Revision 1.2 2006/03/01 21:55:31 arots
Fixed missing end-of-comment.
Revision 1.1 2006/03/01 21:06:05 arots
Initial revision
-->
<xs:schema targetNamespace="http://www.w3.org/1999/xlink"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
elementFormDefault="qualified" attributeFormDefault="qualified">
<xs:attribute name="type">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="simple"/>
<xs:enumeration value="extended"/>
<xs:enumeration value="locator"/>
<xs:enumeration value="arc"/>
<xs:enumeration value="resource"/>
<xs:enumeration value="title"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="href" type="xs:anyURI"/>
<xs:attribute name="role" type="xs:anyURI"/>
<xs:attribute name="arcrole" type="xs:anyURI"/>
<xs:attribute name="title" type="xs:string"/>
<xs:attribute name="show">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="new"/>
<xs:enumeration value="replace"/>
<xs:enumeration value="embed"/>
<xs:enumeration value="other"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="label" type="xs:NMTOKEN"/>
<xs:attribute name="actuate">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="onLoad"/>
<xs:enumeration value="onRequest"/>
<xs:enumeration value="other"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="from" type="xs:NMTOKEN"/>
<xs:attribute name="to" type="xs:NMTOKEN"/>
</xs:schema>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment