Repository: camel Updated Branches: refs/heads/master edf2a3677 -> 6483909c2
CAMEL-10130: Removed deprecated vtdxml language Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6483909c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6483909c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6483909c Branch: refs/heads/master Commit: 6483909c2fd8d2b1a7524c4186f5db61c28240ae Parents: edf2a36 Author: Claus Ibsen <davscl...@apache.org> Authored: Thu Jul 7 11:00:26 2016 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Thu Jul 7 11:00:26 2016 +0200 ---------------------------------------------------------------------- .../apache/camel/builder/ExpressionClause.java | 37 --------------- .../camel/builder/ExpressionClauseSupport.java | 41 ---------------- .../apache/camel/builder/xml/Namespaces.java | 10 ---- .../camel/model/language/VtdXmlExpression.java | 49 -------------------- .../org/apache/camel/model/language/jaxb.index | 1 - .../camel/scala/dsl/languages/Languages.scala | 3 -- 6 files changed, 141 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/6483909c/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java b/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java index 6afe039..3a73651 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java +++ b/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java @@ -656,43 +656,6 @@ public class ExpressionClause<T> extends ExpressionDefinition { } /** - * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath - * expression using the VTD-XML library</a> - * - * @param text the expression to be evaluated - * @return the builder to continue processing the DSL - */ - public T vtdxml(String text) { - return delegate.vtdxml(text); - } - - /** - * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath - * expression using the VTD-XML library</a> - * with the specified set of namespace prefixes and URIs - * - * @param text the expression to be evaluated - * @param namespaces the namespace prefix and URIs to use - * @return the builder to continue processing the DSL - */ - public T vtdxml(String text, Namespaces namespaces) { - return delegate.vtdxml(text, namespaces); - } - - /** - * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath - * expression using the VTD-XML library</a> - * with the specified set of namespace prefixes and URIs - * - * @param text the expression to be evaluated - * @param namespaces the namespace prefix and URIs to use - * @return the builder to continue processing the DSL - */ - public T vtdxml(String text, Map<String, String> namespaces) { - return delegate.vtdxml(text, namespaces); - } - - /** * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath * expression</a> * http://git-wip-us.apache.org/repos/asf/camel/blob/6483909c/camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java b/camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java index 8abe8f3..0ef21b8 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java +++ b/camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java @@ -43,7 +43,6 @@ import org.apache.camel.model.language.SpELExpression; import org.apache.camel.model.language.SqlExpression; import org.apache.camel.model.language.TerserExpression; import org.apache.camel.model.language.TokenizerExpression; -import org.apache.camel.model.language.VtdXmlExpression; import org.apache.camel.model.language.XMLTokenizerExpression; import org.apache.camel.model.language.XPathExpression; import org.apache.camel.model.language.XQueryExpression; @@ -727,46 +726,6 @@ public class ExpressionClauseSupport<T> { } /** - * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath - * expression using the VTD-XML library</a> - * - * @param text the expression to be evaluated - * @return the builder to continue processing the DSL - */ - public T vtdxml(String text) { - return expression(new VtdXmlExpression(text)); - } - - /** - * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath - * expression using the VTD-XML library</a> - * with the specified set of namespace prefixes and URIs - * - * @param text the expression to be evaluated - * @param namespaces the namespace prefix and URIs to use - * @return the builder to continue processing the DSL - */ - public T vtdxml(String text, Namespaces namespaces) { - return vtdxml(text, namespaces.getNamespaces()); - } - - /** - * Evaluates an <a href="http://camel.apache.org/vtdxml.html">XPath - * expression using the VTD-XML library</a> - * with the specified set of namespace prefixes and URIs - * - * @param text the expression to be evaluated - * @param namespaces the namespace prefix and URIs to use - * @return the builder to continue processing the DSL - */ - public T vtdxml(String text, Map<String, String> namespaces) { - VtdXmlExpression expression = new VtdXmlExpression(text); - expression.setNamespaces(namespaces); - setExpressionType(expression); - return result; - } - - /** * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath * expression</a> * http://git-wip-us.apache.org/repos/asf/camel/blob/6483909c/camel-core/src/main/java/org/apache/camel/builder/xml/Namespaces.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/builder/xml/Namespaces.java b/camel-core/src/main/java/org/apache/camel/builder/xml/Namespaces.java index f811b7c..d4651b1 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/xml/Namespaces.java +++ b/camel-core/src/main/java/org/apache/camel/builder/xml/Namespaces.java @@ -24,7 +24,6 @@ import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; -import org.apache.camel.model.language.VtdXmlExpression; import org.apache.camel.model.language.XPathExpression; import org.apache.camel.model.language.XQueryExpression; import org.apache.camel.spi.NamespaceAware; @@ -96,15 +95,6 @@ public class Namespaces { } /** - * Creates the XPath expression using the VTD-XML library using the current namespace context - */ - public VtdXmlExpression vtdxml(String expression) { - VtdXmlExpression answer = new VtdXmlExpression(expression); - configure(answer); - return answer; - } - - /** * Creates the XPath expression using the current namespace context */ public XPathExpression xpath(String expression) { http://git-wip-us.apache.org/repos/asf/camel/blob/6483909c/camel-core/src/main/java/org/apache/camel/model/language/VtdXmlExpression.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/model/language/VtdXmlExpression.java b/camel-core/src/main/java/org/apache/camel/model/language/VtdXmlExpression.java deleted file mode 100644 index cc356a5..0000000 --- a/camel-core/src/main/java/org/apache/camel/model/language/VtdXmlExpression.java +++ /dev/null @@ -1,49 +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.camel.model.language; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; - -import org.apache.camel.spi.Metadata; - -/** - * For VTD-XML (fast and efficient XPath) expressions and predicates (requires using camel-vtdxml from Camel-Extra) - * - * @deprecated will be removed in next release - * - * @version - */ -@Metadata(label = "language,xml", title = "VtdXML") -@XmlRootElement(name = "vtdxml") -@XmlAccessorType(XmlAccessType.FIELD) -@Deprecated -public class VtdXmlExpression extends NamespaceAwareExpression { - - public VtdXmlExpression() { - } - - public VtdXmlExpression(String expression) { - super(expression); - } - - public String getLanguage() { - return "vtdxml"; - } - -} http://git-wip-us.apache.org/repos/asf/camel/blob/6483909c/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index ---------------------------------------------------------------------- diff --git a/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index b/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index index 7be5bd8..2a1c81b 100644 --- a/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index +++ b/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index @@ -36,7 +36,6 @@ SpELExpression SqlExpression TerserExpression TokenizerExpression -VtdXmlExpression XMLTokenizerExpression XPathExpression XQueryExpression http://git-wip-us.apache.org/repos/asf/camel/blob/6483909c/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/languages/Languages.scala ---------------------------------------------------------------------- diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/languages/Languages.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/languages/Languages.scala index f2a2a46..b58cbd9 100644 --- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/languages/Languages.scala +++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/languages/Languages.scala @@ -48,12 +48,10 @@ trait Languages { def spel(expression: String) = Languages.this.spel(expression)(exchange) def sql(expression: String) = Languages.this.sql(expression)(exchange) def tokenize(expression: String) = Languages.this.tokenize(expression)(exchange) - def vtdxml(expression: String) = Languages.this.vtdxml(expression)(exchange) def xpath(expression: String) = Languages.this.xpath(expression)(exchange) def xquery(expression: String) = Languages.this.xquery(expression)(exchange) def jsonpath(expression: String) = Languages.this.jsonpath(expression)(exchange) def language(language: String, expression: String) = Languages.this.language(language)(expression)(exchange) - def tokenizeXML(tagName: String, inheritNamespaceTagName : String = null) = Languages.this.tokenizeXML(tagName, inheritNamespaceTagName)(exchange) } @@ -79,7 +77,6 @@ trait Languages { def spel(expression: String)(exchange: Exchange) = Languages.evaluate(expression)(exchange)("spel") def sql(expression: String)(exchange: Exchange) = Languages.evaluate(expression)(exchange)("sql") def tokenize(expression: String)(exchange: Exchange) = Languages.evaluate(expression)(exchange)("tokenize") - def vtdxml(expression: String)(exchange: Exchange) = Languages.evaluate(expression)(exchange)("vtdxml") def xpath(expression: String)(exchange: Exchange) = Languages.evaluate(expression)(exchange)("xpath") def xquery(expression: String)(exchange: Exchange) = Languages.evaluate(expression)(exchange)("xquery") def jsonpath(expression:String)(exchange:Exchange) = Languages.evaluate(expression)(exchange)("jsonpath")