|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<xs:schema |
| 3 | + targetNamespace="http://ecoinformatics.org/query-1.0.1" |
| 4 | + xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| 5 | + xmlns="http://ecoinformatics.org/query-1.0.1"> |
| 6 | + <xs:annotation> |
| 7 | + <xs:documentation> |
| 8 | + '$RCSfile: query.xsd,v $' |
| 9 | + Copyright: 2003 Partnership for Biodiversity Informatics |
| 10 | + Project: http://seek.ecoinformatics.org/ |
| 11 | + |
| 12 | + '$Author: tao $' |
| 13 | + '$Date: 2008-04-23 16:25:50 $' |
| 14 | + '$Revision: 1.10 $' |
| 15 | + |
| 16 | + This program is free software; you can redistribute it and/or modify |
| 17 | + it under the terms of the GNU General Public License as published by |
| 18 | + the Free Software Foundation; either version 2 of the License, or |
| 19 | + (at your option) any later version. |
| 20 | + |
| 21 | + This program is distributed in the hope that it will be useful, |
| 22 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 | + GNU General Public License for more details. |
| 25 | + |
| 26 | + You should have received a copy of the GNU General Public License |
| 27 | + along with this program; if not, write to the Free Software |
| 28 | + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 29 | + </xs:documentation> |
| 30 | + </xs:annotation> |
| 31 | + <xs:element name="query" type="QueryType"/> |
| 32 | + <xs:complexType name="QueryType"> |
| 33 | + <xs:annotation> |
| 34 | + <xs:documentation>An XML-based query structure for combining XPath |
| 35 | + pattern matching expressions using logical operators. |
| 36 | + </xs:documentation> |
| 37 | + </xs:annotation> |
| 38 | + <xs:sequence> |
| 39 | + <xs:element name="namespace" maxOccurs="unbounded"> |
| 40 | + <xs:annotation> |
| 41 | + <xs:documentation>The namespace element identifies |
| 42 | + the scope for the query by giving one or more |
| 43 | + namespaces to which the query conditions should be |
| 44 | + applied. For example, to query EML documents, one |
| 45 | + would indicate a namespace of |
| 46 | + "eml://ecoinformatics.org/eml-2.0.0". When more than |
| 47 | + one namespace is given, then the query conditions |
| 48 | + should be applied to all of those document types within |
| 49 | + the EcoGrid repository node. |
| 50 | + </xs:documentation> |
| 51 | + </xs:annotation> |
| 52 | + <xs:complexType> |
| 53 | + <xs:simpleContent> |
| 54 | + <xs:extension base="xs:string"> |
| 55 | + <xs:attribute name="prefix" |
| 56 | + type="xs:string" use="optional"/> |
| 57 | + </xs:extension> |
| 58 | + </xs:simpleContent> |
| 59 | + </xs:complexType> |
| 60 | + </xs:element> |
| 61 | + <xs:element name="returnField" type="xs:string" minOccurs="0" |
| 62 | + maxOccurs="unbounded"> |
| 63 | + <xs:annotation> |
| 64 | + <xs:documentation>An optional limited XPath expression that |
| 65 | + defines a field that should be returned in the resultset |
| 66 | + document. The result record constructed will contain a |
| 67 | + well-formed xml file that combines all of the returnfields |
| 68 | + into a single tree structure. If a returnfield is specified |
| 69 | + as a leaf node that is a SimpleType, the value and all |
| 70 | + parent elements leading to that value will be included in |
| 71 | + the result. If a specified returnfield is not a leaf node, |
| 72 | + then all element and value content below that node will be |
| 73 | + included in the result along with the parent elements |
| 74 | + leading to the matched node. |
| 75 | + </xs:documentation> |
| 76 | + </xs:annotation> |
| 77 | + </xs:element> |
| 78 | + <xs:element name="title" type="xs:string" minOccurs="0" |
| 79 | + maxOccurs="unbounded"> |
| 80 | + <xs:annotation> |
| 81 | + <xs:documentation>An optional title that names and |
| 82 | + describes the query.</xs:documentation> |
| 83 | + </xs:annotation> |
| 84 | + </xs:element> |
| 85 | + <xs:choice> |
| 86 | + <xs:element name="AND" type="ANDType"/> |
| 87 | + <xs:element name="OR" type="ORType"/> |
| 88 | + <xs:element name="condition" type="ConditionType"/> |
| 89 | + </xs:choice> |
| 90 | + <!-- |
| 91 | + <xs:element name="resultStruct" type="xs:string" |
| 92 | + minOccurs="1" maxOccurs="1"/> |
| 93 | + --> |
| 94 | + </xs:sequence> |
| 95 | + <xs:attribute name="queryId" type="xs:string" use="required"/> |
| 96 | + <xs:attribute name="system" type="xs:anyURI" use="required"/> |
| 97 | + </xs:complexType> |
| 98 | + <xs:complexType name="ANDType"> |
| 99 | + <xs:annotation> |
| 100 | + <xs:documentation>A type of logical operator that requires all of |
| 101 | + its child conditions to evaluate to true in order for the whole |
| 102 | + clause to evaluate to true.</xs:documentation> |
| 103 | + </xs:annotation> |
| 104 | + <xs:sequence> |
| 105 | + <xs:element name="AND" type="ANDType" minOccurs="0" maxOccurs="unbounded"/> |
| 106 | + <xs:element name="OR" type="ORType" minOccurs="0" maxOccurs="unbounded"/> |
| 107 | + <xs:element name="condition" type="ConditionType" minOccurs="0" maxOccurs="unbounded"/> |
| 108 | + </xs:sequence> |
| 109 | + </xs:complexType> |
| 110 | + <xs:complexType name="ORType"> |
| 111 | + <xs:annotation> |
| 112 | + <xs:documentation>A type of logical operator that evaluates to true |
| 113 | + if any one or more of its child conditions evaluate to true. |
| 114 | + </xs:documentation> |
| 115 | + </xs:annotation> |
| 116 | + <xs:sequence> |
| 117 | + <xs:element name="AND" type="ANDType" minOccurs="0" maxOccurs="unbounded"/> |
| 118 | + <xs:element name="OR" type="ORType" minOccurs="0" maxOccurs="unbounded"/> |
| 119 | + <xs:element name="condition" type="ConditionType" minOccurs="0" maxOccurs="unbounded"/> |
| 120 | + </xs:sequence> |
| 121 | + </xs:complexType> |
| 122 | + <xs:complexType name="ConditionType"> |
| 123 | + <xs:annotation> |
| 124 | + <xs:documentation>The condition represents a portion of the query |
| 125 | + that restricts the set of documents that match the query. The |
| 126 | + content of the condition element is the value that should be |
| 127 | + matched. The symbol '%' should be interpreted as a wildcard that |
| 128 | + matches any character. The "operator" determines how the match is |
| 129 | + performed (e.g., whether numeric equality or string equality is |
| 130 | + used), and the "concept" determines the field to which the |
| 131 | + restriction is applied (e.g., for XML sources this will be a |
| 132 | + relative or absolute path expression). |
| 133 | + </xs:documentation> |
| 134 | + </xs:annotation> |
| 135 | + <xs:simpleContent> |
| 136 | + <xs:extension base="xs:string"> |
| 137 | + <xs:attribute name="operator" type="OperatorType" |
| 138 | + use="required"/> |
| 139 | + <xs:attribute name="concept" type="LimitedXPathExpression" |
| 140 | + use="required"/> |
| 141 | + </xs:extension> |
| 142 | + </xs:simpleContent> |
| 143 | + </xs:complexType> |
| 144 | + <xs:simpleType name="OperatorType"> |
| 145 | + <xs:annotation> |
| 146 | + <xs:documentation>The OperatorType defines the set of allowable |
| 147 | + values for the match operator in a condition. The match operator |
| 148 | + determines the semantics of how matches occur for that condition. |
| 149 | + </xs:documentation> |
| 150 | + </xs:annotation> |
| 151 | + <xs:restriction base="xs:string"> |
| 152 | + <xs:enumeration value="LIKE"> |
| 153 | + <xs:annotation> |
| 154 | + <xs:documentation>Matches string containing value exactly |
| 155 | + </xs:documentation> |
| 156 | + </xs:annotation> |
| 157 | + </xs:enumeration> |
| 158 | + <xs:enumeration value="NOT LIKE"> |
| 159 | + <xs:annotation> |
| 160 | + <xs:documentation>Matches string not containing value |
| 161 | + </xs:documentation> |
| 162 | + </xs:annotation> |
| 163 | + </xs:enumeration> |
| 164 | + <xs:enumeration value="EQUALS"> |
| 165 | + <xs:annotation> |
| 166 | + <xs:documentation>Matches if numerically equal to value |
| 167 | + </xs:documentation> |
| 168 | + </xs:annotation> |
| 169 | + </xs:enumeration> |
| 170 | + <xs:enumeration value="NOT EQUALS"> |
| 171 | + <xs:annotation> |
| 172 | + <xs:documentation>Matches if numerically not equal to value |
| 173 | + </xs:documentation> |
| 174 | + </xs:annotation> |
| 175 | + </xs:enumeration> |
| 176 | + <xs:enumeration value="LESS THAN"> |
| 177 | + <xs:annotation> |
| 178 | + <xs:documentation>Matches if less than value |
| 179 | + </xs:documentation> |
| 180 | + </xs:annotation> |
| 181 | + </xs:enumeration> |
| 182 | + <xs:enumeration value="LESS THAN OR EQUALS"> |
| 183 | + <xs:annotation> |
| 184 | + <xs:documentation>Matches if less than or equal to value |
| 185 | + </xs:documentation> |
| 186 | + </xs:annotation> |
| 187 | + </xs:enumeration> |
| 188 | + <xs:enumeration value="GREATER THAN"> |
| 189 | + <xs:annotation> |
| 190 | + <xs:documentation>Matches if greater than value |
| 191 | + </xs:documentation> |
| 192 | + </xs:annotation> |
| 193 | + </xs:enumeration> |
| 194 | + <xs:enumeration value="GREATER THAN OR EQUALS"> |
| 195 | + <xs:annotation> |
| 196 | + <xs:documentation>Matches if greater than or equal to value |
| 197 | + </xs:documentation> |
| 198 | + </xs:annotation> |
| 199 | + </xs:enumeration> |
| 200 | + </xs:restriction> |
| 201 | + </xs:simpleType> |
| 202 | + <xs:simpleType name="LimitedXPathExpression"> |
| 203 | + <xs:annotation> |
| 204 | + <xs:documentation>A simple type that provides a restricted version |
| 205 | + of standard XPath expressions. These expressions are the valid path |
| 206 | + expressions that can be used to express condition concepts and |
| 207 | + returnfield paths, and represent a subset of the full XPath syntax. |
| 208 | + </xs:documentation> |
| 209 | + </xs:annotation> |
| 210 | + <xs:restriction base="xs:string"> |
| 211 | + <xs:pattern value="((/*)@?[a-zA-Z0-9]*)*"/> |
| 212 | + </xs:restriction> |
| 213 | + </xs:simpleType> |
| 214 | +</xs:schema> |
0 commit comments