Package com.hp.hpl.jena.query

Examples of com.hp.hpl.jena.query.Query


    }
   
    @Override
    protected void exec()
    {
        Query query = modQuery.getQuery() ;

        try {
            String serviceURL = modRemote.getServiceURL() ;
            QueryExecution qe = QueryExecutionFactory.sparqlService(serviceURL, query) ;
            if ( modRemote.usePost() )
View Full Code Here


       
        // Query string.
        String queryString = prolog + NL +
            "SELECT ?title WHERE {?x dc:title ?title}" ;
       
        Query query = QueryFactory.create(queryString) ;
        // Print with line numbers
        query.serialize(new IndentedWriter(System.out,true)) ;
        System.out.println() ;
       
        // Create a single execution of this query, apply to a model
        // which is wrapped up as a Dataset
       
View Full Code Here

    }

    @Override
    protected void execCmd(List<String> positionalArgs)
    {
        Query query = modQuery.getQuery() ;
        compilePrint(getStore(), query) ;
    }
View Full Code Here

    public static void main(String []args)
    {
        String s = "SELECT DISTINCT ?s { ?s ?p ?o }";
       
        // Parse
        Query query = QueryFactory.create(s) ;
        System.out.println(query) ;
       
        // Generate algebra
        Op op = Algebra.compile(query) ;
        op = Algebra.optimize(op) ;
View Full Code Here

       
        // Query string.
        String queryString = prolog + NL +
            "SELECT ?title WHERE {?x dc:title ?title}" ;
       
        Query query = QueryFactory.create(queryString) ;
        // Print with line numbers
        query.serialize(new IndentedWriter(System.out,true)) ;
        System.out.println() ;
       
        // Create a single execution of this query, apply to a model
        // which is wrapped up as a Dataset
       
View Full Code Here

   
    @Override
    protected void exec()
    {
        try{
            Query query = modQuery.getQuery() ;
            try {
                QueryUtils.checkQuery(query, true) ;
            } catch (QueryCheckException ex)
            {
                System.err.println() ;
View Full Code Here

            }
        }

        // Explain.explain("HTTP", opRemote, context) ;

        Query query;

        //@formatter:off
        // Comment (for the future?)
//        if ( false )
//        {
View Full Code Here

   
    @Override
    public void visit(UpdateModify update)
    {
        Node withGraph = update.getWithIRI() ;
        Query query = elementToQuery(update.getWherePattern()) ;
       
        // USING/USING NAMED
        DatasetGraph dsg = processUsing(update) ;
       
        // USING overrides WITH
View Full Code Here

    protected Query elementToQuery(Element pattern)
    {
        if ( pattern == null )
            return null ;
        Query query = new Query() ;
        query.setQueryPattern(pattern) ;
        query.setQuerySelectType() ;
        query.setQueryResultStar(true) ;
        query.setResultVars() ;
        return query ;
    }
View Full Code Here

      // Then read the data from the file into the ontology model
      m.read( ontology );
 
      // Now read the query file into a query object
      // Important: specifying that the query is in Terp syntax
      Query q = QueryFactory.read( query, TerpSyntax.getInstance() );
 
      // Create a SPARQL-DL query execution for the given query and
      // ontology model
      QueryExecution qe = SparqlDLExecutionFactory.create( q, m );
 
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.query.Query

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.