tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r616286 [1/2] - in /incubator/tuscany/java/sca/modules: binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/ binding-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/ binding-ws-axis2/src/main/java/org/apache/tu...
Date Tue, 29 Jan 2008 12:38:38 GMT
Author: antelder
Date: Tue Jan 29 04:38:29 2008
New Revision: 616286

URL: http://svn.apache.org/viewvc?rev=616286&view=rev
Log:
TUSCANY-2019, apply cmds from Sebb to correct various SVN properties

Modified:
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JavaToSmd.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceTestCase.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyAxisConfigurator.java   (props changed)
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceTestCase.java   (props changed)
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceTestCase.java   (props changed)
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Greeter.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElement2String.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElement2XMLStreamReader.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/String2OMElement.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/XMLStreamReader2OMElement.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-axiom/src/test/java/org/apache/tuscany/sca/databinding/axiom/OMElementTestCase.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXB2Node.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/Node2JAXB.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/XMLStreamReader2JAXB.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-jaxb/src/test/java/org/apache/tuscany/databinding/jaxb/JAXBTestCase.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/DataObject2String.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/DataObject2XMLStreamReader.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/String2DataObject.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/XMLDocument2XMLStreamReader.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/XMLStreamReader2DataObject.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/XMLStreamReader2XMLDocument.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-xmlbeans/src/main/java/org/apache/tuscany/sca/databinding/xmlbeans/Node2XmlObject.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-xmlbeans/src/main/java/org/apache/tuscany/sca/databinding/xmlbeans/XMLStreamReader2XmlObject.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-xmlbeans/src/main/java/org/apache/tuscany/sca/databinding/xmlbeans/XmlObject2Node.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-xmlbeans/src/main/java/org/apache/tuscany/sca/databinding/xmlbeans/XmlObject2XMLStreamReader.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding-xmlbeans/src/test/java/org/apache/tuscany/sca/databinding/xmlbeans/XmlObjectTestCase.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DataPipe.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultTransformerExtensionPoint.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/Mediator.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/TransformationContext.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/TransformationException.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/Transformer.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/TransformerExtensionPoint.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/DirectedGraph.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/PipedTransformer.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/Node2String.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/Source2ResultTransformer.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/StAXHelper.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/StreamDataPipe.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/String2Node.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/String2XMLStreamReader.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/Writer2ReaderDataPipe.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/XMLStreamReader2String.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/impl/DirectedGraphTestCase.java   (props changed)
    incubator/tuscany/java/sca/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/xml/Node2StringTestCase.java   (props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/EmbeddedODEServer.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/GeronimoTxFactory.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/ode/ODEInitializationException.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProvider.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELImplementationProviderFactory.java   (contents, props changed)
    incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/provider/BPELInvoker.java   (contents, props changed)

Modified: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JavaToSmd.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JavaToSmd.java?rev=616286&r1=616285&r2=616286&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JavaToSmd.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JavaToSmd.java Tue Jan 29 04:38:29 2008
@@ -1,56 +1,56 @@
-/*
- * 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.sca.binding.jsonrpc;
-
-import java.lang.reflect.Method;
-
-/**
- * Utility class to create a Simple Method Description (SMD) descriptor
- * from a Java class. See http://dojo.jot.com/SMD.
- * 
- * TODO: Change to work from the Tuscany Interface instead of a Java class
- * 
- * @version $Rev$ $Date$
- */
-public class JavaToSmd {
-    
-    public static String interfaceToSmd(Class klazz, String serviceUrl) {
-        String name = klazz.getSimpleName();
-        Method methods[] = klazz.getMethods();
-        
-        StringBuffer smdSb = new StringBuffer();
-        smdSb.append("{\"SMDVersion\":\".1\",\"objectName\":\"" + name + "\",\"serviceType\":\"JSON-RPC\",\"serviceURL\":\""+ serviceUrl + "\",\"methods\":[");
-        for (int i = 0; i < methods.length; i++) {
-            if (i != 0) smdSb.append(",");
-            Class<?> params[] = methods[i].getParameterTypes();            
-            smdSb.append("{\"name\":\""+methods[i].getName() + "\",\"parameters\":[");
-            for (int j = 0; j < params.length; j++) {
-                if (j != 0) smdSb.append(",");
-                // right now Dojo doesn't look at the type value, so we'll default it to STRING
-                // also, since we can't introspect the method paramater names we'll just create an incrementing parameter name
-                smdSb.append("{\"name\":\"param" + j + "\",\"type\":\"STRING\"}");  
-            }
-            smdSb.append("]}");
-        }
-        smdSb.append("]}");
-        
-        return smdSb.toString();        
-    }
-
-}
+/*
+ * 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.sca.binding.jsonrpc;
+
+import java.lang.reflect.Method;
+
+/**
+ * Utility class to create a Simple Method Description (SMD) descriptor
+ * from a Java class. See http://dojo.jot.com/SMD.
+ * 
+ * TODO: Change to work from the Tuscany Interface instead of a Java class
+ * 
+ * @version $Rev$ $Date$
+ */
+public class JavaToSmd {
+    
+    public static String interfaceToSmd(Class klazz, String serviceUrl) {
+        String name = klazz.getSimpleName();
+        Method methods[] = klazz.getMethods();
+        
+        StringBuffer smdSb = new StringBuffer();
+        smdSb.append("{\"SMDVersion\":\".1\",\"objectName\":\"" + name + "\",\"serviceType\":\"JSON-RPC\",\"serviceURL\":\""+ serviceUrl + "\",\"methods\":[");
+        for (int i = 0; i < methods.length; i++) {
+            if (i != 0) smdSb.append(",");
+            Class<?> params[] = methods[i].getParameterTypes();            
+            smdSb.append("{\"name\":\""+methods[i].getName() + "\",\"parameters\":[");
+            for (int j = 0; j < params.length; j++) {
+                if (j != 0) smdSb.append(",");
+                // right now Dojo doesn't look at the type value, so we'll default it to STRING
+                // also, since we can't introspect the method paramater names we'll just create an incrementing parameter name
+                smdSb.append("{\"name\":\"param" + j + "\",\"type\":\"STRING\"}");  
+            }
+            smdSb.append("]}");
+        }
+        smdSb.append("]}");
+        
+        return smdSb.toString();        
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JavaToSmd.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceTestCase.java?rev=616286&r1=616285&r2=616286&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceTestCase.java (original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceTestCase.java Tue Jan 29 04:38:29 2008
@@ -1,67 +1,67 @@
-/*
- * 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.sca.binding.jsonrpc;
-
-import java.io.ByteArrayInputStream;
-
-import junit.framework.TestCase;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
-import org.json.JSONObject;
-
-import com.meterware.httpunit.PostMethodWebRequest;
-import com.meterware.httpunit.WebConversation;
-import com.meterware.httpunit.WebRequest;
-import com.meterware.httpunit.WebResponse;
-
-/**
- * @version $Rev$ $Date$
- */
-public class JSONRPCServiceTestCase extends TestCase {
-
-    private static final String SERVICE_PATH = "/EchoService";
-
-    private static final String SERVICE_URL = "http://localhost:8085/SCADomain" + SERVICE_PATH;
-
-    private SCADomain domain;
-
-    @Override
-    protected void setUp() throws Exception {
-        domain = SCADomain.newInstance("JSONRPCBinding.composite");
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-    	domain.close();
-    }
-
-    public void testJSONRPCBinding() throws Exception {
-        JSONObject jsonRequest = new JSONObject("{ \"method\": \"echo\", \"params\": [\"Hello JSON-RPC\"], \"id\": 1}");
-
-        WebConversation wc = new WebConversation();
-        WebRequest request   = new PostMethodWebRequest( SERVICE_URL, new ByteArrayInputStream(jsonRequest.toString().getBytes("UTF-8")),"application/json");
-        WebResponse response = wc.getResource(request);
-
-        assertEquals(200, response.getResponseCode());
-        JSONObject jsonResp = new JSONObject(response.getText());
-        assertEquals("echo: Hello JSON-RPC", jsonResp.getString("result"));
-    }
-
-
-}
+/*
+ * 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.sca.binding.jsonrpc;
+
+import java.io.ByteArrayInputStream;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.json.JSONObject;
+
+import com.meterware.httpunit.PostMethodWebRequest;
+import com.meterware.httpunit.WebConversation;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class JSONRPCServiceTestCase extends TestCase {
+
+    private static final String SERVICE_PATH = "/EchoService";
+
+    private static final String SERVICE_URL = "http://localhost:8085/SCADomain" + SERVICE_PATH;
+
+    private SCADomain domain;
+
+    @Override
+    protected void setUp() throws Exception {
+        domain = SCADomain.newInstance("JSONRPCBinding.composite");
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+    	domain.close();
+    }
+
+    public void testJSONRPCBinding() throws Exception {
+        JSONObject jsonRequest = new JSONObject("{ \"method\": \"echo\", \"params\": [\"Hello JSON-RPC\"], \"id\": 1}");
+
+        WebConversation wc = new WebConversation();
+        WebRequest request   = new PostMethodWebRequest( SERVICE_URL, new ByteArrayInputStream(jsonRequest.toString().getBytes("UTF-8")),"application/json");
+        WebResponse response = wc.getResource(request);
+
+        assertEquals(200, response.getResponseCode());
+        JSONObject jsonResp = new JSONObject(response.getText());
+        assertEquals("echo: Hello JSON-RPC", jsonResp.getString("result"));
+    }
+
+
+}

Propchange: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/TuscanyAxisConfigurator.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceTestCase.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceTestCase.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/Greeter.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElement2String.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElement2XMLStreamReader.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/String2OMElement.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/XMLStreamReader2OMElement.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-axiom/src/test/java/org/apache/tuscany/sca/databinding/axiom/OMElementTestCase.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/JAXB2Node.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/Node2JAXB.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/XMLStreamReader2JAXB.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-jaxb/src/test/java/org/apache/tuscany/databinding/jaxb/JAXBTestCase.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/DataObject2String.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/DataObject2XMLStreamReader.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/String2DataObject.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/XMLDocument2XMLStreamReader.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/XMLStreamReader2DataObject.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/XMLStreamReader2XMLDocument.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-xmlbeans/src/main/java/org/apache/tuscany/sca/databinding/xmlbeans/Node2XmlObject.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-xmlbeans/src/main/java/org/apache/tuscany/sca/databinding/xmlbeans/XMLStreamReader2XmlObject.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-xmlbeans/src/main/java/org/apache/tuscany/sca/databinding/xmlbeans/XmlObject2Node.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-xmlbeans/src/main/java/org/apache/tuscany/sca/databinding/xmlbeans/XmlObject2XMLStreamReader.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding-xmlbeans/src/test/java/org/apache/tuscany/sca/databinding/xmlbeans/XmlObjectTestCase.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DataPipe.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/DefaultTransformerExtensionPoint.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/Mediator.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/TransformationContext.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/TransformationException.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/Transformer.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/TransformerExtensionPoint.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/DirectedGraph.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/PipedTransformer.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/TransformationContextImpl.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/Node2String.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/Source2ResultTransformer.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/StAXHelper.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/StreamDataPipe.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/String2Node.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/String2XMLStreamReader.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/Writer2ReaderDataPipe.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/xml/XMLStreamReader2String.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/impl/DirectedGraphTestCase.java
            ('svn:executable' removed)

Propchange: incubator/tuscany/java/sca/modules/databinding/src/test/java/org/apache/tuscany/sca/databinding/xml/Node2StringTestCase.java
            ('svn:executable' removed)

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java?rev=616286&r1=616285&r2=616286&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java Tue Jan 29 04:38:29 2008
@@ -1,41 +1,41 @@
-/*
- * 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.sca.implementation.bpel;
-
-/**
- * A factory for the BPEL implementation model.
- * 
- * @version $Rev$ $Date$
- */
-public interface BPELFactory {
-    
-    /**
-     * Creates a new BPEL implementation.
-     * 
-     * @return
-     */
-    BPELImplementation createBPELImplementation();
-
-    /**
-     * Creates a new BPEL Process Definition
-     * @return
-     */
-    BPELProcessDefinition createBPELProcessDefinition();
-}
+/*
+ * 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.sca.implementation.bpel;
+
+/**
+ * A factory for the BPEL implementation model.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface BPELFactory {
+    
+    /**
+     * Creates a new BPEL implementation.
+     * 
+     * @return
+     */
+    BPELImplementation createBPELImplementation();
+
+    /**
+     * Creates a new BPEL Process Definition
+     * @return
+     */
+    BPELProcessDefinition createBPELProcessDefinition();
+}

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java?rev=616286&r1=616285&r2=616286&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java Tue Jan 29 04:38:29 2008
@@ -1,54 +1,54 @@
-/*
- * 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.sca.implementation.bpel;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.assembly.Implementation;
-
-/**
- * The model representing the BPEL implementation in an SCA assembly model.
- * 
- * @version $Rev$ $Date$
- */
-public interface BPELImplementation extends Implementation {
-
-    /**
-     * Get the BPEL process Name
-     */
-    QName getProcess();
-    
-    /**
-     * Set the BPEL process Name
-     * @param processName process QName
-     */
-    void setProcess(QName processName);
-    
-    /**
-     * Get the BPEL process definition
-     * @return
-     */
-    BPELProcessDefinition getProcessDefinition();
-    
-    /**
-     * Set the BPEL process definition
-     * @param processDefinition
-     */
-    void setProcessDefinition(BPELProcessDefinition processDefinition);
-}
+/*
+ * 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.sca.implementation.bpel;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.Implementation;
+
+/**
+ * The model representing the BPEL implementation in an SCA assembly model.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface BPELImplementation extends Implementation {
+
+    /**
+     * Get the BPEL process Name
+     */
+    QName getProcess();
+    
+    /**
+     * Set the BPEL process Name
+     * @param processName process QName
+     */
+    void setProcess(QName processName);
+    
+    /**
+     * Get the BPEL process definition
+     * @return
+     */
+    BPELProcessDefinition getProcessDefinition();
+    
+    /**
+     * Set the BPEL process definition
+     * @param processDefinition
+     */
+    void setProcessDefinition(BPELProcessDefinition processDefinition);
+}

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java?rev=616286&r1=616285&r2=616286&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java Tue Jan 29 04:38:29 2008
@@ -1,53 +1,53 @@
-/*
- * 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.sca.implementation.bpel;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.implementation.bpel.impl.BPELImplementationImpl;
-import org.apache.tuscany.sca.implementation.bpel.impl.BPELProcessDefinitionImpl;
-import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
-
-/**
- * A default factory for the BPEL implementation model.
- * 
- * @version $Rev$ $Date$
- */
-public class DefaultBPELFactory implements BPELFactory {
-    
-    private AssemblyFactory assemblyFactory;
-    private WSDLFactory wsdlFactory;
-    
-    public DefaultBPELFactory(ModelFactoryExtensionPoint modelFactories) {
-        this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
-        this.wsdlFactory  = modelFactories.getFactory(WSDLFactory.class);
-    }
-
-    public BPELImplementation createBPELImplementation() {
-        return new BPELImplementationImpl(assemblyFactory, wsdlFactory);
-    }
-
-    public BPELProcessDefinition createBPELProcessDefinition() {
-        return new BPELProcessDefinitionImpl();
-    }
-    
-    
-
-}
+/*
+ * 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.sca.implementation.bpel;
+
+import org.apache.tuscany.sca.assembly.AssemblyFactory;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.implementation.bpel.impl.BPELImplementationImpl;
+import org.apache.tuscany.sca.implementation.bpel.impl.BPELProcessDefinitionImpl;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+
+/**
+ * A default factory for the BPEL implementation model.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class DefaultBPELFactory implements BPELFactory {
+    
+    private AssemblyFactory assemblyFactory;
+    private WSDLFactory wsdlFactory;
+    
+    public DefaultBPELFactory(ModelFactoryExtensionPoint modelFactories) {
+        this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
+        this.wsdlFactory  = modelFactories.getFactory(WSDLFactory.class);
+    }
+
+    public BPELImplementation createBPELImplementation() {
+        return new BPELImplementationImpl(assemblyFactory, wsdlFactory);
+    }
+
+    public BPELProcessDefinition createBPELProcessDefinition() {
+        return new BPELProcessDefinitionImpl();
+    }
+    
+    
+
+}

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/DefaultBPELFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java?rev=616286&r1=616285&r2=616286&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java Tue Jan 29 04:38:29 2008
@@ -1,133 +1,133 @@
-/*
- * 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.sca.implementation.bpel.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.implementation.bpel.BPELFactory;
-import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
-
-/**
- * BPEL document processor responsible for reading a BPEL file and producing necessary model info about it
- * 
- * @version $Rev$ $Date$
- */
-public class BPELDocumentProcessor extends BaseStAXArtifactProcessor implements URLArtifactProcessor<BPELProcessDefinition> {
-    public final static QName BPEL_PROCESS_DEFINITION = new QName("http://schemas.xmlsoap.org/ws/2004/03/business-process/", "process");
-    public final static QName BPEL_EXECUTABLE_DEFINITION = new QName("http://docs.oasis-open.org/wsbpel/2.0/process/executable", "process");
-    public final static String NAME_ELEMENT = "name";
-    
-    private final static XMLInputFactory inputFactory = XMLInputFactory.newInstance();
-    
-    private final BPELFactory factory;
-    
-    public BPELDocumentProcessor(ModelFactoryExtensionPoint modelFactories) {
-        this.factory = modelFactories.getFactory(BPELFactory.class);
-    }
-    
-    public String getArtifactType() {
-        return "*.bpel";
-    }    
-
-    public Class<BPELProcessDefinition> getModelType() {
-        return BPELProcessDefinition.class;
-    }
-
-    public BPELProcessDefinition read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException {
-        BPELProcessDefinition processDefinition = null;
-        try {
-            //for now we are just using process name
-            //and relying on componentType file for service definition
-            //so it's ok to set resolved for now
-            processDefinition = indexRead(artifactURL);
-            processDefinition.setURI(artifactURI);
-            processDefinition.setUnresolved(false);
-        } catch (Exception e) {
-            throw new ContributionReadException(e);
-        }
-        
-        return processDefinition;
-    }
-
-
-    public void resolve(BPELProcessDefinition model, ModelResolver resolver) throws ContributionResolveException {
-        
-    }
-    
-    /**
-     * Read the namespace for the WSDL definition and inline schemas
-     * 
-     * @param doc
-     * @return
-     * @throws IOException
-     * @throws XMLStreamException
-     */
-    protected BPELProcessDefinition indexRead(URL doc) throws Exception {
-        BPELProcessDefinition processDefinition = factory.createBPELProcessDefinition();
-        processDefinition.setUnresolved(true);
-        processDefinition.setLocation(doc);
-
-        InputStream is = doc.openStream();
-        XMLStreamReader reader = null;
-        try {
-            reader = inputFactory.createXMLStreamReader(is);
-            int eventType = reader.getEventType();
-            while (true) {
-                if (eventType == XMLStreamConstants.START_ELEMENT) {
-                    QName elementName = reader.getName();
-                    if (BPEL_PROCESS_DEFINITION.equals(elementName) || BPEL_EXECUTABLE_DEFINITION.equals(elementName) ) {
-                        QName processName = new QName(getString(reader, org.apache.tuscany.sca.assembly.xml.Constants.TARGET_NAMESPACE), getString(reader, NAME_ELEMENT));
-                        processDefinition.setName(processName);
-                        break;
-                    }
-                }
-                if (reader.hasNext()) {
-                    eventType = reader.next();
-                } else {
-                    break;
-                }
-            }
-        } finally {
-            if(reader != null) {
-                reader.close();
-            }
-            is.close();
-        }
-        
-        return processDefinition;
-    }
-    
-
-}
+/*
+ * 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.sca.implementation.bpel.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.contribution.service.ContributionReadException;
+import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.implementation.bpel.BPELFactory;
+import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
+
+/**
+ * BPEL document processor responsible for reading a BPEL file and producing necessary model info about it
+ * 
+ * @version $Rev$ $Date$
+ */
+public class BPELDocumentProcessor extends BaseStAXArtifactProcessor implements URLArtifactProcessor<BPELProcessDefinition> {
+    public final static QName BPEL_PROCESS_DEFINITION = new QName("http://schemas.xmlsoap.org/ws/2004/03/business-process/", "process");
+    public final static QName BPEL_EXECUTABLE_DEFINITION = new QName("http://docs.oasis-open.org/wsbpel/2.0/process/executable", "process");
+    public final static String NAME_ELEMENT = "name";
+    
+    private final static XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+    
+    private final BPELFactory factory;
+    
+    public BPELDocumentProcessor(ModelFactoryExtensionPoint modelFactories) {
+        this.factory = modelFactories.getFactory(BPELFactory.class);
+    }
+    
+    public String getArtifactType() {
+        return "*.bpel";
+    }    
+
+    public Class<BPELProcessDefinition> getModelType() {
+        return BPELProcessDefinition.class;
+    }
+
+    public BPELProcessDefinition read(URL contributionURL, URI artifactURI, URL artifactURL) throws ContributionReadException {
+        BPELProcessDefinition processDefinition = null;
+        try {
+            //for now we are just using process name
+            //and relying on componentType file for service definition
+            //so it's ok to set resolved for now
+            processDefinition = indexRead(artifactURL);
+            processDefinition.setURI(artifactURI);
+            processDefinition.setUnresolved(false);
+        } catch (Exception e) {
+            throw new ContributionReadException(e);
+        }
+        
+        return processDefinition;
+    }
+
+
+    public void resolve(BPELProcessDefinition model, ModelResolver resolver) throws ContributionResolveException {
+        
+    }
+    
+    /**
+     * Read the namespace for the WSDL definition and inline schemas
+     * 
+     * @param doc
+     * @return
+     * @throws IOException
+     * @throws XMLStreamException
+     */
+    protected BPELProcessDefinition indexRead(URL doc) throws Exception {
+        BPELProcessDefinition processDefinition = factory.createBPELProcessDefinition();
+        processDefinition.setUnresolved(true);
+        processDefinition.setLocation(doc);
+
+        InputStream is = doc.openStream();
+        XMLStreamReader reader = null;
+        try {
+            reader = inputFactory.createXMLStreamReader(is);
+            int eventType = reader.getEventType();
+            while (true) {
+                if (eventType == XMLStreamConstants.START_ELEMENT) {
+                    QName elementName = reader.getName();
+                    if (BPEL_PROCESS_DEFINITION.equals(elementName) || BPEL_EXECUTABLE_DEFINITION.equals(elementName) ) {
+                        QName processName = new QName(getString(reader, org.apache.tuscany.sca.assembly.xml.Constants.TARGET_NAMESPACE), getString(reader, NAME_ELEMENT));
+                        processDefinition.setName(processName);
+                        break;
+                    }
+                }
+                if (reader.hasNext()) {
+                    eventType = reader.next();
+                } else {
+                    break;
+                }
+            }
+        } finally {
+            if(reader != null) {
+                reader.close();
+            }
+            is.close();
+        }
+        
+        return processDefinition;
+    }
+    
+
+}

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELDocumentProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java?rev=616286&r1=616285&r2=616286&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java Tue Jan 29 04:38:29 2008
@@ -1,110 +1,110 @@
-/*
- * 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.sca.implementation.bpel.impl;
-
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.assembly.Property;
-import org.apache.tuscany.sca.assembly.impl.ComponentTypeImpl;
-import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
-import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
-import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
-
-/**
- * The model representing a BPEL implementation in an SCA assembly model.
- * 
- * @version $Rev$ $Date$
- */
-public class BPELImplementationImpl extends ComponentTypeImpl implements BPELImplementation {
-
-    private QName _processName;
-    private BPELProcessDefinition _processDefinition;
-
-    /**
-     * Constructs a new BPEL implementation.
-     */
-    public BPELImplementationImpl(AssemblyFactory assemblyFactory,
-                              WSDLFactory wsdlFactory) {
-
-    }
-
-    public QName getProcess() {
-        return _processName;
-    }
-    
-    public void setProcess(QName processName) {
-        _processName = processName;
-    }
-
-    public BPELProcessDefinition getProcessDefinition() {
-        return this._processDefinition;
-    }
-
-    public void setProcessDefinition(BPELProcessDefinition processDefinition) {
-        this._processDefinition = processDefinition;
-    }
-
-    @Override
-    public String getURI() {
-        // The sample BPEL implementation does not have a URI
-        return null;
-    }
-
-    @Override
-    public void setURI(String uri) {
-        // The sample BPEL implementation does not have a URI
-    }
-
-    @Override
-    public ConstrainingType getConstrainingType() {
-        // The sample BPEL implementation does not support constrainingTypes
-        return null;
-    }
-
-    @Override
-    public List<Property> getProperties() {
-        // The sample BPEL implementation does not support properties
-        return Collections.emptyList();
-    }
-    
-    @Override
-    public int hashCode() {
-        return String.valueOf(this.getProcess()).hashCode();
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj == this) {
-            return true;
-        } else if (obj instanceof BPELImplementation) {
-            if (getProcess() != null) {
-                return getProcess().equals(((BPELImplementation)obj).getProcess());
-            } else {
-                return ((BPELImplementation)obj).getProcess() == null;
-            }
-        } else {
-            return false;
-        }
-    }
-}
+/*
+ * 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.sca.implementation.bpel.impl;
+
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.AssemblyFactory;
+import org.apache.tuscany.sca.assembly.ConstrainingType;
+import org.apache.tuscany.sca.assembly.Property;
+import org.apache.tuscany.sca.assembly.impl.ComponentTypeImpl;
+import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
+import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
+import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
+
+/**
+ * The model representing a BPEL implementation in an SCA assembly model.
+ * 
+ * @version $Rev$ $Date$
+ */
+public class BPELImplementationImpl extends ComponentTypeImpl implements BPELImplementation {
+
+    private QName _processName;
+    private BPELProcessDefinition _processDefinition;
+
+    /**
+     * Constructs a new BPEL implementation.
+     */
+    public BPELImplementationImpl(AssemblyFactory assemblyFactory,
+                              WSDLFactory wsdlFactory) {
+
+    }
+
+    public QName getProcess() {
+        return _processName;
+    }
+    
+    public void setProcess(QName processName) {
+        _processName = processName;
+    }
+
+    public BPELProcessDefinition getProcessDefinition() {
+        return this._processDefinition;
+    }
+
+    public void setProcessDefinition(BPELProcessDefinition processDefinition) {
+        this._processDefinition = processDefinition;
+    }
+
+    @Override
+    public String getURI() {
+        // The sample BPEL implementation does not have a URI
+        return null;
+    }
+
+    @Override
+    public void setURI(String uri) {
+        // The sample BPEL implementation does not have a URI
+    }
+
+    @Override
+    public ConstrainingType getConstrainingType() {
+        // The sample BPEL implementation does not support constrainingTypes
+        return null;
+    }
+
+    @Override
+    public List<Property> getProperties() {
+        // The sample BPEL implementation does not support properties
+        return Collections.emptyList();
+    }
+    
+    @Override
+    public int hashCode() {
+        return String.valueOf(this.getProcess()).hashCode();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == this) {
+            return true;
+        } else if (obj instanceof BPELImplementation) {
+            if (getProcess() != null) {
+                return getProcess().equals(((BPELImplementation)obj).getProcess());
+            } else {
+                return ((BPELImplementation)obj).getProcess() == null;
+            }
+        } else {
+            return false;
+        }
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java?rev=616286&r1=616285&r2=616286&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java Tue Jan 29 04:38:29 2008
@@ -1,207 +1,207 @@
-/*
- * 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.sca.implementation.bpel.impl;
-
-import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-
-import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.ComponentType;
-import org.apache.tuscany.sca.assembly.Property;
-import org.apache.tuscany.sca.assembly.Reference;
-import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
-import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionReadException;
-import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
-import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
-import org.apache.tuscany.sca.databinding.xml.DOMDataBinding;
-import org.apache.tuscany.sca.implementation.bpel.BPELFactory;
-import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
-import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
-import org.apache.tuscany.sca.implementation.bpel.DefaultBPELFactory;
-
-/**
- * Implements a STAX artifact processor for BPEL implementations.
- * 
- * The artifact processor is responsible for processing <implementation.bpel>
- * elements in SCA assembly XML composite files and populating the BPEL
- * implementation model, resolving its references to other artifacts in the SCA
- * contribution, and optionally write the model back to SCA assembly XML.
- * 
- *  @version $Rev$ $Date$
- */
-public class BPELImplementationProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<BPELImplementation> {
-    private static final QName IMPLEMENTATION_BPEL = new QName(Constants.SCA10_NS, "implementation.bpel");
-    
-    private AssemblyFactory assemblyFactory;
-    private BPELFactory bpelFactory;
-    
-    public BPELImplementationProcessor(ModelFactoryExtensionPoint modelFactories) {
-        this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
-        this.bpelFactory = new DefaultBPELFactory(modelFactories);
-    }
-
-    public QName getArtifactType() {
-        // Returns the qname of the XML element processed by this processor
-        return IMPLEMENTATION_BPEL;
-    }
-
-    public Class<BPELImplementation> getModelType() {
-        // Returns the type of model processed by this processor
-        return BPELImplementation.class;
-    }
-
-    public BPELImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
-        assert IMPLEMENTATION_BPEL.equals(reader.getName());
-        
-        // Read an <implementation.bpel> element
-
-        // Read the process attribute. 
-        QName process = getAttributeValueNS(reader, "process");
-
-
-        // Create an initialize the BPEL implementation model
-        BPELImplementation implementation = bpelFactory.createBPELImplementation();
-        implementation.setProcess(process);
-        implementation.setUnresolved(true);
-        
-        // Skip to end element
-        while (reader.hasNext()) {
-            if (reader.next() == END_ELEMENT && IMPLEMENTATION_BPEL.equals(reader.getName())) {
-                break;
-            }
-        }
-        
-        return implementation;
-    }
-
-    public void resolve(BPELImplementation impl, ModelResolver resolver) throws ContributionResolveException {
-        if( impl != null && impl.isUnresolved()) {
-            BPELProcessDefinition processDefinition = resolveBPELProcessDefinition(impl, resolver);
-            if(processDefinition.isUnresolved()) {
-                throw new ContributionResolveException("Can't find BPEL Process : " + processDefinition.getName());
-            }
-            
-            impl.setProcessDefinition(processDefinition);
-            
-            //resolve component type
-            mergeComponentType(resolver, impl);
-                        
-            //set current implementation resolved 
-            impl.setUnresolved(false);
-        }
-        
-    }
-
-    public void write(BPELImplementation model, XMLStreamWriter outputSource) throws ContributionWriteException {
-        //FIXME Implement
-    }
-
-    private BPELProcessDefinition resolveBPELProcessDefinition(BPELImplementation impl, ModelResolver resolver) throws ContributionResolveException {
-        QName processName = impl.getProcess();
-        BPELProcessDefinition processDefinition = this.bpelFactory.createBPELProcessDefinition();
-        processDefinition.setName(processName);
-        processDefinition.setUnresolved(true);
-        
-        return resolver.resolveModel(BPELProcessDefinition.class, processDefinition);
-    }
-    
-    
-    /**
-     * Merge the componentType from introspection and external file
-     * @param resolver
-     * @param impl
-     */
-    private void mergeComponentType(ModelResolver resolver, BPELImplementation impl) {
-        // FIXME: Need to clarify how to merge
-        ComponentType componentType = getComponentType(resolver, impl);
-        if (componentType != null && !componentType.isUnresolved()) {
-            
-            Map<String, Reference> refMap = new HashMap<String, Reference>();
-            for (Reference ref : impl.getReferences()) {
-                refMap.put(ref.getName(), ref);
-            }
-            for (Reference reference : componentType.getReferences()) {
-                refMap.put(reference.getName(), reference);
-            }
-            impl.getReferences().clear();
-            impl.getReferences().addAll(refMap.values());
-
-            Map<String, Service> serviceMap = new HashMap<String, Service>();
-            for (Service svc : impl.getServices()) {
-                if(svc != null) {
-                    serviceMap.put(svc.getName(), svc);    
-                }
-            }
-            for (Service service : componentType.getServices()) {
-                //set default dataBinding to DOM
-                service.getInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);
-                
-                serviceMap.put(service.getName(), service);
-            }
-            impl.getServices().clear();
-            impl.getServices().addAll(serviceMap.values());
-
-            Map<String, Property> propMap = new HashMap<String, Property>();
-            for (Property prop : impl.getProperties()) {
-                propMap.put(prop.getName(), prop);
-            }
-        }
-    }
-
-
-    private ComponentType getComponentType(ModelResolver resolver, BPELImplementation impl) {
-        String bpelProcessURI = impl.getProcessDefinition().getURI().toString();
-        String componentTypeURI = bpelProcessURI.replace(".bpel", ".componentType");
-        ComponentType componentType = assemblyFactory.createComponentType();
-        componentType.setUnresolved(true);
-        componentType.setURI(componentTypeURI);
-        componentType = resolver.resolveModel(ComponentType.class, componentType);
-        if (!componentType.isUnresolved()) {
-            return componentType;
-        }
-        return null;
-    }
-
-    private QName getAttributeValueNS(XMLStreamReader reader, String attribute) {
-        String fullValue = reader.getAttributeValue(null, "process");
-        if (fullValue.indexOf(":") < 0)
-            throw new ODEProcessException("Attribute " + attribute + " with value " + fullValue +
-                    " in your composite should be prefixed (process=\"prefix:name\").");
-        String prefix = fullValue.substring(0, fullValue.indexOf(":"));
-        String name = fullValue.substring(fullValue.indexOf(":") + 1);
-        String nsUri = reader.getNamespaceContext().getNamespaceURI(prefix);
-        if (nsUri == null)
-            throw new ODEProcessException("Attribute " + attribute + " with value " + fullValue +
-                    " in your composite has un unrecognized namespace prefix.");
-        return new QName(nsUri, name, prefix);
-    }
-
-}
+/*
+ * 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.sca.implementation.bpel.impl;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.tuscany.sca.assembly.AssemblyFactory;
+import org.apache.tuscany.sca.assembly.ComponentType;
+import org.apache.tuscany.sca.assembly.Property;
+import org.apache.tuscany.sca.assembly.Reference;
+import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.assembly.xml.Constants;
+import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.contribution.service.ContributionReadException;
+import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.databinding.xml.DOMDataBinding;
+import org.apache.tuscany.sca.implementation.bpel.BPELFactory;
+import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
+import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
+import org.apache.tuscany.sca.implementation.bpel.DefaultBPELFactory;
+
+/**
+ * Implements a STAX artifact processor for BPEL implementations.
+ * 
+ * The artifact processor is responsible for processing <implementation.bpel>
+ * elements in SCA assembly XML composite files and populating the BPEL
+ * implementation model, resolving its references to other artifacts in the SCA
+ * contribution, and optionally write the model back to SCA assembly XML.
+ * 
+ *  @version $Rev$ $Date$
+ */
+public class BPELImplementationProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<BPELImplementation> {
+    private static final QName IMPLEMENTATION_BPEL = new QName(Constants.SCA10_NS, "implementation.bpel");
+    
+    private AssemblyFactory assemblyFactory;
+    private BPELFactory bpelFactory;
+    
+    public BPELImplementationProcessor(ModelFactoryExtensionPoint modelFactories) {
+        this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
+        this.bpelFactory = new DefaultBPELFactory(modelFactories);
+    }
+
+    public QName getArtifactType() {
+        // Returns the qname of the XML element processed by this processor
+        return IMPLEMENTATION_BPEL;
+    }
+
+    public Class<BPELImplementation> getModelType() {
+        // Returns the type of model processed by this processor
+        return BPELImplementation.class;
+    }
+
+    public BPELImplementation read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
+        assert IMPLEMENTATION_BPEL.equals(reader.getName());
+        
+        // Read an <implementation.bpel> element
+
+        // Read the process attribute. 
+        QName process = getAttributeValueNS(reader, "process");
+
+
+        // Create an initialize the BPEL implementation model
+        BPELImplementation implementation = bpelFactory.createBPELImplementation();
+        implementation.setProcess(process);
+        implementation.setUnresolved(true);
+        
+        // Skip to end element
+        while (reader.hasNext()) {
+            if (reader.next() == END_ELEMENT && IMPLEMENTATION_BPEL.equals(reader.getName())) {
+                break;
+            }
+        }
+        
+        return implementation;
+    }
+
+    public void resolve(BPELImplementation impl, ModelResolver resolver) throws ContributionResolveException {
+        if( impl != null && impl.isUnresolved()) {
+            BPELProcessDefinition processDefinition = resolveBPELProcessDefinition(impl, resolver);
+            if(processDefinition.isUnresolved()) {
+                throw new ContributionResolveException("Can't find BPEL Process : " + processDefinition.getName());
+            }
+            
+            impl.setProcessDefinition(processDefinition);
+            
+            //resolve component type
+            mergeComponentType(resolver, impl);
+                        
+            //set current implementation resolved 
+            impl.setUnresolved(false);
+        }
+        
+    }
+
+    public void write(BPELImplementation model, XMLStreamWriter outputSource) throws ContributionWriteException {
+        //FIXME Implement
+    }
+
+    private BPELProcessDefinition resolveBPELProcessDefinition(BPELImplementation impl, ModelResolver resolver) throws ContributionResolveException {
+        QName processName = impl.getProcess();
+        BPELProcessDefinition processDefinition = this.bpelFactory.createBPELProcessDefinition();
+        processDefinition.setName(processName);
+        processDefinition.setUnresolved(true);
+        
+        return resolver.resolveModel(BPELProcessDefinition.class, processDefinition);
+    }
+    
+    
+    /**
+     * Merge the componentType from introspection and external file
+     * @param resolver
+     * @param impl
+     */
+    private void mergeComponentType(ModelResolver resolver, BPELImplementation impl) {
+        // FIXME: Need to clarify how to merge
+        ComponentType componentType = getComponentType(resolver, impl);
+        if (componentType != null && !componentType.isUnresolved()) {
+            
+            Map<String, Reference> refMap = new HashMap<String, Reference>();
+            for (Reference ref : impl.getReferences()) {
+                refMap.put(ref.getName(), ref);
+            }
+            for (Reference reference : componentType.getReferences()) {
+                refMap.put(reference.getName(), reference);
+            }
+            impl.getReferences().clear();
+            impl.getReferences().addAll(refMap.values());
+
+            Map<String, Service> serviceMap = new HashMap<String, Service>();
+            for (Service svc : impl.getServices()) {
+                if(svc != null) {
+                    serviceMap.put(svc.getName(), svc);    
+                }
+            }
+            for (Service service : componentType.getServices()) {
+                //set default dataBinding to DOM
+                service.getInterfaceContract().getInterface().resetDataBinding(DOMDataBinding.NAME);
+                
+                serviceMap.put(service.getName(), service);
+            }
+            impl.getServices().clear();
+            impl.getServices().addAll(serviceMap.values());
+
+            Map<String, Property> propMap = new HashMap<String, Property>();
+            for (Property prop : impl.getProperties()) {
+                propMap.put(prop.getName(), prop);
+            }
+        }
+    }
+
+
+    private ComponentType getComponentType(ModelResolver resolver, BPELImplementation impl) {
+        String bpelProcessURI = impl.getProcessDefinition().getURI().toString();
+        String componentTypeURI = bpelProcessURI.replace(".bpel", ".componentType");
+        ComponentType componentType = assemblyFactory.createComponentType();
+        componentType.setUnresolved(true);
+        componentType.setURI(componentTypeURI);
+        componentType = resolver.resolveModel(ComponentType.class, componentType);
+        if (!componentType.isUnresolved()) {
+            return componentType;
+        }
+        return null;
+    }
+
+    private QName getAttributeValueNS(XMLStreamReader reader, String attribute) {
+        String fullValue = reader.getAttributeValue(null, "process");
+        if (fullValue.indexOf(":") < 0)
+            throw new ODEProcessException("Attribute " + attribute + " with value " + fullValue +
+                    " in your composite should be prefixed (process=\"prefix:name\").");
+        String prefix = fullValue.substring(0, fullValue.indexOf(":"));
+        String name = fullValue.substring(fullValue.indexOf(":") + 1);
+        String nsUri = reader.getNamespaceContext().getNamespaceURI(prefix);
+        if (nsUri == null)
+            throw new ODEProcessException("Attribute " + attribute + " with value " + fullValue +
+                    " in your composite has un unrecognized namespace prefix.");
+        return new QName(nsUri, name, prefix);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELImplementationProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java?rev=616286&r1=616285&r2=616286&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java Tue Jan 29 04:38:29 2008
@@ -1,42 +1,42 @@
-/*
- * 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.sca.implementation.bpel.impl;
-
-/**
- * Thrown when a process can't be compiled properly or when its descriptors
- * are invalid.
- * 
- * @version $Rev$ $Date$ 
- */
-public class ODEProcessException extends RuntimeException {
-    private static final long serialVersionUID = 1047893235216756186L;
-
-    public ODEProcessException(String message) {
-        super(message);
-    }
-
-    public ODEProcessException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    public ODEProcessException(Throwable cause) {
-        super(cause);
-    }
-}
+/*
+ * 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.sca.implementation.bpel.impl;
+
+/**
+ * Thrown when a process can't be compiled properly or when its descriptors
+ * are invalid.
+ * 
+ * @version $Rev$ $Date$ 
+ */
+public class ODEProcessException extends RuntimeException {
+    private static final long serialVersionUID = 1047893235216756186L;
+
+    public ODEProcessException(String message) {
+        super(message);
+    }
+
+    public ODEProcessException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public ODEProcessException(Throwable cause) {
+        super(cause);
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/ODEProcessException.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message