diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-10 19:19:03 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-10 19:19:03 +0000 |
commit | dc741421e88c3e4210b00f39877159c5117b99d3 (patch) | |
tree | 68ae372d3c8a7fee11f44a4701585db55d24369d /sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources | |
parent | 9833a542bb75c2008c71809e4fdfebc41e67fb46 (diff) |
moving SDO branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@834611 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources')
32 files changed, 1259 insertions, 0 deletions
diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/SubstitutionValues.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/SubstitutionValues.xsd new file mode 100644 index 0000000000..7aee02c032 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/SubstitutionValues.xsd @@ -0,0 +1,30 @@ +<schema xmlns="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://www.apache.org/tuscany/SubstitutionValues" + xmlns:sv="http://www.apache.org/tuscany/SubstitutionValues"> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + <element name="groupHead" type="string"/> + <complexType name="TestObject"> + <sequence> + <element ref="sv:groupHead"/> + <element name="nonGroupHead" type="string"/> + </sequence> + </complexType> + <element name="groupMember" type="string" substitutionGroup="sv:groupHead"/> +</schema>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd new file mode 100644 index 0000000000..7718cb424f --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/XMLDocumentNoNamespaceSchemaLocation.xsd @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:element name="aNoNamespaceSchemaLocationElement"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="anElement" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="date" type="xsd:date"/> + </xsd:complexType> + </xsd:element> + +</xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/XMLDocumentSchemaLocation.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/XMLDocumentSchemaLocation.xsd new file mode 100644 index 0000000000..c48fab79f1 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/XMLDocumentSchemaLocation.xsd @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://www.example.com/xmlDocumentSchemaLocation" + xmlns:sl="http://www.example.com/xmlDocumentSchemaLocation"> + + <xsd:element name="schemaLocationElement" type="xsd:string" /> + + <xsd:element name="purchaseReport"> + <xsd:complexType> + <xsd:sequence> + <xsd:any minOccurs="1" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="periodEnding" type="xsd:date"/> + </xsd:complexType> + </xsd:element> + +</xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/XMLDocumentTestCase.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/XMLDocumentTestCase.xml new file mode 100644 index 0000000000..88160e0b2f --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/XMLDocumentTestCase.xml @@ -0,0 +1,14 @@ +<sl:purchaseReport + xmlns:sl="http://www.example.com/xmlDocumentSchemaLocation" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.example.com/xmlDocumentSchemaLocation + /XMLDocumentSchemaLocation.xsd + http://www.example.com/open + /open.xsd" + xsi:noNamespaceSchemaLocation="/XMLDocumentNoNamespaceSchemaLocation.xsd" + periodEnding="2007-12-31"> + <sl:schemaLocationElement>some string</sl:schemaLocationElement> + <aNoNamespaceSchemaLocationElement date="2006-04-01"> + <anElement>another string</anElement> + </aNoNamespaceSchemaLocationElement> +</sl:purchaseReport> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/api_test.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/api_test.xsd new file mode 100644 index 0000000000..3ccaebdd57 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/api_test.xsd @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdo="commonj.sdo" xmlns:simple="http://www.example.com/api_test" targetNamespace="http://www.example.com/api_test">
+ <xsd:import namespace="commonj.sdo" schemaLocation="sdoModel.xsd"/>
+ <xsd:element name="apiTestElem" type="simple:APITest"/>
+
+ <xsd:complexType mixed="true" name="APITest">
+ <xsd:sequence>
+ <xsd:element name="stringVal" type="sdo:String"/>
+ <xsd:element name="booleanVal" type="sdo:Boolean"/>
+ <xsd:element name="booleanVal2" type="sdo:Boolean"/>
+ <xsd:element name="byteVal" type="sdo:Byte"/>
+ <xsd:element name="stringVal2" type="sdo:String"/>
+ <xsd:element name="decimalVal" type="sdo:Decimal"/>
+ <xsd:element name="decimalVal2" type="sdo:Decimal"/>
+ <xsd:element name="intVal" type="sdo:Int"/>
+ <xsd:element name="floatVal" type="sdo:Float"/>
+ <xsd:element name="doubleVal" type="sdo:Double"/>
+ <xsd:element name="dateVal" type="sdo:Date"/>
+ <xsd:element name="shortVal" type="sdo:Short"/>
+ <xsd:element name="longVal" type="sdo:Long"/>
+ <xsd:element maxOccurs="unbounded" minOccurs="0" name="children" type="simple:APITest"/>
+ <xsd:element name="bytesVal" type="sdo:Bytes"/>
+ <xsd:element name="integerVal" type="sdo:Integer"/>
+ <xsd:element name="charVal" type="sdo:Character"/>
+ <xsd:element name="xsdDate" type="xsd:date"/>
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/bank.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/bank.xsd new file mode 100644 index 0000000000..ae23feefa3 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/bank.xsd @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?>
+ <!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+<xsd:schema targetNamespace="http://www.example.com/bank"
+ xmlns:bank="http://www.example.com/bank"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdoXML="commonj.sdo/xml">
+
+ <xsd:element name="bank" type="bank:bankType"/>
+
+ <xsd:complexType name="bankType">
+ <xsd:sequence>
+ <xsd:element name="Branch" type="bank:branchType" maxOccurs="unbounded" />
+ <xsd:element name="Service" type="bank:serviceType" maxOccurs="unbounded" />
+ <xsd:element name="Customer" type="bank:customerType" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="branchType">
+ <xsd:sequence>
+ <xsd:element name="Address" type="bank:addressType"/>
+ <xsd:element name="Directions" type="xsd:string" maxOccurs="unbounded" />
+ <xsd:element name="Account" type="bank:accountType" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="ID" type="xsd:ID"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="serviceType">
+ <xsd:attribute name="ID" type="xsd:ID"/>
+ <xsd:attribute name="Name" type="xsd:string"/>
+ <xsd:attribute name="Fee" type="xsd:decimal"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="accountType">
+ <xsd:attribute name="ID" type="xsd:ID"/>
+ <xsd:attribute name="Service" type="xsd:IDREF" sdoXML:propertyType="bank:serviceType" />
+ <xsd:attribute name="Balance" type="xsd:decimal" />
+ </xsd:complexType>
+
+ <xsd:complexType name="customerType">
+ <xsd:sequence>
+ <xsd:element name="First" type="xsd:string" />
+ <xsd:element name="Last" type="xsd:string" />
+ <xsd:element name="Address" type="bank:addressType"/>
+ <xsd:element name="HomeBranch" type="xsd:IDREF" sdoXML:propertyType="bank:branchType" />
+ <xsd:element name="Account" type="xsd:IDREF" sdoXML:propertyType="bank:accountType" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="ID" type="xsd:ID"/>
+ <xsd:attribute name="Related" type="xsd:IDREFS" sdoXML:propertyType="bank:customerType" />
+ </xsd:complexType>
+
+ <xsd:complexType name="addressType">
+ <xsd:sequence>
+ <xsd:element name="Street" type="xsd:string"/>
+ <xsd:element name="City" type="xsd:string"/>
+ <xsd:element name="State" type="xsd:string"/>
+ <xsd:element name="Zip" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/company.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/company.xsd new file mode 100644 index 0000000000..18e99352be --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/company.xsd @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + <xsd:schema xmlns:company="company.xsd" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="company.xsd"> + <xsd:element name="company" type="company:CompanyType"/> + <xsd:complexType name="CompanyType"> + <xsd:sequence> + <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string"/> + <xsd:attribute name="employeeOfTheMonth" type="xsd:string"/> + </xsd:complexType> + <xsd:complexType name="DepartmentType"> + <xsd:sequence> + <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string"/> + <xsd:attribute name="location" type="xsd:string"/> + <xsd:attribute name="number" type="xsd:int"/> + </xsd:complexType> + <xsd:complexType name="EmployeeType"> + <xsd:attribute name="name" type="xsd:string"/> + <xsd:attribute name="SN" type="xsd:ID"/> + <xsd:attribute name="manager" type="xsd:boolean"/> + </xsd:complexType> + </xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/customer1.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/customer1.xml new file mode 100644 index 0000000000..5a29e30a3c --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/customer1.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="ASCII"?> +<customer:Customer + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:customer="http://example.com/customer" + xsi:type="customer:Customer" + custNum="1" + firstName="John" + lastName="Adams"/>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/customer2.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/customer2.xml new file mode 100644 index 0000000000..e9ebb92677 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/customer2.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="ASCII"?> +<customer:Customer + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:customer="http://example.com/customer" + xsi:type="customer:Customer" + custNum="2" + firstName="Jeremy" + lastName="Pavick"/>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/datatype.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/datatype.xsd new file mode 100644 index 0000000000..9c03964367 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/datatype.xsd @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:datatype="http://www.example.com/datatype" xmlns:sdoJava="commonj.sdo/java" targetNamespace="http://www.example.com/datatype"> + + <xsd:simpleType name="SimpleSDOType"> + <xsd:restriction base="xsd:string"/> + </xsd:simpleType> + + <xsd:simpleType name="SimpleSDOTypeInstanceClass" sdoJava:instanceClass="java.lang.Integer"> + <xsd:restriction base="xsd:string"/> + </xsd:simpleType> + + <xsd:simpleType name="SimpleSDOTypeExtendedInstanceClass" sdoJava:extendedInstanceClass="java.lang.String"> + <xsd:restriction base="xsd:string"/> + </xsd:simpleType> + +</xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/foo-ext.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/foo-ext.xml new file mode 100644 index 0000000000..000909a52e --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/foo-ext.xml @@ -0,0 +1,9 @@ +<module name="m" xmlns="http://foo" xmlns:bar="http://bar" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://bar foo-ext.xsd http://foo foo.xsd "> + <component name="c"> + <bar:implementation.mock myAttr="helloworld.HelloWorldImpl" + listAttr="1 2">1<bar:myElement>Dummy</bar:myElement>2 + </bar:implementation.mock> + </component> +</module>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/foo-ext.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/foo-ext.xsd new file mode 100644 index 0000000000..8bad6f9307 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/foo-ext.xsd @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<schema xmlns="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://bar" + elementFormDefault="qualified" + xmlns:foo="http://foo" xmlns:bar="http://bar"> + + <import namespace="http://foo" + schemaLocation="foo.xsd" /> + + <element name="implementation.mock" type="bar:MockImplementation" + substitutionGroup="foo:implementation" /> + <complexType name="MockImplementation" mixed="true"> + <complexContent> + <extension base="foo:Implementation"> + <sequence> + <element name="myElement" type="string"/> + <any namespace="##other" processContents="lax" + minOccurs="0" maxOccurs="unbounded" /> + </sequence> + <attribute name="myAttr" type="NCName" use="required" /> + <attribute name="listAttr" type="NMTOKENS" use="optional" /> + <anyAttribute namespace="##any" processContents="lax" /> + </extension> + </complexContent> + </complexType> +</schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/foo.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/foo.xsd new file mode 100644 index 0000000000..27a8e3644c --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/foo.xsd @@ -0,0 +1,232 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<schema xmlns="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://foo" + elementFormDefault="qualified" xmlns:foo="http://foo"> + + <element name="componentType" type="foo:ComponentType"/> + <complexType name="ComponentType"> + <sequence> + <element minOccurs="0" maxOccurs="unbounded" name="service" type="foo:Service"/> + <element minOccurs="0" maxOccurs="unbounded" name="reference" type="foo:Reference"/> + <element minOccurs="0" maxOccurs="unbounded" name="property" type="foo:Property"/> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + <complexType name="Service"> + <sequence> + <element minOccurs="1" maxOccurs="1" ref="foo:interface"/> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <attribute name="name" type="NCName" use="required"/> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + <element name="interface" type="foo:Interface"/> + <complexType name="Interface"/> + + <complexType name="Reference"> + <sequence> + <element minOccurs="1" maxOccurs="1" ref="foo:interface"/> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <attribute name="name" type="NCName" use="required"/> + <attribute name="multiplicity" type="foo:Multiplicity" use="optional" default="1..1"/> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + <complexType name="Property"> + <sequence> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <attribute name="name" type="NCName" use="required"/> + <attribute name="type" type="QName" use="required"/> + <attribute name="many" type="boolean" default="false" use="optional"/> + <attribute name="required" type="boolean" default="false" use="optional"/> + <attribute name="default" type="string" use="optional"/> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + + <element name="moduleFragment" type="foo:ModuleFragment"/> + <complexType name="ModuleFragment"> + <sequence> + <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="foo:EntryPoint"/> + <element minOccurs="0" maxOccurs="unbounded" name="component" type="foo:Component"/> + <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="foo:ExternalService"/> + <element minOccurs="0" maxOccurs="unbounded" name="wire" type="foo:ModuleWire"/> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <attribute name="name" type="NCName" use="required"/> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + <element name="module" type="foo:Module"/> + <complexType name="Module"> + <complexContent> + <extension base="foo:ModuleFragment"/> + </complexContent> + </complexType> + + <complexType name="EntryPoint"> + <sequence> + <element minOccurs="0" maxOccurs="1" ref="foo:interface"/> + <element minOccurs="1" maxOccurs="unbounded" ref="foo:binding"/> + <element minOccurs="1" maxOccurs="unbounded" name="reference" type="anyURI"/> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <attribute name="name" type="NCName" use="required"/> + <attribute name="multiplicity" type="foo:Multiplicity" use="optional" default="1..1"/> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + <!-- a multiplicity 1..1 or 0..n sample + <reference>StockQuoteComponent</reference> - type must be URI + a multiplicity 1..n or 0..n sample + <reference>StockQuoteComponent1</reference> - type must be URI + <reference>StockQuoteComponent2</reference> + --> + + <element name="binding" type="foo:Binding"/> + <complexType name="Binding"> + <attribute name="uri" type="anyURI" use="optional"/> + </complexType> + + <complexType name="Component"> + <sequence> + <element minOccurs="1" maxOccurs="1" ref="foo:implementation"/> + <element minOccurs="0" maxOccurs="1" name="properties" type="foo:PropertyValues"/> + <element minOccurs="0" maxOccurs="1" name="references" type="foo:ReferenceValues"/> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <attribute name="name" type="NCName" use="required"/> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + <!-- a multiplicity 1..1 or 0..1 sample + <references> + <v:stockQuote>StockQuoteComponent</v:stockquote> - type must be URI + </references> + a multiplicity 1..n or 0..n sample + <references> + <v:stockQuote>StockQuoteComponent1</v:stockQuote> - type must be URI + <v:stockQuote>StockQuoteComponent2</v:stockQuote> + </references> + --> + + <element name="implementation" type="foo:Implementation"/> + <complexType name="Implementation"/> + + <complexType name="PropertyValues"> + <sequence> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + <complexType name="ReferenceValues"> + <sequence> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + + <complexType name="ExternalService"> + <sequence> + <element minOccurs="1" maxOccurs="1" ref="foo:interface"/> + <element minOccurs="0" maxOccurs="unbounded" ref="foo:binding"/> + </sequence> + <attribute name="name" type="NCName" use="required"/> + <attribute name="overridable" type="foo:OverrideOptions" default="may" use="optional"/> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + + <complexType name="ModuleWire"> + <sequence> + <element minOccurs="1" maxOccurs="1" ref="foo:source.uri"/> + <element minOccurs="1" maxOccurs="1" ref="foo:target.uri"/> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + <element name="source"/> + <element name="target"/> + + <element name="source.uri" type="anyURI" substitutionGroup="foo:source"/> + <element name="target.uri" type="anyURI" substitutionGroup="foo:target"/> + + <element name="subsystem" type="foo:Subsystem"/> + <complexType name="Subsystem"> + <sequence> + <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="foo:EntryPoint"/> + <element minOccurs="0" maxOccurs="unbounded" name="moduleComponent" type="foo:ModuleComponent"/> + <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="foo:ExternalService"/> + <element minOccurs="0" maxOccurs="unbounded" name="wire" type="foo:SystemWire"/> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <attribute name="name" type="NCName" use="required"/> + <attribute name="uri" type="anyURI" use="optional"/> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + <complexType name="ModuleComponent"> + <sequence> + <element minOccurs="0" maxOccurs="1" name="properties" type="foo:PropertyValues"/> + <element minOccurs="0" maxOccurs="1" name="references" type="foo:ReferenceValues"/> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + <attribute name="name" type="NCName" use="required"/> + <attribute name="module" type="NCName" use="required"/> + <attribute name="uri" type="anyURI" use="optional"/> + <anyAttribute namespace="##any" processContents="lax"/> + </complexType> + + <complexType name="SystemWire"> + <sequence> + <element minOccurs="1" maxOccurs="1" ref="foo:source"/> + <element minOccurs="1" maxOccurs="1" ref="foo:target"/> + <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> + </sequence> + </complexType> + + <element name="source.epr" substitutionGroup="foo:source"/> + <element name="target.epr" substitutionGroup="foo:target"/> + + <simpleType name="Multiplicity"> + <restriction base="string"> + <enumeration value="0..1"/> + <enumeration value="1..1"/> + <enumeration value="0..n"/> + <enumeration value="1..n"/> + </restriction> + </simpleType> + + <simpleType name="OverrideOptions"> + <restriction base="string"> + <enumeration value="no"/> + <enumeration value="may"/> + <enumeration value="must"/> + </restriction> + </simpleType> + +</schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixed.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixed.xml new file mode 100644 index 0000000000..42ff3a3a5b --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixed.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ASCII"?> +<mixed:mixedStockQuote xmlns:mixed="http://www.example.com/mixed"> + <symbol>fbnt</symbol> + <companyName>FlyByNightTechnology</companyName> + some text + <quotes><price>2000.0</price></quotes> + more text + <price>1000.0</price> +</mixed:mixedStockQuote>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixed.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixed.xsd new file mode 100644 index 0000000000..b9a8487559 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixed.xsd @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<xsd:schema + targetNamespace="http://www.example.com/mixed" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:simple="http://www.example.com/mixed"> + + <xsd:element name="mixedStockQuote" type="simple:MixedQuote"/> + + <xsd:complexType name="MixedQuote" mixed="true"> + <xsd:sequence> + <xsd:element name="symbol" type="xsd:string"/> + <xsd:element name="companyName" type="xsd:string"/> + <xsd:element name="price" type="xsd:decimal"/> + <xsd:element name="open1" type="xsd:decimal"/> + <xsd:element name="high" type="xsd:decimal"/> + <xsd:element name="low" type="xsd:decimal"/> + <xsd:element name="volume" type="xsd:double"/> + <xsd:element name="change1" type="xsd:double"/> + <xsd:element name="quotes" type="simple:MixedQuote" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixed2.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixed2.xml new file mode 100644 index 0000000000..d95d179478 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixed2.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="ASCII"?> +<mixed:mixedStockQuote + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:mixed="http://www.example.com/mixed" + xsi:type="mixed:MixedQuote"> + <symbol>fbnt</symbol> + <companyName>FlyByNightTechnology</companyName> + some text + <quotes><price>2000.0</price></quotes> + more text + <price>1000.0</price> +</mixed:mixedStockQuote>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixedopen.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixedopen.xml new file mode 100644 index 0000000000..21a62ef2d0 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/mixedopen.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="ASCII"?> +<mixed:mixedOpenStockQuote + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:mixed="http://www.example.com/mixed" + xmlns:open="http://www.example.com/open" + xsi:type="mixed:MixedOpenQuote"> + <open:symbol>fbnt</open:symbol> + <companyName>FlyByNightTechnology</companyName> + some text + <quotes><price>2000.0</price></quotes> + more text + <price>1000.0</price> +</mixed:mixedOpenStockQuote> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/names.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/names.xsd new file mode 100644 index 0000000000..97b57c1741 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/names.xsd @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<xsd:schema + targetNamespace="http://www.example.com/names" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:names="http://www.example.com/names"> + + <xsd:element name="class" type="names:class"/> + <xsd:element name="test.element" type="names:test.element" /> + <xsd:element name="void" type="names:void" /> + + <xsd:complexType name="class" /> + <xsd:complexType name="test.element" /> + <xsd:complexType name="void" /> + +</xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open.xml new file mode 100644 index 0000000000..d4a5b92e0c --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="ASCII"?> +<open:openStockQuote xmlns:open="http://www.example.com/open"> + <symbol>s1</symbol> + <open:company> + <name>FlyByNightTechnology</name> + </open:company> + <open:price>1000.0</open:price> +</open:openStockQuote>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open.xsd new file mode 100644 index 0000000000..d100d58fc6 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open.xsd @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<xsd:schema + xmlns:simple="http://www.example.com/open" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://www.example.com/open"> + + <xsd:element name="openStockQuote" type="simple:OpenQuote"/> + + <xsd:element name="price" type="xsd:decimal"/> + + <xsd:element name="company"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="name" type="xsd:string"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="OpenQuote"> + <xsd:sequence> + <xsd:element name="symbol" type="xsd:string"/> + <xsd:any maxOccurs="unbounded" namespace="##any"/> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open1any.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open1any.xsd new file mode 100644 index 0000000000..00efaef5e0 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open1any.xsd @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<xsd:schema + xmlns:simple="http://www.example.com/open1any" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://www.example.com/open1any"> + + <xsd:element name="openStockQuote" type="simple:OpenQuote"/> + + <xsd:element name="price" type="xsd:decimal"/> + + <xsd:element name="company"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="name" type="xsd:string"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="OpenQuote"> + <xsd:sequence> + <xsd:element name="symbol" type="xsd:string"/> + <xsd:any namespace="##any"/> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open2.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open2.xml new file mode 100644 index 0000000000..ab992ccf74 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/open2.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="ASCII"?> +<open:openStockQuote + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:open="http://www.example.com/open" + xsi:type="open:OpenQuote"> + <open:symbol>s1</open:symbol> + <open:company name="FlyByNightTechnology"/> + <open:price>1000.0</open:price> +</open:openStockQuote> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/openContentProperty.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/openContentProperty.xml new file mode 100644 index 0000000000..03608365c0 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/openContentProperty.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="ASCII"?>
+<open:openStockQuote xmlns:open="http://www.example.com/open">
+ <symbol>s1</symbol>
+ <open:company>
+ <name>FlyByNightTechnology</name>
+ </open:company>
+ <open:price>1000.0</open:price>
+ <open:highPrice>1100.0</open:highPrice>
+ <open:mutualFundQuote>
+ <symbol>mutual-1</symbol>
+ </open:mutualFundQuote>
+</open:openStockQuote>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/po.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/po.xsd new file mode 100644 index 0000000000..5c53ac1905 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/po.xsd @@ -0,0 +1,62 @@ +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns="http://www.example.com/PO" targetNamespace="http://www.example.com/PO"> + + <xsd:element name="purchaseOrder" type="PurchaseOrderType"/> + <xsd:element name="comment" type="xsd:string"/> + + <xsd:complexType name="PurchaseOrderType"> + <xsd:sequence> + <xsd:element name="shipTo" type="USAddress"/> + <xsd:element name="billTo" type="USAddress"/> + <xsd:element ref="comment" minOccurs="0"/> + <xsd:element name="items" type="Items"/> + + </xsd:sequence> + <xsd:attribute name="orderDate" type="xsd:date"/> + </xsd:complexType> + + <xsd:complexType name="USAddress"> + <xsd:sequence> + <xsd:element name="name" type="xsd:string"/> + + <xsd:element name="street" type="xsd:string"/> + <xsd:element name="city" type="xsd:string"/> + <xsd:element name="state" type="xsd:string"/> + <xsd:element name="zip" type="xsd:decimal"/> + </xsd:sequence> + <xsd:attribute name="country" type="xsd:NMTOKEN" fixed="US"/> + + </xsd:complexType> + + <xsd:complexType name="Items"> + <xsd:sequence> + <xsd:element name="item" minOccurs="0" maxOccurs="unbounded"> + <xsd:complexType> + <xsd:sequence> + + <xsd:element name="productName" type="xsd:string"/> + <xsd:element name="price" type="xsd:decimal"/> + <xsd:element name="quantity"> + <xsd:simpleType> + <xsd:restriction base="xsd:positiveInteger"> + <xsd:maxExclusive value="100"/> + </xsd:restriction> + + </xsd:simpleType> + </xsd:element> + <xsd:element ref="comment" minOccurs="0"/> + <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/> + </xsd:sequence> + + <xsd:attribute name="partNum" type="SKU" use="required"/> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + <xsd:simpleType name="SKU"> + + <xsd:restriction base="xsd:string"> + <xsd:pattern value="\d{3}-[A-Z]{2}"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/quote.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/quote.xml new file mode 100644 index 0000000000..d7b5969e23 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/quote.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="ASCII"?> +<simple:stockQuote xmlns:simple="http://www.example.com/simple"> + <symbol>fbnt</symbol> + <companyName>FlyByNightTechnology</companyName> + <price>1000.0</price> + <open1>1000.0</open1> + <high>1000.0</high> + <low>1000.0</low> + <volume>1000.0</volume> + <change1>1000.0</change1> + <quotes> + <price>2000.0</price> + </quotes> +</simple:stockQuote>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/sdoannotations.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/sdoannotations.xsd new file mode 100644 index 0000000000..98be3a57d7 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/sdoannotations.xsd @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<xsd:schema + targetNamespace="http://www.example.com/sdoannotations" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdoa="http://www.example.com/sdoannotations" + xmlns:sdo="commonj.sdo/xml" + xmlns:sdoj="commonj.sdo/java"> + + <!-- simple element with no annotations --> + <xsd:element name="foo0" type="xsd:string" /> + + <!-- simple element with sdo:name --> + <xsd:element name="foo1" type="xsd:string" sdo:name="foo2" /> + + <!-- simple element with sdo:type --> + <xsd:element + name="foo3" type="xsd:int" + sdo:dataType="xsd:string" + sdo:aliasName="foo4" + sdo:readOnly="true" /> + + <xsd:element + name="foo5" type="sdoa:foo6" /> + + <!-- complex type with no annotations --> + <xsd:complexType name="foo6"> + <xsd:sequence> + <xsd:element name="bar1" type="xsd:int" /> + </xsd:sequence> + <xsd:attribute name="bar2" type="xsd:int" /> + </xsd:complexType> + + <xsd:element + name="foo7" type="sdoa:foo8" /> + + <xsd:complexType name="foo8" sdo:name="foo9" sdoj:instanceClass="org.apache.tuscany.sdo.test.XSDHelperTestCase"> + <xsd:sequence> + <xsd:element name="bar3" type="xsd:int" sdo:string="true" /> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/sdotypes.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/sdotypes.xsd new file mode 100644 index 0000000000..f206c86013 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/sdotypes.xsd @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<xsd:schema + targetNamespace="http://www.example.com/sdotypes" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:sdot="http://www.example.com/sdotypes"> + + <xsd:element name="foo0" type="xsd:anySimpleType"/> + <xsd:element name="foo2" type="xsd:anyURI"/> + <xsd:element name="foo3" type="xsd:base64Binary"/> + <xsd:element name="foo4" type="xsd:boolean"/> + <xsd:element name="foo5" type="xsd:byte"/> + <xsd:element name="foo6" type="xsd:date"/> + <xsd:element name="foo7" type="xsd:dateTime"/> + <xsd:element name="foo8" type="xsd:decimal"/> + <xsd:element name="foo9" type="xsd:double"/> + <xsd:element name="foo10" type="xsd:duration"/> + <xsd:element name="foo11" type="xsd:ENTITIES"/> + <xsd:element name="foo12" type="xsd:ENTITY"/> + <xsd:element name="foo13" type="xsd:float"/> + <xsd:element name="foo14" type="xsd:gDay"/> + <xsd:element name="foo15" type="xsd:gMonth"/> + <xsd:element name="foo16" type="xsd:gMonthDay"/> + <xsd:element name="foo17" type="xsd:gYear"/> + <xsd:element name="foo18" type="xsd:gYearMonth"/> + <xsd:element name="foo19" type="xsd:hexBinary"/> + <xsd:element name="foo20" type="xsd:ID"/> + <xsd:element name="foo21" type="xsd:IDREF"/> + <xsd:element name="foo22" type="xsd:IDREFS"/> + <xsd:element name="foo23" type="xsd:int"/> + <xsd:element name="foo24" type="xsd:integer"/> + <xsd:element name="foo25" type="xsd:language"/> + <xsd:element name="foo26" type="xsd:long"/> + <xsd:element name="foo27" type="xsd:Name"/> + <xsd:element name="foo28" type="xsd:NCName"/> + <xsd:element name="foo29" type="xsd:negativeInteger"/> + <xsd:element name="foo30" type="xsd:NMTOKEN"/> + <xsd:element name="foo31" type="xsd:NMTOKENS"/> + <xsd:element name="foo32" type="xsd:nonNegativeInteger"/> + <xsd:element name="foo33" type="xsd:nonPositiveInteger"/> + <xsd:element name="foo34" type="xsd:normalizedString"/> + <xsd:element name="foo35" type="xsd:NOTATION"/> + <xsd:element name="foo36" type="xsd:positiveInteger"/> + <xsd:element name="foo37" type="xsd:QName"/> + <xsd:element name="foo38" type="xsd:short"/> + <xsd:element name="foo39" type="xsd:string"/> + <xsd:element name="foo40" type="xsd:time"/> + <xsd:element name="foo41" type="xsd:token"/> + <xsd:element name="foo42" type="xsd:unsignedByte"/> + <xsd:element name="foo43" type="xsd:unsignedInt"/> + <xsd:element name="foo44" type="xsd:unsignedLong"/> + <xsd:element name="foo45" type="xsd:unsignedShort"/> + +</xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/shallowquote.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/shallowquote.xml new file mode 100644 index 0000000000..a56f2fe2b7 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/shallowquote.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="ASCII"?> +<simple:stockQuote xmlns:simple="http://www.example.com/simple"> + <symbol>fbnt</symbol> + <companyName>FlyByNightTechnology</companyName> + <price>1000.0</price> + <open1>1000.0</open1> + <high>1000.0</high> + <low>1000.0</low> + <volume>1000.0</volume> + <change1>1000.0</change1> +</simple:stockQuote>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/simple.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/simple.xsd new file mode 100644 index 0000000000..46a2b1f4df --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/simple.xsd @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> +<xsd:schema + targetNamespace="http://www.example.com/simple" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:simple="http://www.example.com/simple"> + + <xsd:element name="stockQuote" type="simple:Quote"/> + + <xsd:complexType name="Quote"> + <xsd:sequence> + <xsd:element name="symbol" type="xsd:string"/> + <xsd:element name="companyName" type="xsd:string"/> + <xsd:element name="price" type="xsd:decimal"/> + <xsd:element name="open1" type="xsd:decimal"/> + <xsd:element name="high" type="xsd:decimal"/> + <xsd:element name="low" type="xsd:decimal"/> + <xsd:element name="volume" type="xsd:double"/> + <xsd:element name="change1" type="xsd:double"/> + <xsd:element name="quotes" type="simple:Quote" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/simplechangesummary.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/simplechangesummary.xml new file mode 100644 index 0000000000..1a34e0bf80 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/simplechangesummary.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="ASCII"?> +<sdo:datagraph xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sdo="commonj.sdo" + xmlns:sdo_1="http://www.apache.org/tuscany/2005/SDO" xmlns:simple="http://www.example.com/simple"> + <changeSummary xmlns="" + logging="false"> + <objectChanges key="#//@eRootObject"> + <value xsi:type="sdo_1:ChangeSummarySetting" featureName="symbol" set="false"/> + <value xsi:type="sdo_1:ChangeSummarySetting" featureName="companyName" set="false"/> + <value xsi:type="sdo_1:ChangeSummarySetting" featureName="price" set="false"/> + <value xsi:type="sdo_1:ChangeSummarySetting" featureName="open1" set="false"/> + <value xsi:type="sdo_1:ChangeSummarySetting" featureName="high" set="false"/> + <value xsi:type="sdo_1:ChangeSummarySetting" featureName="low" set="false"/> + <value xsi:type="sdo_1:ChangeSummarySetting" featureName="volume" dataValue="0.0" + set="false"/> + <value xsi:type="sdo_1:ChangeSummarySetting" featureName="change1" dataValue="0.0" + set="false"/> + <value xsi:type="sdo_1:ChangeSummarySetting" featureName="quotes" set="false"/> + </objectChanges> + <objectChanges key="#//@eRootObject/@quotes.0"> + <value xsi:type="sdo_1:ChangeSummarySetting" featureName="price" set="false"/> + </objectChanges> + </changeSummary> + <simple:Quote> + <symbol>fbnt</symbol> + <companyName>FlyByNightTechnology</companyName> + <price>1000.0</price> + <open1>1000.0</open1> + <high>1000.0</high> + <low>1000.0</low> + <volume>1000.0</volume> + <change1>1000.0</change1> + <quotes> + <price>2000.0</price> + </quotes> + </simple:Quote> +</sdo:datagraph> diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/xpath.xml b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/xpath.xml new file mode 100644 index 0000000000..3b3e2ffbb4 --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/xpath.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="ASCII"?> +<xpath:drive xmlns:xpath="http://www.example.com/xpath" id="0"> + <Folder creation_date="1999-10-20" creator="Hasan" type="FolderType"> + <FolderName>Folder00000000000</FolderName> + <description>marries inflamed apprehended beseeming bustle</description> + <SecurityObject name="secure1"> + <Allows> + <Allow> + <User>Brian</User> + <Permissions>rw</Permissions> + </Allow> + <Allow> + <User>Fuhwei</User> + <Permissions>r</Permissions> + </Allow> + </Allows> + <Denies> + <Deny> + <User>Hasan</User> + </Deny> + <Deny> + <User>Frank</User> + </Deny> + </Denies> + </SecurityObject> + </Folder> + <Folder creation_date="2000-03-23" creator="Kapil" type="FileType"> + <FolderName>Folder00000000011</FolderName> + <description>Mumbling Jumblin Pink Panther goofs it up</description> + <SecurityObject name="secure2"> + <Allows> + <Allow> + <User>Imad</User> + <Permissions>x</Permissions> + </Allow> + <Allow> + <User>Robbie</User> + <Permissions>rwx</Permissions> + </Allow> + </Allows> + <Denies> + <Deny> + <User>Yang</User> + </Deny> + <Deny> + <User>Art</User> + </Deny> + </Denies> + </SecurityObject> + </Folder> +</xpath:drive>
\ No newline at end of file diff --git a/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/xpath.xsd b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/xpath.xsd new file mode 100644 index 0000000000..0b817d425d --- /dev/null +++ b/sdo-java/branches/sdo-java-M2/sdo/impl/src/test/resources/xpath.xsd @@ -0,0 +1,75 @@ +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns="http://www.example.com/xpath" targetNamespace="http://www.example.com/xpath"> + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + --> + <xsd:element name="drive" type="DriveType"/> + + <xsd:complexType name="DriveType"> + <xsd:sequence> + <xsd:element name="Folder" type="FolderType" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:int"/> + </xsd:complexType> + + <xsd:complexType name="FolderType"> + <xsd:sequence> + <xsd:element name="FolderName" type="xsd:string"/> + <xsd:element name="description" type="xsd:string"/> + <xsd:element name="SecurityObject" type="SecurityObjectType"/> + </xsd:sequence> + <xsd:attribute name="creation_date" type="xsd:date" minOccurs="0"/> + <xsd:attribute name="creator" type="xsd:string" minOccurs="0"/> + <xsd:attribute name="type" type="xsd:string" minOccurs="0"/> + + </xsd:complexType> + + <xsd:complexType name="AllowsObjectType"> + <xsd:sequence> + <xsd:element name="Allow" minOccurs="0" maxOccurs="unbounded"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="User" type="xsd:string"/> + <xsd:element name="Permissions" type="xsd:string"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="DeniesObjectType"> + <xsd:sequence> + <xsd:element name="Deny" minOccurs="0" maxOccurs="unbounded"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="User" type="xsd:string"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="SecurityObjectType"> + <xsd:sequence> + <xsd:element name="Allows" type="AllowsObjectType"/> + <xsd:element name="Denies" type="DeniesObjectType"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string"/> + </xsd:complexType> + +</xsd:schema> |