The BNF grammar of the CMIS 1.0 specification (§ 2.1.10.2.1 at
http://docs.oasis-open.org/cmis/CMIS/v1.0/cmis-spec-v1.0.html) has:

<quantified comparison predicate> ::= <literal> “=” ANY
<multi-valued-column reference>

So only the "=" operator is allowed by the strict spec, not "<>".

Your query would be a straightforward extension that OpenCMIS could
very reasonably allow in non-strict mode (if the server chooses to
support it), but it's not in it at the moment.

Florent

PS: are you sure that you don't want to write ... WHERE NOT('keyword1'
= ANY keywords), which is legal? This is the semantics people usually
want.


On Fri, Apr 15, 2011 at 8:29 PM, Speakman, Randy <[email protected]> wrote:
> Hi,
>
> I am having an issue with a specific type of CMISQL query that fails to be 
> parsed in OpenCMIS 0.3.0 by the CmisQlStrictParser class. I have checked the 
> CMIS 1.0 specs and believe the query I have written is valid, however I would 
> like someone else to look at the query and double check it. The query 
> criteria filters on a repeating attribute that is not equal to a specific 
> value. In the query below, the keywords attribute is a repeating string. The 
> exception is thrown when QueryUtil.getWalker(...) is called and hits line 57, 
> where it checks the parser for errors. The error message in the parser says 
> "line 1:114 mismatched input '&lt;&gt;' expecting EQ".
>
> /*
> Lines 56 to 59 from QueryWalker class
> */
>        query_return parsedStatement = parser.query();
>        if (parser.hasErrors()) {
>            throw new CmisInvalidArgumentException(parser.getErrorMessages());
>        }
>
> /*
> My query
> */
> select cmis:objectId, cmis:name, cmis:contentStreamLength, keywords from 
> my_doc_type where 'keyword1' <> any keywords
>
>
>
> Thanks,
>
> Randy
>



-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source, Java EE based, Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87

Reply via email to