diff options
Diffstat (limited to 'branches/sca-java-1.x/modules/implementation-widget')
-rw-r--r-- | branches/sca-java-1.x/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/branches/sca-java-1.x/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java b/branches/sca-java-1.x/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java index a8cf25207b..d54999a8b1 100644 --- a/branches/sca-java-1.x/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java +++ b/branches/sca-java-1.x/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; @@ -41,7 +42,6 @@ import org.apache.tuscany.sca.contribution.service.ContributionWriteException; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.apache.tuscany.sca.monitor.impl.ProblemImpl; /** * @@ -49,7 +49,7 @@ import org.apache.tuscany.sca.monitor.impl.ProblemImpl; * * @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; @@ -160,16 +160,13 @@ public class WidgetImplementationProcessor implements StAXArtifactProcessor<Widg } public void write(WidgetImplementation implementation, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException { - // Write <implementation.widget> - writer.writeStartElement(IMPLEMENTATION_WIDGET.getNamespaceURI(), IMPLEMENTATION_WIDGET.getLocalPart()); - writer.writeNamespace("widget",IMPLEMENTATION_WIDGET.getNamespaceURI()); - + writeStart(writer, IMPLEMENTATION_WIDGET.getNamespaceURI(), IMPLEMENTATION_WIDGET.getLocalPart()); if (implementation.getLocation() != null) { writer.writeAttribute("location", implementation.getLocation()); } - writer.writeEndElement(); + writeEnd(writer); } } |