mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged CMIS063 to HEAD
17191: MOB-1332: Update Web Services TCK (Java/.NET) to 0.7 17203: CMIS Query updates. 17211: CMIS WS V1.0 17213: Fix Apache CXF logging issues in exploded deploy mode. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17263 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -366,14 +366,6 @@ public class CMISQueryParser
|
||||
case CMISParser.PRED_FTS:
|
||||
String ftsExpression = predicateNode.getChild(0).getText();
|
||||
FTSQueryParser ftsQueryParser = new FTSQueryParser();
|
||||
if (options.getQueryMode() == CMISQueryMode.CMS_STRICT)
|
||||
{
|
||||
// set default AND
|
||||
}
|
||||
else
|
||||
{
|
||||
// set default from the options
|
||||
}
|
||||
Selector selector;
|
||||
if (predicateNode.getChildCount() > 1)
|
||||
{
|
||||
@@ -395,8 +387,20 @@ public class CMISQueryParser
|
||||
throw new CMISQueryException("A selector must be specified when there are two or more selectors");
|
||||
}
|
||||
}
|
||||
return ftsQueryParser.buildFTS(ftsExpression.substring(1, ftsExpression.length() - 1), factory, functionEvaluationContext, selector, columns, Connective.OR,
|
||||
Connective.OR, null);
|
||||
Connective defaultConnective;
|
||||
Connective defaultFieldConnective;
|
||||
if (options.getQueryMode() == CMISQueryMode.CMS_STRICT)
|
||||
{
|
||||
defaultConnective = Connective.AND;
|
||||
defaultFieldConnective = Connective.AND;
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultConnective = options.getDefaultFTSConnective();
|
||||
defaultFieldConnective = options.getDefaultFTSFieldConnective();
|
||||
}
|
||||
return ftsQueryParser.buildFTS(ftsExpression.substring(1, ftsExpression.length() - 1), factory, functionEvaluationContext, selector, columns, defaultConnective,
|
||||
defaultFieldConnective, null);
|
||||
case CMISParser.PRED_IN:
|
||||
functionName = In.NAME;
|
||||
function = factory.getFunction(functionName);
|
||||
@@ -1106,6 +1110,14 @@ public class CMISQueryParser
|
||||
throw new CMISQueryException("Type is not queryable " + tableName + " -> " + typeDef.getTypeId());
|
||||
}
|
||||
}
|
||||
// check sub types all include in super type query
|
||||
for(CMISTypeDefinition subType : typeDef.getSubTypes(true))
|
||||
{
|
||||
if(!subType.isIncludeInSuperTypeQuery())
|
||||
{
|
||||
throw new CMISQueryException("includeInSuperTypeQuery=falss is not support for "+tableName+ " descendant type "+subType.getQueryName());
|
||||
}
|
||||
}
|
||||
return factory.createSelector(typeDef.getTypeId().getQName(), alias);
|
||||
}
|
||||
else
|
||||
@@ -1137,6 +1149,14 @@ public class CMISQueryParser
|
||||
throw new CMISQueryException("Type is not queryable " + tableName + " -> " + typeDef.getTypeId());
|
||||
}
|
||||
}
|
||||
// check sub types all include in super type query
|
||||
for(CMISTypeDefinition subType : typeDef.getSubTypes(true))
|
||||
{
|
||||
if(!subType.isIncludeInSuperTypeQuery())
|
||||
{
|
||||
throw new CMISQueryException("includeInSuperTypeQuery=falss is not support for "+tableName+ " descendant type "+subType.getQueryName());
|
||||
}
|
||||
}
|
||||
Source lhs = factory.createSelector(typeDef.getTypeId().getQName(), alias);
|
||||
|
||||
List<CommonTree> list = (List<CommonTree>) (source.getChildren());
|
||||
|
Reference in New Issue
Block a user