Examples of execConstruct()


Examples of com.hp.hpl.jena.query.QueryExecution.execConstruct()

        try {
            if(null!=bindings) {
                qe.setInitialBinding(bindings);
            }

            qe.execConstruct(outModel);
        } finally{ qe.close(); }
    }

    public static void appendConstruct(Model outModel,String queryString,Model inModel) {
        appendConstruct(outModel,queryString,inModel,null);
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryExecution.execConstruct()

            return new SPARQLResult(rs) ;
        }

        if ( query.isConstructType() )
        {
            Model model = qexec.execConstruct() ;
            log.info(format("[%d] OK/construct", action.id)) ;
            return new SPARQLResult(model) ;
        }

        if ( query.isDescribeType() )
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryExecution.execConstruct()

      final ResultSet results = qe.execSelect();
      final QueryResult list = resultSetToBindingsList(results);
      qe.close();
      return list;
    } else if (query.isConstructType()) {
      final Model model = qe.execConstruct();
      qe.close();
      final GraphResult gr = new GraphResult();
      TurtleParser.triplesFromModel(model,
          new TripleConsumer() {
            public void consume(final Triple triple) {
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryExecution.execConstruct()

    Query query = QueryFactory.create(queryString, syntax);
   
    QueryExecution qexec = QueryExecutionFactory.create(query, this.jenaModel);
   
    if(query.isConstructType()) {
      com.hp.hpl.jena.rdf.model.Model m = qexec.execConstruct();
      Model resultModel = new ModelImplJena(null, m, Reasoning.none);
      resultModel.open();
      return resultModel;
    } else {
      throw new RuntimeException("Cannot handle this type of queries! Please use CONSTRUCT.");
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryExecution.execConstruct()

    assertModel();
    Query query = QueryFactory.create(queryString);
    QueryExecution qexec = QueryExecutionFactory.create(query, this.jenaModel);
   
    if(query.isConstructType()) {
      com.hp.hpl.jena.rdf.model.Model m = qexec.execConstruct();
      Model resultModel = new ModelImplJena(null, m, Reasoning.none);
      resultModel.open();
      return resultModel;
    } else {
      throw new RuntimeException("Cannot handle this type of queries! Please use CONSTRUCT.");
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryExecution.execConstruct()

    Query jenaQuery = QueryFactory.create(query);
    QueryExecution qexec = QueryExecutionFactory.create(jenaQuery,
        this.dataset);

    if (jenaQuery.isConstructType()) {
      com.hp.hpl.jena.rdf.model.Model m = qexec.execConstruct();
      Model resultModel = new ModelImplJena(null, m, Reasoning.none);
      resultModel.open();
      return resultModel;
    } else {
      throw new RuntimeException(
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryExecution.execConstruct()

    Query jenaQuery = QueryFactory.create(query);
    QueryExecution qexec = QueryExecutionFactory.create(jenaQuery,
        this.dataset);

    if (jenaQuery.isConstructType()) {
      com.hp.hpl.jena.rdf.model.Model m = qexec.execConstruct();
      Model resultModel = new ModelImplJena(null, m, Reasoning.none);
      resultModel.open();
      return resultModel;
    } else {
      throw new RuntimeException(
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryExecution.execConstruct()

        } catch (QueryExecException e2) {
          try {
            return new JenaGraphAdaptor(qexec.execDescribe()
                .getGraph()).getGraph();
          } catch (QueryExecException e3) {
            return new JenaGraphAdaptor(qexec.execConstruct()
                .getGraph()).getGraph();
          }
        }
      }
    } finally {
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryExecution.execConstruct()

          try {
            return new JenaGraphAdaptor(
                qexec.execDescribe().getGraph()).getGraph();
          } catch (QueryExecException e3) {
            return new JenaGraphAdaptor(
                qexec.execConstruct().getGraph()).getGraph();
          }
        }
      }
    } finally {
      qexec.close();
View Full Code Here

Examples of com.hp.hpl.jena.query.QueryExecution.execConstruct()

    if ( query.isSelectType() ) {
      ResultSet results = qe.execSelect();
      ResultSetFormatter.out(System.out, results, query);
    }
    else if ( query.isConstructType() ) {
      Model model_ = qe.execConstruct();
     
//      _listStatements(model_);

      StringWriter writer = new StringWriter();
      model_.getWriter().write(model_, writer, null);
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.