From 4aa0b8bca183523fab66e655ae6652bfea42255d Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 23 May 2011 06:28:01 +0000 Subject: Set the Composites contribution URI when its being read git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1126327 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sca-java-2.x/trunk') diff --git a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java index 320db7ab82..55a31e1bc0 100644 --- a/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java +++ b/sca-java-2.x/trunk/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java @@ -66,12 +66,10 @@ import java.util.List; import java.util.StringTokenizer; import javax.xml.namespace.QName; -import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; -import javax.xml.transform.dom.DOMSource; import javax.xml.xpath.XPathExpressionException; import org.apache.tuscany.sca.assembly.Binding; @@ -186,6 +184,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt Callback callback = null; QName name = null; Monitor monitor = context.getMonitor(); + Contribution contribution = context.getContribution(); try { // Read the composite document while (reader.hasNext()) { @@ -199,6 +198,9 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt // Read a composite = assemblyFactory.createComposite(); composite.setSpecVersion(Constants.SCA11_NS); + if (contribution != null) { + composite.setContributionURI(contribution.getURI()); + } composite.setName(new QName(getURIString(reader, TARGET_NAMESPACE), getString(reader, NAME))); -- cgit v1.2.3