05-15-2007 08:11 AM
05-15-2007 11:01 AM
05-15-2007 12:47 PM
05-16-2007 03:53 AM
AuthenticationUtils.startSession(USER, PASS);
repositoryService = WebServiceFactory.getRepositoryService();
//buildQuery = "-TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\" AND TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"";
buildQuery = "-TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\"";
if (sSolutionText !=null && sSolutionText!="") buildQuery = buildQuery + " TEXT:\""+sSolutionText+"\" ";
if (metadata != null)
{
for (i=0; i < metadata.size(); i++)
{
buildQuery = buildQuery + " @cm\\:metadata1:\""+metadata.get(i)+"\" ";
buildQuery = buildQuery + " @cm\\:metadata2:\""+metadata.get(i)+"\" ";
buildQuery = buildQuery + " @cm\\:metadata3:\""+metadata.get(i)+"\" ";
buildQuery = buildQuery + " @cm\\:metadata4:\""+metadata.get(i)+"\" ";
buildQuery = buildQuery + " @cm\\:metadata5:\""+metadata.get(i)+"\" ";
}
}
// Create a query object, looking for all items with alfresco in the name of text
query = new Query(Constants.QUERY_LANG_LUCENE, buildQuery);
// Execute the query
queryResult = repositoryService.query(store, query, false);
// Display the results
resultSet = queryResult.getResultSet();
rows = resultSet.getRows();
05-16-2007 04:30 AM
05-16-2007 05:13 AM
05-16-2007 08:00 AM
05-16-2007 08:44 AM
try
{
//AuthenticationUtils.startSession(_uid, _pwd);
Store store = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
RepositoryServiceSoapBindingStub repositoryService =
WebServiceFactory.getRepositoryService();
//buildQuery = "-TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\" AND TYPE:\"{http://www.alfresco.org/model/content/1.0}content\"";
String buildQuery = "-
TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\"";
Object sSolutionText = "Diccionario";
// Create a query object, looking for all items with alfresco in the name of text
Query query = new Query(Constants.QUERY_LANG_LUCENE, buildQuery);
// Execute the query
QueryResult queryResult = repositoryService.query(store, query, false);
// Display the results
ResultSet resultSet = queryResult.getResultSet();
ResultSetRow[] rows = resultSet.getRows();
if (rows == null )
{
System.out.println("\n null \n");
}
}
catch(Exception e)
{
System.out.println("\n catch " + e.getMessage() + "\n");
}
}
05-16-2007 09:31 AM
05-16-2007 10:24 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.