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 2006/08/08 23:47:11 UTC

svn commit: r429833 [5/5] - in /incubator/tuscany/cpp/sca: ./ doc/ projects/tuscany_sca/ projects/tuscany_sca/tuscany_sca/ projects/tuscany_sca/tuscany_sca_test/ projects/tuscany_sca/tuscany_sca_test/testSCASystem/composites/ projects/tuscany_sca/tusca...

Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/MyValueServiceModuleTwoClasses/CustomerInfo.fragment
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/MyValueServiceModuleTwoClasses/CustomerInfo.fragment?rev=429833&r1=429532&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/MyValueServiceModuleTwoClasses/CustomerInfo.fragment (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/MyValueServiceModuleTwoClasses/CustomerInfo.fragment Tue Aug  8 14:47:01 2006
@@ -17,7 +17,7 @@
  *  limitations under the License.
  */        
  -->
-<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9" 
+<compositeFragment xmlns="http://www.osoa.org/xmlns/sca/0.9" 
    xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9" 
    xmlns:mvs="http://www.myvalue.org/MyValueService/"
    name="CustomerInfoComponent">
@@ -34,5 +34,5 @@
       </references>
    </component>
 
-</moduleFragment>
+</compositeFragment>
    

Added: incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/MyValueServiceModuleTwoClasses/sca.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/MyValueServiceModuleTwoClasses/sca.composite?rev=429833&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/MyValueServiceModuleTwoClasses/sca.composite (added)
+++ incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/MyValueServiceModuleTwoClasses/sca.composite Tue Aug  8 14:47:01 2006
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+/*
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */        
+ -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/0.9" 
+   xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9" 
+   xmlns:mvs="http://www.myvalue.org/MyValueService/"
+   name="MyValueServiceComposite">
+
+   <!-- Expose as a web service -->
+   <entryPoint name="MyValueServiceExport" multiplicity="1..1">
+      <interface.wsdl interface="" callbackInterface=""></interface.wsdl>
+      <binding.ws port="mvs:MyValueServiceSOAP"></binding.ws>
+      <reference>MyValueServiceComponent</reference>
+   </entryPoint>
+
+   <component name="MyValueServiceComponent">
+      <implementation.cpp dll="MyValue" header="MyValueImpl.hpp"></implementation.cpp>
+      <properties>
+      </properties>
+      <references>
+         <customerInfo>CustomerInfoComponent</customerInfo>
+         <stockQuote>StockQuoteService</stockQuote>
+      </references>
+   </component>
+   
+   <!--
+   <component name="Calculator">
+      <implementation.cpp dll="debug/Calculator.dll" header="CalculatorImpl.h"/>
+   </component>
+   -->
+
+   <externalService name="StockQuoteService">
+      <interface.cpp header="StockQuoteService.h"/>
+      <binding.ws port="http://swanandmokashi.com#wsdl.endpoint(StockQuotes/StockQuotesSoap)"/>
+   </externalService>
+
+   <!--wire>
+      <source.uri>MyValueServiceComponent/customerInfo</source.uri>
+      <target.uri>CustomerInfoComponent</target.uri>
+   </wire-->
+
+</composite>
+   
\ No newline at end of file

Modified: incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.fragment
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.fragment?rev=429833&r1=429532&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.fragment (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/junit/testinput/composites/SimplePublicPrivateProtectedTest/CustomerInfo.fragment Tue Aug  8 14:47:01 2006
@@ -17,7 +17,7 @@
  *  limitations under the License.
  */        
  -->
-<moduleFragment xmlns="http://www.osoa.org/xmlns/sca/0.9" 
+<compositeFragment xmlns="http://www.osoa.org/xmlns/sca/0.9" 
    xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9" 
    xmlns:mvs="http://www.myvalue.org/MyValueService/"
    name="CustomerInfoComponent">
@@ -35,5 +35,5 @@
       </references>
    </component>
 
-</moduleFragment>
+</compositeFragment>
    

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/common/Utils.java Tue Aug  8 14:47:01 2006
@@ -363,19 +363,19 @@
     *            The user message
     * @param eventType
     *            The type of event (input or output). This is used to determine
-    *            if the path name of the file starts with the MODULE_ROOT
+    *            if the path name of the file starts with the COMPOSITE_ROOT
     *            directory or the given output directory as the one of these
     *            prefixes is removed from the path name in order to give the
-    *            new (destination) path relative to the new module root
+    *            new (destination) path relative to the new composite root
     * 
     *  
     */
 
-   static String scagenInputDir = "MODULE_ROOT";
+   static String scagenInputDir = "COMPOSITE_ROOT";
 
    static String scagenOutputDir = "SCAGEN_OUTPUT";
 
-   static String newModuleRoot = "NEW_MODULE_ROOT";
+   static String newCompositeRoot = "NEW_COMPOSITE_ROOT";
 
    static String generatedDirName = "$sourceDir1";
 
@@ -386,23 +386,23 @@
            // Changing the value of the variable below will alter the output of
            // the
            // deploy assist strings:
-           //    true will result in a "copy source NEW_MODULE_ROOT\dest" output
+           //    true will result in a "copy source NEW_COMPOSITE_ROOT\dest" output
            // and
            //    false will result in a "inputDir c:\fred"
            //                           "outputDir c:\bob"
-           //                           "input c:\fred\sca.module"
+           //                           "input c:\fred\sca.composite"
            //                           "output c:\bob\proxy.h" type output
            String command = null;
 
            try {
-               newModuleRoot = (String) Options.getOption("-deploy");
+               newCompositeRoot = (String) Options.getOption("-deploy");
                command = (String) Options.getOption("-command");
            } catch (Exception e) {
                // let it default
            }
 
-           if (null == newModuleRoot) {
-               newModuleRoot = "DEPLOY_MODULE_ROOT";
+           if (null == newCompositeRoot) {
+               newCompositeRoot = "DEPLOY_COMPOSITE_ROOT";
            }
 
            if (null == command) {
@@ -418,7 +418,7 @@
                        tail = message.substring(scagenInputDir.length());
                    }
 
-                   String dest = joinPathElements(newModuleRoot, tail);
+                   String dest = joinPathElements(newCompositeRoot, tail);
 
                     System.out.println(command + " " + platformSlashes(message)
                             + " " + platformSlashes(dest));
@@ -429,7 +429,7 @@
                        tail = message.substring(scagenOutputDir.length());
                    }
 
-                   dest = joinPathElements(newModuleRoot, tail);
+                   dest = joinPathElements(newCompositeRoot, tail);
                     System.out.println(command + " " + platformSlashes(message)
                             + " " + platformSlashes(dest));
                    break;
@@ -499,7 +499,7 @@
    public static String joinPathElements(String root, String tail) {
        String separator;
        // Stick in a "/" (File.separator) if required.
-       if ((tail.substring(0, 1).equals("/") || newModuleRoot.substring(
+       if ((tail.substring(0, 1).equals("/") || newCompositeRoot.substring(
                root.length() - 1, root.length()).equals("/"))
                || (tail.substring(0, 1).equals("\\") || root.substring(
                        root.length() - 1, root.length()).equals("\\"))
@@ -509,7 +509,7 @@
        } else {
            separator = File.separator;
        }
-       String dest = newModuleRoot + separator + tail;
+       String dest = newCompositeRoot + separator + tail;
        return dest;
    }
 

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentDomNodeHandler.java Tue Aug  8 14:47:01 2006
@@ -30,7 +30,7 @@
 
 /**
  * This class will do the required processing for the <component>element of a
- * sca module or fragment file.
+ * sca composite file.
  */
 public class ComponentDomNodeHandler extends GenericDomNodeHandler {
 
@@ -84,15 +84,15 @@
         String implClass = (String) parameters.get(contextXPath
                 + "/implementation.cpp/@class");
 
-        File moduleOrFragmentFile = (File) parameters
-                .get("moduleOrFragmentFile");
+        File compositeOrFragmentFile = (File) parameters
+                .get("compositeOrFragmentFile");
         File implHeaderFile = null;
-        if (null != moduleOrFragmentFile) {
-            File dir = moduleOrFragmentFile.getParentFile();
+        if (null != compositeOrFragmentFile) {
+            File dir = compositeOrFragmentFile.getParentFile();
             implHeaderFile = new File(dir, implHeader);
         } else {
             throw new InternalError(
-                    "Internal error: sca.module or fragment file not present in interal parameters");
+                    "Internal error: sca.composite or fragment file not present in interal parameters");
         }
 
         try {
@@ -127,12 +127,12 @@
             }
         } catch (Exception e) {
             String compName = (String) parameters
-                    .get("/moduleFragment/component/@name");
+                    .get("/compositeFragment/component/@name");
             Utils
                     .screenMessage("Problem interpreting header or class attributes in "
                             + compName
                             + " component, in "
-                            + moduleOrFragmentFile.getPath() + " file");
+                            + compositeOrFragmentFile.getPath() + " file");
             System.exit(-2);
         }
 
@@ -357,4 +357,4 @@
         return methods;
     }
 
-}
\ No newline at end of file
+}

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ComponentTypeFileHandler.java Tue Aug  8 14:47:01 2006
@@ -67,8 +67,8 @@
      *      and kick off the processing (using the handler map that has been set
      *      up by the concrete subclass).
      * 
-     * @param moduleXML
-     *            the sca.module or fragment file
+     * @param compositeXML
+     *            the sca.composite or fragment file
      * @param target
      *            the target directory
      * @param depth
@@ -97,24 +97,24 @@
      */
     protected String getContextMessage() {
 
-        String module = ((File) parameters.get("moduleOrFragmentFile")).getPath();
-        if (null == module) {
-            module = "unknown";
+        String composite = ((File) parameters.get("compositeOrFragmentFile")).getPath();
+        if (null == composite) {
+            composite = "unknown";
         }
 
-        String component = (String) parameters.get("/module/component/@name");
+        String component = (String) parameters.get("/composite/component/@name");
         if (null == component) {
             component = (String) parameters
-                    .get("/moduleFragment/component/@name");
+                    .get("/compositeFragment/component/@name");
         }
         if (null == component) {
-            module = "unknown";
+            composite = "unknown";
         }
 
-        String msg = "when processing module " + module;
+        String msg = "when processing composite " + composite;
 
         msg = msg
-                + "\nin this module file, the component \""
+                + "\nin this composite file, the component \""
                 + component
                 + "\" has an implementation.cpp element with a header attribute \nwhere the C++ header can be found but it has no matching .componentType file present in\nthe same directory as the header.";
 

Added: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java?rev=429833&view=auto
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java (added)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java Tue Aug  8 14:47:01 2006
@@ -0,0 +1,85 @@
+/*
+ *
+ *  Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tuscany.sca.cpp.tools.services;
+
+import java.io.File;
+
+import org.apache.tuscany.sca.cpp.tools.common.FileActor;
+import org.apache.tuscany.sca.cpp.tools.common.Utils;
+
+/**
+ * The purpose of this class is purely to specialise the handler map to one with
+ * a specific ComponentDomNodeHandler.
+ */
+public class CompositeOrFragmentFileHandler extends XMLFileActor {
+
+    static {
+
+        GenericDomNodeHandler gdnh = new GenericDomNodeHandler();
+
+        /*
+         * We use a specific Component node handler in order to be able to
+         * process multiple components in the same XML file
+         */
+        ComponentDomNodeHandler componentdnh = new ComponentDomNodeHandler();
+        handlers.put("component", componentdnh);
+
+        /*
+         * We are interested inthe elements below but they only need standard
+         * processing
+         */
+        handlers.put("composite", gdnh);
+        handlers.put("compositeFragment", gdnh);
+        handlers.put("implementation.cpp", gdnh);
+    }
+
+    /**
+     * This method is the main FileActor method
+     * 
+     * @see FileActor#actOnFile(File, File, int) Here we create an initial DOM
+     *      and kick off the processing (using the handler map that has been set
+     *      up by the concrete subclass).
+     * 
+     * @param compositeXML
+     *            the sca.composite or fragment file
+     * @param target
+     *            the target directory
+     * @param depth
+     *            not uesed here but in the
+     * @see FileActor#actOnFile(File, File, int) interface to allow for
+     *      recursive diving into a directory structure.
+     */
+    public void actOnFile(File compositeXML, File target, int depth)
+            throws Exception {
+
+        if (null == compositeXML || null == target) {
+            return;
+        }
+
+        parameters.put("compositeOrFragmentFile", compositeXML);
+
+        Utils.postEvent(Utils.DEPLOYMENT_ARTEFACT_ENCOUNTERED, compositeXML
+                .getAbsolutePath());
+
+        Utils.postEvent(Utils.EVENT_TYPE_FILE_PARSED,
+                "Scagen processing SCA composite file "
+                        + compositeXML.getAbsolutePath());
+
+        super.actOnFile(compositeXML, target, depth);
+
+    }
+}
\ No newline at end of file

Propchange: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/CompositeOrFragmentFileHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/DirectoryScanner.java Tue Aug  8 14:47:01 2006
@@ -35,12 +35,12 @@
     /**
      * 
      * @param source
-     *            The module root directory
+     *            The composite root directory
      * @param target
      *            The directory that will hold the generated output
      * @param depth
      *            The depth from the initial starting point, not significant for
-     *            the Scagen tool as we are only interested in the module root
+     *            the Scagen tool as we are only interested in the composite root
      *            directory but present due to the FileActor actOnFile interface
      *            method. This code is pulled from the code in the CParsingTool
      *            class and further work is needed to remove the duplication.
@@ -78,7 +78,7 @@
                 }
             }
         } else {
-            return; // Do not act on single files for now we expect a module
+            return; // Do not act on single files for now we expect a composite
             // root directory
             // and the "main" class checks its parameters to ensure this is so.
         }

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/GenericDomNodeHandler.java Tue Aug  8 14:47:01 2006
@@ -60,9 +60,9 @@
 
                 // Report the dll name to the deployment tool if required.
                 if ("dll".equals(attr.getNodeName())) {
-                    //This is a path relative to the module root.
+                    //This is a path relative to the composite root.
                     //so we need to add it in.
-                    File mod = (File) parameters.get("moduleOrFragmentFile");
+                    File mod = (File) parameters.get("compositeOrFragmentFile");
                     if (null != mod) {
                         String separatorForRegex = File.separator.replaceAll(
                                 "\\\\", "\\\\\\\\");
@@ -187,11 +187,11 @@
             return;
         }
 
-        // We want to clear both /moduleFragment and /module
+        // We want to clear both /compositeFragment and /composite
         // subtrees when we come across the root of either..
-        if (contextXPath.equals("/moduleFragment")) {
-            //clear both this and "module"
-            contextXPath = "/module";
+        if (contextXPath.equals("/compositeFragment")) {
+            //clear both this and "composite"
+            contextXPath = "/composite";
         }
 
         Set parms = parameters.entrySet();

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ReferenceDomNodeHandler.java Tue Aug  8 14:47:01 2006
@@ -48,7 +48,7 @@
 
     /**
      * This method is really just an adapter that adapts the -dir Option to a
-     * value int he parameters map for "module_root"
+     * value int he parameters map for "composite_root"
      * 
      * @param parameters
      *            the map of name-value parameters.
@@ -56,7 +56,7 @@
     private void createProxyForReference(Map parameters) {
         try {
             String mr = (String) Options.getOption("-dir");
-            parameters.put("module_root", mr);
+            parameters.put("composite_root", mr);
             ServicesGenerator.handleInterfaceHeader(parameters, true);
 
         } catch (Exception e) {

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/Scagen.java Tue Aug  8 14:47:01 2006
@@ -27,13 +27,13 @@
 
 /**
  * This is the main top level class. Its purpose is to create a
- * Module/FragmentFile handler visitor and pass it to a DirectoryScanner for
+ * Composite/FragmentFile handler visitor and pass it to a DirectoryScanner for
  * processing.
  */
 public class Scagen extends CParsingTool {
 
-    public static Set MODULE_EXTENSIONS = new HashSet(Arrays
-            .asList(new Object[] { "module", "fragment" }));
+    public static Set COMPOSITE_EXTENSIONS = new HashSet(Arrays
+            .asList(new Object[] { "composite", "fragment" }));
 
     /**
      * @throws Exception
@@ -45,7 +45,7 @@
 
     /**
      * Take a directory scanning class and create a vistor that knows how to
-     * handle any sca.module or .fragment that the scanner comes across.
+     * handle any sca.composite or .fragment that the scanner comes across.
      * 
      * @param args
      *            standard main args. THe values we expect in this class are
@@ -56,20 +56,20 @@
         boolean failed = false;
         try {
             Scagen env = new Scagen(args);
-            ModuleOrFragmentFileHandler module_handler = new ModuleOrFragmentFileHandler();
+            CompositeOrFragmentFileHandler composite_handler = new CompositeOrFragmentFileHandler();
 
-            // Check and access the input SCA module directory
+            // Check and access the input SCA composite directory
             String name = (String) Options.getOption("-dir");
             if (null == name) {
                 Utils
-                        .screenMessage("Please provide a SCA module directory name as a \"-dir\" option.");
+                        .screenMessage("Please provide a SCA composite directory name as a \"-dir\" option.");
                 env.printUsage();
                 System.exit(-1);
             }
             File source = new File(name);
             if (!source.isFile() && !source.isDirectory()) {
                 Utils
-                        .screenMessage("The SCA module directory provided as the \"-dir\" option cannot be accessed,");
+                        .screenMessage("The SCA composite directory provided as the \"-dir\" option cannot be accessed,");
                 Utils.screenMessage("the option given was: " + source);
                 env.printUsage();
                 System.exit(-1);
@@ -113,17 +113,17 @@
             Utils.postEvent(Utils.DEPLOYMENT_OUTPUT_DIRECTORY, outputDir
                     .getAbsolutePath());
 
-            DirectoryScanner scanner = new DirectoryScanner(module_handler,
-                    MODULE_EXTENSIONS);
+            DirectoryScanner scanner = new DirectoryScanner(composite_handler,
+                    COMPOSITE_EXTENSIONS);
             scanner.walkTree(source, outputDir, 1);
 
-            if (0 == module_handler.getFilesActedOn()) {
+            if (0 == composite_handler.getFilesActedOn()) {
                 Utils
-                        .screenMessage("No SCA module or fragment files were found in: "
+                        .screenMessage("No SCA composite or fragment files were found in: "
                                 + source);
             }
 
-            failed = module_handler.failed;
+            failed = composite_handler.failed;
 
         } catch (Exception exception) {
             Utils
@@ -134,7 +134,7 @@
 
         if (failed) {
             Utils
-                    .outputDebugString("Finished! (but encountered problems parsing modules)");
+                    .outputDebugString("Finished! (but encountered problems parsing composites)");
             System.exit(-2);
         }
 
@@ -148,12 +148,12 @@
         System.out
                 .println("usage: Java Scagen -dir <input_directory> -output <output_directory> [-verbose] [-deploy <deploy_dir>] [-nogenerate] [-outputCommand] [-command <copy_cmd>]");
         System.out
-                .println("       -dir <input_directory>: the SCA module root directory");
+                .println("       -dir <input_directory>: the SCA composite root directory");
         System.out
                 .println("       -output <output_directory>: a directory to put the generated output into");
         System.out.println("       [-verbose]: report on what scagen is doing");
         System.out
-                .println("       [-deploy <deploy_dir>]: output text to help in deploying the module's artefacts");
+                .println("       [-deploy <deploy_dir>]: output text to help in deploying the composite's artefacts");
         System.out
                 .println("       [-command <copy_cmd>]: a string that is injected into the deploy text");
         System.out

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServiceDomNodeHandler.java Tue Aug  8 14:47:01 2006
@@ -51,7 +51,7 @@
 
         try {
             String mr = (String) Options.getOption("-dir");
-            parameters.put("module_root", mr);
+            parameters.put("composite_root", mr);
             ServicesGenerator.handleInterfaceHeader(parameters, false);
 
         } catch (Exception e) {

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/ServicesGenerator.java Tue Aug  8 14:47:01 2006
@@ -126,26 +126,26 @@
 
         String componentTypeFileHeaderName = interfaceHeaderFilename;
 
-        String sca_module_root =  (String) Options.getOption("-dir");
-        parameters.put("module_root", sca_module_root);
+        String sca_composite_root =  (String) Options.getOption("-dir");
+        parameters.put("composite_root", sca_composite_root);
 
-        if (sca_module_root != null && interfaceHeaderFilename != null
+        if (sca_composite_root != null && interfaceHeaderFilename != null
                 && interfaceHeaderFilename.length() > 0) {
             String separator;
             // Stick in a "/" (File.separator) if required.
-            if ((interfaceHeaderFilename.substring(0, 1).equals("/") || sca_module_root
-                    .substring(sca_module_root.length() - 1,
-                            sca_module_root.length()).equals("/"))
-                    || (interfaceHeaderFilename.substring(0, 1).equals("\\") || sca_module_root
-                            .substring(sca_module_root.length() - 1,
-                                    sca_module_root.length()).equals("\\"))
+            if ((interfaceHeaderFilename.substring(0, 1).equals("/") || sca_composite_root
+                    .substring(sca_composite_root.length() - 1,
+                            sca_composite_root.length()).equals("/"))
+                    || (interfaceHeaderFilename.substring(0, 1).equals("\\") || sca_composite_root
+                            .substring(sca_composite_root.length() - 1,
+                                    sca_composite_root.length()).equals("\\"))
 
             ) {
                 separator = "";
             } else {
                 separator = File.separator;
             }
-            interfaceHeaderFilename = sca_module_root + separator
+            interfaceHeaderFilename = sca_composite_root + separator
                     + interfaceHeaderFilename;
         }
 
@@ -210,38 +210,38 @@
                 }
             }
 
-            String moduleXmlFileHeader = null;
-            String moduleXmlFileHeaderNoExt = null;
-            Object moduleh = parameters
-                    .get("/module/component/implementation.cpp/@header");
-
-            if (moduleh == null) {
-                moduleh = parameters
-                        .get("/moduleFragment/component/implementation.cpp/@header");
+            String compositeXmlFileHeader = null;
+            String compositeXmlFileHeaderNoExt = null;
+            Object compositeh = parameters
+                    .get("/composite/component/implementation.cpp/@header");
+
+            if (compositeh == null) {
+                compositeh = parameters
+                        .get("/compositeFragment/component/implementation.cpp/@header");
             }
 
-            if (moduleh instanceof String) {
-                File f = new File((String) moduleh);
-                moduleXmlFileHeader = (String) moduleh;
+            if (compositeh instanceof String) {
+                File f = new File((String) compositeh);
+                compositeXmlFileHeader = (String) compositeh;
 
                 String fname = f.getName();
-                moduleXmlFileHeaderNoExt = fname.substring(0, fname
+                compositeXmlFileHeaderNoExt = fname.substring(0, fname
                         .lastIndexOf('.'));
 
             }
 
-            String implClassNameAttrFromModuleFile = (String) parameters
+            String implClassNameAttrFromCompositeFile = (String) parameters
             	.get("implClass");
-            String implClassNamespaceAttrFromModuleFile = (String) parameters
+            String implClassNamespaceAttrFromCompositeFile = (String) parameters
             	.get("implNamespace");
             
-            if(implClassNamespaceAttrFromModuleFile == null || implClassNamespaceAttrFromModuleFile.length() == 0)
+            if(implClassNamespaceAttrFromCompositeFile == null || implClassNamespaceAttrFromCompositeFile.length() == 0)
             {
-                implClassNamespaceAttrFromModuleFile = "";
+                implClassNamespaceAttrFromCompositeFile = "";
             }
             else
             {
-                implClassNamespaceAttrFromModuleFile += "::";
+                implClassNamespaceAttrFromCompositeFile += "::";
             }
             
             String interfaceClassNameAttrFromComponentTypeFile;
@@ -279,10 +279,10 @@
 
             Document dom = createDOMofMethods(methods, source, serviceName,
                     referenceName, nameOfSorR, null,
-                    componentTypeFileHeaderName, moduleXmlFileHeader,
-                    moduleXmlFileHeaderNoExt, intfNamespace,
+                    componentTypeFileHeaderName, compositeXmlFileHeader,
+                    compositeXmlFileHeaderNoExt, intfNamespace,
                     interfaceClassNameAttrFromComponentTypeFile,
-                    implClassNameAttrFromModuleFile, implClassNamespaceAttrFromModuleFile);
+                    implClassNameAttrFromCompositeFile, implClassNamespaceAttrFromCompositeFile);
            
 //            // Print out the generated DOM
 //            StringWriter sw = new StringWriter();
@@ -372,7 +372,7 @@
 
         String serviceOrReferenceName = "noSorRNameDefined";
 
-        String implClass = "nomoduleXmlFileHeaderDefined";
+        String implClass = "nocompositeXmlFileHeaderDefined";
 
         Element topNode = dom.getDocumentElement();
         if (null != topNode) {
@@ -423,7 +423,7 @@
 
         String serviceName = "noServiceDefined";
 
-        String implClass = "nomoduleXmlFileHeaderDefined";
+        String implClass = "nocompositeXmlFileHeaderDefined";
 
         Element topNode = dom.getDocumentElement();
         if (null != topNode) {
@@ -525,7 +525,7 @@
 
         String serviceName = "noServiceDefined";
 
-        String implClass = "nomoduleXmlFileHeaderDefined";
+        String implClass = "nocompositeXmlFileHeaderDefined";
 
         Element topNode = dom.getDocumentElement();
         if (null != topNode) {
@@ -651,9 +651,9 @@
      * @referenceName the name of the reference
      * @nameOfSorR the non null one of the two parameters above
      * @headerClassName the name of the header class
-     * @param moduleXmlFileImplHeaderNameWithPathAndExt
+     * @param compositeXmlFileImplHeaderNameWithPathAndExt
      *            the source filename
-     * @param moduleXmlFileHeaderNoExtorPath
+     * @param compositeXmlFileHeaderNoExtorPath
      *            the shortname of the source file
      * @param implClass
      *            the implementation class
@@ -665,8 +665,8 @@
             String serviceName, String referenceName, String nameOfSorR,
             String headerClassName,
             String componentTypeXmlFileIntfHeaderNameWithPathAndExt,
-            String moduleXmlFileImplHeaderNameWithPathAndExt,
-            String moduleXmlFileHeaderNoExtorPath, String intfNamespace,
+            String compositeXmlFileImplHeaderNameWithPathAndExt,
+            String compositeXmlFileHeaderNoExtorPath, String intfNamespace,
             String intfClass, String implClass, String implNamespace) {
 
         if (methods == null) {
@@ -768,7 +768,7 @@
             if (implClass != null) {
                 root.setAttribute("implClass", implClass);
             } else {
-                root.setAttribute("implClass", moduleXmlFileHeaderNoExtorPath);
+                root.setAttribute("implClass", compositeXmlFileHeaderNoExtorPath);
             }
 
             if (implClass != null) {
@@ -801,17 +801,17 @@
             root.setAttribute("componentTypeHeader",
                     componentTypeXmlFileIntfHeaderNameWithPathAndExt);
 
-            if (moduleXmlFileImplHeaderNameWithPathAndExt == null) {
-                moduleXmlFileImplHeaderNameWithPathAndExt = "moduleXmlFileImplHeader";
+            if (compositeXmlFileImplHeaderNameWithPathAndExt == null) {
+                compositeXmlFileImplHeaderNameWithPathAndExt = "compositeXmlFileImplHeader";
             }
-            root.setAttribute("moduleXmlFileHeader",
-                    moduleXmlFileImplHeaderNameWithPathAndExt);
+            root.setAttribute("compositeXmlFileHeader",
+                    compositeXmlFileImplHeaderNameWithPathAndExt);
 
-            if (moduleXmlFileHeaderNoExtorPath == null) {
-                moduleXmlFileHeaderNoExtorPath = "moduleXmlFileHeaderNoExt";
+            if (compositeXmlFileHeaderNoExtorPath == null) {
+                compositeXmlFileHeaderNoExtorPath = "compositeXmlFileHeaderNoExt";
             }
-            root.setAttribute("moduleXmlFileHeaderNoExt",
-                    moduleXmlFileHeaderNoExtorPath);
+            root.setAttribute("compositeXmlFileHeaderNoExt",
+                    compositeXmlFileHeaderNoExtorPath);
 
         } catch (ParserConfigurationException pce) {
             // Parser with specified options can't be built

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/XMLFileActor.java Tue Aug  8 14:47:01 2006
@@ -57,8 +57,8 @@
      *      and kick off the processing (using the handler map that has been set
      *      up by the concrete subclass).
      * 
-     * @param moduleXML
-     *            the sca.module or fragment file
+     * @param compositeXML
+     *            the sca.composite or fragment file
      * @param target
      *            the target directory
      * @param depth
@@ -66,21 +66,21 @@
      * @see FileActor#actOnFile(File, File, int) interface to allow for
      *      recursive diving into a directory structure.
      */
-    public void actOnFile(File moduleXML, File target, int depth)
+    public void actOnFile(File compositeXML, File target, int depth)
             throws Exception {
 
-        if (null == moduleXML || null == target) {
+        if (null == compositeXML || null == target) {
             return;
         }
 
         filesActedOn++;
         
-        parameters.put("sourceFile", moduleXML);
+        parameters.put("sourceFile", compositeXML);
         parameters.put("targetFile", target);
 
         if (transformerFactory.getFeature(DOMSource.FEATURE)
                 && transformerFactory.getFeature(DOMResult.FEATURE)) {
-            Document dom = createDomFromXMLFile(moduleXML);
+            Document dom = createDomFromXMLFile(compositeXML);
             if (dom != null) {
                 parameters.put("targetDirectoryFile", target);
                 DomHandler.handleDom(dom, handlers, parameters);

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/package.html Tue Aug  8 14:47:01 2006
@@ -18,7 +18,7 @@
 <h2>What the package does</h2>
 
 <p>The Scagen class main method will take in an input and
-output directory name. The input directory is taken to be the SCA module root
+output directory name. The input directory is taken to be the SCA composite root
 directory.  The tool will generate the wrapper and proxy headers and methods
 bodies in the output directory. </p>
 
@@ -36,7 +36,7 @@
 <h2>The Input Data Used</h2>
 
 <p>The input directory passed to the Scagen method is taken to
-be the SCA module root directory. All the sca.module and .fragment files in
+be the SCA composite root directory. All the sca.composite and .fragment files in
 that directory are inspected to resolve all the &lt;component/&gt; elements
 within them. </p>
 

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperHeader.xsl Tue Aug  8 14:47:01 2006
@@ -65,7 +65,7 @@
 
         <xsl:call-template name="include_headers">
             <xsl:with-param name="header" 
-                            select="@moduleXmlFileHeader"/>
+                            select="@compositeXmlFileHeader"/>
         </xsl:call-template>
 
         <xsl:apply-templates select="scaService" mode="class_body"/>

Modified: incubator/tuscany/cpp/sca/xsd/sca-core.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/xsd/sca-core.xsd?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/xsd/sca-core.xsd (original)
+++ incubator/tuscany/cpp/sca/xsd/sca-core.xsd Tue Aug  8 14:47:01 2006
@@ -67,23 +67,23 @@
   </complexType>
 
 
-  <element name="moduleFragment" type="sca:ModuleFragment"/>
-  <complexType name="ModuleFragment">
+  <element name="compositeFragment" type="sca:CompositeFragment"/>
+  <complexType name="CompositeFragment">
     <sequence>
       <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
       <element minOccurs="0" maxOccurs="unbounded" name="component" type="sca:Component"/>
       <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
-      <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:ModuleWire"/>
+      <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:CompositeWire"/>
       <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
     </sequence>
     <attribute name="name" type="NCName" use="required"/>
     <anyAttribute namespace="##any" processContents="lax"/>
   </complexType>
 
-  <element name="module" type="sca:Module"/>
-  <complexType name="Module">
+  <element name="composite" type="sca:Composite"/>
+  <complexType name="Composite">
     <complexContent>
-      <extension base="sca:ModuleFragment"/>
+      <extension base="sca:CompositeFragment"/>
     </complexContent>
   </complexType>
 
@@ -166,7 +166,7 @@
 
 	
 
-  <complexType name="ModuleWire">
+  <complexType name="CompositeWire">
     <sequence>
       <element minOccurs="1" maxOccurs="1" ref="sca:source.uri" sdo:name="sourceUri"/>
       <element minOccurs="1" maxOccurs="1" ref="sca:target.uri" sdo:name="targetUri"/>
@@ -186,7 +186,7 @@
   <complexType name="Subsystem">
     <sequence>
       <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
-      <element minOccurs="0" maxOccurs="unbounded" name="moduleComponent" type="sca:ModuleComponent"/>
+      <element minOccurs="0" maxOccurs="unbounded" name="compositeComponent" type="sca:CompositeComponent"/>
       <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
       <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:SystemWire"/>
       <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
@@ -197,14 +197,14 @@
   </complexType>
 	
 
-  <complexType name="ModuleComponent">
+  <complexType name="CompositeComponent">
     <sequence>
       <element minOccurs="0" maxOccurs="1" name="properties" type="sca:PropertyValues"/>
       <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
       <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
     </sequence>
     <attribute name="name" type="NCName" use="required"/>
-    <attribute name="module" type="NCName" use="required"/>
+    <attribute name="composite" type="NCName" use="required"/>
     <attribute name="uri" type="anyURI" use="optional"/>
     <anyAttribute namespace="##any" processContents="lax"/>
   </complexType>

Modified: incubator/tuscany/cpp/sca/xsd/sca-interface-cpp.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/xsd/sca-interface-cpp.xsd?rev=429833&r1=429832&r2=429833&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/xsd/sca-interface-cpp.xsd (original)
+++ incubator/tuscany/cpp/sca/xsd/sca-interface-cpp.xsd Tue Aug  8 14:47:01 2006
@@ -43,7 +43,7 @@
   <simpleType name="CPPScope">
     <restriction base="string">
       <enumeration value="stateless"/>
-      <enumeration value="module"/>
+      <enumeration value="composite"/>
     </restriction>
   </simpleType>
 



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