Examples of execDescribe()


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

            return new SPARQLResult(model) ;
        }

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

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

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

              gr.addGraphResultTriple(triple);
            }
          }, TurtleParser.readFileNumber++);
      return gr;
    } else if (query.isDescribeType()) {
      final Model model = qe.execDescribe();
      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.execDescribe()

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

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

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

    if (jenaQuery.isDescribeType()) {
      com.hp.hpl.jena.rdf.model.Model m = qexec.execDescribe();
      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.execDescribe()

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

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

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

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

            // hsql
            d2rqModel = d2rqQueryExecution.execConstruct();
          }else
          {
            // sdb
            sdbModel = sdbQueryExecution.execDescribe();
            // hsql
            d2rqModel = d2rqQueryExecution.execDescribe();
          }
         
          List<Statement> sdbGraphResult = new ArrayList<Statement>();
View Full Code Here

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

    QueryExecution qe = QueryExecutionFactory.create(sparqlQuery,
        server.dataset());
    if (server.getConfig().getPageTimeout() > 0) {
      qe.setTimeout(Math.round(server.getConfig().getPageTimeout() * 1000));
    }
    Model description = qe.execDescribe();
    qe.close();
   
    if (description.size() == 0) {
      response.sendError(404);
    }
View Full Code Here

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

    case Query.QueryTypeConstruct:
      q.execConstruct().write(out, "N3-PP");
      break;
     
    case Query.QueryTypeDescribe:
      q.execDescribe().write(out, "N3-PP");
      break;
     
    default:
      out.println("Unknown query type");
    }
View Full Code Here

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

            return new SPARQLResult(model) ;
        }

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

        if ( query.isAskType() )
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.