diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-14 18:40:38 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-01-14 18:40:38 +0000 |
commit | 734d1d84e2b097d334bf57331f14af0ee250ca0c (patch) | |
tree | 9d33a9ae904da80b9ae5bbebd5108890e394bbe8 /branches/sca-java-1.x/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java | |
parent | fb6e7cea27cad1d00df2d5acb8b383f256dccbb2 (diff) |
Reverting changes from revision #734356 and there was some merge conflicts that were not supposed to get to svn.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@734475 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java')
-rw-r--r-- | branches/sca-java-1.x/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/branches/sca-java-1.x/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java b/branches/sca-java-1.x/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java index 04431f7eab..36e959ea21 100644 --- a/branches/sca-java-1.x/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java +++ b/branches/sca-java-1.x/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java @@ -38,7 +38,7 @@ import org.apache.tuscany.sca.monitor.Monitor; * * @version $Rev$ $Date$ */ -public class AnyAttributeProcessor extends BaseStAXArtifactProcessor implements StAXAttributeProcessor<AnyAttributeWrapper> { +public class AnyAttributeProcessor extends BaseStAXArtifactProcessor implements StAXAttributeProcessor<String> { private static final QName ANY_ATTRIBUTE = new QName(Constants.XMLSCHEMA_NS, "anyAttribute"); public AnyAttributeProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) { @@ -49,23 +49,21 @@ public class AnyAttributeProcessor extends BaseStAXArtifactProcessor implements return ANY_ATTRIBUTE; } - public Class<AnyAttributeWrapper> getModelType() { - return AnyAttributeWrapper.class; + public Class<String> getModelType() { + return String.class; } - public AnyAttributeWrapper read(QName attributeName, XMLStreamReader reader) throws ContributionReadException, XMLStreamException { - AnyAttributeWrapper attributeWrapper = new AnyAttributeWrapper(); - attributeWrapper.setQName(attributeName); - attributeWrapper.setValue(reader.getAttributeValue(attributeName.getNamespaceURI(), attributeName.getLocalPart())); - return attributeWrapper; + public String read(QName attributeName, XMLStreamReader reader) throws ContributionReadException, XMLStreamException { + return reader.getAttributeValue(attributeName.getNamespaceURI(), attributeName.getLocalPart()); } - public void write(AnyAttributeWrapper attributeWrapper, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException { - writer.writeAttribute(attributeWrapper.getQName().getPrefix(), attributeWrapper.getQName().getNamespaceURI(), attributeWrapper.getQName().getLocalPart(), attributeWrapper.getValue().toString()); + public void write(String value, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException { + writer.setPrefix(ANY_ATTRIBUTE.getPrefix(), ANY_ATTRIBUTE.getNamespaceURI()); + writer.writeAttribute(ANY_ATTRIBUTE.getLocalPart(), value); } - public void resolve(AnyAttributeWrapper arg0, ModelResolver arg1) throws ContributionResolveException { + public void resolve(String arg0, ModelResolver arg1) throws ContributionResolveException { } } |