summaryrefslogtreecommitdiffstats
path: root/java/sdo/tools-test
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-10 19:18:51 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-11-10 19:18:51 +0000
commit9833a542bb75c2008c71809e4fdfebc41e67fb46 (patch)
treed89597c3f9308f70cd89c2e8e2cf4b9adeb43994 /java/sdo/tools-test
parent5b2262864f55b51575f381a823ffacf6b7c27a74 (diff)
Move the SDO folder as new trunk for SDO sub project
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@834610 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sdo/tools-test')
-rw-r--r--java/sdo/tools-test/pom.xml264
-rw-r--r--java/sdo/tools-test/src/main/resources/CustomerAccount.xsd41
-rw-r--r--java/sdo/tools-test/src/main/resources/InternalInElement.xsd31
-rw-r--r--java/sdo/tools-test/src/main/resources/Open.xsd33
-rw-r--r--java/sdo/tools-test/src/main/resources/extensible/customer.xsd47
-rw-r--r--java/sdo/tools-test/src/main/resources/extensible/customers.xml39
-rw-r--r--java/sdo/tools-test/src/main/resources/extensible/infostreet.xml24
-rw-r--r--java/sdo/tools-test/src/main/resources/extensible/infostreet.xsd36
-rw-r--r--java/sdo/tools-test/src/main/resources/extensible/infozipcode.xml24
-rw-r--r--java/sdo/tools-test/src/main/resources/extensible/infozipcode.xsd36
-rw-r--r--java/sdo/tools-test/src/main/resources/extensible/nonamespace.xsd25
-rw-r--r--java/sdo/tools-test/src/main/resources/listAccess.xsd53
-rw-r--r--java/sdo/tools-test/src/main/resources/mixedTypesStatic.xsd41
-rw-r--r--java/sdo/tools-test/src/main/resources/simple.xsd41
-rw-r--r--java/sdo/tools-test/src/main/resources/simpleNoIF.xsd41
-rw-r--r--java/sdo/tools-test/src/main/resources/simpleNoTns.xsd37
-rw-r--r--java/sdo/tools-test/src/main/resources/simpleWithChangeSummary.xsd49
-rw-r--r--java/sdo/tools-test/src/main/resources/subgroup.xsd48
-rw-r--r--java/sdo/tools-test/src/main/resources/subgroup1.xml23
-rw-r--r--java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues.xsd105
-rw-r--r--java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues1.xml48
-rw-r--r--java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues2.xsd62
-rw-r--r--java/sdo/tools-test/src/main/resources/xsdImportOnly.wsdl55
-rw-r--r--java/sdo/tools-test/src/main/resources/xsdImportOnly_1.xsd37
-rw-r--r--java/sdo/tools-test/src/main/resources/xsdlistitem.xsd50
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/AllTests.java57
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java131
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/DataObjectGetListTestCase.java99
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ExtensibleTestCase.java96
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/GenPatternsTestCase.java115
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java102
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/InternalInElementTestCase.java63
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ListWithDefaultTestCase.java53
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/MixedTypesTestCase.java86
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/OpenContentTestCase.java75
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTestCase.java110
-rw-r--r--java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/SubstitutionWithExtensionValuesTestCase.java155
-rw-r--r--java/sdo/tools-test/src/test/resources/mixedTypesDynamic.xsd50
-rw-r--r--java/sdo/tools-test/src/test/resources/stockquote.xml32
39 files changed, 0 insertions, 2514 deletions
diff --git a/java/sdo/tools-test/pom.xml b/java/sdo/tools-test/pom.xml
deleted file mode 100644
index 999e3c91e5..0000000000
--- a/java/sdo/tools-test/pom.xml
+++ /dev/null
@@ -1,264 +0,0 @@
-<?xml version="1.0"?>
-<!--
- * 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.
--->
-<project>
- <parent>
- <artifactId>tuscany-sdo</artifactId>
- <groupId>org.apache.tuscany.sdo</groupId>
- <version>1.2-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.tuscany.sdo</groupId>
- <artifactId>tuscany-sdo-tools-test</artifactId>
- <version>1.2-SNAPSHOT</version>
- <name>Test the SDO Generator Tools and Tool Outputs</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tuscany.sdo</groupId>
- <artifactId>tuscany-sdo-impl</artifactId>
- <version>${sdo.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sdo</groupId>
- <artifactId>tuscany-sdo-lib</artifactId>
- <version>${sdo.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tuscany.sdo</groupId>
- <artifactId>tuscany-sdo-tools</artifactId>
- <version>${sdo.version}</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.3.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-
- <build>
-
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>add-test-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-test-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>target/sdo-source</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.tuscany.sdo</groupId>
- <artifactId>tuscany-sdo-plugin</artifactId>
- <version>${sdo.version}</version>
- <executions>
- <execution>
- <id>simple</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/simple.xsd
- </schemaFile>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>simpleWithChangeSummary</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/simpleWithChangeSummary.xsd
- </schemaFile>
- <prefix>CS</prefix>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>xsdListItem</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/xsdlistitem.xsd
- </schemaFile>
- <prefix>LI</prefix>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>simpleNoInterfaces</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/simpleNoIF.xsd
- </schemaFile>
- <javaPackage>
- com.example.noInterfaces.simple
- </javaPackage>
- <noInterfaces>true</noInterfaces>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>customer</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/CustomerAccount.xsd
- </schemaFile>
- <prefix>Customer</prefix>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>extensible</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/extensible/customer.xsd
- </schemaFile>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>extensible_infostreet</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/extensible/infostreet.xsd
- </schemaFile>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>subgroup</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/subgroup.xsd
- </schemaFile>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>openContent</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/Open.xsd
- </schemaFile>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>MixedTypesStaticPart</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/mixedTypesStatic.xsd
- </schemaFile>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>SimpleNoTns</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/simpleNoTns.xsd
- </schemaFile>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>XSDImportOnly</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/xsdImportOnly.wsdl
- </schemaFile>
- <schemaNamespace>all</schemaNamespace>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>listAccess</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/listAccess.xsd
- </schemaFile>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>SubstitutionWithExtensionValues</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/substitutionWithExtensionValues.xsd
- </schemaFile>
- <prefix>SEV</prefix>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- <execution>
- <id>InternalInElement</id>
- <configuration>
- <schemaFile>
- ${basedir}/src/main/resources/InternalInElement.xsd
- </schemaFile>
- </configuration>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-
-</project>
diff --git a/java/sdo/tools-test/src/main/resources/CustomerAccount.xsd b/java/sdo/tools-test/src/main/resources/CustomerAccount.xsd
deleted file mode 100644
index a720670e3b..0000000000
--- a/java/sdo/tools-test/src/main/resources/CustomerAccount.xsd
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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.
--->
-<xs:schema xmlns:sdo="commonj.sdo" xmlns:sdoJava="commonj.sdo/java" xmlns:stn_1="http://example.com/customer"
- xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified"
- targetNamespace="http://example.com/customer">
-
- <xs:complexType abstract="false" name="Account">
- <xs:sequence />
- <xs:attribute default="0" name="accountNum" type="xs:int" />
- <xs:attribute default="0" name="balance" type="xs:float" />
- </xs:complexType>
-
- <xs:element name="account" type="stn_1:Account" />
-
- <xs:complexType abstract="false" name="Customer">
- <xs:sequence>
- <xs:element name="account" type="stn_1:Account" />
- </xs:sequence>
- <xs:attribute name="firstName" type="xs:string" />
- </xs:complexType>
-
- <xs:element name="customer" type="stn_1:Customer" />
-
-</xs:schema>
diff --git a/java/sdo/tools-test/src/main/resources/InternalInElement.xsd b/java/sdo/tools-test/src/main/resources/InternalInElement.xsd
deleted file mode 100644
index 6144b1e117..0000000000
--- a/java/sdo/tools-test/src/main/resources/InternalInElement.xsd
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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:tns="http://www.example.com/internal"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.example.com/internal">
-
- <xsd:element name="Wrapper" type="tns:Wrapper" />
- <xsd:complexType name="Wrapper" >
- <xsd:sequence>
- <xsd:element name="abc" type="xsd:integer"/>
- <xsd:element name="internalAbc" type="xsd:integer"/>
- </xsd:sequence>
- </xsd:complexType>
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/Open.xsd b/java/sdo/tools-test/src/main/resources/Open.xsd
deleted file mode 100644
index 0f158e591a..0000000000
--- a/java/sdo/tools-test/src/main/resources/Open.xsd
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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:open="http://www.example.com/open" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/open">
-
-
- <xsd:attribute name="globAttribute" type="xsd:string"/>
-
- <xsd:complexType name="OneElementAndAnyAttr">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- </xsd:sequence>
- <xsd:anyAttribute processContents="lax"/>
- </xsd:complexType>
-
-
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/extensible/customer.xsd b/java/sdo/tools-test/src/main/resources/extensible/customer.xsd
deleted file mode 100644
index 1a0531e040..0000000000
--- a/java/sdo/tools-test/src/main/resources/extensible/customer.xsd
+++ /dev/null
@@ -1,47 +0,0 @@
-<?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="http://www.example.com/extensible/customer"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- targetNamespace="http://www.example.com/extensible/customer">
-
- <xsd:complexType name="CustomersType">
- <xsd:sequence>
- <xsd:element name="customer" type="CustomerType" maxOccurs="unbounded" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="CustomerType">
- <xsd:all>
- <xsd:element name="name" type="CustNameType" />
- <xsd:element name="number" type="xsd:integer" />
- <xsd:element form="unqualified" name="info" type="InfoType" />
- </xsd:all>
- </xsd:complexType>
-
- <xsd:simpleType name="CustNameType">
- <xsd:restriction base="xsd:string" />
- </xsd:simpleType>
-
- <xsd:complexType name="InfoType" />
-
- <xsd:element name="customers" type="CustomersType" />
- <xsd:element name="customer" type="CustomerType" />
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/extensible/customers.xml b/java/sdo/tools-test/src/main/resources/extensible/customers.xml
deleted file mode 100644
index 40558f6cf8..0000000000
--- a/java/sdo/tools-test/src/main/resources/extensible/customers.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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.
- -->
- <customers xmlns="http://www.example.com/extensible/customer"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.example.com/extensible/customer customer.xsd">
- <customer>
- <name>Pat Walmsley</name>
- <info xsi:type="ns1:InfoType" xmlns=""
- xmlns:ns1="http://www.example.com/extensible/info/zipcode">
- <zipcode>21043</zipcode>
- </info>
- <number>15465</number>
- </customer>
- <customer>
- <name>Priscilla Walmsley</name>
- <number>15466</number>
- <info xsi:type="ns1:InfoType" xmlns=""
- xmlns:ns1="http://www.example.com/extensible/info/street">
- <street>341 Duckworth Way</street>
- </info>
- </customer>
-</customers>
diff --git a/java/sdo/tools-test/src/main/resources/extensible/infostreet.xml b/java/sdo/tools-test/src/main/resources/extensible/infostreet.xml
deleted file mode 100644
index c57b0b98c1..0000000000
--- a/java/sdo/tools-test/src/main/resources/extensible/infostreet.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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.
- -->
- <info xsi:type="ns1:InfoType" xmlns=""
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ns1="http://www.example.com/extensible/info/street">
- <street>21043 Jones Way</street>
-</info>
diff --git a/java/sdo/tools-test/src/main/resources/extensible/infostreet.xsd b/java/sdo/tools-test/src/main/resources/extensible/infostreet.xsd
deleted file mode 100644
index 4b71628c89..0000000000
--- a/java/sdo/tools-test/src/main/resources/extensible/infostreet.xsd
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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="http://www.example.com/extensible/info/street"
- xmlns:customer="http://www.example.com/extensible/customer"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="unqualified"
- targetNamespace="http://www.example.com/extensible/info/street">
- <xsd:import namespace="http://www.example.com/extensible/customer"
- schemaLocation="customer.xsd" />
- <xsd:complexType name="InfoType">
- <xsd:complexContent>
- <xsd:extension base="customer:InfoType">
- <xsd:sequence>
- <xsd:element name="street" type="xsd:string" />
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/extensible/infozipcode.xml b/java/sdo/tools-test/src/main/resources/extensible/infozipcode.xml
deleted file mode 100644
index a5f551908a..0000000000
--- a/java/sdo/tools-test/src/main/resources/extensible/infozipcode.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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.
- -->
- <info xsi:type="ns1:InfoType" xmlns=""
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ns1="http://www.example.com/extensible/info/zipcode">
- <zipcode>21043</zipcode>
-</info>
diff --git a/java/sdo/tools-test/src/main/resources/extensible/infozipcode.xsd b/java/sdo/tools-test/src/main/resources/extensible/infozipcode.xsd
deleted file mode 100644
index cd1c55c138..0000000000
--- a/java/sdo/tools-test/src/main/resources/extensible/infozipcode.xsd
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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="http://www.example.com/extensible/info/zipcode"
- xmlns:customer="http://www.example.com/extensible/customer"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="unqualified"
- targetNamespace="http://www.example.com/extensible/info/zipcode">
- <xsd:import namespace="http://www.example.com/extensible/customer"
- schemaLocation="customer.xsd" />
- <xsd:complexType name="InfoType">
- <xsd:complexContent>
- <xsd:extension base="customer:InfoType">
- <xsd:sequence>
- <xsd:element name="zipcode" type="xsd:string" />
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/extensible/nonamespace.xsd b/java/sdo/tools-test/src/main/resources/extensible/nonamespace.xsd
deleted file mode 100644
index b551c8aae2..0000000000
--- a/java/sdo/tools-test/src/main/resources/extensible/nonamespace.xsd
+++ /dev/null
@@ -1,25 +0,0 @@
-<?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:customer="http://www.example.com/extensible/customer"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:import namespace="http://www.example.com/extensible/customer"
- schemaLocation="customer.xsd" />
- <xsd:element name="info" type="customer:InfoType"></xsd:element>
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/listAccess.xsd b/java/sdo/tools-test/src/main/resources/listAccess.xsd
deleted file mode 100644
index 917ce78f8a..0000000000
--- a/java/sdo/tools-test/src/main/resources/listAccess.xsd
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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:getList="http://www.example.com/getList"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.example.com/getList">
-
-
- <xsd:element name="company" type="getList:Company"/>
- <xsd:element name="employee" type="xsd:string"/>
-
- <xsd:complexType name="Company">
- <xsd:sequence>
- <xsd:element name="openCompany" type="getList:OpenCompany"/>
- <xsd:element name="closeCompany" type="getList:CloseCompany"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:complexType name="OpenCompany">
- <xsd:sequence>
- <xsd:element name="company" type="xsd:string"/>
- <xsd:element name="employees" maxOccurs="unbounded" type="xsd:string"/>
- <xsd:any maxOccurs="unbounded" namespace="##any"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
- <xsd:complexType name="CloseCompany">
- <xsd:sequence>
- <xsd:element name="company" type="xsd:string"/>
- <xsd:element name="employees" maxOccurs="unbounded" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema> \ No newline at end of file
diff --git a/java/sdo/tools-test/src/main/resources/mixedTypesStatic.xsd b/java/sdo/tools-test/src/main/resources/mixedTypesStatic.xsd
deleted file mode 100644
index 436c1ec9a4..0000000000
--- a/java/sdo/tools-test/src/main/resources/mixedTypesStatic.xsd
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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:statictypes="http://www.example.com/mixedtypes/statictypes"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- targetNamespace="http://www.example.com/mixedtypes/statictypes">
-
- <xsd:complexType name="Customer">
- <xsd:sequence>
- <xsd:element name="number" type="xsd:integer" />
- <xsd:element name="account" type="statictypes:Account" />
- <xsd:element name="address" type="statictypes:Address" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="Account" abstract="true" />
-
- <xsd:complexType name="Address">
- <xsd:sequence>
- <xsd:element name="street" type="xsd:string" />
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/simple.xsd b/java/sdo/tools-test/src/main/resources/simple.xsd
deleted file mode 100644
index aff9f9c5bf..0000000000
--- a/java/sdo/tools-test/src/main/resources/simple.xsd
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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/java/sdo/tools-test/src/main/resources/simpleNoIF.xsd b/java/sdo/tools-test/src/main/resources/simpleNoIF.xsd
deleted file mode 100644
index aff9f9c5bf..0000000000
--- a/java/sdo/tools-test/src/main/resources/simpleNoIF.xsd
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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/java/sdo/tools-test/src/main/resources/simpleNoTns.xsd b/java/sdo/tools-test/src/main/resources/simpleNoTns.xsd
deleted file mode 100644
index 4702f57251..0000000000
--- a/java/sdo/tools-test/src/main/resources/simpleNoTns.xsd
+++ /dev/null
@@ -1,37 +0,0 @@
-<?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="http://www.example.com/simpleNoTns"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-
- <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:sequence>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/simpleWithChangeSummary.xsd b/java/sdo/tools-test/src/main/resources/simpleWithChangeSummary.xsd
deleted file mode 100644
index c81e10ee00..0000000000
--- a/java/sdo/tools-test/src/main/resources/simpleWithChangeSummary.xsd
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Copyright (c) 2005-2006 The Apache Software Foundation or its licensors, as applicable.
- *
- * Licensed 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:sdo="commonj.sdo" xmlns:simpleCS="http://www.example.com/simpleCS" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.example.com/simpleCS">
-
-
- <xsd:import namespace="commonj.sdo" schemaLocation="sdoModel.xsd"/>
-
- <xsd:complexType name="QuoteBase">
- <xsd:complexContent>
- <xsd:extension base="simpleCS:Quote">
- <xsd:sequence>
- <xsd:element name="changes" type="sdo:ChangeSummaryType"/>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
-
- </xsd:complexType>
-
- <xsd:element name="stockQuote" type="simpleCS:QuoteBase"/>
-
- <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 maxOccurs="unbounded" minOccurs="0" name="quotes" type="simpleCS:Quote"/>
- </xsd:sequence>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/subgroup.xsd b/java/sdo/tools-test/src/main/resources/subgroup.xsd
deleted file mode 100644
index 61e0642dfa..0000000000
--- a/java/sdo/tools-test/src/main/resources/subgroup.xsd
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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" xmlns:sg="http://example.com/subgroup" elementFormDefault="qualified" targetNamespace="http://example.com/subgroup">
-
- <element name="a" type="sg:A"/>
-
- <complexType name="A">
- <sequence>
- <element maxOccurs="1" minOccurs="1" ref="sg:ge1"/>
- </sequence>
- </complexType>
-
- <element name="ge1" type="sg:B"/>
- <element name="se1" substitutionGroup="sg:ge1" type="sg:Bprime"/>
-
- <complexType name="B">
- <sequence>
- <element maxOccurs="1" name="imInTypeB" type="string"/>
- </sequence>
- </complexType>
-
- <complexType name="Bprime">
- <complexContent>
- <extension base="sg:B">
- <sequence>
- <element name="imInTypeBprime" type="string"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-</schema>
diff --git a/java/sdo/tools-test/src/main/resources/subgroup1.xml b/java/sdo/tools-test/src/main/resources/subgroup1.xml
deleted file mode 100644
index 007aef9aa3..0000000000
--- a/java/sdo/tools-test/src/main/resources/subgroup1.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
- * 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.
- -->
-<subgroup:a xmlns:subgroup="http://example.com/subgroup">
- <subgroup:ge1>
- <subgroup:imInTypeB>thisIsElB</subgroup:imInTypeB>
- </subgroup:ge1>
-</subgroup:a>
diff --git a/java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues.xsd b/java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues.xsd
deleted file mode 100644
index 72474a62eb..0000000000
--- a/java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues.xsd
+++ /dev/null
@@ -1,105 +0,0 @@
-<xsd:schema
- targetNamespace="http://www.example.com/substitutionEV"
- xmlns="http://www.example.com/substitutionEV"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:sev="http://www.example.com/substitutionEV"
- elementFormDefault="qualified">
- <!--
- 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="results" type="sev:ResultsType" />
-
- <xsd:element name="result" type="sev:ResultType" />
- <xsd:element name="myResult" type="sev:MyResultType"
- substitutionGroup="sev:result" />
-
- <xsd:complexType name="ResultsType">
- <xsd:sequence>
- <xsd:element name="id" type="sev:IdType" />
- <xsd:element ref="sev:result" minOccurs="0"
- maxOccurs="unbounded" />
- <xsd:element name="comment" type="sev:CommentType" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="ResultType">
- <xsd:sequence>
- <xsd:element name="id" type="sev:IdType" />
- <xsd:element name="name" type="xsd:string" />
- <xsd:element name="value" type="sev:ValueType" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="MyResultType">
- <xsd:complexContent>
- <xsd:extension base="sev:ResultType" />
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:simpleType name="IdType">
- <xsd:restriction base="sev:AsciiStringType">
- <xsd:maxLength value="32" />
- <xsd:pattern value="[0-9a-fA-F]*" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="AsciiStringType">
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="\p{IsBasicLatin}*" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="ValueType">
- <xsd:simpleContent>
- <xsd:extension base="sev:Integer32Bit" />
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="Integer32Bit">
- <xsd:restriction base="xsd:integer">
- <xsd:minInclusive value="0" />
- <xsd:maxInclusive value="4290000000" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="CommentType">
- <xsd:simpleContent>
- <xsd:extension base="sev:AsciiStringType">
- <xsd:attribute name="language" use="optional">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="English" />
- <xsd:enumeration value="French" />
- <xsd:enumeration value="Spanish" />
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:complexType name="MyCommentType">
- <xsd:simpleContent>
- <xsd:restriction base="sev:CommentType">
- <xsd:minLength value="0" />
- <xsd:maxLength value="40" />
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues1.xml b/java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues1.xml
deleted file mode 100644
index 45c592a333..0000000000
--- a/java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues1.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<!--
- * 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.
--->
-<sev2:allResults xmlns:sev2="http://www.example.com/substitutionEV2">
- <sev2:id>ZZZZZZZZZZZZZZZZZZZZ</sev2:id>
- <sev2:results xmlns:sev="http://www.example.com/substitutionEV">
- <sev:id>00000000000000000000</sev:id>
- <sev:result>
- <sev:id>11111111111111111111</sev:id>
- <sev:name>name1</sev:name>
- <sev:value>1</sev:value>
- </sev:result>
- <sev:myResult>
- <sev:id>22222222222222222222</sev:id>
- <sev:name>myName2</sev:name>
- <sev:value>2</sev:value>
- </sev:myResult>
- <sev:comment>comment0</sev:comment>
- </sev2:results>
- <sev2:results xmlns:sev="http://www.example.com/substitutionEV">
- <sev:id>AAAAAAAAAAAAAAAAAAAA</sev:id>
- <sev:myResult>
- <sev:id>BBBBBBBBBBBBBBBBBBBB</sev:id>
- <sev:name>myNameB</sev:name>
- <sev:value>11</sev:value>
- </sev:myResult>
- <sev:comment>commentA</sev:comment>
- </sev2:results>
- <sev2:comment language="English">
- commentZZZZZZZZZZZZZZZZZZ
- </sev2:comment>
-</sev2:allResults>
diff --git a/java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues2.xsd b/java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues2.xsd
deleted file mode 100644
index 769cce4f65..0000000000
--- a/java/sdo/tools-test/src/main/resources/substitutionWithExtensionValues2.xsd
+++ /dev/null
@@ -1,62 +0,0 @@
-<xsd:schema
- targetNamespace="http://www.example.com/substitutionEV2"
- xmlns="http://www.example.com/substitutionEV2"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:sev2="http://www.example.com/substitutionEV2"
- xmlns:sev="http://www.example.com/substitutionEV"
- elementFormDefault="qualified">
- <!--
- 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:import namespace="http://www.example.com/substitutionEV"
- schemaLocation="substitutionWithExtensionValues.xsd" />
-
- <xsd:element name="allResults" type="sev2:AllResultsType" />
-
- <xsd:complexType name="AllResultsType">
- <xsd:sequence>
- <xsd:element name="id" type="sev2:Id2Type" />
- <xsd:element name="results" minOccurs="0" maxOccurs="unbounded"
- type="sev2:Results2Type" />
- <xsd:element name="comment" type="sev2:Comment2Type" />
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:complexType name="Results2Type">
- <xsd:complexContent>
- <xsd:extension base="sev:ResultsType" />
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:simpleType name="Id2Type">
- <xsd:restriction base="sev:IdType">
- <xsd:maxLength value="10" />
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:complexType name="Comment2Type">
- <xsd:simpleContent>
- <xsd:restriction base="sev:CommentType">
- <xsd:minLength value="0" />
- <xsd:maxLength value="20" />
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/main/resources/xsdImportOnly.wsdl b/java/sdo/tools-test/src/main/resources/xsdImportOnly.wsdl
deleted file mode 100644
index 576997a0a4..0000000000
--- a/java/sdo/tools-test/src/main/resources/xsdImportOnly.wsdl
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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.
--->
-<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xsdImportOnly/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="EchoService" targetNamespace="http://xsdImportOnly/">
- <types>
- <xsd:schema>
- <xsd:import namespace="http://xsdImportOnly/" schemaLocation="xsdImportOnly_1.xsd"/>
- </xsd:schema>
- </types>
- <message name="echo">
- <part element="tns:echo" name="parameters"/>
- </message>
- <message name="echoResponse">
- <part element="tns:echoResponse" name="parameters"/>
- </message>
- <portType name="Echo">
- <operation name="echo">
- <input message="tns:echo"/>
- <output message="tns:echoResponse"/>
- </operation>
- </portType>
- <binding name="EchoPortBinding" type="tns:Echo">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="echo">
- <soap:operation soapAction=""/>
- <input>
- <soap:body use="literal"/>
- </input>
- <output>
- <soap:body use="literal"/>
- </output>
- </operation>
- </binding>
- <service name="EchoService">
- <port binding="tns:EchoPortBinding" name="EchoPort">
- <soap:address location="http://localhost:9080/w1/EchoService"/>
- </port>
- </service>
-</definitions> \ No newline at end of file
diff --git a/java/sdo/tools-test/src/main/resources/xsdImportOnly_1.xsd b/java/sdo/tools-test/src/main/resources/xsdImportOnly_1.xsd
deleted file mode 100644
index a62c26d948..0000000000
--- a/java/sdo/tools-test/src/main/resources/xsdImportOnly_1.xsd
+++ /dev/null
@@ -1,37 +0,0 @@
-<?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.
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://xsdImportOnly/" targetNamespace="http://xsdImportOnly/" version="1.0">
-
- <xs:element name="echo" type="tns:echo"/>
-
- <xs:element name="echoResponse" type="tns:echoResponse"/>
-
- <xs:complexType name="echo">
- <xs:sequence>
- <xs:element minOccurs="0" name="arg0" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="echoResponse">
- <xs:sequence>
- <xs:element minOccurs="0" name="return" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
-</xs:schema> \ No newline at end of file
diff --git a/java/sdo/tools-test/src/main/resources/xsdlistitem.xsd b/java/sdo/tools-test/src/main/resources/xsdlistitem.xsd
deleted file mode 100644
index e416efaa25..0000000000
--- a/java/sdo/tools-test/src/main/resources/xsdlistitem.xsd
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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.org/AddressWithList" xmlns:address="http://www.example.org/AddressWithList" elementFormDefault="qualified">
-
- <xsd:element name="Address" type="address:AddressType" />
-
- <xsd:complexType name="SubCategoryType">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="categoryType" type="address:CategoryType" default="myCat"/>
- <xsd:attribute name="displayable" type="xsd:boolean" use="optional"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="CategoryType">
- <xsd:list itemType="xsd:string" />
- </xsd:simpleType>
- <xsd:simpleType name="CategoryType2">
- <xsd:restriction base="xsd:string" />
- </xsd:simpleType>
-
-
-
- <xsd:complexType name="AddressType">
- <xsd:sequence>
- <xsd:element name="Street" type="xsd:string"></xsd:element>
- <xsd:element name="City" type="xsd:string"></xsd:element>
- <xsd:element name="Zip" type="xsd:string"></xsd:element>
- <xsd:element name="SubCategory" type="address:SubCategoryType"></xsd:element>
- </xsd:sequence>
- </xsd:complexType>
-</xsd:schema> \ No newline at end of file
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/AllTests.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
deleted file mode 100644
index 7c10cb2c62..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/AllTests.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- *
- * 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.
- */
-
-package org.apache.tuscany.sdo.test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class AllTests extends TestCase {
-
-
- public static TestSuite suite() {
-
- TestSuite suite = new TestSuite();
-
- suite.addTestSuite(ChangeSummaryGenTestCase.class);
- suite.addTestSuite(ExtensibleTestCase.class);
- suite.addTestSuite(GenPatternsTestCase.class);
- suite.addTestSuite(InheritanceTestCase.class);
- suite.addTestSuite(OpenContentTestCase.class);
- suite.addTestSuite(SimpleStaticTestCase.class);
- suite.addTestSuite(MixedTypesTestCase.class);
- suite.addTestSuite(DataObjectGetListTestCase.class);
- suite.addTestSuite(ListWithDefaultTestCase.class);
- suite.addTestSuite(SubstitutionWithExtensionValuesTestCase.class);
- suite.addTestSuite(InternalInElementTestCase.class);
- return suite;
- }
-
-
-
- /**
- * Runs the test suite using the textual runner.
- */
- public static void main(String[] args) {
- junit.textui.TestRunner.run(suite());
- }
-}
-
-
-
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java
deleted file mode 100644
index 37759458b9..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryGenTestCase.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.util.List;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import junit.framework.TestCase;
-
-import com.example.customer.Account;
-import com.example.customer.Customer;
-import com.example.customer.CustomerFactory;
-import com.example.simple.cs.CSFactory;
-import com.example.simple.cs.Quote;
-import com.example.simple.cs.QuoteBase;
-import commonj.sdo.ChangeSummary;
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.impl.HelperProvider;
-
-
-public class ChangeSummaryGenTestCase extends TestCase {
-
- public void testMixedQuoteType() throws IOException {
- QuoteBase quote = CSFactory.INSTANCE.createQuoteBase();
- DataObject dQuote = (DataObject)quote;
-
- // ChangeSummary csp = quote.getChanges();
- ChangeSummary cs = dQuote.getChangeSummary();
- ChangeSummary csp = quote.getChanges();
- cs.beginLogging();
-
- assertSame(cs, csp);
-
- quote.setSymbol("fbnt");
- quote.setCompanyName("FlyByNightTechnology");
- quote.setPrice(new BigDecimal("1000.0"));
- quote.setOpen1(new BigDecimal("1000.0"));
- quote.setHigh(new BigDecimal("1000.0"));
- quote.setLow(new BigDecimal("1000.0"));
- quote.setVolume(1000);
- quote.setChange1(1000);
-
- List quotes = quote.getQuotes();
- Quote innerQuote = CSFactory.INSTANCE.createQuote();
-
- quotes.add(innerQuote);
- innerQuote.setPrice(new BigDecimal("2000.0"));
-
- cs.endLogging();
-
- //XMLHelper.INSTANCE.save(dQuote, "http://www.example.com/simpleCS", "quoteBase", System.out);
-
- cs.undoChanges();
-
- //System.out.println("\nAfter Undo Changes:");
- //XMLHelper.INSTANCE.save(dQuote, "http://www.example.com/simpleCS", "quoteBase", System.out);
- }
-
- public void testChangeSummaryOnDatagraphWithContainmentStatic() throws Exception {
-
- HelperContext hc = HelperProvider.getDefaultContext();
- CustomerFactory.INSTANCE.register(hc);
-
- Type customerType = hc.getTypeHelper().getType(Customer.class);
- DataGraph dataGraph = SDOUtil.createDataGraph();
- Customer customer = (Customer) dataGraph.createRootObject(customerType);
-
- Account account = CustomerFactory.INSTANCE.createAccount();
- customer.setAccount(account);
- customer.setFirstName("John");
- customer.getAccount().setAccountNum(1234);
-
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- SDOUtil.saveDataGraph(dataGraph, outputStream, null);
- DataGraph loadDataGraph = SDOUtil.loadDataGraph(new ByteArrayInputStream(outputStream.toByteArray()), null);
-
- loadDataGraph.getChangeSummary().beginLogging();
-
- customer = (Customer) loadDataGraph.getRootObject();
- customer.getAccount().setAccountNum(987);
-
- loadDataGraph.getChangeSummary().endLogging();
-
- List changedDataObjects = loadDataGraph.getChangeSummary().getChangedDataObjects();
- assertEquals("in fact 1 Object was changed in the code", 1, changedDataObjects.size());
- }
-
- public void testChangeSummaryOnDataGraphWithIntAndFloat() throws Exception {
-
- HelperContext hc = HelperProvider.getDefaultContext();
- CustomerFactory factory = CustomerFactory.INSTANCE;
- factory.register(hc);
- Customer customer = factory.createCustomer();
- Account account = factory.createAccount();
- customer.setAccount(account);
- DataObject customerDO = (DataObject) customer;
- DataGraph dg = SDOUtil.createDataGraph();
- SDOUtil.setRootObject(dg, customerDO);
- dg.getChangeSummary().beginLogging();
- dg.getRootObject().getDataObject(0).delete();
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- SDOUtil.saveDataGraph(dg, baos, null);
- }
-
-}
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/DataObjectGetListTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/DataObjectGetListTestCase.java
deleted file mode 100644
index b6650cade3..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/DataObjectGetListTestCase.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import com.example.get.list.ListFactory;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import junit.framework.TestCase;
-
-public class DataObjectGetListTestCase extends TestCase {
- private HelperContext hc;
- private DataObject companyDataObject;
-
- private final String TEST_NAMESPACE = "http://www.example.com/getList";
-
-
- /**
- * Test DataObject.getList() on open type
- */
- public void testUnknownPropertyOnOpenType() throws IOException {
- String companyName = companyDataObject.getString("openCompany/company");
- assertEquals(companyName, "OpenCompany");
- List unknownProperty = companyDataObject.getList("openCompany/unknownProperty");
- assertNotNull(unknownProperty);
- assertTrue(unknownProperty instanceof List);
-
- List unknownProperty2 = companyDataObject.getList("openCompany/unknownProperty");
- assertNotNull(unknownProperty2);
- assertTrue(unknownProperty2 instanceof List);
-
- // unknownProperty and unknownProperty2 are in fact the same value for the same property
-
- unknownProperty.add("employee1");
- assertTrue(unknownProperty.size() == 1);
-
- unknownProperty2.add("employee2");
- assertTrue(unknownProperty2.size() == 2);
-
- unknownProperty.remove(0);
- assertTrue(unknownProperty.size() == 1);
-
- assertEquals(unknownProperty.get(0), "employee2");
- }
-
- /**
- * Test DataObject.getList() on non-open type
- */
- public void testUnknownPropertyOnClosedType() throws IOException {
- String companyName = companyDataObject.getString("closeCompany/company");
- assertEquals(companyName, "CloseCompany");
- List unknownProperty = companyDataObject.getList("closeCompany/unknownProperty");
- assertNotNull(unknownProperty);
- assertTrue(unknownProperty instanceof List);
-
- try {
- unknownProperty.add("employee1");
- fail("An exception should have been thrown.");
- }
- catch (Exception e) {
- }
- }
-
- protected void setUp() throws Exception {
- super.setUp();
-
- hc = SDOUtil.createHelperContext();
- ListFactory.INSTANCE.register(hc);
-
- companyDataObject = hc.getDataFactory().create(TEST_NAMESPACE, "Company");
- DataObject openCompany = companyDataObject.createDataObject("openCompany");
- openCompany.setString("company", "OpenCompany");
- DataObject closeCompany = companyDataObject.createDataObject("closeCompany");
- closeCompany.setString("company", "CloseCompany");
- }
-}
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ExtensibleTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ExtensibleTestCase.java
deleted file mode 100644
index c9cc384beb..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ExtensibleTestCase.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import com.example.extensible.customer.CustomerFactory;
-import com.example.extensible.customer.CustomersType;
-import com.example.extensible.customer.InfoType;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-
-public class ExtensibleTestCase extends TestCase {
-
- private final String[] MODELS = new String[] {
- "/extensible/nonamespace.xsd",
- "/extensible/infostreet.xsd",
- "/extensible/infozipcode.xsd"
- };
-
- private final String CUSTOMERS_XML = "/extensible/customers.xml";
- private final String INFOSTREET_XML = "/extensible/infostreet.xml";
- private final String INFOZIPCODE_XML = "/extensible/infozipcode.xml";
-
- private HelperContext scope;
-
- public void testCustomersLoad() throws IOException {
- XMLDocument doc = scope.getXMLHelper().load(
- getClass().getResourceAsStream(CUSTOMERS_XML));
- assertEquals("customers", doc.getRootElementName());
- assertTrue("RootObject of " + CUSTOMERS_XML + " should be instanceof CustomersType",
- doc.getRootObject() instanceof CustomersType);
- String strdoc = scope.getXMLHelper().save(
- doc.getRootObject(), doc.getRootElementURI(), doc.getRootElementName());
- assertTrue(strdoc.indexOf("<street>341 Duckworth Way</street>") != -1);
- }
-
- public void testInfoLoad() throws IOException {
- String[] infoXmls = new String[] {INFOSTREET_XML, INFOZIPCODE_XML};
- for (int i = 0; i < infoXmls.length; i++) {
- String infoXml = infoXmls[i];
- XMLDocument doc = scope.getXMLHelper().load(
- getClass().getResourceAsStream(infoXml));
- assertEquals("info", doc.getRootElementName());
- assertTrue("RootObject of " + infoXml + " should be instanceof InfoType",
- doc.getRootObject() instanceof InfoType);
- String strdoc = scope.getXMLHelper().save(
- doc.getRootObject(), doc.getRootElementURI(), doc.getRootElementName());
- String elementName = (i == 0) ? "street" : "zipcode";
- String valuePrefix = "21043";
- assertTrue(strdoc.indexOf("<" + elementName + ">") != -1);
- assertTrue(strdoc.indexOf("</" + elementName + ">") != -1);
- assertTrue(strdoc.indexOf(">" + valuePrefix) != -1);
- }
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- scope = SDOUtil.createHelperContext();
-
- CustomerFactory.INSTANCE.register(scope);
-
- // Populate the meta data for the models
- for (int i = 0; i < MODELS.length; i++) {
- String model = MODELS[i];
- URL url = getClass().getResource(model);
- InputStream inputStream = url.openStream();
- scope.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
- }
- }
-
-}
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/GenPatternsTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/GenPatternsTestCase.java
deleted file mode 100644
index e63697738e..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/GenPatternsTestCase.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import java.math.BigDecimal;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import com.example.simple.SimpleFactory;
-import commonj.sdo.helper.HelperContext;
-
-
-public class GenPatternsTestCase extends TestCase
-{
- /**
- * Simple Default Generation Pattern Static SDO 2.1 test.
- */
- public void testSimpleDefaultGeneratedClasses()
- {
- try
- {
- HelperContext scope = SDOUtil.createHelperContext();
- com.example.simple.SimpleFactory.INSTANCE.register(scope);
-
- com.example.simple.Quote quote =
- (com.example.simple.Quote)scope.getDataFactory().create(com.example.simple.Quote.class);
-
- quote.setSymbol("fbnt");
- quote.setCompanyName("FlyByNightTechnology");
- quote.setPrice(new BigDecimal("1000.0"));
- quote.setOpen1(new BigDecimal("1000.0"));
- quote.setHigh(new BigDecimal("1000.0"));
- quote.setLow(new BigDecimal("1000.0"));
- quote.setVolume(1000);
- quote.setChange1(1000);
-
- com.example.simple.Quote child =
- (com.example.simple.Quote)scope.getDataFactory().create(com.example.simple.Quote.class);
- quote.getQuotes().add(child);
- child.setPrice(new BigDecimal("2000.0"));
-
- //XMLHelper.INSTANCE.save((DataObject)quote, "http://www.example.com/simple", "stockQuote", System.out);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- /**
- * Simple Default Generation Pattern Static SDO 2.1 test.
- */
- public void testSimpleNoInterfaceGeneratedClasses()
- {
- try
- {
- HelperContext scope = SDOUtil.createHelperContext();
- com.example.noInterfaces.simple.SimpleFactory.INSTANCE.register(scope);
-
- com.example.noInterfaces.simple.Quote quote =
- (com.example.noInterfaces.simple.Quote)scope.getDataFactory().create(com.example.noInterfaces.simple.Quote.class);
-
- quote.setSymbol("fbnt");
- quote.setCompanyName("FlyByNightTechnology");
- quote.setPrice(new BigDecimal("1000.0"));
- quote.setOpen1(new BigDecimal("1000.0"));
- quote.setHigh(new BigDecimal("1000.0"));
- quote.setLow(new BigDecimal("1000.0"));
- quote.setVolume(1000);
- quote.setChange1(1000);
-
- com.example.noInterfaces.simple.Quote child =
- (com.example.noInterfaces.simple.Quote)scope.getDataFactory().create(com.example.noInterfaces.simple.Quote.class);
- quote.getQuotes().add(child);
- child.setPrice(new BigDecimal("2000.0"));
-
- //XMLHelper.INSTANCE.save((DataObject)quote, "http://www.example.com/simple", "stockQuote", System.out);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void testFailureOnNullScope() {
- try {
- SimpleFactory.INSTANCE.register(null);
- assertTrue("Should not be able to register in null scope", false);
- }
- catch (Exception e) {
- // caught expected exception
- }
- }
-
-
-}
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java
deleted file mode 100644
index 0b291b3365..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/InheritanceTestCase.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import com.example.subgroup.A;
-import com.example.subgroup.B;
-import com.example.subgroup.Bprime;
-import com.example.subgroup.SubgroupFactory;
-import com.example.subgroup.impl.AImpl;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-
-public class InheritanceTestCase extends TestCase {
-
- private HelperContext scope;
-
- public void testSubGroupLoad() throws IOException {
- XMLDocument doc = scope.getXMLHelper().load(
- getClass().getResourceAsStream("/subgroup1.xml"));
- assertEquals("a", doc.getRootElementName());
- String strdoc = scope.getXMLHelper().save(
- doc.getRootObject(), doc.getRootElementURI(), doc.getRootElementName());
- assertTrue(strdoc.indexOf("<sg:imInTypeB>thisIsElB</sg:imInTypeB>") != -1);
- }
-
- public void testSubGroup_AcontainsB() {
- A a = (A) scope.getDataFactory().create(A.class);
- B b = (B) scope.getDataFactory().create(B.class);
- b.setImInTypeB("thisIsElB");
- a.setGe1(b);
-
- assertSame(b, a.getGe1());
- assertSame(b, ((AImpl) a).get(AImpl.GE1));
-
- String doc = scope.getXMLHelper().save((DataObject) a,
- "http://example.com/subgroup", "a");
- assertTrue(doc.indexOf("<sg:imInTypeB>thisIsElB</sg:imInTypeB>") != -1);
-
- }
-
- public void testSubGroup_AcontainsBprime() {
- A a = (A) scope.getDataFactory().create(A.class);
- Bprime bp = (Bprime) scope.getDataFactory().create(Bprime.class);
- bp.setImInTypeBprime("thisIsElBprime");
- a.setGe1(bp);
-
- assertSame(bp, a.getGe1());
- assertSame(bp, ((AImpl) a).get(AImpl.GE1));
-
- String doc = scope.getXMLHelper().save((DataObject) a,
- "http://example.com/subgroup", "a");
-
- assertTrue(doc.indexOf("<sg:imInTypeBprime>thisIsElBprime</sg:imInTypeBprime>") != -1);
-
- }
-
- public void testSubGroup_Bprime() {
- Bprime bp = (Bprime) scope.getDataFactory().create(Bprime.class);
- bp.setImInTypeB("bValue");
- bp.setImInTypeBprime("bpvalue");
- String doc = scope.getXMLHelper().save((DataObject) bp,
- "http://example.com/subgroup", "bp");
- assertTrue(doc.indexOf("<sg:imInTypeB>bValue</sg:imInTypeB>") != -1);
- assertTrue(doc.indexOf("<sg:imInTypeBprime>bpvalue</sg:imInTypeBprime>") != -1);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- scope = SDOUtil.createHelperContext();
-
- SubgroupFactory.INSTANCE.register(scope);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/InternalInElementTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/InternalInElementTestCase.java
deleted file mode 100644
index dfa4b02221..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/InternalInElementTestCase.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.apache.tuscany.sdo.generate.XSD2JavaGenerator;
-
-import com.example.internal.InternalFactory;
-import com.example.internal.Wrapper;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-
-public class InternalInElementTestCase extends TestCase {
- HelperContext scope;
-
- /*TUSCANy-1483 check correct code generation for internalAbc */
- public void testPackageValidityWithInternalInElement() throws Exception {
- //if dob is instantiated, it proves that the code got generated without any duplicates
- //without the fix,
- //public final static int INTERNAL_ABC = 1;
- //public final static int INTERNAL_ABC = 0;
- //was getting generated and so invalid java class WrapperImpl.java.
- InternalFactory.INSTANCE.register(scope);
- DataObject dob = scope.getDataFactory().create(Wrapper.class);
-
- assertTrue(true);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- scope = SDOUtil.createHelperContext();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-}
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ListWithDefaultTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ListWithDefaultTestCase.java
deleted file mode 100644
index 59799bf23e..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/ListWithDefaultTestCase.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.example.address.with.list.LIFactory;
-import org.example.address.with.list.SubCategoryType;
-
-import commonj.sdo.helper.HelperContext;
-
-public class ListWithDefaultTestCase extends TestCase {
- HelperContext scope = null;
-
- public void testListWithDefault() {
- SubCategoryType sct = (SubCategoryType)scope.getDataFactory().create(SubCategoryType.class);
- List l = sct.getCategoryType();
- assertTrue(l.size() == 1);
- assertEquals((String)l.get(0), "myCat");
- }
-
-
- protected void setUp() throws Exception {
- super.setUp();
- scope = SDOUtil.createHelperContext();
-
- LIFactory.INSTANCE.register(scope);
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-}
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/MixedTypesTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/MixedTypesTestCase.java
deleted file mode 100644
index e716076366..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/MixedTypesTestCase.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import com.example.mixedtypes.statictypes.StatictypesFactory;
-import com.example.mixedtypes.statictypes.Address;
-import com.example.mixedtypes.statictypes.Customer;
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.DataFactory;
-import commonj.sdo.helper.HelperContext;
-
-public class MixedTypesTestCase extends TestCase {
-
- private final String[] MODELS = new String[] {
- "/mixedTypesDynamic.xsd"
- };
-
- private final String NS_DYNAMIC = "http://www.example.com/mixedtypes/dynamictypes";
-
- private HelperContext scope;
-
- public void testSetDynamicToStatic() {
- DataFactory factory = scope.getDataFactory();
-
- DataObject staticCustomer = factory.create(Customer.class);
- assertTrue("The account property type has to be abstract, pre condition to this test.",
- staticCustomer.getInstanceProperty("account").getType().isAbstract());
-
- DataObject dynamicSavingsAccount = factory.create(NS_DYNAMIC, "SavingsAccount");
- staticCustomer.set("account", dynamicSavingsAccount);
- assertNotNull("The account property in the static customer has to be set",
- ((Customer)staticCustomer).getAccount());
- }
-
- public void testSetStaticToDynamic() {
- DataFactory factory = scope.getDataFactory();
-
- DataObject dynamicSavingsAccount = factory.create(NS_DYNAMIC, "SavingsAccount");
- DataObject staticAddress = factory.create(Address.class);
-
- dynamicSavingsAccount.set("alternateAddress", staticAddress);
- assertTrue("The address property on the dynamic account object has to be set",
- dynamicSavingsAccount.isSet("alternateAddress"));
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- scope = SDOUtil.createHelperContext();
-
- StatictypesFactory.INSTANCE.register(scope);
-
- // Populate the meta data for the models
- for (int i = 0; i < MODELS.length; i++) {
- String model = MODELS[i];
- URL url = getClass().getResource(model);
- InputStream inputStream = url.openStream();
- scope.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
- }
- }
-
-}
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/OpenContentTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/OpenContentTestCase.java
deleted file mode 100644
index cff0c3ba85..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/OpenContentTestCase.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import com.example.open.OneElementAndAnyAttr;
-import com.example.open.OpenFactory;
-import commonj.sdo.DataObject;
-import commonj.sdo.Property;
-import commonj.sdo.Sequence;
-import commonj.sdo.helper.HelperContext;
-
-
-public class OpenContentTestCase extends TestCase
-{
-
- HelperContext scope;
-
- public void testAnyAttribute() throws IOException
- {
-
- OpenFactory.INSTANCE.register(scope);
- DataObject dob = scope.getDataFactory().create(OneElementAndAnyAttr.class);
- OneElementAndAnyAttr staticDob = (OneElementAndAnyAttr)dob;
-
- staticDob.setName("fred");
-
- assertEquals(1, dob.getInstanceProperties().size());
- Sequence s = ((OneElementAndAnyAttr)dob).getAnyAttribute();
-
- assertFalse(dob.getType().isSequenced());
- assertTrue(dob.getType().isOpen());
- assertNull(dob.getSequence());
-
- Property prop = scope.getTypeHelper().getOpenContentProperty("http://www.example.com/open", "globAttribute");
- s.add(prop, "foo");
- assertEquals(2, dob.getInstanceProperties().size());
- assertTrue(dob.getInstanceProperties().contains(prop));
-
- // scope.getXMLHelper().save((DataObject)dob, "http://www.example.com/open", "bar", System.out);
- }
-
- protected void setUp() throws Exception {
- scope = SDOUtil.createHelperContext();
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-
-}
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTestCase.java
deleted file mode 100644
index c085245f13..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/SimpleStaticTestCase.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import java.io.InputStream;
-import java.math.BigDecimal;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.dom.DOMSource;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-
-import com.example.simple.Quote;
-import com.example.simple.SimpleFactory;
-
-import commonj.sdo.DataObject;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.XMLDocument;
-import commonj.sdo.impl.HelperProvider;
-
-
-public class SimpleStaticTestCase extends TestCase
-{
-
- HelperContext scope;
- /**
- * Simple Static SDO 2 test.
- */
- public void testSimpleStatic()
- {
- try
- {
- Quote quote = SimpleFactory.INSTANCE.createQuote();
-
- quote.setSymbol("fbnt");
- quote.setCompanyName("FlyByNightTechnology");
- quote.setPrice(new BigDecimal("1000.0"));
- quote.setOpen1(new BigDecimal("1000.0"));
- quote.setHigh(new BigDecimal("1000.0"));
- quote.setLow(new BigDecimal("1000.0"));
- quote.setVolume(1000);
- quote.setChange1(1000);
-
- //Quote child = (Quote)((DataObject)quote).createDataObject(8);
- Quote child = SimpleFactory.INSTANCE.createQuote();
- quote.getQuotes().add(child);
- child.setPrice(new BigDecimal("2000.0"));
-
- // scope.getXMLHelper().save((DataObject)quote, "http://www.example.com/simple", "stockQuote", System.out);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void testSimpleStaticViaDomSource() throws Exception {
- // created for TUSCANY-2080
-
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setNamespaceAware(true);
-
- DocumentBuilder builder = factory.newDocumentBuilder();
-
- java.net.URL url = getClass().getResource("/stockquote.xml");
- InputStream inputStream = url.openStream();
- org.w3c.dom.Document dom = builder.parse(inputStream);
-
- // Now load from dom to object
- DOMSource source = new DOMSource(dom);
-
- XMLDocument xml = scope.getXMLHelper().load(source, null, null);
- assertTrue("Root element is not an instance of the generated class", xml
- .getRootObject() instanceof Quote);
-
- }
-
- protected void setUp() throws Exception {
- scope = SDOUtil.createHelperContext();
- SimpleFactory.INSTANCE.register(scope);
-
- super.setUp();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-
-}
diff --git a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/SubstitutionWithExtensionValuesTestCase.java b/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/SubstitutionWithExtensionValuesTestCase.java
deleted file mode 100644
index 92cef546a6..0000000000
--- a/java/sdo/tools-test/src/test/java/org/apache/tuscany/sdo/test/SubstitutionWithExtensionValuesTestCase.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- *
- * 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.
- */
-package org.apache.tuscany.sdo.test;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sdo.api.SDOUtil;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.ExtendedMetaData;
-
-import com.example.substitution.ev.SEVFactory;
-import com.example.substitution.ev.impl.SEVFactoryImpl;
-import commonj.sdo.DataGraph;
-import commonj.sdo.DataObject;
-import commonj.sdo.Type;
-import commonj.sdo.helper.HelperContext;
-import commonj.sdo.helper.TypeHelper;
-import commonj.sdo.impl.HelperProvider;
-
-public final class SubstitutionWithExtensionValuesTestCase extends TestCase
-{
- private static String sev2NamespaceURI;
- private HelperContext hc;
- private DataObject dataObject;
-
- protected void setUp() throws Exception {
- super.setUp();
- hc = HelperProvider.getDefaultContext();
- registerSEV(hc, true);
-
- InputStream inputStream = null;
- URL url = getClass().getResource("/substitutionWithExtensionValues2.xsd");
- inputStream = url.openStream();
- List sev2TypeList = hc.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
-
- inputStream = getClass().getResourceAsStream("/substitutionWithExtensionValues1.xml");
- dataObject = hc.getXMLHelper().load(inputStream).getRootObject();
- inputStream.close();
-
- if (sev2NamespaceURI == null)
- {
- sev2NamespaceURI = ((Type) sev2TypeList.get(0)).getURI();
- }
- }
-
- private void registerSEV(HelperContext hc, boolean useStaticRegistration) throws IOException
- {
- if (useStaticRegistration)
- {
- SEVFactory.INSTANCE.register(hc);
- }
- else
- {
- InputStream inputStream = null;
- URL url = getClass().getResource("/substitutionWithExtensionValues.xsd");
- inputStream = url.openStream();
- hc.getXSDHelper().define(inputStream, url.toString());
- inputStream.close();
- }
- }
-
- public void testComplexTypeWithSubstitutionExtension() throws IOException
- {
- TypeHelper typeHelper = hc.getTypeHelper();
-
- Type resultsType = typeHelper.getType(SEVFactoryImpl.NAMESPACE_URI, "ResultsType");
- Type results2Type = typeHelper.getType(sev2NamespaceURI, "Results2Type");
- assertTrue("Results2 type does not report Results as a base type",
- results2Type.getBaseTypes().contains(resultsType));
-
- assertEquals("results.1/myResult.0/id has unexpected value",
- "BBBBBBBBBBBBBBBBBBBB", dataObject.getString("results.1/myResult.0/id"));
- }
-
- public void testComplexTypeWithSimpleContentExtensionMetaData()
- {
- TypeHelper typeHelper = hc.getTypeHelper();
-
- Type commentType = typeHelper.getType(SEVFactoryImpl.NAMESPACE_URI, "CommentType");
- Type myCommentType = typeHelper.getType(SEVFactoryImpl.NAMESPACE_URI, "MyCommentType");
- Type _myCommentType = typeHelper.getType(SEVFactoryImpl.NAMESPACE_URI, "_MyCommentType");
- Type comment2Type = typeHelper.getType(sev2NamespaceURI, "Comment2Type");
- Type _comment2Type = typeHelper.getType(sev2NamespaceURI, "_Comment2Type");
- assertTrue("MyComment type does not report Comment as a base type",
- myCommentType.getBaseTypes().contains(commentType));
- assertTrue("Comment2 type does not report Comment as a base type",
- comment2Type.getBaseTypes().contains(commentType));
-
- // Test length facets - resort to EMF APIs until Tuscany SDO exposes these directly
- ExtendedMetaData extendedMetaData = ExtendedMetaData.INSTANCE;
-
- EStructuralFeature simpleFeature = null;
- EDataType commentSimpleType = null;
-
- // FIXME Work-around EMF's lack of support for re-definable features - SEE TUSCANY-1832
- commentSimpleType = (EDataType) _myCommentType;
- assertEquals(40, extendedMetaData.getMaxLengthFacet(commentSimpleType));
-
- // FIXME Work-around EMF's lack of support for re-definable features - SEE TUSCANY-1832
- commentSimpleType = (EDataType) _comment2Type;
- assertEquals(20, extendedMetaData.getMaxLengthFacet(commentSimpleType));
- }
-
- public void testComplexTypeWithSimpleContentExtensionChangeSummary() throws IOException
- {
- DataGraph dg = SDOUtil.createDataGraph();
- SDOUtil.setRootObject(dg, dataObject);
- dg.getChangeSummary().beginLogging();
- dataObject.getDataObject("results.1/myResult.0").delete();
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- SDOUtil.saveDataGraph(dg, baos, null);
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- SDOUtil.loadDataGraph(bais, null, hc);
- }
-
- public void testSimpleTypeExtension()
- {
- TypeHelper typeHelper = hc.getTypeHelper();
-
- Type asciiStringType = typeHelper.getType(SEVFactoryImpl.NAMESPACE_URI, "AsciiStringType");
- Type idType = typeHelper.getType(SEVFactoryImpl.NAMESPACE_URI, "IdType");
- assertTrue("IdType does not report AsciiStringType as a base type",
- idType.getBaseTypes().contains(asciiStringType));
-
- Type id2Type = typeHelper.getType(sev2NamespaceURI, "Id2Type");
- assertTrue("Id2Type does not report IdType as a base type",
- id2Type.getBaseTypes().contains(idType));
- }
-}
diff --git a/java/sdo/tools-test/src/test/resources/mixedTypesDynamic.xsd b/java/sdo/tools-test/src/test/resources/mixedTypesDynamic.xsd
deleted file mode 100644
index 25276792fc..0000000000
--- a/java/sdo/tools-test/src/test/resources/mixedTypesDynamic.xsd
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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:dynamictypes="http://www.example.com/mixedtypes/dynamictypes"
- xmlns:statictypes="http://www.example.com/mixedtypes/statictypes"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- targetNamespace="http://www.example.com/mixedtypes/dynamictypes">
-
- <xsd:import namespace="http://www.example.com/mixedtypes/statictypes"
- schemaLocation="mixedtypesstatictypes.xsd" />
-
- <xsd:complexType name="SavingsAccount">
- <xsd:complexContent>
- <xsd:extension base="statictypes:Account">
- <xsd:sequence>
- <xsd:element name="interest" type="xsd:int" />
- <xsd:element name="alternateAddress" type="statictypes:Address" />
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
- <xsd:complexType name="HomeAddress">
- <xsd:complexContent>
- <xsd:extension base="statictypes:Address">
- <xsd:sequence>
- <xsd:element name="email" type="xsd:string" />
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/java/sdo/tools-test/src/test/resources/stockquote.xml b/java/sdo/tools-test/src/test/resources/stockquote.xml
deleted file mode 100644
index 526743868d..0000000000
--- a/java/sdo/tools-test/src/test/resources/stockquote.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?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.
- -->
-<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