Package org.alfresco.webservice.repository

Examples of org.alfresco.webservice.repository.QueryResult


      }
      i++;
    }
   
    try{
      QueryResult queryResult = null;
      if (StringUtils.isEmpty(luceneQuery)) {
        // get documents from the root of the Alfresco Repository
        queryResult = SearchUtils.getChildrenFromCompanyHome(endpoint, username, password, socketTimeout, session);
      } else {
        // execute a Lucene query against the repository
        queryResult = SearchUtils.luceneSearch(endpoint, username, password, socketTimeout, session, luceneQuery);
      }
 
      if(queryResult!=null){
        ResultSet resultSet = queryResult.getResultSet();
        ResultSetRow[] resultSetRows = resultSet.getRows();
        for (ResultSetRow resultSetRow : resultSetRows) {
            NamedValue[] properties = resultSetRow.getColumns();
            String nodeReference = PropertiesUtils.getNodeReference(properties);
            activities.addSeedDocument(nodeReference);
View Full Code Here


        boolean isFolder = ContentModelUtils.isFolder(endpoint, username, password, socketTimeout, session, reference);
       
        //a generic node in Alfresco could have child-associations
        if (isFolder) {
            // ingest all the children of the folder
            QueryResult queryResult = SearchUtils.getChildren(endpoint, username, password, socketTimeout, session, reference);
            ResultSet resultSet = queryResult.getResultSet();
            ResultSetRow[] resultSetRows = resultSet.getRows();
            for (ResultSetRow resultSetRow : resultSetRows) {
              NamedValue[] childProperties = resultSetRow.getColumns();
              String childNodeReference = PropertiesUtils.getNodeReference(childProperties);
              activities.addDocumentReference(childNodeReference, nodeReference, RELATIONSHIP_CHILD);
View Full Code Here

    AuthenticationUtils.startSession(ALFRESCO_USERNAME, ALFRESCO_PASSWORD);
    Reference reference = new Reference();
    try{
      RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
      Query query = new Query(Constants.QUERY_LANG_LUCENE, ALFRESCO_TEST_QUERY);
      QueryResult queryResult = repositoryService.query(STORE, query, false);
      ResultSetRow row = queryResult.getResultSet().getRows(0);
      reference.setStore(STORE);
      reference.setUuid(row.getNode().getId());
      return reference;
    } finally {
      AuthenticationUtils.endSession();
View Full Code Here

   
    try{
   
      RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();        
      Query query = new Query(Constants.QUERY_LANG_LUCENE, luceneQuery);
      QueryResult queryResult = repositoryService.query(STORE, query, false);
     
      ResultSetRow row = queryResult.getResultSet().getRows(0);
     
      Reference reference = new Reference();
      reference.setStore(STORE);
      reference.setUuid(row.getNode().getId());
     
View Full Code Here

   
    try{
   
      RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();        
      Query query = new Query(Constants.QUERY_LANG_LUCENE, luceneQuery);
      QueryResult queryResult = repositoryService.query(STORE, query, false);
     
      ResultSetRow row = queryResult.getResultSet().getRows(0);
     
      Reference reference = new Reference();
      reference.setStore(STORE);
      reference.setUuid(row.getNode().getId());
     
View Full Code Here

    throws Exception
  {
    WebServiceFactory.setEndpointAddress(ALFRESCO_ENDPOINT_TEST_SERVER);
    AuthenticationUtils.startSession(ALFRESCO_USERNAME, ALFRESCO_PASSWORD);
   
    QueryResult queryResultTestArea = null;
    try {
     
      RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
      Query query = new Query(Constants.QUERY_LANG_LUCENE, ALFRESCO_TEST_QUERY);
      queryResultTestArea = repositoryService.query(STORE, query, false);

      if(queryResultTestArea.getResultSet().getTotalRowCount()>0){
     
        ResultSetRow row = queryResultTestArea.getResultSet().getRows(0);
       
        Reference reference = new Reference();
        reference.setStore(STORE);
        reference.setUuid(row.getNode().getId());
       
View Full Code Here

      }
      i++;
    }
   
    try{
      QueryResult queryResult = null;
      if (StringUtils.isEmpty(luceneQuery)) {
        // get documents from the root of the Alfresco Repository
        queryResult = SearchUtils.getChildrenFromCompanyHome(endpoint, username, password, socketTimeout, session);
      } else {
        // execute a Lucene query against the repository
        queryResult = SearchUtils.luceneSearch(endpoint, username, password, socketTimeout, session, luceneQuery);
      }
 
      if(queryResult!=null){
        ResultSet resultSet = queryResult.getResultSet();
        ResultSetRow[] resultSetRows = resultSet.getRows();
        for (ResultSetRow resultSetRow : resultSetRows) {
            NamedValue[] properties = resultSetRow.getColumns();
            String nodeReference = PropertiesUtils.getNodeReference(properties);
            activities.addSeedDocument(nodeReference);
View Full Code Here

        boolean isFolder = ContentModelUtils.isFolder(endpoint, username, password, socketTimeout, session, reference);
       
        //a generic node in Alfresco could have child-associations
        if (isFolder) {
            // ingest all the children of the folder
            QueryResult queryResult = SearchUtils.getChildren(endpoint, username, password, socketTimeout, session, reference);
            ResultSet resultSet = queryResult.getResultSet();
            ResultSetRow[] resultSetRows = resultSet.getRows();
            for (ResultSetRow resultSetRow : resultSetRows) {
              NamedValue[] childProperties = resultSetRow.getColumns();
              String childNodeReference = PropertiesUtils.getNodeReference(childProperties);
              activities.addDocumentReference(childNodeReference, nodeReference, RELATIONSHIP_CHILD);
View Full Code Here

        break;
      }
      i++;
    }

    QueryResult queryResult = null;
    if (StringUtils.isEmpty(luceneQuery)) {
      // get documents from the root of the Alfresco Repository
      queryResult = SearchUtils.getChildrenFromCompanyHome(username, password, session);
    } else {
      // execute a Lucene query against the repository
      queryResult = SearchUtils.luceneSearch(username, password, session, luceneQuery);
    }

    if(queryResult!=null){
      ResultSet resultSet = queryResult.getResultSet();
      ResultSetRow[] resultSetRows = resultSet.getRows();
      for (ResultSetRow resultSetRow : resultSetRows) {
          NamedValue[] properties = resultSetRow.getColumns();
          String nodeReference = PropertiesUtils.getNodeReference(properties);
          activities.addSeedDocument(nodeReference);
View Full Code Here

      boolean isFolder = ContentModelUtils.isFolder(username, password, session, reference);
     
      //a generic node in Alfresco could have child-associations
      if (isFolder) {
        // ingest all the children of the folder
        QueryResult queryResult = SearchUtils.getChildren(username, password, session, reference);
        ResultSet resultSet = queryResult.getResultSet();
        ResultSetRow[] resultSetRows = resultSet.getRows();
        for (ResultSetRow resultSetRow : resultSetRows) {
          NamedValue[] childProperties = resultSetRow.getColumns();
          String childNodeReference = PropertiesUtils.getNodeReference(childProperties);
          activities.addDocumentReference(childNodeReference, nodeReference, RELATIONSHIP_CHILD);
View Full Code Here

TOP

Related Classes of org.alfresco.webservice.repository.QueryResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.