-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanDeprecated, for removal: This API element is subject to removal in a future version.Ignoredstatic booleanDefault for whether SERVICE is enabled when no context settinghttpServiceAllowedis found.static final StringIRI for ARQstatic final StringRoot of ARQ-defined parameter namesstatic final StringPrefix for ARQ-defined parameter namesstatic final SymbolControls bNode labels as <_:...> or not - that is a pseudo URIs.static final SymbolEnable logging of execution timing.static final SymbolEnable built-in property functions - also called "magic properties".static final SymbolExpression evaluation without extension types (e.g. xsd:date, language tags)static final SymbolIf set to true, the parsers will convert undefined prefixes to a URI according to the fixup functionRiotLib.fixupPrefixes.static final SymbolGenerate the ToList operation in the algebra (as ARQ is stream based, ToList is a non-op).static booleanGlobal on/off for all SERVICE calls.static final SymbolContext key to control hiding non-distinguished variablesstatic final SymbolHttpClientto use.static final SymbolOperation timeout.static final SymbolUse this symbol to provide aRegistryRequestModifierthat can modify an HTTP request just before it is sent.static final SymbolUse this symbol to provide aHttpRequestModifierdirectly.static final SymbolControl whether SERVICE processing is allowed.static final SymbolUse this symbol to provide aQuerySendModeto use on the HTTP call.static final SymbolIf true, XML result sets will use the bNode label in the result set itself.static final SymbolDeprecated, for removal: This API element is subject to removal in a future version.Use string "javaRegex"static final StringName of the execution loggerstatic final StringName of the logger for remote HTTP requestsstatic final StringName of the information logger (only used by jena-text).static final StringThe product namestatic final SymbolContext key controlling whether a DISTINCT-ORDER BY query is done by replacing the distinct with a reduced.static final SymbolContext key controlling whether the standard optimizer applies constant folding to expressionsstatic final SymbolContext key controlling whether the standard optimizer applies optimizations to conjunctions (&&) in filters.static final SymbolContext key controlling whether the standard optimizer applies optimizations to disjunctions (||) in filters.static final SymbolContext key controlling whether the standard optimizer applies optimizations to equalities in FILTERs.static final SymbolContext key controlling whether the standard optimizer applies optimizations to IN and NOT IN.static final SymbolContext key controlling whether the standard optimizer applies optimizations to implicit joins in FILTERs.static final SymbolContext key controlling whether the standard optimizer applies optimizations to inequalities in FILTERs This optimization is conservative - it does not take place if there is a potential risk of changing query semanticsstatic final SymbolContext key controlling whether the main query engine moves filters to the "best" place.static final SymbolContext key controlling whether to do filter placement within BGP and quad blocks.static final SymbolContext key controlling whether the main query engine moves filters to the "best" place using the more limited and conservative strategy which does not place as many filters Must be explicitly set "true" to operate.static final SymbolContext key controlling whether the main query engine applies the default optimization transformations.static final SymbolContext key controlling whether the standard optimizer applies optimizations to implicit left joins.static final SymbolContext key controlling whether the standard optimizer applies optimizations to the evaluation of joins to favour index joins wherever possiblestatic final SymbolContext key controlling whether the standard optimizer applies optimizations where by some assignments may be eliminated/inlined into the operators where their values are used only oncestatic final SymbolContext key controlling whether the standard optimizer aggressively inlines assignments whose values are used only once into operators where those expressions may be evaluated multiple times e.g. orderstatic final SymbolContext key controlling whether the standard optimizater applies optimizations to joined BGPs to merge them into single BGPs.static final SymbolContext key controlling whether the standard optimizer applies the optimization to combine stacks of (extend) into one compound operation.static final SymbolContext key controlling whether a DISTINCT-ORDER BY query is done by applying the ORDER BY after the DISTINCT when default SPARQL semantics usually mean ORDER BY applies before DISTINCT.static final SymbolContext key controlling whether the main query engine flattens simple paths (e.g.static final SymbolContext key controlling whether the main query engine does more extensive property path flattening that involves more in-depth manipulation of the SPARQL algebra.static final SymbolContext key controlling whether the standard optimizer applies table empty promotionstatic final SymbolContext key controlling whether the standard optimizer applies the optimization to reorder basic graph patterns.static final SymbolContext key controlling whether an ORDER BY-LIMIT query is done avoiding total sort using an heap.static final SymbolIf true, XML result sets written will contain the graph bNode label See also inputGraphBNodeLabelsstatic final SymbolContext key controlling whether the main query engine processes property functions.static final SymbolSet timeout.static final SymbolDetermine which regular expression system to use.static final SymbolUse this Symbol to allow passing additional query parameters to a SERVICE <IRI> call.static final SymbolA Long value that specifies the number of bindings (or triples for CONSTRUCT queries) to be stored in memory by sort operations or hash tables before switching to temporary disk files.static final SymbolContext key for StageBuilder used in BGP compilationstatic final SymbolStick exactly to the spec.static final SymbolContext symbol for the script function allow liststatic SymbolContext symbol for JavaScript functions as a string value which is evaluated.static SymbolContext symbol for JavaScript library of functions defined in a file.static final SymbolSymbol to enable logging of execution.static final StringJava system property to enable JavaScript functionsstatic final SymbolThreshold for doing a top N sort for ORDER-LIMIT.static final SymbolSet timeout.static final SymbolUse the SAX parser for XML result sets.static final StringThe ARQ versionstatic final SymbolDeprecated, for removal: This API element is subject to removal in a future version.Use string "xercesRegex" -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidTurn on processing of blank node labels in queriesstatic voidenableBlankNodeResultLabels(boolean val) Turn on/off processing of blank node labels in queriesstatic voidenableOptimizer(boolean state) Globally switch the default optimizer on and off : Note that storage subsystems may also be applying separately controlled optimizations.static voidenableOptimizer(Context context, boolean state) Switch the default optimizer on and off for a specific Context.static Contextstatic org.slf4j.LoggerThe execution loggerstatic Explain.InfoLevelGet the currently global execution logging settingstatic org.slf4j.LoggerThe HTTP Request loggerstatic org.slf4j.LoggerThe information loggerstatic voidinit()Ensure things have started - applications do not need call this.static booleanstatic booleanisFalseOrUndef(Symbol symbol) static booleanstatic booleanstatic booleanisTrueOrUndef(Symbol symbol) static voidstatic voidsetExecutionLogging(Explain.InfoLevel infoLevel) Set execution logging - logging is to logger "org.apache.jena.arq.exec" at level INFO.static voidstatic voidSet normal mode, including expression evaluationstatic voidsetNormalMode(Context context) Explicitly set the values for normal operation.static voidSet strict mode, including expression evaluationstatic voidsetStrictMode(Context context) Set strict mode for a given Context.static voidstatic void
-
Field Details
-
logExecName
Name of the execution logger- See Also:
-
logInfoName
Name of the information logger (only used by jena-text).- See Also:
-
logHttpRequestName
Name of the logger for remote HTTP requests- See Also:
-
symLogExec
Symbol to enable logging of execution. Must also set log4j, or other logging system, The logger is "org.apache.jena.arq.exec"
log4j2:logger.arq-exec.name = org.apache.jena.arq.exec logger.arq-exec.level = INFO
See the ARQ Logging Documentation. -
arqIRI
IRI for ARQ- See Also:
-
arqParamNS
Root of ARQ-defined parameter names- See Also:
-
arqSymbolPrefix
Prefix for ARQ-defined parameter names- See Also:
-
strictSPARQL
Stick exactly to the spec. -
constantBNodeLabels
Controls bNode labels as <_:...> or not - that is a pseudo URIs. This does not affect [] or _:a bNodes as variables in queries. -
enablePropertyFunctions
Enable built-in property functions - also called "magic properties". These are properties in triple patterns that need calculation, not matching. See ARQ documentation for more details. rdfs:member and http://jena.apache.org/ARQ/list#member are provided. -
enableExecutionTimeLogging
Enable logging of execution timing. -
outputGraphBNodeLabels
If true, XML result sets written will contain the graph bNode label See also inputGraphBNodeLabels -
inputGraphBNodeLabels
If true, XML result sets will use the bNode label in the result set itself. See also outputGraphBNodeLabels -
queryTimeout
Set timeout. The value of this symbol gives the value of the timeout in milliseconds- A Number; the long value is used
- A string, e.g. "1000", parsed as a number
- A string, as two numbers separated by a comma, e.g. "500,10000" parsed as two numbers
-
updateTimeout
Set timeout. The value of this symbol gives the value of the timeout in milliseconds- A Number; the long value is used
- A string, e.g. "1000", parsed as a number
- A string, as two numbers separated by a comma, e.g. "500,10000" parsed as two numbers
-
stageGenerator
Context key for StageBuilder used in BGP compilation -
hideNonDistiguishedVariables
Context key to control hiding non-distinguished variables -
useSAX
Use the SAX parser for XML result sets. The default is to use StAX for full streaming of XML results. The SAX parser takes a copy of the result set before giving the ResultSet to the calling application. -
allowDuplicateSelectColumns
Deprecated, for removal: This API element is subject to removal in a future version.Ignored- See Also:
-
regexImpl
Determine which regular expression system to use. The value of this context entry should be a string:- "
javaRegex" : use java.util.regex (support features outside the strict SPARQL regex language) - "
xercesRegex" : use the internal XPath regex engine (more compliant; slower)
- "
-
javaRegex
Deprecated, for removal: This API element is subject to removal in a future version.Use string "javaRegex"Symbol to name java.util.regex regular expression engine -
xercesRegex
Deprecated, for removal: This API element is subject to removal in a future version.Use string "xercesRegex"Symbol to name the Xerces-J regular expression engine -
serviceParams
Use this Symbol to allow passing additional query parameters to a SERVICE <IRI> call. Parameters need to be grouped by SERVICE <IRI>, a Map<String, Map<String,List<String>>> is assumed. The key of the first map is the SERVICE IRI, the value is a Map which maps the name of a query string parameters to its values.- See Also:
-
httpServiceSendMode
Use this symbol to provide aQuerySendModeto use on the HTTP call. -
httpRegistryRequestModifer
Use this symbol to provide aRegistryRequestModifierthat can modify an HTTP request just before it is sent. -
httpRequestModifer
Use this symbol to provide aHttpRequestModifierdirectly. This takes precedence over registry lookup. -
globalServiceAllowed
public static boolean globalServiceAllowedGlobal on/off for all SERVICE calls.Set
falseto disable SERVICE calls regardless of any context or default setting. -
allowServiceDefault
public static boolean allowServiceDefaultDefault for whether SERVICE is enabled when no context settinghttpServiceAllowedis found. -
httpServiceAllowed
Control whether SERVICE processing is allowed. If the context of the query execution contains this, and it's set to "false", then SERVICE is not allowed. -
httpQueryClient
HttpClientto use. -
httpQueryTimeout
Operation timeout. Connection timeout is controlled viaHttpClient. -
fixupUndefinedPrefixes
If set to true, the parsers will convert undefined prefixes to a URI according to the fixup functionRiotLib.fixupPrefixes. Normally, unset (which equates to false).- See Also:
-
spillToDiskThreshold
A Long value that specifies the number of bindings (or triples for CONSTRUCT queries) to be stored in memory by sort operations or hash tables before switching to temporary disk files. The value defaults to -1, which will always keep the bindings in memory and never write to temporary files. The amount of memory used will vary based on the size of the bindings. If you are retrieving large literal strings, then you may need to lower the value.Note that for a complex query, several sort or hash operations might be running in parallel; each one will be allowed to retain as many bindings in memory as this value specifies before it starts putting data in temporary files. Also, several running sessions could be doing such operations concurrently. Therefore, the total number of bindings held in memory could be many times this value; it is necessary to keep this fact in mind when choosing the value.
Operations currently affected by this symbol:
ORDER BY, SPARQL Update, CONSTRUCT (optionally)A reasonable value here is 10000.
- See Also:
-
optimization
Context key controlling whether the main query engine applies the default optimization transformations. -
optPathFlatten
Context key controlling whether the main query engine flattens simple paths (e.g.?x :p/:q ?z => ?x :p ?.0 . ?.0 ?q ?z)Default is "true"
-
optPathFlattenAlgebra
Context key controlling whether the main query engine does more extensive property path flattening that involves more in-depth manipulation of the SPARQL algebra. This must be explicitly enabled and is only used ifoptPathFlattenis also enabled (which it is by default).Default is
false -
optFilterPlacement
Context key controlling whether the main query engine moves filters to the "best" place. Default is "true" - filter placement is done. -
optFilterPlacementBGP
Context key controlling whether to do filter placement within BGP and quad blocks. Modifies the effect of optFilterPlacement. Default is "true" - filter placement is pushed into BGPs. -
optFilterPlacementConservative
Context key controlling whether the main query engine moves filters to the "best" place using the more limited and conservative strategy which does not place as many filters Must be explicitly set "true" to operate. Filter placement, viaoptFilterPlacementmust also be active (which it is by default).- See Also:
-
optTopNSorting
Context key controlling whether an ORDER BY-LIMIT query is done avoiding total sort using an heap. Default is "true" - total sort if avoided by default when ORDER BY is used with LIMIT. -
topNSortingThreshold
Threshold for doing a top N sort for ORDER-LIMIT. The default is a limit of 1000. The context value should be aNumber. -
optDistinctToReduced
Context key controlling whether a DISTINCT-ORDER BY query is done by replacing the distinct with a reduced. Default is "true" - the reduced operator does not need to keep a data structure with all previously seen bindings. -
optOrderByDistinctApplication
Context key controlling whether a DISTINCT-ORDER BY query is done by applying the ORDER BY after the DISTINCT when default SPARQL semantics usually mean ORDER BY applies before DISTINCT. This optimization applies only in a subset of cases unlike the more generaloptDistinctToReducedoptimization.See
TransformOrderByDistinctApplicationfor more discussion on exactly when this may apply -
optFilterEquality
Context key controlling whether the standard optimizer applies optimizations to equalities in FILTERs. This optimization is conservative - it does not take place if there is a potential risk of changing query semantics. -
optFilterInequality
Context key controlling whether the standard optimizer applies optimizations to inequalities in FILTERs This optimization is conservative - it does not take place if there is a potential risk of changing query semantics -
optFilterImplicitJoin
Context key controlling whether the standard optimizer applies optimizations to implicit joins in FILTERs. This optimization is conservative - it does not take place if there is a potential risk of changing query semantics. -
optImplicitLeftJoin
Context key controlling whether the standard optimizer applies optimizations to implicit left joins. This optimization is conservative - it does not take place if there is a potential risk of changing query semantics. -
optExprConstantFolding
Context key controlling whether the standard optimizer applies constant folding to expressionsBy default, this transformation is applied.
-
optFilterConjunction
Context key controlling whether the standard optimizer applies optimizations to conjunctions (&&) in filters.By default, this transformation is applied.
-
optFilterExpandOneOf
Context key controlling whether the standard optimizer applies optimizations to IN and NOT IN.By default, this transformation is applied.
-
optFilterDisjunction
Context key controlling whether the standard optimizer applies optimizations to disjunctions (||) in filters.By default, this transformation is applied.
-
optPromoteTableEmpty
Context key controlling whether the standard optimizer applies table empty promotion -
optIndexJoinStrategy
Context key controlling whether the standard optimizer applies optimizations to the evaluation of joins to favour index joins wherever possible -
optInlineAssignments
Context key controlling whether the standard optimizer applies optimizations where by some assignments may be eliminated/inlined into the operators where their values are used only onceBy default, this transformation is not applied.
-
optInlineAssignmentsAggressive
Context key controlling whether the standard optimizer aggressively inlines assignments whose values are used only once into operators where those expressions may be evaluated multiple times e.g. orderThis is modifier to
optInlineAssignments. -
optMergeBGPs
Context key controlling whether the standard optimizater applies optimizations to joined BGPs to merge them into single BGPs.By default, this transformation is applied.
-
optMergeExtends
Context key controlling whether the standard optimizer applies the optimization to combine stacks of (extend) into one compound operation. Ditto (assign).By default, this transformation is applied.
-
optReorderBGP
Context key controlling whether the standard optimizer applies the optimization to reorder basic graph patterns. This is an algebra optimizer step. Because it interacts with filter placement, it is worth doing even though there are later reorderings. -
propertyFunctions
Context key controlling whether the main query engine processes property functions.By default, this is applied.
-
extensionValueTypes
Expression evaluation without extension types (e.g. xsd:date, language tags) -
systemPropertyScripting
Java system property to enable JavaScript functions- See Also:
-
symCustomFunctionScriptAllowList
Context symbol for the script function allow list -
symJavaScriptFunctions
Context symbol for JavaScript functions as a string value which is evaluated.arq:js-functions. -
symJavaScriptLibFile
Context symbol for JavaScript library of functions defined in a file.arq:js-library. -
generateToList
Generate the ToList operation in the algebra (as ARQ is stream based, ToList is a non-op). Default is not to do so. Strict mode will also enable this. -
NAME
The product name- See Also:
-
VERSION
The ARQ version
-
-
Constructor Details
-
ARQ
public ARQ()
-
-
Method Details
-
getExecLogger
public static org.slf4j.Logger getExecLogger()The execution logger -
getInfoLogger
public static org.slf4j.Logger getInfoLogger()The information logger -
getHttpRequestLogger
public static org.slf4j.Logger getHttpRequestLogger()The HTTP Request logger -
getExecutionLogging
Get the currently global execution logging setting -
setExecutionLogging
Set execution logging - logging is to logger "org.apache.jena.arq.exec" at level INFO. An appropriate logging configuration is also required. -
enableBlankNodeResultLabels
public static void enableBlankNodeResultLabels()Turn on processing of blank node labels in queries -
enableBlankNodeResultLabels
public static void enableBlankNodeResultLabels(boolean val) Turn on/off processing of blank node labels in queries -
enableOptimizer
public static void enableOptimizer(boolean state) Globally switch the default optimizer on and off : Note that storage subsystems may also be applying separately controlled optimizations. -
enableOptimizer
Switch the default optimizer on and off for a specific Context. Note that storage subsystems may also be applying separately controlled optimizations. -
setStrictMode
public static void setStrictMode()Set strict mode, including expression evaluation -
setStrictMode
Set strict mode for a given Context. Does not influence expression evaluation because NodeValues are controlled globally, not per context. -
isStrictMode
public static boolean isStrictMode() -
setNormalMode
public static void setNormalMode()Set normal mode, including expression evaluation -
setNormalMode
Explicitly set the values for normal operation. Does not influence expression evaluation. -
init
public static void init()Ensure things have started - applications do not need call this. The method is public so any part of ARQ can call it. -
getContext
-
set
-
setTrue
-
setFalse
-
unset
-
isTrue
-
isFalse
-
isTrueOrUndef
-
isFalseOrUndef
-