cancel
Showing results for 
Search instead for 
Did you mean: 

Ayuda!!!

lupiska
Champ in-the-making
Champ in-the-making
Hola, me encuentro en un conflicto con opencmis al hacer mi query, lo q quiero obtener es que al seleccionar un folder X me muestre la informacion que tiene, todos los documentos.

ItemIterable<QueryResult> rows = httpsession.query("SELECT * FROM cmis:folder WHERE cmis:name like '%Encuestas%'", false);

De que manera podria hacerlo??? espero me puedan ayudar. Gracias
13 REPLIES 13

cristinamr
World-Class Innovator
World-Class Innovator
Te falta cerrar el System.out.

A priori es así: System.out("mensaje:"+variable+" "+variable2);

Creo que te falta ese ); final.

Prueba y nos comentas 😃
--
VenziaIT: helping companies since 2005! Our ECM products: AQuA & Seidoc

lupiska
Champ in-the-making
Champ in-the-making
Esto es lo que tengo:

System.out.println("**********Busquedas Categorias**********");
        String query2 = "select d.*, c.* from cmis:document as d join cm:generalclassifiable as c on d.cmis:objectId = c.cmis:objectId where c.cm:categorias='Documento'";
   ItemIterable<QueryResult> q2 = session.query(query2, false);

       
        System.out.println("RESULTADO DE BUSQUEDA: " + query2);

        int i2 = 1;
        for (QueryResult qr : q2)
        {
            System.out.println("——————————————–\n" + i2 + " , "
            + qr.getPropertyById("cmis:name").getFirstValue()
            );                   
            i2++;
        }
Me da como resultado todo los documentos que tengo en el repositorio del servidor alfresco pero al poner mi clausula que me identifique solo
los documentos que tengo en la categoria que estan definidas de esta manera:

Mi categoria esta definida de esta manera:

1. Proyecto
1.1 Encuesta
1.1.1 Personal




 String query2 = "select d.*, c.* from cmis:document as d join cm:generalclassifiable as c on d.cmis:objectId = c.cmis:objectId where c.cm:category LIKE '%Documento%' ";

No obtengo ningun resultado, no pasa del for Smiley Sad

Como vez????

lupiska
Champ in-the-making
Champ in-the-making
Hola, NO ahi solucion??? Smiley Sad

vizziello
Champ in-the-making
Champ in-the-making
Hi,

I have had the same problem and in a certain way this post has helped me to find the solution.

To select all documents that have been categorized with the category "Person":

SELECT * FROM cmis:document C WHERE CONTAINS(C, 'PATH:"/cm:generalclassifiable//cmSmiley Tongueersonal/member"')

The following CMIS query to get all the documents that have been categorized:

SELECT d.*, c.* FROM cmis:document AS d JOIN cm:generalclassifiable AS c ON d.cmisSmiley SurprisedbjectId = c.cmisSmiley SurprisedbjectId
Getting started

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.