chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1521365 - in /chemistry/opencmis/trunk/chemistry-opencmis-server: chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/query/ chemistry-opencmis-server-jcr/src/test/java/org/apache/chemistry/opencmis/jcr/query/ che...
Date Tue, 10 Sep 2013 07:37:30 GMT
Author: jens
Date: Tue Sep 10 07:37:29 2013
New Revision: 1521365

URL: http://svn.apache.org/r1521365
Log:
Remove deprecated query interfaces [CMIS-719]

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/query/QueryTranslator.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/test/java/org/apache/chemistry/opencmis/jcr/query/XPathBuilderTest.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/ColumnReference.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/query/QueryTranslator.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/query/QueryTranslator.java?rev=1521365&r1=1521364&r2=1521365&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/query/QueryTranslator.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/main/java/org/apache/chemistry/opencmis/jcr/query/QueryTranslator.java
Tue Sep 10 07:37:29 2013
@@ -27,7 +27,7 @@ import org.apache.chemistry.opencmis.jcr
 import org.apache.chemistry.opencmis.server.support.query.CmisQueryWalker;
 import org.apache.chemistry.opencmis.server.support.query.QueryObject;
 import org.apache.chemistry.opencmis.server.support.query.QueryObject.SortSpec;
-import org.apache.chemistry.opencmis.server.support.query.QueryUtil;
+import org.apache.chemistry.opencmis.server.support.query.QueryUtilStrict;
 
 /**
  * Abstract base class for translating a CMIS query statement to a JCR XPath
@@ -78,12 +78,11 @@ public abstract class QueryTranslator {
      * @return
      */
     public String translateToXPath(String statement) {
-        QueryUtil queryUtil = new QueryUtil();
-        queryObject = new QueryObject(typeManager);
         ParseTreeWalker<XPathBuilder> parseTreeWalker = new ParseTreeWalker<XPathBuilder>(evaluator);
-        CmisQueryWalker walker = queryUtil.traverseStatementAndCatchExc(statement, queryObject,
parseTreeWalker);
-        walker.setDoFullTextParse(false);
+        QueryUtilStrict queryUtil = new QueryUtilStrict(statement, typeManager, parseTreeWalker,
true);
+        queryUtil.processStatementUsingCmisExceptions();
         XPathBuilder parseResult = parseTreeWalker.getResult();
+        queryObject = queryUtil.getQueryObject();
         TypeDefinition fromType = getFromName(queryObject);
 
         String pathExpression = buildPathExpression(fromType, getFolderPredicate(parseResult));

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/test/java/org/apache/chemistry/opencmis/jcr/query/XPathBuilderTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/test/java/org/apache/chemistry/opencmis/jcr/query/XPathBuilderTest.java?rev=1521365&r1=1521364&r2=1521365&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/test/java/org/apache/chemistry/opencmis/jcr/query/XPathBuilderTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-jcr/src/test/java/org/apache/chemistry/opencmis/jcr/query/XPathBuilderTest.java
Tue Sep 10 07:37:29 2013
@@ -40,7 +40,7 @@ import org.apache.chemistry.opencmis.jcr
 import org.apache.chemistry.opencmis.jcr.util.ISO8601;
 import org.apache.chemistry.opencmis.server.support.query.CalendarHelper;
 import org.apache.chemistry.opencmis.server.support.query.QueryObject;
-import org.apache.chemistry.opencmis.server.support.query.QueryUtil;
+import org.apache.chemistry.opencmis.server.support.query.QueryUtilStrict;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -265,10 +265,10 @@ public class XPathBuilderTest {
     }
 
     private XPathBuilder execute(String statement) {
-        QueryUtil queryUtil = new QueryUtil();
         QueryObject queryObject = new QueryObject(typeManager);
         ParseTreeWalker<XPathBuilder> parseTreeWalker = new ParseTreeWalker<XPathBuilder>(new
EvaluatorXPath());
-        queryUtil.traverseStatementAndCatchExc(statement, queryObject, parseTreeWalker);
+        QueryUtilStrict queryUtil = new QueryUtilStrict(statement, typeManager, parseTreeWalker);
+        queryUtil.processStatementUsingCmisExceptions();
         return parseTreeWalker.getResult();
     }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/ColumnReference.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/ColumnReference.java?rev=1521365&r1=1521364&r2=1521365&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/ColumnReference.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/ColumnReference.java
Tue Sep 10 07:37:29 2013
@@ -44,12 +44,6 @@ public class ColumnReference extends Cmi
         return qualifier;
     }
 
-    /** @deprecated use {@link #getQualifier} instead. */
-    @Deprecated
-    public String getTypeQueryName() {
-        return getQualifier();
-    }
-
     public String getPropertyQueryName() {
         return propQueryName;
     }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java?rev=1521365&r1=1521364&r2=1521365&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryObject.java
Tue Sep 10 07:37:29 2013
@@ -252,21 +252,6 @@ public class QueryObject {
         return getRequestedProperties(true);
     }
 
-    /**
-     * return a map of all columns that have been requested in the SELECT part
-     * of the statement.
-     * 
-     * @return a map with a String as a key and value. key is the query name of
-     *         the property, value is the alias if an alias was given or the
-     *         query name otherwise.
-     * 
-     * @deprecated Use getRequestedPropertiesByAlias instead.
-     */
-    @Deprecated
-    public Map<String, String> getRequestedProperties() {
-        return getRequestedProperties(false);
-    }
-
     private Map<String, String> getRequestedProperties(boolean byAlias) {
 
         Map<String, String> res = new HashMap<String, String>();
@@ -293,21 +278,6 @@ public class QueryObject {
      * return a map of all functions that have been requested in the SELECT part
      * of the statement.
      * 
-     * @return a map with a String as a key and value. key is the function name
-     *         of the property, value is the alias if an alias was given or the
-     *         function name otherwise.
-     * 
-     * @deprecated Use getRequestedPropertiesByAlias instead.
-     */
-    @Deprecated
-    public Map<String, String> getRequestedFuncs() {
-        return getRequestedFuncs(false);
-    }
-
-    /**
-     * return a map of all functions that have been requested in the SELECT part
-     * of the statement.
-     * 
      * @return a map with a String as a key and value. key is the alias if an
      *         alias was given or the function name otherwise, value is the a
      *         name of the property.



Mime
View raw message