public void doQuery(String cql, int maxItems) { Session cmisSession = getCmisSession(); OperationContext oc = new OperationContextImpl(); oc.setMaxItemsPerPage(maxItems); ItemIterable<QueryResult> results = cmisSession.query(cql, false, oc); for (QueryResult result : results) { for (PropertyData<?> prop : result.getProperties()) { System.out.println(prop.getQueryName() + ": " + prop.getFirstValue()); } System.out.println("--------------------------------------"); } System.out.println("--------------------------------------"); System.out.println("Total number: " + results.getTotalNumItems()); System.out.println("Has more: " + results.getHasMoreItems()); System.out.println("--------------------------------------"); }
propertiesByQueryName.put(property.getQueryName(), property);
writer.writeAttribute(ATTR_PROPERTY_LOCALNAME, source.getLocalName()); if (source.getQueryName() != null) { writer.writeAttribute(ATTR_PROPERTY_QUERYNAME, source.getQueryName());
propertiesByQueryName.put(property.getQueryName(), property);
result.setQueryName(property.getQueryName()); result.setDisplayName(property.getDisplayName());
String propId = (propertyMode == PropertyMode.QUERY ? property.getQueryName() : property.getId()); if (propId == null) { throw new CmisRuntimeException("No query name or alias for property '" + property.getId() + "'!");
String propId = (propertyMode == PropertyMode.QUERY ? property.getQueryName() : property.getId()); if (propId == null) { throw new CmisRuntimeException("No query name or alias for property '" + property.getId() + "'!");
writer.attribute(null, ATTR_PROPERTY_LOCALNAME, source.getLocalName()); if (source.getQueryName() != null) { writer.attribute(null, ATTR_PROPERTY_QUERYNAME, source.getQueryName());
setIfNotNull(JSON_PROPERTY_LOCALNAME, property.getLocalName(), result); setIfNotNull(JSON_PROPERTY_DISPLAYNAME, property.getDisplayName(), result); setIfNotNull(JSON_PROPERTY_QUERYNAME, property.getQueryName(), result);
setIfNotNull(JSON_PROPERTY_LOCALNAME, property.getLocalName(), result); setIfNotNull(JSON_PROPERTY_DISPLAYNAME, property.getDisplayName(), result); setIfNotNull(JSON_PROPERTY_QUERYNAME, property.getQueryName(), result);