You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/03/14 03:45:05 UTC
svn commit: r517975 - in
/incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test:
java/org/apache/tuscany/assembly/ java/org/apache/tuscany/assembly/reader/
resources/
Author: jsdelfino
Date: Tue Mar 13 19:45:03 2007
New Revision: 517975
URL: http://svn.apache.org/viewvc?view=rev&rev=517975
Log:
Adding test cases to test the usability of the assembly model SPI and the ability to write simple loaders with it.
Added:
incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/
incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/
incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/BaseHandler.java (with props)
incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ComponentTypeHandler.java (with props)
incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/CompositeHandler.java (with props)
incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ConstrainingTypeHandler.java (with props)
incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java (with props)
incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/
incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/Calculator.composite (with props)
Added: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/BaseHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/BaseHandler.java?view=auto&rev=517975
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/BaseHandler.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/BaseHandler.java Tue Mar 13 19:45:03 2007
@@ -0,0 +1,95 @@
+/*
+ * 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.assembly.reader;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.assembly.model.AbstractProperty;
+import org.apache.tuscany.assembly.model.AssemblyFactory;
+import org.apache.tuscany.assembly.model.ConstrainingType;
+import org.apache.tuscany.assembly.model.Property;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * A test handler to test the usability of the assembly model API when loading SCDL
+ *
+ * @version $Rev$ $Date$
+ */
+public abstract class BaseHandler extends DefaultHandler implements ContentHandler {
+
+ protected final static String sca10 = "http://www.osoa.org/xmlns/sca/1.0";
+
+ protected AssemblyFactory factory;
+ protected XMLReader reader;
+
+ public BaseHandler(AssemblyFactory factory, XMLReader reader) {
+ this.factory = factory;
+ this.reader = reader;
+ }
+
+ protected String getString(Attributes attr, String name) {
+ return attr.getValue(name);
+ }
+
+ protected QName getQName(Attributes attr, String name) {
+ //TODO handle namespace prefixes
+ return new QName(attr.getValue(name));
+ }
+
+ protected boolean getBoolean(Attributes attr, String name) {
+ return Boolean.valueOf(attr.getValue(name));
+ }
+
+ protected ConstrainingType getConstrainingType(Attributes attr) {
+ String constrainingTypeName = attr.getValue(sca10, "constrainingType");
+ if (constrainingTypeName!= null) {
+ ConstrainingType constrainingType = factory.createConstrainingType();
+ constrainingType.setName(new QName(constrainingTypeName));
+ constrainingType.setUndefined(true);
+ return constrainingType;
+ } else {
+ return null;
+ }
+ }
+
+ protected void initAbstractProperty(AbstractProperty prop, Attributes attr) {
+ prop.setName(getString(attr, "name"));
+ prop.setMany(getBoolean(attr, "many"));
+ prop.setMustSupply(getBoolean(attr, "mustSupply"));
+ String xsdElement = getString(attr, "element");
+ if (xsdElement != null) {
+ prop.setXSDElement(new QName(xsdElement));
+ }
+ String xsdType = getString(attr, "type");
+ if (xsdType != null) {
+ prop.setXSDElement(new QName(xsdType));
+ }
+ //TODO handle default value
+ }
+
+ protected void initProperty(Property prop, Attributes attr) {
+ initAbstractProperty(prop, attr);
+ //TODO handle property value
+ }
+
+}
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/BaseHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/BaseHandler.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ComponentTypeHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ComponentTypeHandler.java?view=auto&rev=517975
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ComponentTypeHandler.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ComponentTypeHandler.java Tue Mar 13 19:45:03 2007
@@ -0,0 +1,88 @@
+/*
+ * 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.assembly.reader;
+
+import org.apache.tuscany.assembly.model.AssemblyFactory;
+import org.apache.tuscany.assembly.model.ComponentType;
+import org.apache.tuscany.assembly.model.Property;
+import org.apache.tuscany.assembly.model.Reference;
+import org.apache.tuscany.assembly.model.Service;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ * A test handler to test the usability of the assembly model API when loading SCDL
+ *
+ * @version $Rev$ $Date$
+ */
+public class ComponentTypeHandler extends BaseHandler implements ContentHandler {
+
+ private ComponentType componentType;
+ private Service service;
+ private Reference reference;
+ private Property property;
+
+ public ComponentTypeHandler(AssemblyFactory factory, XMLReader reader) {
+ super(factory, reader);
+ }
+
+ public void startElement(String uri, String name, String qname, Attributes attr) throws SAXException {
+ if (sca10.equals(uri)) {
+
+ if ("componentType".equals(name)) {
+ componentType = factory.createComponentType();
+ componentType.setConstrainingType(getConstrainingType(attr));
+
+ } else if ("service".equals(name)) {
+ service = factory.createService();
+ service.setName(getString(attr, "name"));
+
+ } else if ("reference".equals(name)) {
+ reference = factory.createReference();
+ reference.setName(getString(attr, "name"));
+
+ } else if ("property".equals(name)) {
+ property = factory.createProperty();
+ initProperty(property, attr);
+ }
+ }
+ }
+
+ public void endElement(String uri, String localName, String qName) throws SAXException {
+ if (sca10.equals(uri)) {
+
+ if ("service".equals(localName)) {
+ componentType.getServices().add(service);
+ service = null;
+
+ } else if ("reference".equals(localName)) {
+ componentType.getReferences().add(reference);
+ reference = null;
+
+ } else if ("property".equals(localName)) {
+ componentType.getProperties().add(property);
+ property = null;
+ }
+ }
+ }
+
+}
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ComponentTypeHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ComponentTypeHandler.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/CompositeHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/CompositeHandler.java?view=auto&rev=517975
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/CompositeHandler.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/CompositeHandler.java Tue Mar 13 19:45:03 2007
@@ -0,0 +1,142 @@
+/*
+ * 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.assembly.reader;
+
+import org.apache.tuscany.assembly.model.AssemblyFactory;
+import org.apache.tuscany.assembly.model.Component;
+import org.apache.tuscany.assembly.model.ComponentProperty;
+import org.apache.tuscany.assembly.model.ComponentReference;
+import org.apache.tuscany.assembly.model.ComponentService;
+import org.apache.tuscany.assembly.model.Composite;
+import org.apache.tuscany.assembly.model.CompositeReference;
+import org.apache.tuscany.assembly.model.CompositeService;
+import org.apache.tuscany.assembly.model.Property;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ * A test handler to test the usability of the assembly model API when loading SCDL
+ *
+ * @version $Rev$ $Date$
+ */
+public class CompositeHandler extends BaseHandler implements ContentHandler {
+
+ private Composite composite;
+ private Component component;
+ private Property property;
+ private ComponentService componentService;
+ private ComponentReference componentReference;
+ private ComponentProperty componentProperty;
+ private CompositeService compositeService;
+ private CompositeReference compositeReference;
+
+ public CompositeHandler(AssemblyFactory factory, XMLReader reader) {
+ super(factory, reader);
+ }
+
+ public void startElement(String uri, String name, String qname, Attributes attr) throws SAXException {
+ if (sca10.equals(uri)) {
+
+ if ("composite".equals(name)) {
+ composite = factory.createComposite();
+ composite.setName(getQName(attr, "name"));
+ composite.setAutowire(getBoolean(attr, "autowire"));
+ composite.setLocal(getBoolean(attr, "local"));
+ composite.setConstrainingType(getConstrainingType(attr));
+
+ } else if ("service".equals(name)) {
+ if (component != null) {
+ componentService = factory.createComponentService();
+ componentService.setName(getString(attr, "name"));
+ } else {
+ compositeService = factory.createCompositeService();
+ compositeService.setName(getString(attr, "name"));
+ }
+
+ } else if ("reference".equals(name)) {
+ if (component != null) {
+ componentReference = factory.createComponentReference();
+ componentReference.setName(getString(attr, "name"));
+ } else {
+ compositeReference = factory.createCompositeReference();
+ compositeReference.setName(getString(attr, "name"));
+ }
+
+ } else if ("property".equals(name)) {
+ if (component != null) {
+ componentProperty = factory.createComponentProperty();
+ initProperty(componentProperty, attr);
+ } else {
+ property = factory.createProperty();
+ initProperty(property, attr);
+ }
+
+ } else if ("component".equals(name)) {
+ component = factory.createComponent();
+ component.setName(getString(attr, "name"));
+ component.setConstrainingType(getConstrainingType(attr));
+ }
+ }
+ }
+
+ public void endElement(String uri, String localName, String qName) throws SAXException {
+ if ("composite".equals(localName)) {
+
+ } else if ("service".equals(localName)) {
+
+ if (component != null) {
+ component.getServices().add(componentService);
+ componentService = null;
+ } else {
+ composite.getServices().add(compositeService);
+ compositeService = null;
+ }
+
+ } else if ("reference".equals(localName)) {
+
+ if (component != null) {
+ component.getReferences().add(componentReference);
+ componentReference = null;
+ } else {
+ composite.getReferences().add(compositeReference);
+ compositeReference = null;
+ }
+
+ } else if ("property".equals(localName)) {
+
+ if (component != null) {
+ component.getProperties().add(componentProperty);
+ componentProperty = null;
+ } else {
+ composite.getProperties().add(property);
+ property = null;
+ }
+
+ } else if ("component".equals(localName)) {
+
+ composite.getComponents().add(component);
+ component = null;
+
+ }
+ }
+
+}
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/CompositeHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/CompositeHandler.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ConstrainingTypeHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ConstrainingTypeHandler.java?view=auto&rev=517975
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ConstrainingTypeHandler.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ConstrainingTypeHandler.java Tue Mar 13 19:45:03 2007
@@ -0,0 +1,88 @@
+/*
+ * 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.assembly.reader;
+
+import org.apache.tuscany.assembly.model.AbstractProperty;
+import org.apache.tuscany.assembly.model.AbstractReference;
+import org.apache.tuscany.assembly.model.AbstractService;
+import org.apache.tuscany.assembly.model.AssemblyFactory;
+import org.apache.tuscany.assembly.model.ConstrainingType;
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ * A test handler to test the usability of the assembly model API when loading SCDL
+ *
+ * @version $Rev$ $Date$
+ */
+public class ConstrainingTypeHandler extends BaseHandler implements ContentHandler {
+
+ private ConstrainingType constrainingType;
+ private AbstractService abstractService;
+ private AbstractReference abstractReference;
+ private AbstractProperty abstractProperty;
+
+ public ConstrainingTypeHandler(AssemblyFactory factory, XMLReader reader) {
+ super(factory, reader);
+ }
+
+ public void startElement(String uri, String name, String qname, Attributes attr) throws SAXException {
+ if (sca10.equals(uri)) {
+
+ if ("constrainingType".equals(name)) {
+ constrainingType = factory.createConstrainingType();
+ constrainingType.setName(getQName(attr, "name"));
+
+ } else if ("service".equals(name)) {
+ abstractService = factory.createAbstractService();
+ abstractService.setName(getString(attr, "name"));
+
+ } else if ("reference".equals(name)) {
+ abstractReference = factory.createAbstractReference();
+ abstractReference.setName(getString(attr, "name"));
+
+ } else if ("property".equals(name)) {
+ abstractProperty = factory.createAbstractProperty();
+ initAbstractProperty(abstractProperty, attr);
+ }
+ }
+ }
+
+ public void endElement(String uri, String localName, String qName) throws SAXException {
+ if (sca10.equals(uri)) {
+
+ if ("service".equals(localName)) {
+ constrainingType.getServices().add(abstractService);
+ abstractService = null;
+
+ } else if ("reference".equals(localName)) {
+ constrainingType.getReferences().add(abstractReference);
+ abstractReference = null;
+
+ } else if ("property".equals(localName)) {
+ constrainingType.getProperties().add(abstractProperty);
+ abstractProperty = null;
+ }
+ }
+ }
+
+}
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ConstrainingTypeHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ConstrainingTypeHandler.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java?view=auto&rev=517975
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java Tue Mar 13 19:45:03 2007
@@ -0,0 +1,78 @@
+/*
+ * 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.assembly.reader;
+
+
+import java.io.InputStream;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.assembly.model.AssemblyFactory;
+import org.apache.tuscany.assembly.model.impl.AssemblyFactoryImpl;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+/**
+ * Test the usability of the assembly model API when loading SCDL
+ *
+ * @version $Rev$ $Date$
+ */
+public class ReadTestCase extends TestCase {
+
+ AssemblyFactory factory;
+ XMLReader reader;
+
+ public void setUp() throws Exception {
+ factory = new AssemblyFactoryImpl();
+
+ reader = XMLReaderFactory.createXMLReader();
+ reader.setFeature("http://xml.org/sax/features/namespaces", true);
+ reader.setFeature("http://xml.org/sax/features/namespace-prefixes", false);
+ }
+
+ public void tearDown() throws Exception {
+ factory = null;
+ reader = null;
+ }
+
+ public void testLoadComponentType() throws Exception {
+// InputStream is = getClass().getClassLoader().getResourceAsStream("Calculator.componentType");
+// ContentHandler handler = new CompositeHandler(factory, reader);
+// reader.setContentHandler(handler);
+// reader.parse(new InputSource(is));
+ }
+
+ public void testLoadConstrainingType() throws Exception {
+// InputStream is = getClass().getClassLoader().getResourceAsStream("Calculator.constrainingType");
+// ContentHandler handler = new CompositeHandler(factory, reader);
+// reader.setContentHandler(handler);
+// reader.parse(new InputSource(is));
+ }
+
+ public void testLoadComposite() throws Exception {
+ InputStream is = getClass().getClassLoader().getResourceAsStream("Calculator.composite");
+ ContentHandler handler = new CompositeHandler(factory, reader);
+ reader.setContentHandler(handler);
+ reader.parse(new InputSource(is));
+ }
+
+}
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/java/org/apache/tuscany/assembly/reader/ReadTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/Calculator.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/Calculator.composite?view=auto&rev=517975
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/Calculator.composite (added)
+++ incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/Calculator.composite Tue Mar 13 19:45:03 2007
@@ -0,0 +1,52 @@
+<?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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="Calculator">
+
+ <service name="CalculatorService">
+ <interface.java interface="calculator.CalculatorService"/>
+ <reference>CalculatorServiceComponent</reference>
+ </service>
+
+ <component name="CalculatorServiceComponent">
+ <implementation.java class="calculator.CalculatorServiceImpl"/>
+ <reference name="addService">AddServiceComponent</reference>
+ <reference name="subtractService">SubtractServiceComponent</reference>
+ <reference name="multiplyService">MultiplyServiceComponent</reference>
+ <reference name="divideService">DivideServiceComponent</reference>
+ </component>
+
+ <component name="AddServiceComponent">
+ <implementation.java class="calculator.AddServiceImpl"/>
+ </component>
+
+ <component name="SubtractServiceComponent">
+ <implementation.java class="calculator.SubtractServiceImpl"/>
+ </component>
+
+ <component name="MultiplyServiceComponent">
+ <implementation.java class="calculator.MultiplyServiceImpl"/>
+ </component>
+
+ <component name="DivideServiceComponent">
+ <implementation.java class="calculator.DivideServiceImpl"/>
+ </component>
+
+</composite>
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/Calculator.composite
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/branches/sca-java-integration/sca/scdl/src/test/resources/Calculator.composite
------------------------------------------------------------------------------
svn:keywords = Rev Date
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org