Package org.eclipse.rdf4j.federated.util
Class FedXUtil
java.lang.Object
org.eclipse.rdf4j.federated.util.FedXUtil
General utility functions
- Since:
- 5.0
- Author:
- Andreas Schwarte
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyMaxQueryExecutionTime
(Operation operation, FederationContext federationContext) Set a maximum execution time corresponding toFedXConfig.getEnforceMaxQueryTime()
to this operation.static void
applyQueryBindings
(SailQuery query) Apply query bindings to transfer information from the query into the evaluation routine, e.g.static String
Hexadecimal representation of an incremental integer.static IRI
static Literal
static Resource[]
toContexts
(StatementPattern stmt, Dataset dataset) Retrieve the contexts from theStatementPattern
andDataset
.static Resource[]
toContexts
(Dataset ds) Convert the givenDataset
to an array of contextsstatic Dataset
Convert the given contexts to aDataset
representation.static Dataset
toDataset
(StatementPattern stmt, Dataset dataset) static ValueFactory
-
Constructor Details
-
FedXUtil
public FedXUtil()
-
-
Method Details
-
iri
- Parameters:
iri
-- Returns:
- the IRI for the full URI string
-
literal
- Parameters:
literal
-- Returns:
- the string literal
-
valueFactory
- Returns:
- a
SimpleValueFactory
instance
-
applyQueryBindings
Apply query bindings to transfer information from the query into the evaluation routine, e.g. the query execution time.- Parameters:
query
-
-
getIncrementalUUID
Hexadecimal representation of an incremental integer.- Returns:
- an incremental hex UUID
-
applyMaxQueryExecutionTime
public static void applyMaxQueryExecutionTime(Operation operation, FederationContext federationContext) Set a maximum execution time corresponding toFedXConfig.getEnforceMaxQueryTime()
to this operation. Note that this is an upper bound only as FedX applies other means for evaluation the maximum query execution time.- Parameters:
operation
- theOperation
federationContext
- theFederationContext
-
toDataset
Convert the given contexts to aDataset
representation.- Parameters:
contexts
-- Returns:
-
toContexts
Convert the givenDataset
to an array of contexts- Parameters:
ds
-- Returns:
-
toContexts
Retrieve the contexts from theStatementPattern
andDataset
.- Parameters:
stmt
-dataset
-- Returns:
-
toDataset
Returns aDataset
representation of the givenStatementPattern
andDataset
.If the
StatementPattern
does not have a context value, theDataset
is returned as-is, which may also benull
.Otherwise the newly constructed
Dataset
contains all information from the original one plus the context from the statement.- Parameters:
stmt
-dataset
-- Returns:
-