diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-09-08 22:27:43 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-09-08 22:27:43 +0000 |
commit | 34a6bf5aea02a1092d3eca524020f8194acfbcb3 (patch) | |
tree | e8dc17377461c8c0162a2797bed29df010d4f526 /branches/sca-java-1.5.1/modules/implementation-widget/src | |
parent | c2a7566c644a172079127381706a9aff407fc24e (diff) |
TUSCANY-3264 - Tyiding up how we write the schema prefix as per StAX spec
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@812715 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.5.1/modules/implementation-widget/src')
-rw-r--r-- | branches/sca-java-1.5.1/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/branches/sca-java-1.5.1/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java b/branches/sca-java-1.5.1/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java index 442191a568..c0087e97fe 100644 --- a/branches/sca-java-1.5.1/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java +++ b/branches/sca-java-1.5.1/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java @@ -33,6 +33,7 @@ import org.apache.tuscany.sca.assembly.xml.Constants; import org.apache.tuscany.sca.contribution.Artifact; import org.apache.tuscany.sca.contribution.ContributionFactory; import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; +import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.contribution.service.ContributionReadException; @@ -48,7 +49,7 @@ import org.apache.tuscany.sca.monitor.Problem.Severity; * * @version $Rev$ $Date$ */ -public class WidgetImplementationProcessor implements StAXArtifactProcessor<WidgetImplementation> { +public class WidgetImplementationProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<WidgetImplementation> { private static final QName IMPLEMENTATION_WIDGET = new QName(Constants.SCA10_TUSCANY_NS, "implementation.widget"); private AssemblyFactory assemblyFactory; @@ -159,17 +160,13 @@ public class WidgetImplementationProcessor implements StAXArtifactProcessor<Widg } public void write(WidgetImplementation implementation, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException { - - // Write <implementation.widget> - // writer.setPrefix("widget",IMPLEMENTATION_WIDGET.getNamespaceURI()); - writer.writeStartElement(IMPLEMENTATION_WIDGET.getNamespaceURI(), IMPLEMENTATION_WIDGET.getLocalPart()); - writer.writeNamespace("widget",IMPLEMENTATION_WIDGET.getNamespaceURI()); - + // Write <implementation.widget> + writeStart(writer, IMPLEMENTATION_WIDGET.getNamespaceURI(), IMPLEMENTATION_WIDGET.getLocalPart()); if (implementation.getLocation() != null) { writer.writeAttribute("location", implementation.getLocation()); } - writer.writeEndElement(); + writeEnd(writer); } } |