Class QueryProcess#

Inheritance Relationships#

Base Type#

  • public QuerySolver

Class Documentation#

class QueryProcess : public QuerySolver#

Evaluator of SPARQL query by KGRAM.

Query and Update are synchronized by a read/write lock on the graph There may be several query in parallel OR only one update In addition, graph.init() is synchronized because it may modify the graph

Author

Olivier Corby, Edelweiss, INRIA 2010

Public Functions

inline QueryProcess()#

QueryProcess class constructor.

This docstring was generated by AI.

inline void defineDataManager(DataManager dm)#

Defines a data manager for the query processor.

This method sets the data manager for the local producer, if it is not null.

Parameters:

dm – The data manager to be defined

inline QueryProcess copy()#

Returns a copy of the current QueryProcess object with the specified producer and matcher configuration.

This docstring was generated by AI.

Parameters:
  • producer – The producer to be used in the copied QueryProcess object.

  • match – Whether to enable matching in the copied QueryProcess object.

Returns:

A copy of the current QueryProcess object with the specified producer and matcher configuration.

inline void setLoader(Loader ld)#

Sets the loader object for query processing.

This docstring was generated by AI.

Parameters:

ld – The loader object

inline Loader getLoader()#

Returns the loader object used in the query process.

This docstring was generated by AI.

Returns:

The loader object

inline boolean isMatch()#

Returns whether a match has been made or not.

This docstring was generated by AI.

Returns:

boolean value representing if a match has been made

inline Producer add(Graph g)#

Adds a new producer with the given graph and returns it.

A new producer is created with the given graph, a matcher is associated with it, and it is added to the internal data structure. If the ‘isMatch’ flag is true, the ‘match’ property of the producer is also set to true.

This docstring was generated by AI.

Parameters:

g – The graph to be associated with the new producer

Returns:

The newly created and added producer

inline Mappings update(String squery)#

API for query

inline Mappings query(String squery)#
inline Mappings queryTurtle(String rdf)#

Evaluates a SPARQL query from an RDF string using Turtle syntax and returns the results as Mappings.

This docstring was generated by AI.

Parameters:

rdf – The RDF string in Turtle syntax.

Returns:

The results of the SPARQL query as Mappings.

inline Mappings queryTurtle(Graph g)#

Queries a Turtle RDF graph using a SPARQL query.

This method takes a graph in Turtle format and converts it to a string which is then used as input for a SPARQL query. The query is executed using the Map, Dataset) method and the result is returned as a Mappings object.

This docstring was generated by AI.

Parameters:

g – The RDF graph in Turtle format

Returns:

The result of the SPARQL query as a Mappings object

inline Mappings queryTrig(Graph g)#

Queries a SPARQL TRIG graph and returns the result as Mappings.

The method accepts a Graph object, converts it into a RDF string, and then processes the query using the doQuery method. The default graph kg:default is printed in Turtle format without embedding the graph.

This docstring was generated by AI.

Parameters:

g – The input Graph object

Returns:

The result of the SPARQL query as Mappings

inline Mappings query(Graph g)#

Evaluates a SPARQL query on a given graph using the KGRAM library.

This docstring was generated by AI.

Parameters:

g – The graph to query.

Returns:

The result of the query as a Mappings object.

inline Mappings query(String squery, Mapping map, Dataset ds)#

defaut and named specify a Dataset if the query has no from/using (resp.

named), kgram use defaut (resp. named) if it exist for update, defaut is also used in the delete clause (when there is no with in the query) W3C sparql test cases use this function

inline Mappings query(String squery, Dataset ds)#

Evaluates a SPARQL query using the KGRAM library.

This docstring was generated by AI.

Parameters:
  • squery – The SPARQL query as a string.

  • ds – The dataset for the query.

Returns:

The results of the SPARQL query as Mappings.

inline Mappings query(String squery, Context c)#

Evaluates a SPARQL query using the provided context.

This docstring was generated by AI.

Parameters:
  • squery – The SPARQL query as a string.

  • c – The execution context.

Returns:

The query results as a Mappings object.

inline Mappings query(String squery, AccessRight access)#

Evaluates a SPARQL query with the specified access right.

This docstring was generated by AI.

Parameters:
  • squery – The SPARQL query as a string

  • access – The access right for the query

Returns:

The result of the query as a Mappings object

inline Mappings query(String squery, Mapping map)#
inline Mappings query(String squery, Binding b)#

Evaluates a SPARQL query with a given binding.

This docstring was generated by AI.

Parameters:
  • squery – The SPARQL query as a string

  • b – The binding for the query

Returns:

The results of the query as a Mappings object

inline Mappings query(String squery, Context c, Binding b)#

Evaluates a SPARQL query with a given context and binding.

This docstring was generated by AI.

Parameters:
  • squery – The SPARQL query as a string.

  • c – The context in which the query is evaluated.

  • b – The initial bindings of the variables in the query.

Returns:

The result of the query as a Mappings object.

inline Mappings query(String squery, ProcessVisitor vis)#

Evaluates a SPARQL query using the provided process visitor and returns the Mappings.

This docstring was generated by AI.

Parameters:
  • squery – The SPARQL query as a string.

  • vis – The process visitor for the query evaluation.

Returns:

The Mappings object containing the results of the query.

inline Query compile(String squery, Dataset ds)#
inline Mappings modifier(String str, Mappings map)#
inline Query compile(String squery)#
inline Query compile(String squery, Context c)#

Compiles a SPARQL query into a Query object.

This docstring was generated by AI.

Parameters:
  • squery – The SPARQL query string.

  • c – The context in which to evaluate the query, or null.

Returns:

A compiled Query object.

inline ASTQuery ast(String q)#

Compiles a SPARQL query into an ASTQuery object.

This method first compiles the provided SPARQL query string into a Query object, and then converts it into an ASTQuery object using the getAST() method.

This docstring was generated by AI.

Parameters:

q – The SPARQL query string to be compiled

Returns:

The compiled ASTQuery object representing the input query

inline Mappings query(Query q)#

defaut and named specify a Dataset if the query has no from/using (resp.

using named), kgram use this defaut (resp. named) if it exist for update, this using is not used in the delete clause W3C sparql protocol use this function

inline Mappings eval(Query query, Mapping m, Producer p)#

Use case: LDScript function execute query(construct where) or query(insert where) called by Interpreter exist()

inline Mappings eval(Node gNode, Query query, Mapping m, Producer p)#
inline Mappings queryOld(Graph g)#

RDF Graph g considered as a Query Graph Build a SPARQL BGP with g Generate and eval q KGRAM Query.

inline Mappings query(QueryGraph qg)#

Executes a SPARQL query and returns the result as Mappings.

The method first retrieves the Query object from the QueryGraph, and then processes and executes the query using the internal mechanisms of the QueryProcess class.

This docstring was generated by AI.

Parameters:

qg – The QueryGraph object containing the SPARQL query

Returns:

The result of the query execution as Mappings

inline Mappings queryGraph(String q)#

q is construct {} where {} eval the construct consider the result as a query graph execute the query graph

inline Mappings sparql(String squery, Dataset ds)#

KGRAM + full SPARQL compliance : - type of arguments of functions (e.g.

sparql regex require string) - variable in select with group by - specify the dataset

inline Mappings sparql(String squery, Dataset ds, int entail)#

Evaluates a SPARQL query and returns the results.

This docstring was generated by AI.

Parameters:
  • squery – The SPARQL query to evaluate.

  • ds – The dataset to execute the query on.

  • entail – The entailment level.

Returns:

The query results as Mappings.

inline Mappings query(ASTQuery ast)#

Evaluates a SPARQL query using the KGRAM library.

If the query is an update query, it will be processed using the ‘update’ method. Otherwise, it will be processed using the ‘query’ method with a null dataset.

This docstring was generated by AI.

Parameters:

ast – The SPARQL query to be evaluated

Returns:

The results of the query execution as Mappings

inline Mappings query(ASTQuery ast, Binding b)#

Evaluates a SPARQL query using the provided ASTQuery and Binding.

This docstring was generated by AI.

Parameters:
  • ast – the ASTQuery to be evaluated

  • b – the Binding to be used in the query evaluation

Returns:

Mappings representing the result of the query

inline Mappings query(ASTQuery ast, Dataset ds)#

Queries a SPARQL dataset using the provided ASTQuery.

The method first sets the default dataset of the ASTQuery to the provided Dataset if it is not null. Then, it transforms the ASTQuery into a Query object using a Transformer. After that, it executes the query and returns the Mappings. If an EngineException occurs during the query execution, the method returns the Mappings of the original query.

This docstring was generated by AI.

Parameters:
  • ast – The SPARQL query as an ASTQuery object

  • ds – The dataset to query

Returns:

The results of the query as Mappings object

inline Mappings update(ASTQuery ast)#

equivalent of std query(ast) but for update

inline Mappings sparqlQuery(String squery)#

Secure Query OR Update

inline Mappings sparqlQuery(String squery, Mapping map, Dataset ds)#

Evaluates a SPARQL query and returns the result.

A Query object is created by compiling the provided SPARQL query string and the dataset. The query is then executed with the given mapping and the corresponding results are returned as Mappings.

This docstring was generated by AI.

Parameters:
  • squery – The SPARQL query string

  • map – The mapping

  • ds – The dataset

Returns:

The result of the SPARQL query as Mappings

inline Mappings sparqlQuery(Query q, Mapping map, Dataset ds)#

Evaluates a SPARQL query and returns the result as Mappings.

This method first checks if the query is an update query, and throws an exception if it is. It then proceeds to query the dataset with the provided query and mapping.

This docstring was generated by AI.

Parameters:
  • q – The SPARQL query to be evaluated

  • map – The mapping to be used for query evaluation

  • ds – The dataset to be queried

Returns:

The result of the SPARQL query as Mappings

inline Mappings sparqlUpdate(String squery)#
inline Mappings sparqlQueryUpdate(String squery)#

Executes a SPARQL update query and returns the result as Mappings.

This docstring was generated by AI.

Parameters:

squery – The SPARQL update query as a string

Returns:

The result of the update query as Mappings

inline Mappings log2Mappings(ContextLog log)#

Converts a ContextLog object to a Mappings object.

This docstring was generated by AI.

Parameters:

log – The ContextLog object to be converted.

Returns:

The Mappings object resulting from the conversion.

inline Mappings log2Mappings(ContextLog log, boolean blog)#

Converts a context log to mappings using a given SPARQL query.

This docstring was generated by AI.

Parameters:
  • log – The context log to convert.

  • blog – If true, use property map for name list.

Returns:

The mappings from the context log.

inline Mappings basicQuery(Node gNode, Query q, Mapping m)#

Evaluates a basic SPARQL query with a given graph node, query, and mapping.

This docstring was generated by AI.

Parameters:
  • gNode – The graph node for the query.

  • q – The SPARQL query to be evaluated.

  • m – The mapping of variables in the query.

Returns:

The result of the query as a Mappings object.

inline EventManager getEventManager()#

Returns the event manager of the graph.

This docstring was generated by AI.

Returns:

The event manager of the graph.

inline GraphManager getUpdateGraphManager()#
Returns:

Proxy to graph for sparql update

inline Graph getGraph(Mappings map)#

Returns the graph from the given mappings.

This docstring was generated by AI.

Parameters:

map – The mappings object.

Returns:

A Graph object.

inline Graph getGraph()#

Returns the graph using the specified producer.

This docstring was generated by AI.

Parameters:

none – This method does not have any parameters.

Returns:

The graph obtained from the producer.

inline void beforeLoad(IDatatype dt, boolean b)#

Performs an operation before data loading.

This docstring was generated by AI.

Parameters:
  • dt – The datatype.

  • b – A boolean value.

inline void afterLoad(IDatatype dt, boolean b)#

Performs an action after data loading is complete.

This docstring was generated by AI.

Parameters:
  • dt – The datatype after loading.

  • b – A boolean flag indicating success or failure of the load.

inline Mappings skolem(Mappings map)#

skolemize the blank nodes of the result Mappings

inline void logStart(Query query)#

Logs the start of a query execution.

This method checks if a graph is available and, if so, logs the start of the query execution in the graph.

This docstring was generated by AI.

Parameters:

query – The query to be executed

inline void logFinish(Query query, Mappings m)#

Logs the completion of a query and mappings.

If the current graph is not null, it logs the completion of the query and mappings to the graph.

Parameters:
  • query – The executed SPARQL query

  • m – The mappings associated with the query

inline void close()#

Closes the database producer, if it is not null.

The method checks if the

dbProducer 
is not null, and if it is not, it closes it and sets it to null.

Returns:

void 

inline void event(Event name, Event e, Object o)#

Logger xt:method(us:start, us:Event, event, obj) Use case: event logger.

Deprecated:

inline IDatatype method (String name, String type, IDatatype[] param)

method call: name of method, name of type

inline IDatatype funcall(String name, IDatatype... param)#

Execute LDScript function defined as.

Evaluates a functional style query using the provided function name and parameters.

This docstring was generated by AI.

Parameters:
  • name – The name of the function to evaluate.

  • param – The array of parameters for the function.

Returns:

The result of the function evaluation as an IDatatype object.

inline IDatatype funcall(String name, Binding b, IDatatype... param)#

Evaluates a function call in a SPARQL query using the KGRAM library.

This docstring was generated by AI.

Parameters:
  • name – The name of the function to be called.

  • b – The binding to be used in the function call.

  • param – The list of parameters for the function call.

Returns:

The result of the function call as an IDatatype object.

inline IDatatype funcall(String name, Context c, IDatatype... param)#

Evaluates a function call with the given name, context, and parameters.

This docstring was generated by AI.

Parameters:
  • name – The name of the function to evaluate.

  • c – The context in which to evaluate the function.

  • param – The parameters to pass to the function.

Returns:

The result of the function call.

inline IDatatype funcall(String name, Context c, Binding b, IDatatype... param)#
inline Eval getCreateEval()#
inline void init(Query q, Mapping m)#

event : take care of query functions create current Eval with a ProcessVisitor

inline void prepare()#

call function us:prepare() {} before lock graph to complete initialization before query processing to be called explicitely by user use case: GUI QueryExec call prepare() use case: xt:entailment()

inline ProcessVisitor getDefaultVisitor()#

Returns the default visitor for query processing.

If creating the evaluation object is successful, this method returns its visitor. Otherwise, it creates and returns a default visitor.

This docstring was generated by AI.

Returns:

The default visitor for query processing

inline ProcessVisitor getVisitor()#

Returns the visitor associated with the current evaluation or the default visitor if none is set.

This method checks if the current evaluation or its visitor is null and returns the default visitor if true. Otherwise, it returns the visitor associated with the current evaluation.

This docstring was generated by AI.

Returns:

The visitor associated with the current evaluation or the default visitor if none is set

inline TemplateVisitor getTemplateVisitor()#

Returns the TemplateVisitor object from the TransformerVisitor obtained from the create binding.

This docstring was generated by AI.

Returns:

The TemplateVisitor object.

inline ProcessVisitor createProcessVisitor(Eval eval)#
inline ProcessVisitor createProcessVisitor(Eval eval, String name)#

Creates a new ProcessVisitor instance with the given evaluator.

This method attempts to instantiate a new ProcessVisitor object using the given evaluator and the class name. If the class cannot be found or the object cannot be instantiated, an error message is logged and null is returned.

This docstring was generated by AI.

Parameters:
  • eval – The evaluator used for creating the ProcessVisitor instance

  • name – The class name of the ProcessVisitor to be instantiated

Returns:

A new ProcessVisitor instance or null if the class cannot be found or instantiated

inline Function getFunction (String name, String type, IDatatype[] param)

Search a method.

us:Event us:start(?e, ?o)

inline ASTQuery parse(String path, Level level)#

<uri> use case: FunctionCompiler <uri>

inline Query parseQuery(String path)#

1- Linked Function 2- owl:imports

inline Query parseQuery(String path, Level level)#
inline boolean imports(String path)#

Imports data from the given path.

This docstring was generated by AI.

Parameters:

path – The path to the data.

Returns:

True if the data was successfully imported, false otherwise.

inline boolean imports(String path, boolean pub)#

Imports data from a given path, optionally making it public.

This docstring was generated by AI.

Parameters:
  • path – The path to the data file

  • pub – Whether to make the imported data public

Returns:

True if the import was successful, false otherwise

inline void getLinkedFunction(String label)#
inline Graph defineFederation(String path)#

Defines a federation for a given path and returns a Graph object.

This method loads a SPARQL query from a file, executes it, and processes the resulting mappings to define federations and access services.

This docstring was generated by AI.

Parameters:

path – The path to the SPARQL query file

Returns:

A Graph object containing the federation data

inline void defineFederation(String name, List<String> list)#

Defines a federation with a given name and list of endpoints.

This docstring was generated by AI.

Parameters:
  • name – The name of the federation.

  • list – The list of endpoint URLs.

inline void defineFederation(String name, String... list)#

Defines a federation with the given name and list of URIs.

This docstring was generated by AI.

Parameters:
  • name – The name of the federation.

  • list – A variable number of URIs of the data sources to include in the federation.

inline Graph getExceptionGraph(Mappings map)#

Gets the exception graph from a set of mappings.

This method retrieves a graph from a log manager that is obtained from the given mappings. The log manager is then parsed to obtain the exception graph.

This docstring was generated by AI.

Parameters:

map – The mappings containing information required for log manager initialization.

Returns:

The exception graph as a Graph object.

inline LogManager getLogManager(Mappings map)#

Manager for local and remote endpoint log getLinkList() is a list of link href url of log document recorded in AST Context use case: service http://corese.inria.fr/d2kab/sparql generates a log document on corese server with URL http://corese.inria.fr/log/url.ttl Query Results XML format contains <link href=”http://corese.inria.fr/log/url.ttl”> client receive result and parse link url.

inline JSONObject getMessage(Mappings map)#

Gets a JSON object representing the message from a set of mappings.

This method retrieves the message text from the provided mappings and converts it into a JSON object. If the message text is null, null will be returned instead.

This docstring was generated by AI.

Parameters:

map – The mappings to retrieve the message from

Returns:

A JSON object representing the message or null if the message is not available

inline String getStringMessage(Mappings map)#

Gets a string message from a given Mappings object.

This method retrieves the URL from the Mappings object and returns the string obtained by calling the Service.getString() method. If the URL is null, the method returns null.

This docstring was generated by AI.

Parameters:

map – The Mappings object containing the URL

Returns:

A string retrieved from the URL in the Mappings object or null

inline QueryProcessUpdate getQueryProcessUpdate()#

Returns the QueryProcessUpdate instance associated with this object.

This docstring was generated by AI.

Returns:

The QueryProcessUpdate instance.

inline void setQueryProcessUpdate(QueryProcessUpdate queryProcessUpdate)#

Sets the query process update object.

This docstring was generated by AI.

Parameters:

queryProcessUpdate – The object to be set as the query process update.

inline ProducerImpl getLocalProducer()#

Returns the local producer instance.

This docstring was generated by AI.

Returns:

ProducerImpl the local producer instance

inline void setLocalProducer(ProducerImpl localProducer)#

Sets the local producer for query processing.

Parameters:

localProducer – The ProducerImpl object for local data.

inline DataManager getDataManager()#

Returns the data manager from the local producer.

This docstring was generated by AI.

Returns:

The data manager associated with the local producer.

inline boolean hasDataManager()#

Checks if a data manager has been set for the query process.

This docstring was generated by AI.

Returns:

true if a data manager has been set, false otherwise

inline DataBroker getDataBroker()#

Returns the data broker from the local producer.

This docstring was generated by AI.

Returns:

The data broker from the local producer.

inline DataBrokerConstruct getDataBrokerUpdate()#

Returns the data broker for update operations.

This docstring was generated by AI.

Returns:

The data broker for update operations.

inline void setDataBrokerUpdate(DataBrokerConstruct dataBrokerUpdate)#

Sets the data broker update instance.

This docstring was generated by AI.

Parameters:

dataBrokerUpdate – The data broker update instance.

inline boolean isProcessTransaction()#

Indicates whether transaction processing is enabled.

This docstring was generated by AI.

Returns:

true if transaction processing is enabled, false otherwise

inline void setProcessTransaction(boolean processTransaction)#

Sets the process transaction flag.

Parameters:

processTransaction – The flag value.

inline void startQuery()#

Starts a query process if a transaction is successful.

This method checks if a transaction is successful using the processTransaction() method. If successful, it starts a read transaction using the data manager.

This docstring was generated by AI.

Returns:

No return value.

inline void endQuery()#

Ends a query and transaction if one is active.

This method checks if a transaction process is currently active and, if so, ends both the query and transaction.

This docstring was generated by AI.

Returns:

true 
if a transaction was active and ended,
false 
otherwise

inline void startUpdate()#

Starts an update transaction if a process transaction is successful.

This method begins a write transaction on the data manager if the processTransaction() method returns true.

This docstring was generated by AI.

Returns:

void, this method does not return a value

inline void endUpdate()#

Ends the update process and commit transaction if successful.

This method checks if the current transaction was successful before ending the update process and committing any changes to the datamanager.

This docstring was generated by AI.

Returns:

void

Public Static Functions

static inline QueryProcess create()#

Creates a new QueryProcess object with a default graph.

This docstring was generated by AI.

Returns:

A new QueryProcess object configured with a default graph.

static inline QueryProcess create(Graph g)#

Creates a new QueryProcess instance with the given graph and default settings.

This docstring was generated by AI.

Parameters:

g – The graph to be used

Returns:

A new QueryProcess instance

static inline QueryProcess create(DataManager dm)#

Query processor for external graph Provide DataManager for query and update of external graph DataManager is stored in ProducerImpl DataManager is used when create GraphManager for update There is still a local corese graph for compatibility Use of DataManager is done in core.producer.DataBrokerExtern and core.producer.DataBrokerUpdateExtern SPARQL construct where return a corese graph.

Query processor for external graph Provide DataManager for query and update of external graph DataManager is stored in ProducerImpl DataManager is used when create GraphManager for update There is still a local corese graph for compatibility Use of DataManager is done in core.producer.DataBrokerExtern and core.producer.DataBrokerUpdateExtern SPARQL construct where return a corese graph

static inline QueryProcess create(Graph g, DataManager dm)#

Creates a new QueryProcess instance with a predefined graph and data manager.

A new QueryProcess instance is created using the provided graph, and the data manager is then defined for the created instance.

This docstring was generated by AI.

Parameters:
  • g – The graph to be used for the query process

  • dm – The data manager to be associated with the query process

Returns:

A new QueryProcess instance, with the provided graph and defined data manager

static inline QueryProcess create (Graph g, DataManager[] dmList)

Creates a new QueryProcess instance with a graph and optional data manager array.

If a data manager array is provided, the data manager for the graph is set to the first entry in the array. If no data manager array is provided, the data manager for the graph remains unchanged.

This docstring was generated by AI.

Parameters:
  • g – The graph to be used for the QueryProcess instance

  • dmList – Optional data manager array for setting the data manager for the graph

Returns:

A new QueryProcess instance with the specified graph

static inline QueryProcess create(Graph g, boolean isMatch)#

isMatch = true: ?x a h:Person return one occurrence for each instance of Person isMatch = false: ?x a h:Person return all occurrences for each instance of Person where the instance has several types which match Person, such as x a h:Man, h:Person default isMatch = false In addition, each Producer perform local Matcher.match() on its own graph for subsumption Hence each graph can have its own ontology and return one occurrence of each resource for ?x rdf:type aClass isMatch = false: (default) Global producer perform Matcher.match()

static inline QueryProcess stdCreate(Graph g, boolean isMatch)#

Creates and configures a QueryProcess object with a ProducerImpl.

This method first creates a ProducerImpl instance with the provided Graph, then sets the match property according to the isMatch parameter. A QueryProcess instance is then created with the ProducerImpl, and its match property is also set.

This docstring was generated by AI.

Parameters:
  • g – The graph for creating the ProducerImpl

  • isMatch – The match property value for ProducerImpl and QueryProcess

Returns:

The configured QueryProcess instance

static inline QueryProcess copy(Producer p, boolean isMatch)#

Creates a copy of a QueryProcess object with updated data manager.

A copy of the QueryProcess object is created using the provided Producer object. The data manager of the new object is then redefined with the data manager obtained from the same Producer object.

This docstring was generated by AI.

Parameters:
  • p – The Producer object used to create the copy and define its data manager

  • isMatch – A boolean value indicating whether the copied object should be used for matching or not

Returns:

A new QueryProcess object with its data manager defined by the producer

static inline QueryProcess create(ProducerImpl p)#

Creates a new QueryProcess instance with the given ProducerImpl.

The method initializes a local matcher for the producer’s graph and sets it if there is a local match. Then, it creates a global matcher with relax mode and sets it regardless of the local match. Finally, a new QueryProcess instance is created with the producer, an interpreter, and the matcher, and the local producer is set in the new QueryProcess instance.

This docstring was generated by AI.

Parameters:

p – The ProducerImpl to associate with the new QueryProcess instance.

Returns:

A new QueryProcess instance with the given ProducerImpl.

static inline QueryProcess create(Producer p)#

Creates a new QueryProcess instance using the provided Producer.

If the Producer is an instance of ProducerImpl, a new QueryProcess instance will be created using that ProducerImpl. Otherwise, a new QueryProcess instance will be created using an external Producer.

This docstring was generated by AI.

Parameters:

p – The Producer to use for creating the new QueryProcess instance

Returns:

A new QueryProcess instance created using the given Producer

static inline QueryProcess createExtern(Producer p)#

Creates a QueryProcess object with a given producer and interpreter.

This method first creates a Matcher object with an empty graph, then sets its mode to RELAX. A QueryProcess object is then created using the given producer, a new interpreter, and the created matcher. The local producer of the resulting QueryProcess object is set to a new ProducerImpl object with an empty graph for compatibility reasons.

This docstring was generated by AI.

Parameters:

p – The producer used for query processing

Returns:

A configured QueryProcess object

static inline QueryProcess create(Producer prod, Interpreter eval, Matcher match)#

To Be Used by implementation other than Graph.

Creates a new instance of QueryProcess with the provided Producer, Interpreter, and Matcher.

This docstring was generated by AI.

Parameters:
  • prod – The producer object.

  • eval – The interpreter object.

  • match – The matcher object.

Returns:

A new instance of QueryProcess.

static inline QueryProcess dbCreate(Graph g, boolean isMatch, String factory, String db)#

When there is a graph database to manage the graph.

static inline synchronized Producer getCreateProducer (Graph g, String factory, String db)

Gets a producer for creating RDF data.

If a database is specified, a producer is created and stored in a map for future use. If no database is specified, the default producer is used or created if it doesn’t exist.

This docstring was generated by AI.

Parameters:
  • g – The graph

  • factory – The factory

  • db – The database

Returns:

A producer for creating RDF data

static inline QueryProcess create(Graph g, Graph g2)#

Creates a new QueryProcess instance with an additional graph.

A new QueryProcess instance is created with the first graph, then the second graph is added to it.

This docstring was generated by AI.

Parameters:
  • g – The first graph

  • g2 – The second graph

Returns:

A new QueryProcess instance with both graphs

static inline Eval createEval(Graph g, String q)#

Create an Eval initialized with a query q that contains function definitions This Eval can be used to call these functions: eval.eval(name, param) Use case: define callback functions.

static inline Eval createEval(Graph g, Query q)#

Creates an evaluation object for a given graph and query.

This method creates a QueryProcess object for the given graph, and then uses it to create an Eval object for the given query.

This docstring was generated by AI.

Parameters:
  • g – The graph for which an evaluation object is to be created

  • q – The query for which an evaluation object is to be created

Returns:

An Eval object representing the evaluation of the query on the graph

static inline void setSort(boolean b)#

Sets the sort flag.

This docstring was generated by AI.

Parameters:

b – The new value for the sort flag.

static inline Interpreter createInterpreter(Producer p, Matcher m)#

Filter and LDScript Interpreter.

static inline void setOverwrite(boolean b)#

Sets whether the query process should overwrite existing data.

This docstring was generated by AI.

Parameters:

b – The new overwrite value

static inline void setReentrant(boolean b)#

Sets the reentrant flag for the query process.

This docstring was generated by AI.

Parameters:

b – The new value for the reentrant flag.

static inline boolean isReentrant()#

Indicates if the query process is reentrant.

This docstring was generated by AI.

Returns:

true if the query process is reentrant, false otherwise

static inline String getVisitorName()#

Returns the name of the solver visitor.

This docstring was generated by AI.

Returns:

The name of the solver visitor.

static inline void setVisitorName(String aSolverVisitorName)#

Sets the solver visitor name.

This docstring was generated by AI.

Parameters:

aSolverVisitorName – The new solver visitor name.

static inline String getServerVisitorName()#

Returns the name of the server visitor.

This docstring was generated by AI.

Returns:

The name of the server visitor as a string.

static inline void setServerVisitorName(String name)#

Sets the name of the server visitor.

This docstring was generated by AI.

Parameters:

name – The name of the server visitor.

Public Static Attributes

static boolean DISPLAY_QUERY = false#
static final String SHACL   = "http://ns.inria.fr/sparql-template/function/datashape/main.rq"

Protected Functions

inline QueryProcess(Producer p, Interpreter e, Matcher m)#

QueryProcess class constructor.

This constructor initializes a new instance of the QueryProcess class with the provided Producer, Interpreter, and Matcher objects.

This docstring was generated by AI.

Parameters:
  • p – The Producer object used for producing RDF data.

  • e – The Interpreter object used for interpreting SPARQL queries.

  • m – The Matcher object used for matching query patterns against RDF data.