Class PlanFactory


  • public class PlanFactory
    extends Object
    A factory that creates a RootPlan from a query. Then the RootPlan may be used to execute the query.

    A SPARQLExtQuery may be created from a string as follows:

    
     String query;
     SPARQLExtQuery query;
    
     Syntax syntax = SPARQLExt.SYNTAX;
     query = (SPARQLExtQuery) QueryFactory.create(query, syntax);
     
    Author:
    Maxime Lefrançois
    • Method Detail

      • create

        public static final RootPlan create​(SPARQLExtQuery query)
        A factory that creates a RootPlan from a query.

        A SPARQLExtQuery may be created from a string as follows:

        
         String query;
         SPARQLExtQuery query;
        
         Syntax syntax = SPARQLExt.syntaxSPARQLGenerate;
         query = (SPARQLExtQuery) QueryFactory.create(query, syntax);
         
        Parameters:
        query - the Query.
        Returns:
        the RootPlan that may be used to execute the query.
      • create

        public static final RootPlan create​(String queryStr)
        A factory that creates a RootPlan from a SPARQL-Generate or SPARQL-Template query.
        Parameters:
        queryStr - the string representation of the SPARQL-Generate or SPARQL-Template Query.
        Returns:
        the RootPlan that may be used to execute the SPARQL-Generate or SPARQL-Template Query. query.
      • create

        public static final RootPlan create​(String queryStr,
                                            String base)
        A factory that creates a RootPlan from a query.
        Parameters:
        queryStr - the string representation of the SPARQL-Generate or SPARQL-Template Query.
        base - the base URI, if not set explicitly in the query string
        Returns:
        the RootPlan that may be used to execute the query.