As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
String queryString = "SELECT * FROM cmis:folder where contains('PATH:\"/cm:generalclassifiable//*\"')"; List<CmisObject> objList = new ArrayList<CmisObject>(); // execute query ItemIterable<QueryResult> results = session.query(queryString, false); System.out.println("TOTAL DE RESULTADOS => "+results.getTotalNumItems()); for (QueryResult qResult : results) { String objectId = ""; PropertyData<?> propData = qResult.getPropertyById("cmis:objectId"); // Atom Pub binding if (propData != null) { objectId = (String) propData.getFirstValue(); } else { objectId = qResult.getPropertyValueByQueryName("d.cmis:objectId"); // Web Services binding } CmisObject obj = session.getObject(session.createObjectId(objectId)); objList.add(obj); } DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM); int iCount = 1; for (CmisObject result : objList) { System.out.println("———————-\r\nResult " + iCount + ":"); System.out.println("id:" + result.getId()); System.out.println("name:" + result.getName()); System.out.println("created:" + dateFormat.format(result.getCreationDate().getTime())); iCount ++; }
String luceneQueryString = "PATH:\""+ROOT_CATEGORY+(categoryPath==null?"":encodeCategoryPath(categoryPath))+"\""; Query query = new Query(Constants.QUERY_LANG_LUCENE, luceneQueryString); QueryResult result = WebServiceFactory.getRepositoryService().query(STORE, query, true);