11-09-2009 04:52 AM
………….
………….
Query query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/cm:my_folder//*\" + @cm\\:name:plantilla*");
// Execute the query
final Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
QueryResult queryResult = repositoryService.query(STORE, query, false);
// Display the results
ResultSet results = queryResult.getResultSet();
ResultSetRow[] rows = results.getRows();
System.out.println("La busqueda da algo asi:");
if(rows != null){
for(ResultSetRow row : rows){
for (NamedValue namedValue : row.getColumns()){
if (namedValue.getName().endsWith("path") == true)
System.out.println(namedValue.getValue());
if (namedValue.getName().endsWith(Constants.PROP_CREATED) == true)
System.out.println(namedValue.getValue());
else if (namedValue.getName().endsWith(Constants.PROP_NAME) == true){
System.out.println(namedValue.getValue());
else if (namedValue.getName().endsWith(Constants.PROP_DESCRIPTION) == true){
System.out.println(namedValue.getValue());
………….
………….
………….
}
11-10-2009 03:42 AM
11-10-2009 05:57 AM
if (namedValue.getName().endsWith("path") == true){
…..
11-10-2009 11:03 AM
11-11-2009 04:18 AM
11-16-2009 07:21 AM
11-17-2009 03:33 AM
11-18-2009 05:17 AM
Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
String ROOT = "/app:company_home/cm:"+ISO9075.encode("Folder Name");
String path = "PATH:\"/" + ROOT + "//.\" AND TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"";
final List<String> result = new ArrayList<String>();
final Query query = new Query(Constants.QUERY_LANG_LUCENE, path);
Node [] nodes = null;
try {
nodes = WebServiceFactory.getRepositoryService().get(new Predicate(null,STORE,query));
} catch (RepositoryFault e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}
if (null != nodes){
NamedValue[] props = null;
for (final Node node : nodes) {
props = node.getProperties();
for(NamedValue prop : props) {
if(prop.getName().endsWith(Constants.PROP_NAME) == true) {
result.add(prop.getValue());
}
}
}
hope it may resolve your problem 11-18-2009 07:39 AM
String nodeId = row.getNode().getId();
ContentResult contentResult = new ContentResult(nodeId);
for (NamedValue namedValue : row.getColumns()){
if (namedValue.getName().endsWith(Constants.PROP_CREATED) == true){
………
}
……………
……………
}
NamedValue[] props = null;
for (final Node node : nodes) {
props = node.getProperties();
int i = 0;
for(NamedValue prop : props) {
if(prop.getName().endsWith(Constants.PROP_NAME) == true) {
………..
}
………………
………………
}
11-18-2009 10:12 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.