diff options
5 files changed, 8 insertions, 44 deletions
diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/Constants.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/Constants.java deleted file mode 100644 index 10fe72280c..0000000000 --- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/Constants.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.contribution; - -/** - * Constants used in SCA contribution. - * - * @version $Rev$ $Date$ - */ -public interface Constants { - String XMLSCHEMA_NS = "http://www.w3.org/2001/XMLSchema"; - String SCA11_NS = "http://docs.oasis-open.org/ns/opencsa/sca/200903"; - String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1"; -} diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXArtifactProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXArtifactProcessor.java index a50c19238f..a31b24a295 100644 --- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXArtifactProcessor.java +++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXArtifactProcessor.java @@ -33,7 +33,6 @@ import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; -import org.apache.tuscany.sca.contribution.Constants; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; @@ -49,8 +48,8 @@ import org.apache.tuscany.sca.monitor.Problem.Severity; */ public class ExtensibleStAXArtifactProcessor implements StAXArtifactProcessor<Object> { private static final Logger logger = Logger.getLogger(ExtensibleStAXArtifactProcessor.class.getName()); - - private static final QName ANY_ELEMENT = new QName(Constants.XMLSCHEMA_NS, "any"); + private static final String XMLSCHEMA_NS = "http://www.w3.org/2001/XMLSchema"; + public static final QName ANY_ELEMENT = new QName(XMLSCHEMA_NS, "any"); private XMLInputFactory inputFactory; private XMLOutputFactory outputFactory; diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java index a875689e1a..084396f733 100644 --- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java +++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ExtensibleStAXAttributeProcessor.java @@ -35,7 +35,6 @@ import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import org.apache.tuscany.sca.assembly.Extension; -import org.apache.tuscany.sca.contribution.Constants; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; @@ -52,8 +51,8 @@ import org.apache.tuscany.sca.monitor.Problem.Severity; public class ExtensibleStAXAttributeProcessor implements StAXAttributeProcessor<Object> { private static final Logger logger = Logger.getLogger(ExtensibleStAXAttributeProcessor.class.getName()); - - private static final QName ANY_ATTRIBUTE = new QName(Constants.XMLSCHEMA_NS, "anyAttribute"); + private static final String XMLSCHEMA_NS = "http://www.w3.org/2001/XMLSchema"; + public static final QName ANY_ATTRIBUTE = new QName(XMLSCHEMA_NS, "anyAttribute"); private XMLInputFactory inputFactory; private XMLOutputFactory outputFactory; diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java index 4091323f05..3188b1ca60 100644 --- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java +++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java @@ -25,11 +25,11 @@ import javax.xml.stream.XMLStreamWriter; import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.Extension; -import org.apache.tuscany.sca.contribution.Constants; import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; import org.apache.tuscany.sca.contribution.processor.ContributionWriteException; +import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXAttributeProcessor; import org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.core.FactoryExtensionPoint; @@ -41,7 +41,6 @@ import org.apache.tuscany.sca.monitor.Monitor; * @version $Rev$ $Date$ */ public class AnyAttributeProcessor extends BaseStAXArtifactProcessor implements StAXAttributeProcessor<Extension> { - private static final QName ANY_ATTRIBUTE = new QName(Constants.XMLSCHEMA_NS, "anyAttribute"); private AssemblyFactory assemblyFactory; @@ -50,7 +49,7 @@ public class AnyAttributeProcessor extends BaseStAXArtifactProcessor implements } public QName getArtifactType() { - return ANY_ATTRIBUTE; + return ExtensibleStAXAttributeProcessor.ANY_ATTRIBUTE; } public Class<Extension> getModelType() { diff --git a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyElementProcessor.java b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyElementProcessor.java index 931a0bce4a..0b471d1146 100644 --- a/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyElementProcessor.java +++ b/java/sca/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyElementProcessor.java @@ -28,9 +28,9 @@ import javax.xml.stream.XMLStreamWriter; import org.apache.tuscany.sca.assembly.AssemblyFactory; import org.apache.tuscany.sca.assembly.Extension; import org.apache.tuscany.sca.common.xml.stax.StAXHelper; -import org.apache.tuscany.sca.contribution.Constants; import org.apache.tuscany.sca.contribution.processor.ContributionReadException; import org.apache.tuscany.sca.contribution.processor.ContributionResolveException; +import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.core.ExtensionPointRegistry; @@ -38,8 +38,6 @@ import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.monitor.Monitor; public class AnyElementProcessor implements StAXArtifactProcessor<Extension> { - private static final QName ANY_ELEMENT = new QName(Constants.XMLSCHEMA_NS, "any"); - private AssemblyFactory assemblyFactory; private StAXHelper helper; @@ -55,7 +53,7 @@ public class AnyElementProcessor implements StAXArtifactProcessor<Extension> { } public QName getArtifactType() { - return ANY_ELEMENT; + return ExtensibleStAXArtifactProcessor.ANY_ELEMENT; } public Class<Extension> getModelType() { |