You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2011/08/08 10:19:41 UTC

svn commit: r1154866 - in /tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/sca/ src/mai...

Author: antelder
Date: Mon Aug  8 08:19:40 2011
New Revision: 1154866

URL: http://svn.apache.org/viewvc?rev=1154866&view=rev
Log:
Add a module for a Tuscany Shell command that can draw an SVG picture of a composite

Added:
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/pom.xml
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/SVGViewer.java
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/Helloworld.java
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/HelloworldImpl.java
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/services/
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/services/org.apache.tuscany.sca.shell.Command
    tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/helloworld.composite

Added: tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/pom.xml?rev=1154866&view=auto
==============================================================================
--- tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/pom.xml (added)
+++ tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/pom.xml Mon Aug  8 08:19:40 2011
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- * Licensed to the Apache Software Foundation (ASF) under one * or more 
+	contributor license agreements. See the NOTICE file * distributed with this 
+	work for additional information * regarding copyright ownership. The ASF 
+	licenses this file * to you under the Apache License, Version 2.0 (the * 
+	"License"); you may not use this file except in compliance * with the License. 
+	You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 
+	* * Unless required by applicable law or agreed to in writing, * software 
+	distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT 
+	WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the 
+	License for the * specific language governing permissions and limitations 
+	* under the License. <groupId>org.apache.tuscany.sca</groupId> -->
+<project>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.tuscany.sca</groupId>
+	<artifactId>tuscany-composite-diagram-shell-plugin</artifactId>
+	<version>0.0.1</version>
+	<name>Apache Tuscany SCA Composite Diagram Generator Shell Plugin
+	</name>
+
+    <repositories>
+        <!-- Tuscany repository to hold artifacts that are not published in the public maven repos -->
+        <repository>
+            <id>tuscany.repo</id>
+            <name>Tuscany Maven 2.x Repository</name>
+            <url>http://svn.apache.org/repos/asf/tuscany/maven</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>org.apache.tuscany.sca</groupId>
+			<artifactId>tuscany-composite-diagram</artifactId>
+			<version>0.0.1</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.xmlgraphics</groupId>
+			<artifactId>batik-swing</artifactId>
+			<version>1.7</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.tuscany.sca</groupId>
+			<artifactId>tuscany-base-runtime</artifactId>
+			<version>2.0-Beta3</version>
+		</dependency>
+
+		<dependency>
+			<groupId>jline</groupId>
+			<artifactId>jline</artifactId>
+			<version>0.9.95-huynhjl</version>
+		</dependency>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.5</version>
+			<scope>test</scope>
+		</dependency>
+
+	</dependencies>
+
+	<build>
+		<defaultGoal>install</defaultGoal>
+		<directory>${basedir}/target</directory>
+		<finalName>${artifactId}-${version}</finalName>
+		<plugins>
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.tuscany.sca</groupId>
+				<artifactId>tuscany-maven-plugin</artifactId>
+				<version>2.0-Beta3</version>
+		<dependencies>
+		<dependency>
+			<groupId>org.apache.tuscany.sca</groupId>
+			<artifactId>tuscany-composite-diagram-shell-plugin</artifactId>
+			<version>0.0.1</version>
+		</dependency>
+		</dependencies>
+			</plugin>
+
+		</plugins>
+
+	</build>
+
+</project>

Added: tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java
URL: http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java?rev=1154866&view=auto
==============================================================================
--- tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java (added)
+++ tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java Mon Aug  8 08:19:40 2011
@@ -0,0 +1,98 @@
+/*
+ * 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.diagram.shell;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import jline.Completor;
+import jline.NullCompletor;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.xml.Utils;
+import org.apache.tuscany.sca.impl.NodeImpl;
+import org.apache.tuscany.sca.impl.diagram.DiagramGenerator;
+import org.apache.tuscany.sca.impl.io.XMLWriter;
+import org.apache.tuscany.sca.impl.layout.CompositeEntity;
+import org.apache.tuscany.sca.impl.layout.EntityBuilder;
+import org.apache.tuscany.sca.shell.Command;
+import org.apache.tuscany.sca.shell.Shell;
+import org.apache.tuscany.sca.shell.jline.CompositeURICompletor;
+import org.apache.tuscany.sca.shell.jline.ICURICompletor;
+import org.w3c.dom.Document;
+
+public class DrawShellCommand implements Command {
+
+    private Shell shell;
+    
+    public DrawShellCommand(Shell shell) {
+        this.shell = shell;
+    }
+
+    public String getName() {
+        return "draw";
+    }
+
+    public String getShortHelp() {
+        return "draw <contributionURI> <compositeURI>";
+    }
+
+    public String getHelp() {
+        StringBuilder helpText = new StringBuilder();
+        helpText.append("Draws a picture of the composite.\n");
+        helpText.append("\n");
+        helpText.append("Arguments:\n");
+        helpText.append("   contributionURI - (required) the URI of the installed contribution\n");
+        helpText.append("   compositeURL    - (required) the URI of a started composite\n");
+        return helpText.toString();
+    }
+
+    public boolean invoke(String[] args) throws Exception {
+
+        NodeImpl node = (NodeImpl)shell.getNode();
+        Composite composite = node.getContribution(args[0]).getArtifactModel(args[1]);
+        
+        //TODO: really all we want is to pass the Tuscany Composite object to the SVG drawing code,
+        //      but for now as that requires an XML file to the Composite to XML:
+        
+        String compositeXML = Utils.modelToXML(composite, false, node.getExtensionPointRegistry());
+        DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+        Document doc = db.parse(new ByteArrayInputStream(compositeXML.getBytes()));
+        EntityBuilder eb = new EntityBuilder(doc);
+        CompositeEntity comp = eb.buildCompositeEntity();
+        DiagramGenerator dg = new DiagramGenerator(comp);
+        Document svg = dg.buildSVGDocument();
+        File outFile = File.createTempFile("tmp", "svg");
+        XMLWriter writer = new XMLWriter();
+        writer.fileWriter(svg, outFile);
+
+        new SVGViewer(outFile.toURI().toURL().toString());
+
+        return true;
+    }
+
+    public Completor[] getCompletors() {
+        return new Completor[]{new ICURICompletor(shell), new CompositeURICompletor(shell), new NullCompletor()};
+    }
+
+}

Added: tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/SVGViewer.java
URL: http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/SVGViewer.java?rev=1154866&view=auto
==============================================================================
--- tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/SVGViewer.java (added)
+++ tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/SVGViewer.java Mon Aug  8 08:19:40 2011
@@ -0,0 +1,104 @@
+/*
+ * 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.diagram.shell;
+
+import java.awt.BorderLayout;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.io.File;
+import java.net.MalformedURLException;
+
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.apache.batik.swing.JSVGCanvas;
+import org.apache.batik.swing.gvt.GVTTreeRendererAdapter;
+import org.apache.batik.swing.gvt.GVTTreeRendererEvent;
+import org.apache.batik.swing.svg.GVTTreeBuilderAdapter;
+import org.apache.batik.swing.svg.GVTTreeBuilderEvent;
+import org.apache.batik.swing.svg.SVGDocumentLoaderAdapter;
+import org.apache.batik.swing.svg.SVGDocumentLoaderEvent;
+
+public class SVGViewer {
+
+        public static void main(String[] args) {
+            new SVGViewer("../CompositeDiagramGeneratorUsingBatik/output/Calculator_diagram.svg");
+        }
+        
+        protected JFrame frame;
+        protected JLabel label = new JLabel();
+        protected JSVGCanvas svgCanvas = new JSVGCanvas();
+        protected String svgFile;
+
+        public SVGViewer(String svgFile) {
+            this.svgFile = svgFile;
+            this.frame = new JFrame("Batik");
+            frame.getContentPane().add(createComponents());
+            frame.addWindowListener(new WindowAdapter() {
+                public void windowClosing(WindowEvent e) {
+//                    System.exit(0);
+                }
+            });
+            frame.setSize(1000, 1000);
+            frame.setVisible(true);
+        }
+
+        public JComponent createComponents() {
+            final JPanel panel = new JPanel(new BorderLayout());
+            panel.add("Center", svgCanvas);
+            try {
+                svgCanvas.setURI(new File(svgFile).toURI().toURL().toString());
+            } catch (MalformedURLException e) {
+                e.printStackTrace();
+            }
+            
+            svgCanvas.addSVGDocumentLoaderListener(new SVGDocumentLoaderAdapter() {
+                public void documentLoadingStarted(SVGDocumentLoaderEvent e) {
+                    label.setText("Document Loading...");
+                }
+                public void documentLoadingCompleted(SVGDocumentLoaderEvent e) {
+                    label.setText("Document Loaded.");
+                }
+            });
+
+            svgCanvas.addGVTTreeBuilderListener(new GVTTreeBuilderAdapter() {
+                public void gvtBuildStarted(GVTTreeBuilderEvent e) {
+                    label.setText("Build Started...");
+                }
+                public void gvtBuildCompleted(GVTTreeBuilderEvent e) {
+                    label.setText("Build Done.");
+                    frame.pack();
+                }
+            });
+
+            svgCanvas.addGVTTreeRendererListener(new GVTTreeRendererAdapter() {
+                public void gvtRenderingPrepare(GVTTreeRendererEvent e) {
+                    label.setText("Rendering Started...");
+                }
+                public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
+                    label.setText("");
+                }
+            });
+
+            return panel;
+        }
+    }
\ No newline at end of file

Added: tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/Helloworld.java
URL: http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/Helloworld.java?rev=1154866&view=auto
==============================================================================
--- tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/Helloworld.java (added)
+++ tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/Helloworld.java Mon Aug  8 08:19:40 2011
@@ -0,0 +1,28 @@
+/*
+ * 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 sample;
+
+import org.oasisopen.sca.annotation.Remotable;
+
+@Remotable
+public interface Helloworld {
+
+    String sayHello(String name);
+
+}

Added: tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/HelloworldImpl.java
URL: http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/HelloworldImpl.java?rev=1154866&view=auto
==============================================================================
--- tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/HelloworldImpl.java (added)
+++ tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/sample/HelloworldImpl.java Mon Aug  8 08:19:40 2011
@@ -0,0 +1,27 @@
+/*
+ * 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 sample;
+
+public class HelloworldImpl implements Helloworld {
+
+    public String sayHello(String name) {
+        return "Hello " + name;
+    }
+
+}

Added: tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml
URL: http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml?rev=1154866&view=auto
==============================================================================
--- tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml (added)
+++ tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/sca-contribution.xml Mon Aug  8 08:19:40 2011
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+              xmlns:sample="http://sample">
+   
+   <deployable composite="sample:helloworld-contribution" />
+
+</contribution>

Added: tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/services/org.apache.tuscany.sca.shell.Command
URL: http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/services/org.apache.tuscany.sca.shell.Command?rev=1154866&view=auto
==============================================================================
--- tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/services/org.apache.tuscany.sca.shell.Command (added)
+++ tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/META-INF/services/org.apache.tuscany.sca.shell.Command Mon Aug  8 08:19:40 2011
@@ -0,0 +1,17 @@
+# 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.
+org.apache.tuscany.sca.diagram.shell.DrawShellCommand

Added: tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/helloworld.composite
URL: http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/helloworld.composite?rev=1154866&view=auto
==============================================================================
--- tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/helloworld.composite (added)
+++ tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/resources/helloworld.composite Mon Aug  8 08:19:40 2011
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+           xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
+           targetNamespace="http://sample"
+           name="helloworld-contribution">
+
+    <component name="HelloworldComponent">
+        <implementation.java class="sample.HelloworldImpl"/>
+    </component>
+
+</composite>