Allow 'cmis-sql-strict' query language in Node Browser.

- fix up Search Service to CMIS query engine wrappers

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15015 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2009-06-29 15:47:06 +00:00
parent aa41f18f6d
commit b5d4daa46a
4 changed files with 43 additions and 10 deletions

View File

@@ -54,6 +54,7 @@ import org.alfresco.service.namespace.QName;
public class CMISResultSetMetaDataImpl implements CMISResultSetMetaData
{
private CMISQueryOptions options;
private SearchParameters searchParams;
private Map<String, CMISResultSetColumn> columnMetaData;
@@ -62,6 +63,7 @@ public class CMISResultSetMetaDataImpl implements CMISResultSetMetaData
public CMISResultSetMetaDataImpl(CMISQueryOptions options, Query query, CMISDictionaryService cmisDictionaryService, DictionaryService alfrescoDictionaryService)
{
this.options = options;
this.searchParams = new SearchParameters(options);
Map<String, Selector> selectors = query.getSource().getSelectors();
selectorMetaData = new LinkedHashMap<String, CMISResultSetSelector>();
@@ -196,7 +198,7 @@ public class CMISResultSetMetaDataImpl implements CMISResultSetMetaData
public SearchParameters getSearchParameters()
{
throw new UnsupportedOperationException();
return searchParams;
}
}

View File

@@ -204,14 +204,11 @@ public class CMISResultSetRowImpl implements CMISResultSetRow
public NodeRef getNodeRef()
{
if(getCMISResultSet().getMetaData().getColumns().length == 1)
if (nodeRefs.size() == 1)
{
return getNodeRef(getCMISResultSet().getMetaData().getColumns()[0].getName());
}
else
{
throw new UnsupportedOperationException("Ambiguous selector");
return nodeRefs.values().iterator().next();
}
throw new UnsupportedOperationException("Ambiguous selector");
}
public QName getQName()