Examples of QueryResult


Examples of org.mmisw.ont.sparql.QueryResult

   
  }
 
  public QueryResult executeQuery(String sparqlQuery, boolean infer, String form) throws Exception {
    log.debug(getClass().getSimpleName()+ " executeQuery called.");
    QueryResult queryResult = Sparql.executeQuery(_getEffectiveModel(infer), sparqlQuery, form);
    return queryResult;
  }
View Full Code Here

Examples of org.mmisw.ont.sparql.QueryResult

   
    Query query = QueryFactory.create(sparqlQuery);
    VirtuosoQueryExecution vqe = VirtuosoQueryExecutionFactory.create(query, _conn._graph);
   
    try {
      QueryResult queryResult = Sparql.executeQuery(query, vqe, sparqlQuery, form);
      return queryResult;
    }
    finally {
      vqe.close();
    }
View Full Code Here

Examples of org.openquark.cal.foreignsupport.module.DataGems.QueryResult

        // Some variables we want to set and use inside the try/catch blocks
        LazyLoadingTableModel model = new LazyLoadingTableModel();
        TableColumnModel columnModel = table.getColumnModel();
        table.setTableHeader(new JDBCResultSetTableHeader(columnModel, this, dragPointHandler));
        QueryResult recordSet;
        int nColumns = 0;

        boolean failed = false;       
        try {
            // Get some information from the Record Set
            recordSet = adapter.getResultSet();
            if (recordSet != null) {
                // Set the appropriate columns into the table (note that this is 1-based not 0-based)
                nColumns = recordSet.getColumnCount();
                for (int i = 1; i <= nColumns; ++i) {
                    model.addColumn(recordSet.getColumnName(i));
                }
            } else {
                // cannot get the result set object: no column list
                failed = true;
            }
View Full Code Here

Examples of org.saiku.web.rest.objects.resultset.QueryResult

    // Move a dimension
    qs.moveDimension("TestQuery1", "ROWS", "Store", -1);
    qs.moveDimension("TestQuery1", "COLUMNS", "Time", -1);

    // Execute the query.
    QueryResult output = qs.execute("TestQuery1");

    // Make sure output is not null.
    assertNotNull(output);

    // Check a cell value
    Cell[] cellarray = output.getCellset().get(0);
    assertEquals("1997", cellarray[1].getValue());
  }
View Full Code Here

Examples of org.wikipediacleaner.api.data.QueryResult

    }
    if (wikipedia.getConnection().getLgToken() == null) {
      throw new APIException("You must be logged in to update pages");
    }
    int attemptNumber = 0;
    QueryResult result = null;
    do {
      attemptNumber++;
      Map<String, String> properties = getProperties(ApiRequest.ACTION_EDIT, true);
      properties.put("assert", "user");
      if (page.getContentsTimestamp() != null) {
View Full Code Here

Examples of pierre.model.QueryResult

    final Collection returnValues = new HashSet();
    final QueryResult[] queryResultTemplates = queryFeature.getQueryResultTemplates();
   
    for( int i = 0; i < queryResultTemplates.length; i++ )
    {
      final QueryResult queryResult = queryResultTemplates[ i ];
      RecordModel recordModel = queryResult.getRecordModel();
     
      if( recordModel == null )
      {
        recordModel= recordModelFactory.createRecordModel( queryResult.getRecordClassName() );
      }
     
      final Collection editFields = recordModel.getEditFields();
     
      for( Iterator iterator = editFields.iterator(); iterator.hasNext(); )
      {
        final DataFieldModel dataFieldModel = (DataFieldModel)iterator.next();
       
        if( dataFieldModel.isAttribute() )
        {
          returnValues.add( stripAttribute( SEPARATOR + normaliseQueryContext( queryResult.getSchemaContext() ) + SEPARATOR + dataFieldModel.getName() ) );
        }
        else
        {
          returnValues.add( SEPARATOR + normaliseQueryContext( queryResult.getSchemaContext() ) + SEPARATOR + dataFieldModel.getName() );
        }
      }
    }

    final StringBuffer query = ( isTamino ) ? new StringBuffer( "declare namespace tf=\"http://namespaces.softwareag.com/tamino/TaminoFunction\" " ) : new StringBuffer(); //$NON-NLS-1$;
View Full Code Here

Examples of twitter4j.QueryResult

  public void start(BundleContext context) throws Exception {
    Twitter twitter = new Twitter();
    Query query = new Query("from:theasf");
   
    try {
      QueryResult result = twitter.search(query);
        List<Tweet> tweets = result.getTweets();
        System.out.println("hits:" + tweets.size());
        for (Tweet tweet : result.getTweets()) {
            System.out.println(tweet.getFromUser() + ":" + StringEscapeUtils.unescapeXml(tweet.getText()));
        }
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of twitter4j.QueryResult

    public static void main(String... args) throws TwitterException{
        // The factory instance is re-useable and thread safe.
        Twitter twitter = new TwitterFactory().getInstance();
        Query query = new Query("#latino");
        query.setRpp(100);
        QueryResult result = twitter.search(query);
        System.out.println("hits:" + result.getResultsPerPage());
        System.out.println(result.getMaxId() + " :" + result.getPage());
        for (Tweet tweet : result.getTweets()) {           
            User user = twitter.showUser(tweet.getFromUser());
            System.out.println(user.getLocation());
            if (user.isGeoEnabled()) {
                GeoLocation geo = user.getStatus() != null ? user.getStatus().getGeoLocation() : null;
                System.out.println(geo + ":" + tweet.getLocation() + ":" + tweet.getFromUser() + ":" + tweet.getText());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.