Author: nirmal070125
Date: Thu Aug 11 14:50:14 2011
New Revision: 1156638

URL: http://svn.apache.org/viewvc?rev=1156638&view=rev
Log:
Few adjustments based on suggestions from Jean and Ant

Modified:
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/input/composite_with_compositeService.xml
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/Calculator_diagram.svg
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/MyValueComposite2_diagram.svg
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/store_diagram.svg
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/supplychain_diagram.svg
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Constant.java
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/diagram/DiagramGenerator.java
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java
    
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/Main.java

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/input/composite_with_compositeService.xml
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/input/composite_with_compositeService.xml?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/input/composite_with_compositeService.xml
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/input/composite_with_compositeService.xml
 Thu Aug 11 14:50:14 2011
@@ -62,7 +62,7 @@
 
    <reference name="CustomerService"
 
-         promote="MyValueServiceComponent/customerService">
+         promote="MyValueServiceComponent/customerService 
StockQuoteMediatorComponent">
 
          <interface.java interface="services.customer.CustomerService"/>
 

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/Calculator_diagram.svg
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/Calculator_diagram.svg?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/Calculator_diagram.svg
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/Calculator_diagram.svg
 Thu Aug 11 14:50:14 2011
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><svg 
xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns="http://www.w3.org/2000/svg"; 
contentScriptType="text/ecmascript" zoomAndPan="magnify" 
contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" 
version="1.0"><rect x="0" y="0" alignment-baseline="central" fill="#E5E5D0" 
width="1400" rx="20" ry="20" height="1340" stroke="#919191"/><rect x="200" 
y="100" alignment-baseline="central" fill="#E5E5E5" width="1000" rx="20" 
ry="20" height="1140" stroke="#919191"/><text x="700" font-size="15" y="120" 
dominant-baseline="mathematical">Calculator</text><rect x="400" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="400" font-size="15" y="350" 
dominant-baseline="mathematical">CalculatorServiceComponent</text><polygon 
fill="#00CD66" points="380,210 410,210 425,225 410,240 380,240 395,225 " 
stroke="#008B45"/><text x="380" font-size="15" y="225" 
dominant-baseline="mathematical">Calcula
 torService</text><polygon fill="#BF3EFF" points="586,210 608,210 619,221 
608,232 586,232 597,221 " stroke="#68228B"/><text x="586" font-size="15" 
y="221" dominant-baseline="mathematical">addService</text><polygon 
fill="#BF3EFF" points="586,242 608,242 619,253 608,264 586,264 597,253 " 
stroke="#68228B"/><text x="586" font-size="15" y="253" 
dominant-baseline="mathematical">subtractService</text><polygon fill="#BF3EFF" 
points="586,274 608,274 619,285 608,296 586,296 597,285 " 
stroke="#68228B"/><text x="586" font-size="15" y="285" 
dominant-baseline="mathematical">multiplyService</text><polygon fill="#BF3EFF" 
points="586,306 608,306 619,317 608,328 586,328 597,317 " 
stroke="#68228B"/><text x="586" font-size="15" y="317" 
dominant-baseline="mathematical">divideService</text><rect x="800" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="800" font-size="15" y="350" 
dominant-baseline="mathematical">AddServiceComponent</text
 ><polygon fill="#00CD66" points="780,210 810,210 825,225 810,240 780,240 
 >795,225 " stroke="#008B45"/><text x="780" font-size="15" y="225" 
 >dominant-baseline="mathematical">AddService</text><rect x="800" y="460" 
 >fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
 >stroke="#104E8B"/><text x="800" font-size="15" y="610" 
 >dominant-baseline="mathematical">SubtractServiceComponent</text><polygon 
 >fill="#00CD66" points="780,470 810,470 825,485 810,500 780,500 795,485 " 
 >stroke="#008B45"/><text x="780" font-size="15" y="485" 
 >dominant-baseline="mathematical">SubtractService</text><rect x="800" y="720" 
 >fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
 >stroke="#104E8B"/><text x="800" font-size="15" y="870" 
 >dominant-baseline="mathematical">MultiplyServiceComponent</text><polygon 
 >fill="#00CD66" points="780,730 810,730 825,745 810,760 780,760 795,745 " 
 >stroke="#008B45"/><text x="780" font-size="15" y="745" 
 >dominant-baseline="mathematical">Multi
 plyService</text><rect x="800" y="980" fill-opacity="0.75" fill="#3D59AB" 
width="200" rx="20" ry="20" height="130" stroke="#104E8B"/><text x="800" 
font-size="15" y="1130" 
dominant-baseline="mathematical">DivideServiceComponent</text><polygon 
fill="#00CD66" points="780,990 810,990 825,1005 810,1020 780,1020 795,1005 " 
stroke="#008B45"/><text x="780" font-size="15" y="1005" 
dominant-baseline="mathematical">DivideService</text><polyline fill="none" 
stroke-width="2" points="619,221 639,221 639,225 795,225" 
stroke="black"/><polyline fill="none" stroke-width="2" points="619,317 644,317 
644,1005 795,1005" stroke="black"/><polyline fill="none" stroke-width="2" 
points="619,285 649,285 649,745 795,745" stroke="black"/><polyline fill="none" 
stroke-width="2" points="619,253 654,253 654,485 795,485" stroke="black"/><rect 
x="205" y="1170" alignment-baseline="central" fill="#E5E5C0" width="990" 
rx="20" ry="20" height="65" stroke="#919191"/><text x="210" font-size="15" 
y="1180" dominant-bas
 eline="mathematical">Included Composites</text><text x="210" font-size="15" 
y="1205" dominant-baseline="mathematical"></text></svg>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><svg 
xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns="http://www.w3.org/2000/svg"; 
contentScriptType="text/ecmascript" zoomAndPan="magnify" 
contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" 
version="1.0"><rect x="0" y="0" alignment-baseline="middle" fill="#E5E5D0" 
width="1400" rx="20" ry="20" height="1340" stroke="#919191"/><rect x="200" 
y="100" alignment-baseline="middle" fill="#E5E5E5" width="1000" rx="20" ry="20" 
height="1140" stroke="#919191"/><text x="700" font-size="15" y="120" 
dominant-baseline="mathematical">Calculator</text><rect x="400" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="400" font-size="15" y="350" 
dominant-baseline="mathematical">CalculatorServiceComponent</text><polygon 
fill="#00CD66" points="380,210 410,210 425,225 410,240 380,240 395,225 " 
stroke="#008B45"/><text x="380" font-size="15" y="209" 
dominant-baseline="mathematical">Calculato
 rService</text><polygon fill="#BF3EFF" points="586,210 608,210 619,221 608,232 
586,232 597,221 " stroke="#68228B"/><text x="586" font-size="15" y="209" 
dominant-baseline="mathematical">addService</text><polygon fill="#BF3EFF" 
points="586,242 608,242 619,253 608,264 586,264 597,253 " 
stroke="#68228B"/><text x="586" font-size="15" y="241" 
dominant-baseline="mathematical">subtractService</text><polygon fill="#BF3EFF" 
points="586,274 608,274 619,285 608,296 586,296 597,285 " 
stroke="#68228B"/><text x="586" font-size="15" y="273" 
dominant-baseline="mathematical">multiplyService</text><polygon fill="#BF3EFF" 
points="586,306 608,306 619,317 608,328 586,328 597,317 " 
stroke="#68228B"/><text x="586" font-size="15" y="305" 
dominant-baseline="mathematical">divideService</text><rect x="800" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="800" font-size="15" y="350" 
dominant-baseline="mathematical">AddServiceComponent</text><
 polygon fill="#00CD66" points="780,210 810,210 825,225 810,240 780,240 795,225 
" stroke="#008B45"/><text x="780" font-size="15" y="209" 
dominant-baseline="mathematical">AddService</text><rect x="800" y="460" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="800" font-size="15" y="610" 
dominant-baseline="mathematical">SubtractServiceComponent</text><polygon 
fill="#00CD66" points="780,470 810,470 825,485 810,500 780,500 795,485 " 
stroke="#008B45"/><text x="780" font-size="15" y="469" 
dominant-baseline="mathematical">SubtractService</text><rect x="800" y="720" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="800" font-size="15" y="870" 
dominant-baseline="mathematical">MultiplyServiceComponent</text><polygon 
fill="#00CD66" points="780,730 810,730 825,745 810,760 780,760 795,745 " 
stroke="#008B45"/><text x="780" font-size="15" y="729" 
dominant-baseline="mathematical">Multipl
 yService</text><rect x="800" y="980" fill-opacity="0.75" fill="#3D59AB" 
width="200" rx="20" ry="20" height="130" stroke="#104E8B"/><text x="800" 
font-size="15" y="1130" 
dominant-baseline="mathematical">DivideServiceComponent</text><polygon 
fill="#00CD66" points="780,990 810,990 825,1005 810,1020 780,1020 795,1005 " 
stroke="#008B45"/><text x="780" font-size="15" y="989" 
dominant-baseline="mathematical">DivideService</text><polyline fill="none" 
stroke-width="2" points="619,221 639,221 639,225 795,225" 
stroke="black"/><polyline fill="none" stroke-width="2" points="619,317 644,317 
644,1005 795,1005" stroke="black"/><polyline fill="none" stroke-width="2" 
points="619,285 649,285 649,745 795,745" stroke="black"/><polyline fill="none" 
stroke-width="2" points="619,253 654,253 654,485 795,485" stroke="black"/></svg>
\ No newline at end of file

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/MyValueComposite2_diagram.svg
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/MyValueComposite2_diagram.svg?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/MyValueComposite2_diagram.svg
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/MyValueComposite2_diagram.svg
 Thu Aug 11 14:50:14 2011
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><svg 
xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns="http://www.w3.org/2000/svg"; 
contentScriptType="text/ecmascript" zoomAndPan="magnify" 
contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" 
version="1.0"><rect x="0" y="0" alignment-baseline="central" fill="#E5E5D0" 
width="1400" rx="20" ry="20" height="560" stroke="#919191"/><rect x="200" 
y="100" alignment-baseline="central" fill="#E5E5E5" width="1000" rx="20" 
ry="20" height="360" stroke="#919191"/><text x="700" font-size="15" y="120" 
dominant-baseline="mathematical">MyValueComposite2</text><rect x="400" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="130" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="400" font-size="15" y="350" 
dominant-baseline="mathematical">MyValueServiceComponent</text><polygon 
fill="#00CD66" points="380,210 410,210 425,225 410,240 380,240 395,225 " 
stroke="#008B45"/><text x="380" font-size="15" y="225" 
dominant-baseline="mathematical">myVal
 ueService</text><polygon fill="#BF3EFF" points="510,210 540,210 555,225 
540,240 510,240 525,225 " stroke="#68228B"/><text x="510" font-size="15" 
y="225" dominant-baseline="mathematical">stockQuoteService</text><polygon 
fill="#BF3EFF" points="510,250 540,250 555,265 540,280 510,280 525,265 " 
stroke="#68228B"/><text x="510" font-size="15" y="265" 
dominant-baseline="mathematical">customerService</text><rect fill="#EEEE00" 
x="420" width="20" height="20" y="190" stroke="#EEC900"/><text x="420" 
font-size="15" y="190" dominant-baseline="mathematical">currency</text><rect 
x="660" y="200" fill-opacity="0.75" fill="#3D59AB" width="130" rx="20" ry="20" 
height="130" stroke="#104E8B"/><text x="660" font-size="15" y="350" 
dominant-baseline="mathematical">StockQuoteMediatorComponent</text><polygon 
fill="#00CD66" points="640,210 670,210 685,225 670,240 640,240 655,225 " 
stroke="#008B45"/><text x="640" font-size="15" y="225" 
dominant-baseline="mathematical">SQMediator</text><polygon fill="#B
 F3EFF" points="770,210 800,210 815,225 800,240 770,240 785,225 " 
stroke="#68228B"/><text x="770" font-size="15" y="225" 
dominant-baseline="mathematical">stockQuoteService</text><rect fill="#EEEE00" 
x="680" width="20" height="20" y="190" stroke="#EEC900"/><text x="680" 
font-size="15" y="190" dominant-baseline="mathematical">currency</text><polygon 
fill="#00CD66" points="140,130 230,130 275,175 230,220 140,220 185,175 " 
stroke="#008B45"/><text x="140" font-size="15" y="175" 
dominant-baseline="mathematical">MyValueService</text><polygon fill="#BF3EFF" 
points="1140,130 1230,130 1275,175 1230,220 1140,220 1185,175 " 
stroke="#68228B"/><text x="1140" font-size="15" y="175" 
dominant-baseline="mathematical">CustomerService</text><polygon fill="#BF3EFF" 
points="1140,250 1230,250 1275,295 1230,340 1140,340 1185,295 " 
stroke="#68228B"/><text x="1140" font-size="15" y="295" 
dominant-baseline="mathematical">StockQuoteService</text><polyline fill="none" 
stroke-width="2" points="555,225 655
 ,225" stroke="black"/><polyline fill="none" stroke-dasharray="3 3" 
stroke-width="2" points="815,225 840,225 840,295 1185,295" 
stroke="black"/><polyline fill="none" stroke-dasharray="3 3" stroke-width="2" 
points="555,265 585,265 585,175 1185,175" stroke="black"/><polyline fill="none" 
stroke-dasharray="3 3" stroke-width="2" points="275,175 310,175 310,225 
395,225" stroke="black"/><rect x="205" y="390" alignment-baseline="central" 
fill="#E5E5C0" width="990" rx="20" ry="20" height="65" stroke="#919191"/><text 
x="210" font-size="15" y="400" dominant-baseline="mathematical">Included 
Composites</text><text x="210" font-size="15" y="425" 
dominant-baseline="mathematical"><a xlink:href="store_diagram.svg" 
xlink:actuate="onRequest" xlink:type="simple" xlink:show="new" 
xmlns:xlink="http://www.w3.org/1999/xlink";> store ,</a><a 
xlink:href="Calculator_diagram.svg" xlink:actuate="onRequest" 
xlink:type="simple" xlink:show="new" 
xmlns:xlink="http://www.w3.org/1999/xlink";> Calculator ,</a><a x
 link:href="supplychain_diagram.svg" xlink:actuate="onRequest" 
xlink:type="simple" xlink:show="new" 
xmlns:xlink="http://www.w3.org/1999/xlink";> supplychain ,</a></text></svg>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><svg 
xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns="http://www.w3.org/2000/svg"; 
contentScriptType="text/ecmascript" zoomAndPan="magnify" 
contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" 
version="1.0"><rect x="0" y="0" alignment-baseline="middle" fill="#E5E5D0" 
width="1400" rx="20" ry="20" height="560" stroke="#919191"/><rect x="200" 
y="100" alignment-baseline="middle" fill="#E5E5E5" width="1000" rx="20" ry="20" 
height="360" stroke="#919191"/><text x="700" font-size="15" y="120" 
dominant-baseline="mathematical">MyValueComposite2</text><rect x="400" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="130" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="400" font-size="15" y="350" 
dominant-baseline="mathematical">MyValueServiceComponent</text><polygon 
fill="#00CD66" points="380,210 410,210 425,225 410,240 380,240 395,225 " 
stroke="#008B45"/><text x="380" font-size="15" y="225" 
dominant-baseline="mathematical">myValue
 Service</text><polygon fill="#BF3EFF" points="510,210 540,210 555,225 540,240 
510,240 525,225 " stroke="#68228B"/><text x="510" font-size="15" y="225" 
dominant-baseline="mathematical">stockQuoteService</text><polygon 
fill="#BF3EFF" points="510,250 540,250 555,265 540,280 510,280 525,265 " 
stroke="#68228B"/><text x="510" font-size="15" y="265" 
dominant-baseline="mathematical">customerService</text><rect fill="#EEEE00" 
x="420" width="20" height="20" y="190" stroke="#EEC900"/><text x="420" 
font-size="15" y="190" dominant-baseline="mathematical">currency</text><rect 
x="660" y="200" fill-opacity="0.75" fill="#3D59AB" width="130" rx="20" ry="20" 
height="130" stroke="#104E8B"/><text x="660" font-size="15" y="350" 
dominant-baseline="mathematical">StockQuoteMediatorComponent</text><polygon 
fill="#00CD66" points="640,210 670,210 685,225 670,240 640,240 655,225 " 
stroke="#008B45"/><text x="640" font-size="15" y="225" 
dominant-baseline="mathematical">SQMediator</text><polygon fill="#BF3
 EFF" points="770,210 800,210 815,225 800,240 770,240 785,225 " 
stroke="#68228B"/><text x="770" font-size="15" y="225" 
dominant-baseline="mathematical">stockQuoteService</text><rect fill="#EEEE00" 
x="680" width="20" height="20" y="190" stroke="#EEC900"/><text x="680" 
font-size="15" y="190" dominant-baseline="mathematical">currency</text><polygon 
fill="#00CD66" points="140,130 230,130 275,175 230,220 140,220 185,175 " 
stroke="#008B45"/><text x="140" font-size="15" y="175" 
dominant-baseline="mathematical">MyValueService</text><polygon fill="#BF3EFF" 
points="1140,130 1230,130 1275,175 1230,220 1140,220 1185,175 " 
stroke="#68228B"/><text x="1140" font-size="15" y="175" 
dominant-baseline="mathematical">CustomerService</text><polygon fill="#BF3EFF" 
points="1140,250 1230,250 1275,295 1230,340 1140,340 1185,295 " 
stroke="#68228B"/><text x="1140" font-size="15" y="295" 
dominant-baseline="mathematical">StockQuoteService</text><polyline fill="none" 
stroke-width="2" points="555,225 655,2
 25" stroke="black"/><polyline fill="none" stroke-dasharray="3 3" 
stroke-width="2" points="815,225 840,225 840,295 1185,295" 
stroke="black"/><polyline fill="none" stroke-dasharray="3 3" stroke-width="2" 
points="555,265 585,265 585,175 1185,175" stroke="black"/><polyline fill="none" 
stroke-dasharray="3 3" stroke-width="2" points="815,225 850,225 850,175 
1185,175" stroke="black"/><polyline fill="none" stroke-dasharray="3 3" 
stroke-width="2" points="275,175 315,175 315,225 395,225" stroke="black"/><rect 
x="205" y="390" alignment-baseline="middle" fill="#E5E5C0" width="990" rx="20" 
ry="20" height="65" stroke="#919191"/><text x="210" font-size="15" y="400" 
dominant-baseline="mathematical">Included Composites</text><text x="210" 
font-size="15" y="425" dominant-baseline="mathematical"><a 
xlink:href="store_diagram.svg" xlink:actuate="onRequest" xlink:type="simple" 
xlink:show="new" xmlns:xlink="http://www.w3.org/1999/xlink";> store ,</a><a 
xlink:href="Calculator_diagram.svg" xlink:actu
 ate="onRequest" xlink:type="simple" xlink:show="new" 
xmlns:xlink="http://www.w3.org/1999/xlink";> Calculator ,</a><a 
xlink:href="supplychain_diagram.svg" xlink:actuate="onRequest" 
xlink:type="simple" xlink:show="new" 
xmlns:xlink="http://www.w3.org/1999/xlink";> supplychain ,</a></text></svg>
\ No newline at end of file

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/store_diagram.svg
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/store_diagram.svg?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/store_diagram.svg
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/store_diagram.svg
 Thu Aug 11 14:50:14 2011
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><svg 
xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns="http://www.w3.org/2000/svg"; 
contentScriptType="text/ecmascript" zoomAndPan="magnify" 
contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" 
version="1.0"><rect x="0" y="0" alignment-baseline="central" fill="#E5E5D0" 
width="1800" rx="20" ry="20" height="820" stroke="#919191"/><rect x="200" 
y="100" alignment-baseline="central" fill="#E5E5E5" width="1400" rx="20" 
ry="20" height="620" stroke="#919191"/><text x="900" font-size="15" y="120" 
dominant-baseline="mathematical">store</text><rect x="400" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="400" font-size="15" y="350" 
dominant-baseline="mathematical">Store</text><polygon fill="#00CD66" 
points="380,210 410,210 425,225 410,240 380,240 395,225 " 
stroke="#008B45"/><text x="380" font-size="15" y="225" 
dominant-baseline="mathematical">Widget</text><polygon fill="#BF3EFF
 " points="580,210 610,210 625,225 610,240 580,240 595,225 " 
stroke="#68228B"/><text x="580" font-size="15" y="225" 
dominant-baseline="mathematical">catalog</text><polygon fill="#BF3EFF" 
points="580,250 610,250 625,265 610,280 580,280 595,265 " 
stroke="#68228B"/><text x="580" font-size="15" y="265" 
dominant-baseline="mathematical">shoppingCart</text><polygon fill="#BF3EFF" 
points="580,290 610,290 625,305 610,320 580,320 595,305 " 
stroke="#68228B"/><text x="580" font-size="15" y="305" 
dominant-baseline="mathematical">shoppingTotal</text><rect x="800" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="800" font-size="15" y="350" 
dominant-baseline="mathematical">Catalog</text><polygon fill="#00CD66" 
points="780,210 810,210 825,225 810,240 780,240 795,225 " 
stroke="#008B45"/><text x="780" font-size="15" y="225" 
dominant-baseline="mathematical">Catalog</text><polygon fill="#BF3EFF" 
points="980,210 1010,210 1025,225 1010,2
 40 980,240 995,225 " stroke="#68228B"/><text x="980" font-size="15" y="225" 
dominant-baseline="mathematical">currencyConverter</text><rect fill="#EEEE00" 
x="820" width="20" height="20" y="190" stroke="#EEC900"/><text x="820" 
font-size="15" y="190" 
dominant-baseline="mathematical">currencyCode</text><rect x="800" y="460" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="800" font-size="15" y="610" 
dominant-baseline="mathematical">ShoppingCart</text><polygon fill="#00CD66" 
points="780,470 810,470 825,485 810,500 780,500 795,485 " 
stroke="#008B45"/><text x="780" font-size="15" y="485" 
dominant-baseline="mathematical">Cart</text><polygon fill="#00CD66" 
points="780,510 810,510 825,525 810,540 780,540 795,525 " 
stroke="#008B45"/><text x="780" font-size="15" y="525" 
dominant-baseline="mathematical">Total</text><rect x="1200" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><tex
 t x="1200" font-size="15" y="350" 
dominant-baseline="mathematical">CurrencyConverter</text><polygon 
fill="#00CD66" points="1180,210 1210,210 1225,225 1210,240 1180,240 1195,225 " 
stroke="#008B45"/><text x="1180" font-size="15" y="225" 
dominant-baseline="mathematical">CurrencyConverter</text><polyline fill="none" 
stroke-width="2" points="625,305 645,305 645,525 795,525" 
stroke="black"/><polyline fill="none" stroke-width="2" points="625,265 650,265 
650,485 795,485" stroke="black"/><polyline fill="none" stroke-width="2" 
points="625,225 795,225" stroke="black"/><polyline fill="none" stroke-width="2" 
points="1025,225 1195,225" stroke="black"/><rect x="205" y="650" 
alignment-baseline="central" fill="#E5E5C0" width="1390" rx="20" ry="20" 
height="65" stroke="#919191"/><text x="210" font-size="15" y="660" 
dominant-baseline="mathematical">Included Composites</text><text x="210" 
font-size="15" y="685" dominant-baseline="mathematical"></text></svg>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><svg 
xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns="http://www.w3.org/2000/svg"; 
contentScriptType="text/ecmascript" zoomAndPan="magnify" 
contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" 
version="1.0"><rect x="0" y="0" alignment-baseline="middle" fill="#E5E5D0" 
width="1800" rx="20" ry="20" height="820" stroke="#919191"/><rect x="200" 
y="100" alignment-baseline="middle" fill="#E5E5E5" width="1400" rx="20" ry="20" 
height="620" stroke="#919191"/><text x="900" font-size="15" y="120" 
dominant-baseline="mathematical">store</text><rect x="400" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="400" font-size="15" y="350" 
dominant-baseline="mathematical">Store</text><polygon fill="#00CD66" 
points="380,210 410,210 425,225 410,240 380,240 395,225 " 
stroke="#008B45"/><text x="380" font-size="15" y="209" 
dominant-baseline="mathematical">Widget</text><polygon fill="#BF3EFF" 
 points="580,210 610,210 625,225 610,240 580,240 595,225 " 
stroke="#68228B"/><text x="580" font-size="15" y="209" 
dominant-baseline="mathematical">catalog</text><polygon fill="#BF3EFF" 
points="580,250 610,250 625,265 610,280 580,280 595,265 " 
stroke="#68228B"/><text x="580" font-size="15" y="249" 
dominant-baseline="mathematical">shoppingCart</text><polygon fill="#BF3EFF" 
points="580,290 610,290 625,305 610,320 580,320 595,305 " 
stroke="#68228B"/><text x="580" font-size="15" y="289" 
dominant-baseline="mathematical">shoppingTotal</text><rect x="800" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="800" font-size="15" y="350" 
dominant-baseline="mathematical">Catalog</text><rect fill="#EEEE00" x="820" 
width="20" height="20" y="190" stroke="#EEC900"/><text x="820" font-size="15" 
y="189" dominant-baseline="mathematical">currencyCode</text><polygon 
fill="#00CD66" points="780,210 810,210 825,225 810,240 780,240 795,225 " s
 troke="#008B45"/><text x="780" font-size="15" y="209" 
dominant-baseline="mathematical">Catalog</text><polygon fill="#BF3EFF" 
points="980,210 1010,210 1025,225 1010,240 980,240 995,225 " 
stroke="#68228B"/><text x="980" font-size="15" y="209" 
dominant-baseline="mathematical">currencyConverter</text><rect x="800" y="460" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="800" font-size="15" y="610" 
dominant-baseline="mathematical">ShoppingCart</text><polygon fill="#00CD66" 
points="780,470 810,470 825,485 810,500 780,500 795,485 " 
stroke="#008B45"/><text x="780" font-size="15" y="469" 
dominant-baseline="mathematical">Cart</text><polygon fill="#00CD66" 
points="780,510 810,510 825,525 810,540 780,540 795,525 " 
stroke="#008B45"/><text x="780" font-size="15" y="509" 
dominant-baseline="mathematical">Total</text><rect x="1200" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text 
 x="1200" font-size="15" y="350" 
dominant-baseline="mathematical">CurrencyConverter</text><polygon 
fill="#00CD66" points="1180,210 1210,210 1225,225 1210,240 1180,240 1195,225 " 
stroke="#008B45"/><text x="1180" font-size="15" y="209" 
dominant-baseline="mathematical">CurrencyConverter</text><polyline fill="none" 
stroke-width="2" points="625,305 645,305 645,525 795,525" 
stroke="black"/><polyline fill="none" stroke-width="2" points="625,265 650,265 
650,485 795,485" stroke="black"/><polyline fill="none" stroke-width="2" 
points="625,225 795,225" stroke="black"/><polyline fill="none" stroke-width="2" 
points="1025,225 1195,225" stroke="black"/></svg>
\ No newline at end of file

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/supplychain_diagram.svg
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/supplychain_diagram.svg?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/supplychain_diagram.svg
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/output/supplychain_diagram.svg
 Thu Aug 11 14:50:14 2011
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><svg 
xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns="http://www.w3.org/2000/svg"; 
contentScriptType="text/ecmascript" zoomAndPan="magnify" 
contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" 
version="1.0"><rect x="0" y="0" alignment-baseline="central" fill="#E5E5D0" 
width="2200" rx="20" ry="20" height="560" stroke="#919191"/><rect x="200" 
y="100" alignment-baseline="central" fill="#E5E5E5" width="1800" rx="20" 
ry="20" height="360" stroke="#919191"/><text x="1100" font-size="15" y="120" 
dominant-baseline="mathematical">supplychain</text><rect x="400" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="400" font-size="15" y="350" 
dominant-baseline="mathematical">CustomerComponent</text><polygon 
fill="#00CD66" points="380,210 410,210 425,225 410,240 380,240 395,225 " 
stroke="#008B45"/><text x="380" font-size="15" y="225" 
dominant-baseline="mathematical">CustomerComponen
 t</text><polygon fill="#BF3EFF" points="580,210 610,210 625,225 610,240 
580,240 595,225 " stroke="#68228B"/><text x="580" font-size="15" y="225" 
dominant-baseline="mathematical">retailer</text><rect x="800" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="800" font-size="15" y="350" 
dominant-baseline="mathematical">RetailerComponent</text><polygon 
fill="#00CD66" points="780,210 810,210 825,225 810,240 780,240 795,225 " 
stroke="#008B45"/><text x="780" font-size="15" y="225" 
dominant-baseline="mathematical">RetailerComponent</text><polygon 
fill="#BF3EFF" points="980,210 1010,210 1025,225 1010,240 980,240 995,225 " 
stroke="#68228B"/><text x="980" font-size="15" y="225" 
dominant-baseline="mathematical">warehouse</text><rect x="1200" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="1200" font-size="15" y="350" 
dominant-baseline="mathematical">WarehouseCompon
 ent</text><polygon fill="#00CD66" points="1180,210 1210,210 1225,225 1210,240 
1180,240 1195,225 " stroke="#008B45"/><text x="1180" font-size="15" y="225" 
dominant-baseline="mathematical">WarehouseComponent</text><polygon 
fill="#BF3EFF" points="1380,210 1410,210 1425,225 1410,240 1380,240 1395,225 " 
stroke="#68228B"/><text x="1380" font-size="15" y="225" 
dominant-baseline="mathematical">shipper</text><rect x="1600" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="1600" font-size="15" y="350" 
dominant-baseline="mathematical">ShipperComponent</text><polygon fill="#00CD66" 
points="1580,210 1610,210 1625,225 1610,240 1580,240 1595,225 " 
stroke="#008B45"/><text x="1580" font-size="15" y="225" 
dominant-baseline="mathematical">ShipperComponent</text><polygon fill="#BF3EFF" 
points="1780,210 1810,210 1825,225 1810,240 1780,240 1795,225 " 
stroke="#68228B"/><text x="1780" font-size="15" y="225" 
dominant-baseline="mathematical
 ">customer</text><polyline fill="none" stroke-width="2" points="625,225 
795,225" stroke="black"/><polyline fill="none" stroke-width="2" 
points="1025,225 1195,225" stroke="black"/><polyline fill="none" 
stroke-width="2" points="1425,225 1595,225" stroke="black"/><polyline 
fill="none" stroke-width="2" points="1825,225 1860,225 1860,155 360,155 360,225 
395,225" stroke="black"/><rect x="205" y="390" alignment-baseline="central" 
fill="#E5E5C0" width="1790" rx="20" ry="20" height="65" stroke="#919191"/><text 
x="210" font-size="15" y="400" dominant-baseline="mathematical">Included 
Composites</text><text x="210" font-size="15" y="425" 
dominant-baseline="mathematical"></text></svg>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><svg 
xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns="http://www.w3.org/2000/svg"; 
contentScriptType="text/ecmascript" zoomAndPan="magnify" 
contentStyleType="text/css" preserveAspectRatio="xMidYMid meet" 
version="1.0"><rect x="0" y="0" alignment-baseline="middle" fill="#E5E5D0" 
width="2200" rx="20" ry="20" height="560" stroke="#919191"/><rect x="200" 
y="100" alignment-baseline="middle" fill="#E5E5E5" width="1800" rx="20" ry="20" 
height="360" stroke="#919191"/><text x="1100" font-size="15" y="120" 
dominant-baseline="mathematical">supplychain</text><rect x="400" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="400" font-size="15" y="350" 
dominant-baseline="mathematical">CustomerComponent</text><polygon 
fill="#00CD66" points="380,210 410,210 425,225 410,240 380,240 395,225 " 
stroke="#008B45"/><text x="380" font-size="15" y="225" 
dominant-baseline="mathematical">CustomerComponent<
 /text><polygon fill="#BF3EFF" points="580,210 610,210 625,225 610,240 580,240 
595,225 " stroke="#68228B"/><text x="580" font-size="15" y="225" 
dominant-baseline="mathematical">retailer</text><rect x="800" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="800" font-size="15" y="350" 
dominant-baseline="mathematical">RetailerComponent</text><polygon 
fill="#00CD66" points="780,210 810,210 825,225 810,240 780,240 795,225 " 
stroke="#008B45"/><text x="780" font-size="15" y="225" 
dominant-baseline="mathematical">RetailerComponent</text><polygon 
fill="#BF3EFF" points="980,210 1010,210 1025,225 1010,240 980,240 995,225 " 
stroke="#68228B"/><text x="980" font-size="15" y="225" 
dominant-baseline="mathematical">warehouse</text><rect x="1200" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="1200" font-size="15" y="350" 
dominant-baseline="mathematical">WarehouseComponen
 t</text><polygon fill="#00CD66" points="1180,210 1210,210 1225,225 1210,240 
1180,240 1195,225 " stroke="#008B45"/><text x="1180" font-size="15" y="225" 
dominant-baseline="mathematical">WarehouseComponent</text><polygon 
fill="#BF3EFF" points="1380,210 1410,210 1425,225 1410,240 1380,240 1395,225 " 
stroke="#68228B"/><text x="1380" font-size="15" y="225" 
dominant-baseline="mathematical">shipper</text><rect x="1600" y="200" 
fill-opacity="0.75" fill="#3D59AB" width="200" rx="20" ry="20" height="130" 
stroke="#104E8B"/><text x="1600" font-size="15" y="350" 
dominant-baseline="mathematical">ShipperComponent</text><polygon fill="#00CD66" 
points="1580,210 1610,210 1625,225 1610,240 1580,240 1595,225 " 
stroke="#008B45"/><text x="1580" font-size="15" y="225" 
dominant-baseline="mathematical">ShipperComponent</text><polygon fill="#BF3EFF" 
points="1780,210 1810,210 1825,225 1810,240 1780,240 1795,225 " 
stroke="#68228B"/><text x="1780" font-size="15" y="225" 
dominant-baseline="mathematical">
 customer</text><polyline fill="none" stroke-width="2" points="625,225 795,225" 
stroke="black"/><polyline fill="none" stroke-width="2" points="1025,225 
1195,225" stroke="black"/><polyline fill="none" stroke-width="2" 
points="1425,225 1595,225" stroke="black"/><polyline fill="none" 
stroke-width="2" points="1825,225 1860,225 1860,155 360,155 360,225 395,225" 
stroke="black"/></svg>
\ No newline at end of file

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/CompositeArtifact.java
 Thu Aug 11 14:50:14 2011
@@ -46,7 +46,7 @@ public class CompositeArtifact extends A
                rectangle.setAttributeNS(null, "height", height+"");
                rectangle.setAttributeNS(null, "fill", "#E5E5E5");
                rectangle.setAttributeNS(null, "stroke", "#919191");
-               rectangle.setAttributeNS(null, "alignment-baseline", "central");
+               rectangle.setAttributeNS(null, "alignment-baseline", "middle");
                
                return rectangle;
        }

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Constant.java
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Constant.java?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Constant.java
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Constant.java
 Thu Aug 11 14:50:14 2011
@@ -21,6 +21,6 @@ public final class Constant {
        public static final int SPACING_FOR_COMPONENT_OF_SERVICE = 10 ;
        public static final int SPACING_FOR_COMPOSITE_OF_SERVICE = 30 ;
        
-       
+       public static final int SPACING_FOR_TEXT = 1 ;
 
 }

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/artifacts/Layer.java
 Thu Aug 11 14:50:14 2011
@@ -46,7 +46,7 @@ public class Layer extends Artifact{
                rectangle.setAttributeNS(null, "height", height+"");
                rectangle.setAttributeNS(null, "fill", "#E5E5D0");
                rectangle.setAttributeNS(null, "stroke", "#919191");
-               rectangle.setAttributeNS(null, "alignment-baseline", "central");
+               rectangle.setAttributeNS(null, "alignment-baseline", "middle");
                
                return rectangle;
        }

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/diagram/DiagramGenerator.java
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/diagram/DiagramGenerator.java?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/diagram/DiagramGenerator.java
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/diagram/DiagramGenerator.java
 Thu Aug 11 14:50:14 2011
@@ -99,14 +99,14 @@ public class DiagramGenerator {
                for(ComponentEntity ent: comp.getComponentList()){
 
                        addComponent(ent);
+                       addComponentProperties(ent);
                        addComponentService(ent);
                        addComponentReference(ent);
-                       addComponentProperties(ent);
                }
 
+               addCompositeProperties();
                addCompositeService();
                addCompositeReference();
-               addCompositeProperties();
 
                addComponentConnections();
                addReferencePromotion();
@@ -164,31 +164,35 @@ public class DiagramGenerator {
        }
        
        private void addInclusions() {
-               Layer inclusionLayer = new Layer();
-               int constant = 5;
-               int x0 = comp.getX()+constant;
-               int y0 = 
comp.getY()+comp.getHeight()-(Constant.COMPONENT_DEFAULT_HEIGHT/2+constant);
-               int height = Constant.COMPONENT_DEFAULT_HEIGHT/2;
-               int width = comp.getWidth()-constant*2;
-               
-               Element layerElt = inclusionLayer.addElement(doc, svgNS, x0, 
y0, height, 
-                               width , "#E5E5C0");
-               
-               Element text = Text.addTextElement(doc, svgNS, x0+constant, 
y0+constant*2, "Included Composites");
-               
-               svgRoot.appendChild(layerElt);
-               svgRoot.appendChild(text);
-               
-               text = Text.addTextElement(doc, svgNS, x0+constant, 
y0+constant*7, "");
-               
-               for(String includedComposite : comp.getIncludedComposites()){
-                       
-                       Link link = new Link();
-                       Element aLink = link.addElement(doc, svgNS, 
includedComposite+comp.getFileNameSuffix(), includedComposite);
-                       text.appendChild(aLink);
+
+               if(!comp.getIncludedComposites().isEmpty()){
                        
+                       Layer inclusionLayer = new Layer();
+                       int constant = 5;
+                       int x0 = comp.getX()+constant;
+                       int y0 = 
comp.getY()+comp.getHeight()-(Constant.COMPONENT_DEFAULT_HEIGHT/2+constant);
+                       int height = Constant.COMPONENT_DEFAULT_HEIGHT/2;
+                       int width = comp.getWidth()-constant*2;
+
+                       Element layerElt = inclusionLayer.addElement(doc, 
svgNS, x0, y0, height, 
+                                       width , "#E5E5C0");
+
+                       Element text = Text.addTextElement(doc, svgNS, 
x0+constant, y0+constant*2, "Included Composites");
+
+                       svgRoot.appendChild(layerElt);
+                       svgRoot.appendChild(text);
+
+                       text = Text.addTextElement(doc, svgNS, x0+constant, 
y0+constant*7, "");
+
+                       for(String includedComposite : 
comp.getIncludedComposites()){
+
+                               Link link = new Link();
+                               Element aLink = link.addElement(doc, svgNS, 
includedComposite+comp.getFileNameSuffix(), includedComposite);
+                               text.appendChild(aLink);
+
+                       }
+                       svgRoot.appendChild(text);
                }
-               svgRoot.appendChild(text);
        }
 
        /**
@@ -286,7 +290,7 @@ public class DiagramGenerator {
                for(String prop: ent.getProperties()){
                        PropertyArtifact pro = new PropertyArtifact();
                        Element property = pro.addElement(doc, svgNS, x, y, 
propLen);
-                       Element text = Text.addTextElement(doc, svgNS, x, y, 
prop);
+                       Element text = Text.addTextElement(doc, svgNS, x, 
y-Constant.SPACING_FOR_TEXT, prop);
 
                        svgRoot.appendChild(property);
                        svgRoot.appendChild(text);
@@ -307,7 +311,7 @@ public class DiagramGenerator {
                for(String ref: setRefOrder(ent)){
                        ReferenceArtifact refer= new ReferenceArtifact();
                        Element polygon = refer.addElement(doc, svgNS, x, y, 
refHeight);
-                       Element text = Text.addTextElement(doc, svgNS, x, 
y+refHeight/2, ref);
+                       Element text = Text.addTextElement(doc, svgNS, x, 
y-Constant.SPACING_FOR_TEXT, ref);
                        svgRoot.appendChild(polygon);
                        svgRoot.appendChild(text);
 
@@ -426,9 +430,9 @@ public class DiagramGenerator {
                        Element polygon = serve.addElement(doc, svgNS, x, y, 
serHeight);
                        Element text;
                        if(!ser.endsWith("Impl"))
-                               text = Text.addTextElement(doc, svgNS, x, 
y+serHeight/2, ser);
+                               text = Text.addTextElement(doc, svgNS, x, 
y-Constant.SPACING_FOR_TEXT, ser);
                        else
-                               text = Text.addTextElement(doc, svgNS, x, 
y+serHeight/2, "");
+                               text = Text.addTextElement(doc, svgNS, x, 
y-Constant.SPACING_FOR_TEXT, "");
 
                        svgRoot.appendChild(polygon);
                        svgRoot.appendChild(text);
@@ -455,9 +459,9 @@ public class DiagramGenerator {
                        Element polygon = serve.addElement(doc, svgNS, x, y, 
serHeight);
                        Element text;
                        if(!ser.endsWith("Impl"))
-                               text = Text.addTextElement(doc, svgNS, x, 
y+serHeight/2, ser);
+                               text = Text.addTextElement(doc, svgNS, x, 
y-Constant.SPACING_FOR_TEXT, ser);
                        else
-                               text = Text.addTextElement(doc, svgNS, x, 
y+serHeight/2, "");
+                               text = Text.addTextElement(doc, svgNS, x, 
y-Constant.SPACING_FOR_TEXT, "");
 
                        svgRoot.appendChild(polygon);
                        svgRoot.appendChild(text);
@@ -479,7 +483,7 @@ public class DiagramGenerator {
                for(String ref: comp.getReferences()){
                        ReferenceArtifact refer= new ReferenceArtifact();
                        Element polygon = refer.addElement(doc, svgNS, x, y, 
refHeight);
-                       Element text = Text.addTextElement(doc, svgNS, x, 
y+refHeight/2, ref);
+                       Element text = Text.addTextElement(doc, svgNS, x, 
y-Constant.SPACING_FOR_TEXT, ref);
                        svgRoot.appendChild(polygon);
                        svgRoot.appendChild(text);
 
@@ -501,7 +505,7 @@ public class DiagramGenerator {
                for(String prop: comp.getProperties()){
                        PropertyArtifact pro = new PropertyArtifact();
                        Element property = pro.addElement(doc, svgNS, x, y, 
propLen);
-                       Element text = Text.addTextElement(doc, svgNS, x, y, 
prop);
+                       Element text = Text.addTextElement(doc, svgNS, x, 
y-Constant.SPACING_FOR_TEXT, prop);
 
                        svgRoot.appendChild(property);
                        svgRoot.appendChild(text);

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/impl/layout/ComponentEntity.java
 Thu Aug 11 14:50:14 2011
@@ -51,7 +51,7 @@ public class ComponentEntity extends Ent
                
                setStartPosition(200);
                setHeight(Constant.COMPONENT_DEFAULT_HEIGHT);
-               setWidth(Constant.COMPONENT_DEFAULT_HEIGHT);
+               setWidth(Constant.COMPONENT_DEFAULT_WIDTH);
                
                setDefaultNoOfSers(
                                Constant.COMPONENT_DEFAULT_HEIGHT / 

Modified: 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/Main.java
URL: 
http://svn.apache.org/viewvc/tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/Main.java?rev=1156638&r1=1156637&r2=1156638&view=diff
==============================================================================
--- 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/Main.java
 (original)
+++ 
tuscany/collaboration/GSoC-2011-Nirmal/CompositeDiagramGeneratorUsingBatik/src/main/java/org/apache/tuscany/sca/main/Main.java
 Thu Aug 11 14:50:14 2011
@@ -38,7 +38,7 @@ public class Main {
        public static void main(String[] args) throws Exception {
 
                XMLReader reader = new XMLReader();
-               Document doc 
=reader.parseXMLFile(System.getProperty("user.dir")+"/input/composite_with_compositeService.xml");//composite1.xml
 composite_with_compositeService.xml");
+               Document doc 
=reader.parseXMLFile(System.getProperty("user.dir")+"/input/composite.xml");//composite1.xml
 composite_with_compositeService.xml");
                EntityBuilder eb = new EntityBuilder(doc);
                CompositeEntity comp =eb.buildCompositeEntity();
                


Reply via email to