diff options
Diffstat (limited to '')
5 files changed, 327 insertions, 0 deletions
diff --git a/branches/sca-java-0.99/itest/properties/src/main/resources/OuterPropertyTest.composite b/branches/sca-java-0.99/itest/properties/src/main/resources/OuterPropertyTest.composite new file mode 100644 index 0000000000..43853d46a5 --- /dev/null +++ b/branches/sca-java-0.99/itest/properties/src/main/resources/OuterPropertyTest.composite @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * 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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ xmlns:foo="http://foo"
+ targetNamespace="http://foo"
+ name="OuterPropertyTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+ <component name="OuterComponent">
+ <implementation.composite name="foo:PropertyTest"/>
+ <property name="number">125</property>
+ <property name="complex" type="foo:MyComplexType">
+ <foo:MyComplexValue xsi:type="foo:MyComplexType" >
+ <foo:a>Overriden A</foo:a>
+ <foo:b>Overriden B</foo:b>
+ <foo:c>Overriden C</foo:c>
+ <foo:d>Overriden D</foo:d>
+ <foo:x>
+ <foo:y>Overriden Y</foo:y>
+ <foo:z>Overriden Z</foo:z>
+ </foo:x>
+ </foo:MyComplexValue>
+ </property>
+ </component>
+</composite>
+
diff --git a/branches/sca-java-0.99/itest/properties/src/main/resources/PropertyTest.composite b/branches/sca-java-0.99/itest/properties/src/main/resources/PropertyTest.composite new file mode 100644 index 0000000000..0c328e04eb --- /dev/null +++ b/branches/sca-java-0.99/itest/properties/src/main/resources/PropertyTest.composite @@ -0,0 +1,212 @@ +<?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 + * 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. +--> +<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" + xmlns:foo="http://foo" + xmlns:cust="http://www.example.com/Customer" + xmlns:dbsdo="http://tuscany.apache.org/xmlns/sca/databinding/sdo/1.0" + targetNamespace="http://foo" + name="PropertyTest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + + <service name="ProperterTestService" promote="ABComponent"> + <interface.java interface="org.apache.tuscany.sca.itest.ABComponent"/> + </service> + + <dbsdo:import.sdo location="customer.xsd" /> + <!-- dbsdo:import.sdo factory="com.example.customer.sdo.SdoFactory" / --> + + <property name="number" type="xsd:int">1</property> + <property name="complex" type="foo:MyComplexType" > + <foo:MyComplexValue xsi:type="foo:MyComplexType" > + <foo:a>a</foo:a> + <foo:b>b</foo:b> + <foo:c>c</foo:c> + <foo:d>d</foo:d> + <foo:x> + <foo:y>y</foo:y> + <foo:z>z</foo:z> + </foo:x> + </foo:MyComplexValue> + </property> + + <property name="moreComplex" type="foo:MyMoreComplexType"> + <foo:MyMoreComplexValue xsi:type="foo:MyMoreComplexType"> + <foo:numberSetArray> + <foo:integerNumber>1</foo:integerNumber> + <foo:floatNumber>11</foo:floatNumber> + <foo:doubleNumber>111</foo:doubleNumber> + </foo:numberSetArray> + <foo:numberSetArray> + <foo:integerNumber>2</foo:integerNumber> + <foo:floatNumber>22</foo:floatNumber> + <foo:doubleNumber>222</foo:doubleNumber> + </foo:numberSetArray> + <foo:stringArray>TestString_1</foo:stringArray> + <foo:intArray>10</foo:intArray> + <foo:stringArray>TestString_2</foo:stringArray> + <foo:intArray>20</foo:intArray> + <foo:integerNumber>27</foo:integerNumber> + <foo:floatNumber>79.34</foo:floatNumber> + <foo:doubleNumber>184.52</foo:doubleNumber> + <foo:doubleArray>50.05</foo:doubleArray> + <foo:doubleArray>25.52</foo:doubleArray> + <foo:numberSet> + <foo:integerNumber>54</foo:integerNumber> + <foo:floatNumber>158.68</foo:floatNumber> + <foo:doubleNumber>369.04</foo:doubleNumber> + </foo:numberSet> + </foo:MyMoreComplexValue> + </property> + + <component name="ABCDComponent"> + <implementation.java class="org.apache.tuscany.sca.itest.ABCDComponentImpl"/> + <reference name="ab" target="ABComponent"/> + <reference name="cd" target="CDComponent"/> + </component> + + <component name="ABComponent"> + <implementation.java class="org.apache.tuscany.sca.itest.ABComponentImpl"/> + <property name="a" source="$complex/foo:MyComplexValue/foo:a"/> + <property name="b" source="$complex/foo:MyComplexValue/foo:b"/> + <property name="f" source="$complex/foo:MyComplexValue/foo:a">f</property> + <property name="xpath" source="$complex/foo:MyComplexValue/foo:x/*[local-name()='z']"/> + <property name="one" source="$number"/> + <property name="foobar" many="true">"Apache" "Tuscany" "Java SCA"</property> + <property name="fooInts" many="true">123 456 789</property> + </component> + + + <component name="CDComponent"> + <implementation.java class="org.apache.tuscany.sca.itest.CDComponentImpl"/> + <property name="c" source="$complex/foo:MyComplexValue/foo:c"/> + <property name="d" source="$complex/foo:MyComplexValue/foo:d"/> + <property name="nosource">aValue</property> + <property name="fileProperty" file="fileProperty.txt"/> + <property name="manyValuesFileProperty" many="true" file="manyValuesFileProperty.txt"/> + <property name="nonFileProperty" file="fileProperty.txt" source="$complex/foo:MyComplexValue/foo:c"/> + <property name="two" source="$number">25</property> + </component> + + <component name="PropertyComponent"> + <implementation.java class="org.apache.tuscany.sca.itest.PropertyComponentImpl"/> + <property name="complexPropertyOne" source="$moreComplex"></property> + <property name="complexPropertyTwo"> + <foo:MyAnotherComplexValue> + <foo:stringArray>TestString_1</foo:stringArray> + <foo:stringArray>TestString_2</foo:stringArray> + <foo:intArray>10</foo:intArray> + <foo:integerNumber>27</foo:integerNumber> + <foo:floatNumber>79.34</foo:floatNumber> + <foo:doubleArray>25.52</foo:doubleArray> + <foo:doubleNumber>184.52</foo:doubleNumber> + <foo:doubleArray>50.05</foo:doubleArray> + <foo:intArray>20</foo:intArray> + <foo:numberSetArray> + <foo:integerNumber>1</foo:integerNumber> + <foo:floatNumber>11</foo:floatNumber> + <foo:doubleNumber>111</foo:doubleNumber> + </foo:numberSetArray> + <foo:numberSetArray> + <foo:integerNumber>2</foo:integerNumber> + <foo:floatNumber>22</foo:floatNumber> + <foo:doubleNumber>222</foo:doubleNumber> + </foo:numberSetArray> + <foo:numberSet> + <foo:integerNumber>54</foo:integerNumber> + <foo:floatNumber>158.68</foo:floatNumber> + <foo:doubleNumber>369.04</foo:doubleNumber> + </foo:numberSet> + </foo:MyAnotherComplexValue> + </property> + <property name="complexPropertyThree" element="foo:PropertyThreeElement"> + <foo:PropertyThreeElement> + <foo:stringArray>TestElementString_1</foo:stringArray> + <foo:stringArray>TestElementString_2</foo:stringArray> + <foo:intArray>10</foo:intArray> + <foo:integerNumber>27</foo:integerNumber> + <foo:floatNumber>79.34</foo:floatNumber> + <foo:doubleArray>25.52</foo:doubleArray> + <foo:doubleNumber>184.52</foo:doubleNumber> + <foo:doubleArray>50.05</foo:doubleArray> + <foo:intArray>20</foo:intArray> + <foo:numberSetArray> + <foo:integerNumber>1</foo:integerNumber> + <foo:floatNumber>11</foo:floatNumber> + <foo:doubleNumber>111</foo:doubleNumber> + </foo:numberSetArray> + <foo:numberSetArray> + <foo:integerNumber>2</foo:integerNumber> + <foo:floatNumber>22</foo:floatNumber> + <foo:doubleNumber>222</foo:doubleNumber> + </foo:numberSetArray> + <foo:numberSet> + <foo:integerNumber>54</foo:integerNumber> + <foo:floatNumber>158.68</foo:floatNumber> + <foo:doubleNumber>369.04</foo:doubleNumber> + </foo:numberSet> + </foo:PropertyThreeElement> + </property> + <property name="complexPropertyFour" element="foo:PropertyFourElement" many="true"> + <foo:PropertyFourElement> + <foo:integerNumber>1</foo:integerNumber> + <foo:floatNumber>11.11</foo:floatNumber> + <foo:doubleNumber>111.111</foo:doubleNumber> + <foo:numberSet> + <foo:integerNumber>11</foo:integerNumber> + <foo:floatNumber>1111.1111</foo:floatNumber> + <foo:doubleNumber>11111.11111</foo:doubleNumber> + </foo:numberSet> + </foo:PropertyFourElement> + <foo:PropertyFourElement> + <foo:integerNumber>2</foo:integerNumber> + <foo:floatNumber>22.22</foo:floatNumber> + <foo:doubleNumber>222.222</foo:doubleNumber> + <foo:numberSet> + <foo:integerNumber>22</foo:integerNumber> + <foo:floatNumber>2222.2222</foo:floatNumber> + <foo:doubleNumber>22222.22222</foo:doubleNumber> + </foo:numberSet> + </foo:PropertyFourElement> + <foo:PropertyFourElement> + <foo:integerNumber>3</foo:integerNumber> + <foo:floatNumber>33.33</foo:floatNumber> + <foo:doubleNumber>333.333</foo:doubleNumber> + <foo:numberSet> + <foo:integerNumber>33</foo:integerNumber> + <foo:floatNumber>3333.3333</foo:floatNumber> + <foo:doubleNumber>33333.33333</foo:doubleNumber> + </foo:numberSet> + </foo:PropertyFourElement> + </property> + <property name="sdoProperty" type="cust:Customer"> + <cust:customer> + <cust:firstName>Firstly Name</cust:firstName> + <cust:middleName>Middler Name</cust:middleName> + <cust:lastName>Lasting Name</cust:lastName> + </cust:customer> + </property> + <property name="customerSdo" type="cust:Customer"> + <cust:customer> + <cust:firstName>Sdo Firstly Name</cust:firstName> + <cust:middleName>Sdo Middler Name</cust:middleName> + <cust:lastName>Sdo Lasting Name</cust:lastName> + </cust:customer> + </property> + </component> +</composite> + diff --git a/branches/sca-java-0.99/itest/properties/src/main/resources/customer.xsd b/branches/sca-java-0.99/itest/properties/src/main/resources/customer.xsd new file mode 100644 index 0000000000..8861d7e7b8 --- /dev/null +++ b/branches/sca-java-0.99/itest/properties/src/main/resources/customer.xsd @@ -0,0 +1,30 @@ +<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://www.example.com/Customer" targetNamespace="http://www.example.com/Customer">
+
+ <xsd:element name="customer" type="Customer"/>
+ <xsd:complexType name="Customer">
+ <xsd:sequence>
+ <xsd:element name="firstName" type="xsd:string"/>
+ <xsd:element name="middleName" type="xsd:string"/>
+ <xsd:element name="lastName" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
diff --git a/branches/sca-java-0.99/itest/properties/src/main/resources/fileProperty.txt b/branches/sca-java-0.99/itest/properties/src/main/resources/fileProperty.txt new file mode 100644 index 0000000000..0d3d9ead83 --- /dev/null +++ b/branches/sca-java-0.99/itest/properties/src/main/resources/fileProperty.txt @@ -0,0 +1,21 @@ +<?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. +--> + +<filePropertyTest>fileValue</filePropertyTest> diff --git a/branches/sca-java-0.99/itest/properties/src/main/resources/manyValuesFileProperty.txt b/branches/sca-java-0.99/itest/properties/src/main/resources/manyValuesFileProperty.txt new file mode 100644 index 0000000000..450f397b30 --- /dev/null +++ b/branches/sca-java-0.99/itest/properties/src/main/resources/manyValuesFileProperty.txt @@ -0,0 +1,23 @@ +<?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.
+-->
+
+<manyFilePropertyValues>
+ "fileValueOne" "fileValueTwo" "fileValueThree" "fileValueFour"
+</manyFilePropertyValues>
|