chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1441477 [2/2] - in /chemistry/opencmis/trunk/chemistry-opencmis-server: chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/query/ chemistry-opencmis-server-inmemory/src/test/java/org/apache/chemistry/op...
Date Fri, 01 Feb 2013 15:08:18 GMT
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryUtil.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/QueryUtil.java?rev=1441477&r1=1441476&r2=1441477&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryUtil.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryUtil.java
Fri Feb  1 15:08:17 2013
@@ -1,104 +1,132 @@
-/*
- * 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.chemistry.opencmis.server.support.query;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.BaseRecognizer;
-import org.antlr.runtime.CharStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.RecognitionException;
-import org.antlr.runtime.TokenSource;
-import org.antlr.runtime.TokenStream;
-import org.antlr.runtime.tree.CommonTree;
-import org.antlr.runtime.tree.CommonTreeNodeStream;
-import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
-import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
-import org.apache.chemistry.opencmis.server.support.query.CmisQlStrictParser_CmisBaseGrammar.query_return;
-
-/**
- * Utility class providing convenience methods for parsing CMIS queries. 
- *
- */
-public class QueryUtil {
-
-    private CmisQueryWalker walker;
-
-    // convenience method because everybody needs this piece of code
-    public static CmisQueryWalker getWalker(String statement) throws RecognitionException
{
-        
-        CharStream input = new ANTLRStringStream(statement);
-        TokenSource lexer = new CmisQlStrictLexer(input);
-        TokenStream tokens = new CommonTokenStream(lexer);
-        CmisQlStrictParser parser = new CmisQlStrictParser(tokens);
-        CommonTree parserTree; // the ANTLR tree after parsing phase
-
-        query_return parsedStatement = parser.query();
-        if (parser.hasErrors()) {
-            throw new CmisInvalidArgumentException(parser.getErrorMessages());
-        } else if ( tokens.index()!=tokens.size() ) {
-            throw new  CmisInvalidArgumentException("Query String has illegal tokens after
end of statement: " + tokens.get(tokens.index()));
-        }
-        
-        parserTree = (CommonTree) parsedStatement.getTree();
-
-        CommonTreeNodeStream nodes = new CommonTreeNodeStream(parserTree);
-        nodes.setTokenStream(tokens);
-        CmisQueryWalker walker = new CmisQueryWalker(nodes);
-        return walker;
-    }
-
-    public CmisQueryWalker traverseStatement(String statement, QueryObject queryObj, PredicateWalkerBase
pw) throws UnsupportedEncodingException, IOException, RecognitionException {
-        walker = getWalker(statement);
-        walker.query(queryObj, pw);
-        walker.getWherePredicateTree();
-        return walker;        
-    }
-    
-    public CmisQueryWalker traverseStatementAndCatchExc(String statement, QueryObject queryObj,
PredicateWalkerBase pw) {
-        try {
-            return traverseStatement(statement, queryObj, pw);
-        } catch (RecognitionException e) {
-            String errorMsg = queryObj.getErrorMessage();
-            throw new CmisInvalidArgumentException("Walking of statement failed with RecognitionException
error: \n   " + errorMsg);
-        } catch (CmisBaseException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new CmisInvalidArgumentException("Walking of statement failed with exception:
\n   " + e);
-        }
-    }
-
-    public String getErrorMessage(RecognitionException e) {
-        if (null == walker)
-            return e.toString();
-        else
-            return getErrorMessage(walker, e);
-    }
-    
-    private static String getErrorMessage(BaseRecognizer recognizer, RecognitionException
e) {
-        String[] tokenNames = recognizer.getTokenNames();
-        // String hdr = walker.getErrorHeader(e);
-        String hdr = "Line "+e.line+":"+e.charPositionInLine;
-        String msg = recognizer.getErrorMessage(e, tokenNames);
-        return hdr + " " + msg;
-    }
-    
-}
+/*
+ * 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.chemistry.opencmis.server.support.query;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.CharStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.TokenSource;
+import org.antlr.runtime.TokenStream;
+import org.antlr.runtime.tree.CommonTree;
+import org.antlr.runtime.tree.CommonTreeNodeStream;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
+import org.apache.chemistry.opencmis.server.support.query.CmisQlStrictParser_CmisBaseGrammar.query_return;
+
+/**
+ * Support class to assist in parsing and processing CMIS queries.
+ * This class inherits from QueryUtilBase to use the error handling
+ * methods. It does not follow its design and is only maintained for
+ * backwards compatibility.
+ * 
+ * @deprecated 
+ *
+ */
+public class QueryUtil extends QueryUtilBase<CmisQueryWalker> {
+    
+    public QueryUtil() {
+        super(null, null, null);
+    }
+    
+    @Override
+    public CommonTree parseStatement() throws RecognitionException {
+        throw new CmisRuntimeException("Not supported, use getWalker to parse a query using
this legacy class.");        
+    }
+
+    @Override
+    public void walkStatement() throws CmisQueryException, RecognitionException {
+        throw new CmisRuntimeException("Not supported, use getWalker to parse a query using
this legacy class.");
+    }
+
+    /**
+     * Parse a CMISQL statement and return a tree that can be walked to evaluate the expression
+     * of the query (usually not used directly but through traverseStatement)
+     * 
+     * @param statement
+     *      CMISQL statement
+     * @return
+     *      an AntLR tree grammar that can be traversed to evaluate the query
+     *      
+     * @throws RecognitionException
+     */
+    public static CmisQueryWalker getWalker(String statement) throws RecognitionException
{
+        CharStream input = new ANTLRStringStream(statement);
+        TokenSource lexer = new CmisQlStrictLexer(input);
+        TokenStream tokens = new CommonTokenStream(lexer);
+        CmisQlStrictParser parser = new CmisQlStrictParser(tokens);
+        CommonTree parserTree; // the ANTLR tree after parsing phase
+
+        query_return parsedStatement = parser.query();
+        if (parser.hasErrors()) {
+            throw new CmisInvalidArgumentException(parser.getErrorMessages());
+        } else if ( tokens.index()!=tokens.size() ) {
+            throw new  CmisInvalidArgumentException("Query String has illegal tokens after
end of statement: " + tokens.get(tokens.index()));
+        }
+        
+        parserTree = (CommonTree) parsedStatement.getTree();
+
+        CommonTreeNodeStream nodes = new CommonTreeNodeStream(parserTree);
+        nodes.setTokenStream(tokens);
+        CmisQueryWalker walker = new CmisQueryWalker(nodes);
+        return walker;               
+    }
+    
+    /**
+     * Parse and process a CMISQL statement using the higher level support classes
+     * 
+     * @param statement
+     *      CMISQL statement
+     * @param queryObj
+     *      CMIS query object filled with information what data need to be retrieved
+     * @param pw
+     *      predicate walker that evaluates the where clause
+     * @return
+     *      AntLR tree grammar created by this statement
+     *      
+     * @throws UnsupportedEncodingException
+     * @throws IOException
+     * @throws RecognitionException
+     */
+    public CmisQueryWalker traverseStatement(String statement, QueryObject queryObj, PredicateWalkerBase
pw)
+            throws UnsupportedEncodingException, IOException, RecognitionException {
+        walker = getWalker(statement);
+        walker.query(queryObj, pw);
+        walker.getWherePredicateTree();
+        return walker;        
+    }
+
+    public CmisQueryWalker traverseStatementAndCatchExc(String statement, QueryObject queryObj,
PredicateWalkerBase pw) {
+        try {
+            return traverseStatement(statement, queryObj, pw);
+        } catch (RecognitionException e) {
+            String errorMsg = queryObj.getErrorMessage();
+            throw new CmisInvalidArgumentException("Walking of statement failed with RecognitionException
error: \n   " + errorMsg, e);
+        } catch (CmisBaseException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new CmisInvalidArgumentException("Walking of statement failed with exception:
\n   ", e);
+        }
+    }
+
+}

Added: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryUtilBase.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/QueryUtilBase.java?rev=1441477&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryUtilBase.java
(added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryUtilBase.java
Fri Feb  1 15:08:17 2013
@@ -0,0 +1,139 @@
+/*
+ * 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.chemistry.opencmis.server.support.query;
+
+import org.antlr.runtime.BaseRecognizer;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.TokenStream;
+import org.antlr.runtime.tree.CommonTree;
+import org.antlr.runtime.tree.TreeParser;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
+import org.apache.chemistry.opencmis.server.support.TypeManager;
+
+/**
+ * Utility class to help parsing and processing a query statement using the AntLR parser
+ * Subclasses have to implement methods that setup parser and query walker and 
+ * parse and process a query. This class provides common methods for error handling
+ * and for storing the necessary opencmis objects for query support
+ *
+ * @param <T>
+ *      AntLR tree grammar, will usually be a CmisQueryWalker but can be custom class for
+ *       customized (extended) parsers
+ */
+public abstract class QueryUtilBase<T extends TreeParser> {
+
+    protected T walker;
+    protected QueryObject queryObj;
+    protected PredicateWalkerBase predicateWalker;
+    protected String statement;
+ 
+    protected CommonTree parserTree; // the ANTLR tree after parsing phase
+    protected TokenStream tokens;    // the ANTLR token stream
+
+    /**
+     * Perform the first phase of query processing. Setup lexer and parser, 
+     * parse the statement, check for syntax errors and create an AST
+     * 
+     * @return
+     *      the abstract syntax tree of the parsed statement
+     *      
+     * @throws RecognitionException
+     */
+    public abstract CommonTree parseStatement() throws RecognitionException;
+    
+    /**
+     * Perform the second phase of  query processing, analyzes the select 
+     * part, check for semantic errors, fill the query object. Usually a 
+     * walker will be CmisQueryWalker (or subclass) if the supporting 
+     * OpenCMIS query classes are used. 
+     * 
+     * @throws RecognitionException
+     */    
+    public abstract void walkStatement() throws RecognitionException;;
+
+    /**
+     * Fully process a query by parsing and walking it and setting up the
+     * supporting objects
+     * 
+     * @throws RecognitionException
+     */
+    public void processStatement() throws RecognitionException {
+        parseStatement();
+        walkStatement();
+     }
+
+    protected QueryUtilBase(String statement, TypeManager tm, PredicateWalkerBase pw) {
+        walker = null;
+        queryObj = new QueryObject(tm);
+        predicateWalker = pw; 
+        this.statement = statement;
+    }
+    
+    public T getWalker() {
+        return walker;
+    }
+    
+    public PredicateWalkerBase getPredicateWalker() {
+        return predicateWalker;
+    }
+    
+    public QueryObject getQueryObject() {
+        return queryObj;
+    }
+    
+    public String getStatement() {
+        return statement;
+    }
+        
+    /**
+     * Same as traverseStatement but throws only CMIS Exceptions
+     * 
+     * @param statement
+     *      CMISQL statement to parse
+     * @return
+     */
+    public void  processStatementUsingCmisExceptions() {
+        try {
+            processStatement();
+        } catch (RecognitionException e) {
+            String errorMsg = queryObj.getErrorMessage();
+            throw new CmisInvalidArgumentException("Walking of statement failed with RecognitionException
error: \n   " + errorMsg, e);
+        } catch (CmisBaseException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new CmisInvalidArgumentException("Walking of statement failed with exception:
\n   ", e);
+        }
+    }
+
+    public String getErrorMessage(RecognitionException e) {
+        if (null == walker)
+            return e.toString();
+        else
+            return getErrorMessage(walker, e);
+    }
+    
+    private static String getErrorMessage(BaseRecognizer recognizer, RecognitionException
e) {
+        String[] tokenNames = recognizer.getTokenNames();
+        String hdr = "Line "+e.line+":"+e.charPositionInLine;
+        String msg = recognizer.getErrorMessage(e, tokenNames);
+        return hdr + " " + msg;
+    }
+
+}
\ No newline at end of file

Added: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryUtilStrict.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/QueryUtilStrict.java?rev=1441477&view=auto
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryUtilStrict.java
(added)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/query/QueryUtilStrict.java
Fri Feb  1 15:08:17 2013
@@ -0,0 +1,80 @@
+/*
+ * 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.chemistry.opencmis.server.support.query;
+
+import org.antlr.runtime.ANTLRStringStream;
+import org.antlr.runtime.CharStream;
+import org.antlr.runtime.CommonTokenStream;
+import org.antlr.runtime.RecognitionException;
+import org.antlr.runtime.TokenSource;
+import org.antlr.runtime.TokenStream;
+import org.antlr.runtime.tree.CommonTree;
+import org.antlr.runtime.tree.CommonTreeNodeStream;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
+import org.apache.chemistry.opencmis.server.support.TypeManager;
+import org.apache.chemistry.opencmis.server.support.query.CmisQlStrictParser_CmisBaseGrammar.query_return;
+
+public class QueryUtilStrict extends QueryUtilBase<CmisQueryWalker> {
+
+    private CommonTree parserTree; // the ANTLR tree after parsing phase
+    private TokenStream tokens;    // the ANTLR token stream
+    private boolean parseFulltext = true; 
+    
+    public QueryUtilStrict(String statement, TypeManager tm, PredicateWalkerBase pw) {
+        super(statement, tm, pw);
+    }
+
+    public QueryUtilStrict(String statement, TypeManager tm, PredicateWalkerBase pw, boolean
parseFulltext) {
+        super(statement, tm, pw);
+        this.parseFulltext = parseFulltext;
+    }
+
+    @Override
+    public CommonTree parseStatement() throws RecognitionException {
+        CharStream input = new ANTLRStringStream(statement);
+        TokenSource lexer = new CmisQlStrictLexer(input);
+        tokens = new CommonTokenStream(lexer);
+        CmisQlStrictParser parser = new CmisQlStrictParser(tokens);
+
+        query_return parsedStatement = parser.query();
+        if (parser.hasErrors()) {
+            throw new CmisInvalidArgumentException(parser.getErrorMessages());
+        } else if (tokens.index() != tokens.size()) {
+            throw new CmisInvalidArgumentException("Query String has illegal tokens after
end of statement: " + tokens.get(tokens.index()));
+        }
+        
+        parserTree = (CommonTree) parsedStatement.getTree();
+        return parserTree;
+    }
+    
+    @Override
+    public void walkStatement() throws RecognitionException {
+        
+        if (null == parserTree)
+            throw new CmisQueryException("You must parse the query before you can walk it.");
+        
+        CommonTreeNodeStream nodes = new CommonTreeNodeStream(parserTree);
+        nodes.setTokenStream(tokens);
+        walker = new CmisQueryWalker(nodes);
+        walker.setDoFullTextParse(parseFulltext);
+        walker.query(queryObj, predicateWalker);
+        walker.getWherePredicateTree();    
+    }
+
+}

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/AbstractParserTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/AbstractParserTest.java?rev=1441477&r1=1441476&r2=1441477&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/AbstractParserTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/AbstractParserTest.java
Fri Feb  1 15:08:17 2013
@@ -28,6 +28,7 @@ import org.antlr.runtime.BaseRecognizer;
 import org.antlr.runtime.CharStream;
 import org.antlr.runtime.CommonTokenStream;
 import org.antlr.runtime.Lexer;
+import org.antlr.runtime.RecognizerSharedState;
 import org.antlr.runtime.TokenStream;
 import org.antlr.runtime.tree.CommonTree;
 import org.antlr.stringtemplate.StringTemplate;
@@ -45,14 +46,16 @@ public class AbstractParserTest{
     private static final Logger log = LoggerFactory.getLogger(AbstractParserTest.class);
 
     protected String superGrammarName;
+    protected String baseLexerName;
     Class<?> lexer;
     Class<?> parser;
     protected String treeParserPath;
 
-    protected void setUp(Class<?> lexerClass, Class<?> parserClass, String baseGrammar)
 {
+    protected void setUp(Class<?> lexerClass, Class<?> parserClass, String baseGrammar,
String baseLexer)  {
         lexer = lexerClass;
         parser = parserClass;
         this.superGrammarName = baseGrammar;
+        this.baseLexerName = baseLexer;
     }
 
     protected void tearDown() {
@@ -118,9 +121,19 @@ public class AbstractParserTest{
         Constructor<?> lexConstructor = lexer.getConstructor(lexArgTypes);
         Object[] lexArgs = new Object[]{input};                             // assign value
to lexer's args
         Object lexObj = lexConstructor.newInstance(lexArgs);                // makes new
instance of lexer
-
-        Method ruleName = lexer.getMethod("m"+testRuleName, new Class[0]);
-
+        Method ruleName = null;
+                
+        try {
+            ruleName = lexer.getMethod("m"+testRuleName, new Class[0]);
+        } catch (NoSuchMethodException e) {
+            // try superclass lexers
+            Class<?>lexerSuper = Class.forName(lexer.getName() + "_" + baseLexerName);
+            ruleName = lexerSuper.getMethod("m"+testRuleName, new Class[0]);
+            lexArgTypes = new Class[]{CharStream.class, CmisQlStrictLexer.class};
+            lexArgs = new Object[]{input, lexObj };     
+            lexConstructor = lexerSuper.getConstructor(lexArgTypes);
+            lexObj = lexConstructor.newInstance(lexArgs);     
+        }
         /** Invoke lexer rule, and get the current index in CharStream */
         ruleName.invoke(lexObj, new Object[0]);
         Method ruleName2 = lexer.getMethod("getCharIndex", new Class[0]);

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserExt.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserExt.java?rev=1441477&r1=1441476&r2=1441477&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserExt.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserExt.java
Fri Feb  1 15:08:17 2013
@@ -30,7 +30,7 @@ public class TestParserExt extends Abstr
 
     @Before
     public void setUp() throws Exception {
-        super.setUp(CmisQlStrictLexer.class, CmisQlExtParser.class, null);
+        super.setUp(CmisQlExtLexer.class, CmisQlExtParser.class, null, "CmisBaseLexer");
     }
 
     @Override

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserStrict.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserStrict.java?rev=1441477&r1=1441476&r2=1441477&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserStrict.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserStrict.java
Fri Feb  1 15:08:17 2013
@@ -34,7 +34,7 @@ public class TestParserStrict extends Ab
 
     @Before
     public void setUp() {
-        super.setUp(CmisQlStrictLexer.class, CmisQlStrictParser.class, "CmisBaseGrammar");
+        super.setUp(CmisQlStrictLexer.class, CmisQlStrictParser.class, "CmisBaseGrammar",
"CmisBaseLexer");
     }
 
     @Override

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserTextSearch.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserTextSearch.java?rev=1441477&r1=1441476&r2=1441477&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserTextSearch.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/query/TestParserTextSearch.java
Fri Feb  1 15:08:17 2013
@@ -28,7 +28,7 @@ public class TestParserTextSearch extend
 
     @Before
     public void setUp() {
-        super.setUp(TextSearchLexer.class, TextSearchParser.class, null);
+        super.setUp(TextSearchLexer.class, TextSearchParser.class, null, "CmisBaseLexer");
     }
 
     @Override



Mime
View raw message