chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karnakar Thallapalli" <karnak...@virtusa.com>
Subject cmis search qurery parsing
Date Thu, 31 Mar 2011 10:13:24 GMT
Hi 

I want to perform a search on document 

String myType = "my:documentType";

 

// get the query name of cmis:objectId

ObjectType type = session.getTypeDefinition(myType);

PropertyDefinition<?> objectIdPropDef =
type.getPropertyDefinitions().get(PropertyIds.OBJECT_ID);

String objectIdQueryName = objectIdPropDef.getQueryName();

 

String queryString = "SELECT " + objectIdQueryName + " FROM " +
type.getQueryName();

 

// execute query

ItemIterable<QueryResult> results = session.query(queryString, false);

 

for (QueryResult qResult : results) {

   String objectId =
qResult.getPropertyValueByQueryName(objectIdQueryName);

   Document doc = (Document)
session.getObject(session.createObjectId(objectId));

}

 

 

Can any one elaborate  my:Type   here 


Virtusa was recently ranked and featured in 2010 Deloitte Technology Fast 500, 2010 Global
Services 100, IAOP's 2010 Global Outsourcing 100 sub-list and 2010 FinTech 100 among others.

--------------------------------------------------------------------------------------------

This message, including any attachments, contains confidential information 
intended for a specific individual and purpose, and is intended for the addressee only. Any
unauthorized disclosure, use, dissemination, copying, or distribution of 
this message or any of its attachments or the information contained in this e-mail, or the
taking of any action based on it, is strictly prohibited. If you are not the intended recipient,
please notify the sender immediately by return e-mail and delete this message.

--------------------------------------------------------------------------------------------

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message