### Example of installing a specific path (Java) Source: https://jena.apache.org/documentation/query/property_paths.html Provides a concrete example of parsing the 'rdf:type/rdfs:subClassOf*' path and installing it with a custom URI. ```java Path path = PathParser.parse("rdf:type/rdfs:subClassOf*", PrefixMapping.Standard) ; String uri = "http://example/ns#myType" ; PathLib.install(uri, path) ; ``` -------------------------------- ### start Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/FusekiServer.Builder.html Builds the server according to the current description and then starts it. This is a shortcut method for building and immediately starting the server. ```APIDOC ## start ### Description Builds the server according to the current description and then starts it. This is a shortcut method for building and immediately starting the server. ### Method public FusekiServer start() ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response Returns the started `FusekiServer` instance. ### Response Example None ``` -------------------------------- ### start Method Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/system/progress/ProgressMonitorOutput.html Starts the progress monitor and begins timing. ```APIDOC ## start() ### Description Starts the progress monitoring process and initiates timing. This method should be paired with a call to `finish()` to properly track the duration of an operation. ``` -------------------------------- ### Example LET Assignment Source: https://jena.apache.org/documentation/query/assignment.html An example demonstrating the LET assignment syntax. ```sparql LET ( ?x := 2 ) ``` -------------------------------- ### Main Method Example Source: https://jena.apache.org/documentation/javadoc/extras/serviceenhancer/org.apache.jena.serviceplugins/org/apache/jena/sparql/service/enhancer/example/ServicePluginExamples.html The main entry point for running service enhancer examples. ```Java public static void main(String[] args) ``` -------------------------------- ### FusekiServer Starting and Running Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/class-use/FusekiServer.html Methods for starting and running FusekiServer instances. ```APIDOC ## FusekiServer.Builder.start() ### Description Shortcut: build, then start the server. ### Method `start()` ### Endpoint N/A (Method Call) ### Parameters None ### Request Example ```java FusekiServer server = fusekiServerBuilder.start(); ``` ### Response #### Success Response (FusekiServer) - **server** (FusekiServer) - The started FusekiServer instance. #### Response Example ```java // Returns a FusekiServer object ``` ``` ```APIDOC ## FusekiMain.run(String... args) ### Description Run a server asynchronously based on the command line arguments. ### Method `static run(String... args)` ### Endpoint N/A (Method Call) ### Parameters - **args** (String...) - Command line arguments for server configuration. ### Request Example ```java FusekiMain.run("--port", "3030"); ``` ### Response #### Success Response (FusekiServer) - **server** (FusekiServer) - The running FusekiServer instance. #### Response Example ```java // Server starts running asynchronously ``` ``` ```APIDOC ## FusekiServer.run(int port, String name, org.apache.jena.sparql.core.DatasetGraph dsg) ### Description Run a Fuseki server for one dataset. ### Method `static run(int port, String name, org.apache.jena.sparql.core.DatasetGraph dsg)` ### Endpoint N/A (Method Call) ### Parameters - **port** (int) - The port number for the server. - **name** (String) - The name of the dataset endpoint. - **dsg** (org.apache.jena.sparql.core.DatasetGraph) - The DatasetGraph to serve. ### Request Example ```java DatasetGraph dsg = ...; FusekiServer server = FusekiServer.run(3030, "mydata", dsg); ``` ### Response #### Success Response (FusekiServer) - **server** (FusekiServer) - The running FusekiServer instance. #### Response Example ```java // Returns a FusekiServer object that is now running ``` ``` ```APIDOC ## FusekiServer.start() ### Description Start the server - the server continues to run after this call returns. ### Method `start()` ### Endpoint N/A (Method Call) ### Parameters None ### Request Example ```java FusekiServer server = ...; server.start(); ``` ### Response #### Success Response (void) - This method does not return a value. #### Response Example ```java // Server starts running in the background ``` ``` ```APIDOC ## Runner.runAsync(String... args) ### Description Setup a `FusekiServer` from the command line options and run it asynchronously. ### Method `runAsync(String... args)` ### Endpoint N/A (Method Call) ### Parameters - **args** (String...) - Command line arguments for server configuration. ### Request Example ```java FusekiServer server = Runner.runAsync("--port", "3030"); ``` ### Response #### Success Response (FusekiServer) - **server** (FusekiServer) - The running FusekiServer instance. #### Response Example ```java // Returns a FusekiServer object that is now running asynchronously ``` ``` ```APIDOC ## FusekiRunner.runAsyncBasic(String... args) ### Description Minimal server - e.g. embedded use and testing. ### Method `static runAsyncBasic(String... args)` ### Endpoint N/A (Method Call) ### Parameters - **args** (String...) - Command line arguments for server configuration. ### Request Example ```java FusekiServer server = FusekiRunner.runAsyncBasic("--port", "3030"); ``` ### Response #### Success Response (FusekiServer) - **server** (FusekiServer) - The running FusekiServer instance. #### Response Example ```java // Returns a FusekiServer object that is now running asynchronously ``` ``` ```APIDOC ## FusekiRunner.runAsyncMain(String... args) ### Description Basic server. ### Method `static runAsyncMain(String... args)` ### Endpoint N/A (Method Call) ### Parameters - **args** (String...) - Command line arguments for server configuration. ### Request Example ```java FusekiServer server = FusekiRunner.runAsyncMain("--port", "3030"); ``` ### Response #### Success Response (FusekiServer) - **server** (FusekiServer) - The running FusekiServer instance. #### Response Example ```java // Returns a FusekiServer object that is now running asynchronously ``` ``` ```APIDOC ## FusekiRunner.runAsyncServerPlain(String... args) ### Description All available server functionality, except admin functionality; no UI. ### Method `static runAsyncServerPlain(String... args)` ### Endpoint N/A (Method Call) ### Parameters - **args** (String...) - Command line arguments for server configuration. ### Request Example ```java FusekiServer server = FusekiRunner.runAsyncServerPlain("--port", "3030"); ``` ### Response #### Success Response (FusekiServer) - **server** (FusekiServer) - The running FusekiServer instance. #### Response Example ```java // Returns a FusekiServer object that is now running asynchronously ``` ``` ```APIDOC ## FusekiRunner.runAsyncServerUI(String... args) ### Description General server, with UI. ### Method `static runAsyncServerUI(String... args)` ### Endpoint N/A (Method Call) ### Parameters - **args** (String...) - Command line arguments for server configuration. ### Request Example ```java FusekiServer server = FusekiRunner.runAsyncServerUI("--port", "3030"); ``` ### Response #### Success Response (FusekiServer) - **server** (FusekiServer) - The running FusekiServer instance. #### Response Example ```java // Returns a FusekiServer object that is now running asynchronously ``` ``` -------------------------------- ### start Method Source: https://jena.apache.org/documentation/javadoc/rdfpatch/org.apache.jena.rdfpatch/org/apache/jena/rdfpatch/changes/RDFChangesOnStartFinish.html Starts the RDF change processing, executing the onStart callback. ```APIDOC ## start() ### Description Starts processing. This method should be paired with a `finish()` call. It executes the `onStart` Runnable provided during construction. ### Method void ### Overrides `start` in class `RDFChangesWrapper` ### Implements `start` in interface `RDFChanges` ``` -------------------------------- ### start Method Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/sparql/core/describe/DescribeBNodeClosure.html Starts the describe process, passing in the result model and query execution context. ```APIDOC ## start(Model accumulateResultModel, Context cxt) ### Description Start the describe process, passing in the result model. ### Method `void start(org.apache.jena.rdf.model.Model accumulateResultModel, Context cxt)` ### Parameters * `accumulateResultModel` (Model) - The model to accumulate results. * `cxt` (Context) - Query execution context. ``` -------------------------------- ### start() Source: https://jena.apache.org/documentation/javadoc/rdfpatch/org.apache.jena.rdfpatch/org/apache/jena/rdfpatch/binary/RDFChangesWriterBinary.html Starts processing changes. This should be paired with a `finish()` call. ```APIDOC ## Method start ### Description Starts processing changes. The exact meaning is implementation-dependent. This method should be paired with a `finish()` call to ensure proper completion of the change processing. ### Interface `RDFChanges` ``` -------------------------------- ### Main Method for Jena Text Example Source: https://jena.apache.org/documentation/javadoc/text/org.apache.jena.text/examples/text/JenaTextExample1.html The entry point for the example. It orchestrates the creation, loading, and querying of the text search dataset. ```Java public static void main(String... argv) { org.apache.jena.query.Dataset dataset = createAssembler(); loadData(dataset, "data.ttl"); queryData(dataset); } ``` -------------------------------- ### Example Statistics File Source: https://jena.apache.org/documentation/tdb/optimizer.html A concrete example of a statistics file with metadata and predicate counts. ```sse (prefix ((: )) (stats (meta (timestamp "2008-10-23T10:35:19.122+01:00"^^) (run@ "2008/10/23 10:35:19") (count 11)) (:p 7) ( 7) )) ``` -------------------------------- ### JettyServer Start Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/JettyServer.html Starts the Jetty server. The server will continue to run after this method returns. Call `join()` to synchronize with the server's lifecycle. ```APIDOC ## start ### Description Starts the Jetty server. The server operates asynchronously after this call returns. To wait for the server to stop, use the `join()` method. ### Method `JettyServer` ### Signature `public JettyServer start()` ``` -------------------------------- ### setup() Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/mgt/FusekiServerCtl.html Initializes the Fuseki server environment if it has not been formatted yet. ```APIDOC ## setup() ### Description Sets up the Fuseki server's file areas and configuration if they do not already exist. ### Method `public void setup()` ``` -------------------------------- ### getOffsetInRanges Source: https://jena.apache.org/documentation/javadoc/extras/serviceenhancer/org.apache.jena.serviceplugins/org/apache/jena/sparql/service/enhancer/slice/impl/RangeBuffer.html Gets the offset within the range set where this buffer starts. Returns null if the offset cannot be represented in a single value. ```APIDOC ## getOffsetInRanges ### Description The offset within the range set where this buffer starts; may be null if the offset cannot be represented in a single value such as in a union of two buffers which have different offsets. ### Method `getOffsetInRanges()` ### Return Type `Long` ``` -------------------------------- ### tdbquery --explain output example Source: https://jena.apache.org/documentation/tdb/optimizer.html Example output from tdbquery with --explain, showing query, algebra, and TDB details. ```text 00:05:20 INFO exec :: QUERY SELECT * WHERE { ?a ?b ?c } 00:05:20 INFO exec :: ALGEBRA (quadpattern (quad ?a ?b ?c)) 00:05:20 INFO exec :: TDB (quadpattern (quad ?a ?b ?c)) 00:05:20 INFO exec :: Execute :: (?a ?b ?c) ``` -------------------------------- ### get(int index) Source: https://jena.apache.org/documentation/javadoc/ontapi/org.apache.jena.ontapi/org/apache/jena/ontapi/impl/objects/OntListImpl.html Answers the list that is the tail of this list starting from the given position. This method can be used to insert/remove/clear the parent list at any position. ```APIDOC ## get(int index) ### Description Answers the list that is the tail of this list starting from the given position. Note: the returned list cannot be annotated. This method can be used to insert/remove/clear the parent list at any position, e.g. the operation `get(1).addFirst(e)` will insert the element `e` at second position. ### Method public OntList get(int index) throws org.apache.jena.shared.PropertyNotFoundException, OntJenaException.IllegalArgument ### Parameters #### Path Parameters - **index** (int) - Required - not negative ### Returns new `OntList` instance ### Throws - `OntJenaException.IllegalArgument` - if the specified index is out of list bounds - `org.apache.jena.shared.PropertyNotFoundException` ``` -------------------------------- ### Example Property Function Implementation Source: https://jena.apache.org/documentation/query/writing_propfuncs.html A basic implementation of a Property Function that returns no results. This serves as a starting point for creating custom property functions. ```java public class ExamplePropertyFunctionFactory implements PropertyFunctionFactory { @Override public PropertyFunction create(final String uri) { return new PFuncSimple() { @Override public QueryIterator execEvaluated(final Binding parent, final Node subject, final Node predicate, final Node object, final ExecutionContext execCtx) { return QueryIterNullIterator.create(execCtx); } }; } } ``` -------------------------------- ### ActionBase execGet Implementation Source: https://jena.apache.org/documentation/javadoc/fuseki2/org.apache.jena.fuseki.core/org/apache/jena/fuseki/servlets/ActionBase.html Example of how subclasses of ActionBase can implement the execGet method to handle HTTP GET requests by calling the superclass's executeLifecycle method. ```java public void execGet(HttpAction action) { super.executeLifecycle(action); } ``` -------------------------------- ### main Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/ext/xerces_regex/REUtil.html A sample entry point for demonstrating the usage of REUtil methods. It expects a regex and a string as command-line arguments. ```APIDOC ## main ### Description Sample entry point for demonstrating REUtil functionality. ### Method Signature `public static void main(String[] argv)` ### Usage `org.apache.jena.ext.xerces_regex.REUtil ` ``` -------------------------------- ### setup Source: https://jena.apache.org/documentation/javadoc/geosparql/index-all.html Initializes all GeoSPARQL property and filter functions. ```APIDOC ## setup ### Description Initialise all GeoSPARQL property and filter functions. ### Method Signature `static void setup(IndexConfiguration.IndexOption indexOption)` ### Parameters * `indexOption` (IndexConfiguration.IndexOption) - The index configuration option. ``` ```APIDOC ## setup ### Description Initialise all GeoSPARQL property and filter functions. ### Method Signature `static void setup(IndexConfiguration.IndexOption indexOption, Boolean initialize)` ### Parameters * `indexOption` (IndexConfiguration.IndexOption) - The index configuration option. * `initialize` (Boolean) - Whether to initialize. ``` -------------------------------- ### Fuseki Server Configuration with ACLs Source: https://jena.apache.org/documentation/fuseki2/fuseki-data-access-control.html Example of starting a Fuseki server with a configuration file that includes access control lists (ACLs) using the fuseki:allowedUsers property. ```shell $ fuseki --conf configFile.ttl ``` -------------------------------- ### Fuseki Server Configuration via Command Line Source: https://jena.apache.org/documentation/query/javascript-functions.html Demonstrates how to start a Fuseki server with JavaScript scripting enabled and a specific function allowed. The `arq:js-library` and `arq:scriptAllowList` context parameters are used. ```bash export JVM_ARGS=-Djena:scripting=true fuseki --set arq:js-library=functions.js \ --set arq:scriptAllowList=toCamelCase \ --mem /ds ``` -------------------------------- ### Example RDF Patch with Prefixes and Triples Source: https://jena.apache.org/documentation/rdf-patch/index.html This snippet demonstrates how to ensure specific prefixes are present and add basic triples for a new subclass. It includes transaction start and commit markers. ```turtle TX . PA "rdf" "http://www.w3.org/1999/02/22-rdf-syntax-ns#" . PA "owl" "http://www.w3.org/2002/07/owl#" . PA "rdfs" "http://www.w3.org/2000/01/rdf-schema#" . A . A . A "SubClass" . TC . ``` -------------------------------- ### Get Zero or One Labels for Each Subject Source: https://jena.apache.org/documentation/query/lateral-join.html This example uses `LATERAL` with an `OPTIONAL` block inside to retrieve at most one label for any subject. If no label is found, the subject is still included in the results. ```sparql SELECT * { ?s ?p ?o LATERAL { OPTIONAL { SELECT * { ?s rdfs:label ?label } LIMIT 1 } } } ``` -------------------------------- ### FusekiServer construct(FusekiModules fusekiModules, String... args) Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/FusekiMain.html Builds a Fuseki server instance with specified modules and command-line arguments, without starting it. Facilitates custom server setups. ```APIDOC ## construct(FusekiModules fusekiModules, String... args) ### Description Build, but do not start, a server based on modules and the command line syntax. ### Method `public static FusekiServer construct(FusekiModules fusekiModules, String... args)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java FusekiModules modules = ...; // Initialize your FusekiModules FusekiServer server = FusekiMain.construct(modules, "--port=0"); ``` ### Response #### Success Response (200) `FusekiServer` - A configured server instance with specified modules, not yet started. ``` -------------------------------- ### Run Fuseki Plain Server with Help Source: https://jena.apache.org/documentation/fuseki2/fuseki-plain.html Execute the Fuseki plain server JAR with the --help argument to display available command-line options. This is useful for understanding the server's configuration and operational parameters. ```bash java -cp jena-fuseki-server-$VER.jar org.apache.jena.fuseki.main.cmds.FusekiMainCmd --help ``` -------------------------------- ### Get Property Source: https://jena.apache.org/documentation/javadoc/ontapi/org.apache.jena.ontapi/org/apache/jena/ontapi/impl/objects/OntClassImpl.DataSomeValuesFromImpl.html Gets the property associated with this restriction. ```APIDOC ## Method: getProperty ### Description Gets the property, that this `OntClass.UnaryRestriction` has inside its RDF structure on predicate `owl:onProperty`. ### Returns `OntDataProperty` - The associated property. ``` -------------------------------- ### Example Rule File with Directives Source: https://jena.apache.org/documentation/inference Demonstrates a complete rule file including RDFS rules and a custom rule, using @prefix and @include directives. ```plaintext # ... A comment line. // ... A comment line. @prefix pre: . Defines a prefix `pre` which can be used in the rules. The prefix is local to the rule file. @include . Includes the rules defined in the given file in this file. The included rules will appear before the user defined rules, irrespective of where in the file the @include directive appears. A set of special cases is supported to allow a rule file to include the predefined rules for RDFS and OWL - in place of a real URL for a rule file use one of the keywords `RDFS` `OWL` `OWLMicro` `OWLMini` (case insensitive). So an example complete rule file which includes the RDFS rules and defines a single extra rule is: ``` -------------------------------- ### get Source: https://jena.apache.org/documentation/javadoc/extras/serviceenhancer/org.apache.jena.serviceplugins/org/apache/jena/sparql/service/enhancer/claimingcache/RefImpl.html Gets the referent if the reference is alive and not closed. ```APIDOC ## get ### Description Gets the referent only if this ref instance has not yet been closed. This method fails for closed alive refs. A closed reference is alive if it has unclosed child references. For most use cases the referent should be accessed using this method. ### Specified by `get` in interface `Ref` ### Returns - **T** - The referent. ``` -------------------------------- ### init Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/sparql/core/assembler/AssemblerUtils.html Initializes the AssemblerUtils system. ```APIDOC ## init ### Description Initializes the AssemblerUtils system. This method should be called before using other utility methods. ### Method `public static void init()` ``` -------------------------------- ### construct Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/runner/Runner.html Sets up a FusekiServer from the command line options. The returned server has not been started. ```APIDOC ## construct ### Description Sets up a `FusekiServer` from the command line options. The server is configured but not yet started. ### Method Signature `FusekiServer construct(String... args)` ### Parameters #### Path Parameters - **args** (String...) - The command-line arguments for configuring the Fuseki server. ### Returns - `FusekiServer` - The constructed, but not yet started, server instance. ``` -------------------------------- ### Get Subclasses (Direct or All) - OntSimpleClassImpl Source: https://jena.apache.org/documentation/javadoc/ontapi/org.apache.jena.ontapi/org/apache/jena/ontapi/impl/objects/OntSimpleClassImpl.html Retrieves a stream of subclasses for this class. Set 'direct' to true to get only immediate subclasses, or false to get all subclasses in the hierarchy. ```java public Stream subClasses(boolean direct) Description copied from interface: OntClass Answers a Stream over all the class expressions that are declared to be subclasses of this class expression. The return Stream is distinct and this instance is not included in it. The flag direct allows some selectivity over the classes that appear in the Stream. Consider the following scenario: ``` -------------------------------- ### begin Method Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/sparql/graph/TransactionHandlerNull.html Starts a new transaction. This method does nothing. ```APIDOC ## begin() ### Description Starts a new transaction. This method does nothing. ### Method `void begin()` ``` -------------------------------- ### Get Superclasses (Direct or All) - OntSimpleClassImpl Source: https://jena.apache.org/documentation/javadoc/ontapi/org.apache.jena.ontapi/org/apache/jena/ontapi/impl/objects/OntSimpleClassImpl.html Retrieves a stream of superclasses for this class. Set 'direct' to true to get only immediate superclasses, or false to get all superclasses in the hierarchy. ```java public Stream superClasses(boolean direct) Description copied from interface: OntClass Answers a Stream over the class-expressions for which this class expression is declared a subclass. The return Stream is distinct and this instance is not included in it. The flag direct allows some selectivity over the classes that appear in the Stream. Consider the following scenario: :A rdfs:subClassOf :B . :A rdfs:subClassOf :C . :C rdfs:subClassOf :D . (so A has superclasses B and C, and C has superclass D) In a raw model, with no inference support, listing the superclasses of A will answer B and C. In an inferencing model, rdfs:subClassOf is known to be transitive, so the superclasses iterator will include D. The direct superclasses are those members of the closure of the inverse-subClassOf relation, restricted to classes that cannot be reached by a longer route, i.e., the ones that are _directly_ adjacent to the given root. Thus, the direct superclasses of A are B and C only, and not D - even in an inferencing graph. Note that this is not the same as the entailments from the raw graph. Suppose we add to this example: :A rdfs:subClassOf :D . Now, in the raw graph, A has superclasses B, C, D. But the direct superclasses of A remain only B and C, since there is a longer path A-C-D that means that D is not a direct superclass of A. The assertion in the raw graph that A has superclass D is essentially redundant, since this can be inferred from the closure of the graph. Specified by: superClasses in interface OntClass Parameters: direct - boolean: if true answers the directly adjacent classes in the superclass relation, i.e., eliminate any class for which there is a longer route to reach that parent under the superclass relation; if false answers all superclasses found by inferencer, which usually means entire hierarchy up the tree; this class is not included Returns: distinct Stream of super class expression See Also: * OntClass.superClasses() * OntClass.subClasses(boolean) ``` -------------------------------- ### start Source: https://jena.apache.org/documentation/javadoc/rdfpatch/org.apache.jena.rdfpatch/org/apache/jena/rdfpatch/changes/RDFChangesApply.html Starts processing. This method should be paired with a finish() call. ```APIDOC ## start() ### Description Start processing. The exact meaning is implementation dependent. This should be paired with a `finish()`. ### Method `void start()` ### Specified by: `start` in interface `RDFChanges` ``` -------------------------------- ### Example Command Line Invocation Source: https://jena.apache.org/documentation/tools/schemagen.html Demonstrates how to invoke the schemagen tool with command line options for input file, ontology processing, and uppercase naming. ```bash Java jena.schemagen -i myvocab.owl --ontology --uppercase ``` -------------------------------- ### setupSpatialIndex(Dataset dataset, String srsURI, Path spatialIndexFile) Source: https://jena.apache.org/documentation/javadoc/geosparql/org.apache.jena.geosparql/org/apache/jena/geosparql/configuration/GeoSPARQLConfig.html Sets up a spatial index using the provided Dataset and a specific SRS URI. The created spatial index is then written to the specified file. ```APIDOC ## setupSpatialIndex(Dataset dataset, String srsURI, Path spatialIndexFile) ### Description Sets up a spatial index using the provided Dataset and a specific SRS URI. The created spatial index is then written to the specified file. ### Method `public static final void setupSpatialIndex(org.apache.jena.query.Dataset dataset, String srsURI, Path spatialIndexFile)` ### Parameters #### Path Parameters - `dataset` (org.apache.jena.query.Dataset) - The dataset to use for setting up the spatial index. - `srsURI` (String) - The specific SRS URI to use for the spatial index. - `spatialIndexFile` (Path) - The file path where the serialized spatial index will be written. ### Throws - `SpatialIndexException` - If an error occurs during spatial index setup. ``` -------------------------------- ### Execute Query with Explanation on Command Line Source: https://jena.apache.org/documentation/query/explain.html Run a query with explanation enabled using `arq.query` on the command line. This is equivalent to using `--explain` for query execution logging. ```bash arq.query --explain --data data file --query=queryfile ``` -------------------------------- ### GET() - GSP Source: https://jena.apache.org/documentation/javadoc/arq/index-all.html Retrieves a graph using the GET method. ```APIDOC ## GET() ### Description Get a graph. ### Method Method ### Class org.apache.jena.sparql.exec.http.GSP ``` -------------------------------- ### runAsync Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/runner/Runner.html Sets up a FusekiServer from command-line options and runs it asynchronously. The server is started, and the server object is returned to the caller. ```APIDOC ## runAsync ### Description Sets up a `FusekiServer` from the command line options and runs it asynchronously. ### Method Signature `FusekiServer runAsync(String... args)` ### Parameters #### Path Parameters - **args** (String...) - The command-line arguments for configuring the Fuseki server. ### Returns - `FusekiServer` - The running server instance. ``` -------------------------------- ### GET() - DSP Source: https://jena.apache.org/documentation/javadoc/arq/index-all.html Retrieves a dataset using the GET method. ```APIDOC ## GET() ### Description GET dataset. ### Method Method ### Class org.apache.jena.sparql.exec.http.DSP ``` -------------------------------- ### begin Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/sparql/core/TransactionHandlerView.html Starts a new transaction. ```APIDOC ## begin ### Description Starts a new transaction. ### Method void ### Endpoint N/A (Method call) ### Parameters None ``` -------------------------------- ### init Source: https://jena.apache.org/documentation/javadoc/ontapi/org.apache.jena.ontapi/org/apache/jena/ontapi/OntModelFactory.html Initializes the Jena System. ```APIDOC ## init() ### Description Initializes Jena System. ### Method static void ### Endpoint N/A (Static method) ### Parameters None ### Response None (void method). ``` -------------------------------- ### Get Value Source: https://jena.apache.org/documentation/javadoc/ontapi/org.apache.jena.ontapi/org/apache/jena/ontapi/impl/objects/OntClassImpl.DataSomeValuesFromImpl.html Gets the encapsulated data range or class expression. ```APIDOC ## Method: getValue ### Description Gets an RDF-value (a filler in OWL-API terms) encapsulated by this expression (that can be either `class` or `data range` expression). The result is not `null` even if it is an Unqualified Cardinality Restriction, that has no explicit filler in RDF (the filler is expected to be either `owl:Thing` for object restriction or `RDFS.Literal` for data restriction). ### Returns `OntDataRange` - The encapsulated value, not `null`. ``` -------------------------------- ### Specifying Configuration Root with Command Line and Config File Source: https://jena.apache.org/documentation/tools/schemagen.html Example of how to specify the configuration root URI on the command line, which must match the URI in the configuration file. ```Java Java jena.schemagen -c config/localconf.rdf -r http://example.org/sg#project1 ``` ```xml .... ``` -------------------------------- ### OntModel Get OntResource Source: https://jena.apache.org/documentation/javadoc/jena/org.apache.jena.core/org/apache/jena/rdf/model/class-use/Resource.html Method to get an OntResource facet from a Resource. ```APIDOC ## OntModel Get OntResource ### Description Method to get an OntResource facet from a Resource. ### Method - `getOntResource(Resource res)`: Answer a resource presenting the `OntResource` facet, which corresponds to the given resource but attached to this model. - `OntResource` ``` -------------------------------- ### Get Factory Instance Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/sparql/function/user/UserDefinedFunctionFactory.html Gets the singleton static instance of the `UserDefinedFunctionFactory`. ```APIDOC ## getFactory ### Description Returns the static singleton instance of the `UserDefinedFunctionFactory`. ### Method `static UserDefinedFunctionFactory getFactory()` ### Response #### Success Response (UserDefinedFunctionFactory) - **UserDefinedFunctionFactory** - The singleton factory instance. ### Example ```java UserDefinedFunctionFactory factory = UserDefinedFunctionFactory.getFactory(); ``` ``` -------------------------------- ### Running Fuseki with Configuration File Source: https://jena.apache.org/documentation/query/javascript-functions.html Command to start a Fuseki server using a specified configuration file (`config.ttl`). Assumes `JVM_ARGS` is set for scripting. ```bash export JVM_ARGS=-Djena:scripting=true fuseki --conf config.ttl ``` -------------------------------- ### GET Graph Operation Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/sparql/exec/http/GSP.html Executes a GET request to retrieve a graph. ```java org.apache.jena.graph.Graph GET() ``` -------------------------------- ### setup(IndexConfiguration.IndexOption indexOption) Source: https://jena.apache.org/documentation/javadoc/geosparql/org.apache.jena.geosparql/org/apache/jena/geosparql/configuration/GeoSPARQLConfig.html Initializes all GeoSPARQL property and filter functions with query rewrite enabled. This method configures the indexing based on the provided IndexOption and does not affect Spatial Indexes for Datasets. ```APIDOC ## setup(IndexConfiguration.IndexOption indexOption) ### Description Initialise all GeoSPARQL property and filter functions. Query rewrite enabled. This does not affect the use of Spatial Indexes for Datasets. ### Method public static final void setup(IndexConfiguration.IndexOption indexOption) ### Endpoint N/A (Static method) ### Parameters #### Query Parameters - **indexOption** (IndexConfiguration.IndexOption) - Required - The indexing option to use. ``` -------------------------------- ### static get() Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/sparql/engine/QueryEngineRegistry.html Gets the default global query engine registry. ```APIDOC ## static get() ### Description Gets the default global query engine registry. ### Method static QueryEngineRegistry get() ``` -------------------------------- ### Assemble Text Dataset in Java Source: https://jena.apache.org/documentation/query/text-query.html Demonstrates how to assemble a text dataset configuration in Java code, specifying the configuration file and the text dataset URI. ```Java Dataset ds = DatasetFactory.assemble( "text-config.ttl", "http://localhost/jena_example/#text_dataset") ; ``` -------------------------------- ### RDF/XML Example Source: https://jena.apache.org/documentation/io/rdf-json.html An example of RDF data expressed in RDF/XML format. ```rdfxml Anna Wilder Anna's Homepage Anna Wilder Anna Wilder wildling wilda 69e31bbcf58d432950127593e292a55975bc66fd ``` -------------------------------- ### RDFList.indexOf(RDFNode value, int start) Source: https://jena.apache.org/documentation/javadoc/jena/org.apache.jena.core/org/apache/jena/rdf/model/class-use/RDFNode.html Answers the index of the first occurrence of the given value in the list after index `start`, or -1 if the value is not in the list after the given start point. ```APIDOC ## RDFList.indexOf(RDFNode value, int start) ### Description Answer the index of the first occurrence of the given value in the list after index `start`, or -1 if the value is not in the list after the given start point. ### Method `int` ### Parameters * **value** (RDFNode) - The node to find the index of. * **start** (int) - The starting index for the search. ### Return Value `int` - The index of the first occurrence of the value after `start`, or -1 if not found. ``` -------------------------------- ### setupSpatialIndex(Dataset dataset, Path spatialIndexFile) Source: https://jena.apache.org/documentation/javadoc/geosparql/org.apache.jena.geosparql/org/apache/jena/geosparql/configuration/GeoSPARQLConfig.html Sets up a spatial index using the provided Dataset and the most frequent SRS URI found within it. The created spatial index is then written to the specified file. ```APIDOC ## setupSpatialIndex(Dataset dataset, Path spatialIndexFile) ### Description Sets up a spatial index using the provided Dataset and the most frequent SRS URI found within it. The created spatial index is then written to the specified file. ### Method `public static final void setupSpatialIndex(org.apache.jena.query.Dataset dataset, Path spatialIndexFile)` ### Parameters #### Path Parameters - `dataset` (org.apache.jena.query.Dataset) - The dataset to use for setting up the spatial index. - `spatialIndexFile` (Path) - The file path where the serialized spatial index will be written. ### Throws - `SpatialIndexException` - If an error occurs during spatial index setup. ``` -------------------------------- ### start() Source: https://jena.apache.org/documentation/javadoc/text/org.apache.jena.text/org/apache/jena/query/text/TextDocProducerTriples.html Indicates that a sequence of changes is about to start. This method is part of the TextDatasetChanges interface. ```APIDOC ## start() ### Description Indicator that a sequence of changes is about to start. ### Method `void start()` ### Implements `TextDatasetChanges.start` ``` -------------------------------- ### FusekiServer construct(String... args) Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/FusekiMain.html Builds a Fuseki server instance based on command-line syntax but does not start it. This is useful for further configuration before execution. ```APIDOC ## construct(String... args) ### Description Build, but do not start, a server based on command line syntax. ### Method `public static FusekiServer construct(String... args)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java FusekiServer server = FusekiMain.construct("--port=0"); // Further configuration can be done on the server object before starting it. ``` ### Response #### Success Response (200) `FusekiServer` - A configured but not yet started Fuseki server instance. ``` -------------------------------- ### start Source: https://jena.apache.org/documentation/javadoc/rdfpatch/org.apache.jena.rdfpatch/org/apache/jena/rdfpatch/changes/RDFChangesWriteUpdate.html Starts the processing of RDF changes. This method should be paired with a call to `finish()`. ```APIDOC ## Method: start ### Description Starts processing RDF changes. The exact meaning is implementation dependent. This should be paired with a `finish()` call. ### Signature `public void start()` ### Implements `RDFChanges.start()` ``` -------------------------------- ### serverAfterStarting Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/sys/FusekiModule.html Called immediately after the server has started and before the `server.start()` method returns. ```APIDOC ## serverAfterStarting ### Description Called immediately after the server has started and before the `server.start()` method returns. ### Method `default void serverAfterStarting(FusekiServer server)` ### Parameters #### Path Parameters - **server** (FusekiServer) - Required - The Fuseki server instance. ``` -------------------------------- ### start Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/riot/system/BatchedStreamRDF.html Starts the RDF stream processing. This method should be called before emitting any triples or quads. ```APIDOC ## start ### Description Starts the processing of an RDF stream. This method is part of the `StreamRDF` interface and signals the beginning of data emission. ### Method `public final void start()` ### Endpoint N/A (Method call) ### Parameters None ### Request Example N/A (Method call) ### Response None ``` -------------------------------- ### HTTP GET Operations Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/http/HttpOp.html Methods for performing HTTP GET requests and retrieving data. ```APIDOC ## httpGetString(String url) ### Description Perform an HTTP GET request and return the response body as a string. Returns null if the resource is not found (404). ### Method GET ### Endpoint `{url}` ### Response #### Success Response (200) - **body** (String) - The response body. #### Not Found Response (404) - Returns `null`. ## httpGetStringEx(String url) ### Description Perform an HTTP GET request and return the response body as a string. Throws `HttpException` on any non-success HTTP status code, including 404. ### Method GET ### Endpoint `{url}` ### Throws - `HttpException` - If the HTTP request fails or returns a non-success status code. ## httpGetString(String url, String acceptHeader) ### Description Perform an HTTP GET request with a specified `Accept` header and return the response body as a string. Returns null if the resource is not found (404). ### Method GET ### Endpoint `{url}` ### Parameters #### Query Parameters - **Accept** (String) - The value for the Accept header. ### Response #### Success Response (200) - **body** (String) - The response body. #### Not Found Response (404) - Returns `null`. ## httpGetString(HttpClient httpClient, String url) ### Description Perform an HTTP GET request using a provided `HttpClient` and return the response body as a string. Returns null if the resource is not found (404). ### Method GET ### Endpoint `{url}` ### Parameters #### Path Parameters - **httpClient** (HttpClient) - The HTTP client to use for the request. ### Response #### Success Response (200) - **body** (String) - The response body. #### Not Found Response (404) - Returns `null`. ## httpGetString(HttpClient httpClient, String url, String acceptHeader) ### Description Perform an HTTP GET request using a provided `HttpClient` with a specified `Accept` header, returning the response body as a string. Returns null if the resource is not found (404). ### Method GET ### Endpoint `{url}` ### Parameters #### Path Parameters - **httpClient** (HttpClient) - The HTTP client to use for the request. #### Query Parameters - **Accept** (String) - The value for the Accept header. ### Response #### Success Response (200) - **body** (String) - The response body. #### Not Found Response (404) - Returns `null`. ## httpGetDiscard(String url) ### Description Perform an HTTP GET request and discard the response body. This is useful for using GET as a ping-like operation. Throws `HttpException` on any non-success HTTP status code. ### Method GET ### Endpoint `{url}` ### Throws - `HttpException` - If the HTTP request fails or returns a non-success status code. ## httpGetJson(String url) ### Description Perform an HTTP GET request and parse the response body as a JSON value. ### Method GET ### Endpoint `{url}` ### Response #### Success Response (200) - **jsonValue** (JsonValue) - The parsed JSON value from the response body. ## httpGet(String url) ### Description Perform an HTTP GET request with an `Accept` header of `*/*` and return the response as a `TypedInputStream`. The application must close the returned InputStream. ### Method GET ### Endpoint `{url}` ### Response #### Success Response (200) - **inputStream** (TypedInputStream) - An input stream containing the response body. ## httpGet(String url, String acceptHeader) ### Description Perform an HTTP GET request with a specified `Accept` header and return the response as a `TypedInputStream`. The application must close the returned InputStream. ### Method GET ### Endpoint `{url}` ### Parameters #### Query Parameters - **Accept** (String) - The value for the Accept header. ### Response #### Success Response (200) - **inputStream** (TypedInputStream) - An input stream containing the response body. ## httpGet(HttpClient httpClient, String url) ### Description Perform an HTTP GET request using a provided `HttpClient` and return the response as a `TypedInputStream`. The application must close the returned InputStream. ### Method GET ### Endpoint `{url}` ### Parameters #### Path Parameters - **httpClient** (HttpClient) - The HTTP client to use for the request. ### Response #### Success Response (200) - **inputStream** (TypedInputStream) - An input stream containing the response body. ## httpGet(HttpClient httpClient, String url, String acceptHeader) ### Description Perform an HTTP GET request using a provided `HttpClient` with a specified `Accept` header, returning the response as a `TypedInputStream`. The application must close the returned InputStream. ### Method GET ### Endpoint `{url}` ### Parameters #### Path Parameters - **httpClient** (HttpClient) - The HTTP client to use for the request. #### Query Parameters - **Accept** (String) - The value for the Accept header. ### Response #### Success Response (200) - **inputStream** (TypedInputStream) - An input stream containing the response body. ``` -------------------------------- ### ServerArgs Setup Field Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/runner/class-use/SetupType.html Illustrates the usage of SetupType as a field within ServerArgs. ```APIDOC ## ServerArgs ### Fields #### `SetupType setup` This field indicates the setup type used by the server arguments. ``` -------------------------------- ### Example of a Retrieved Literal Source: https://jena.apache.org/documentation/query/text-query.html An example of a literal that might be bound to ?lit in the previous query. ```sparql "zorn protégé a prés"@fr ``` -------------------------------- ### init Method Source: https://jena.apache.org/documentation/javadoc/jena/org.apache.jena.core/org/apache/jena/reasoner/rulesys/impl/ConsumerChoicePointFrame.html Initializes the choice point state. ```APIDOC ## init(LPInterpreter interpreter) ### Description Initialize the choice point state. ### Overrides `init` in class `GenericTripleMatchFrame` ### Parameters * **interpreter** (LPInterpreter) - The parent interpreter whose state is to be preserved here, its arg stack defines the parameters for the target goal. ``` -------------------------------- ### setUpdate Source: https://jena.apache.org/documentation/javadoc/arq/org.apache.jena.arq/org/apache/jena/sparql/lang/sparql_10/javacc/SPARQLParser10.html Sets the Prologue and UpdateSink for parsing SPARQL Update operations. ```APIDOC ## setUpdate ### Description Sets the Prologue and UpdateSink for parsing SPARQL Update operations. ### Method public void setUpdate(Prologue prologue, UpdateSink sink) ``` -------------------------------- ### setupDefaultSRS Source: https://jena.apache.org/documentation/javadoc/geosparql/index-all.html Sets up the default SRS registry. ```APIDOC ## setupDefaultSRS ### Description Set up the default SRS registry. ### Method Signature `static void setupDefaultSRS()` ``` -------------------------------- ### Run Fuseki Plain Server with Arguments Source: https://jena.apache.org/documentation/fuseki2/fuseki-plain.html Launch the Fuseki plain server using its main command class, providing necessary arguments. This method allows for custom configurations and operational parameters to be passed to the server. ```bash java -cp jena-fuseki-server-$VER.jar:...OtherJars... \ org.apache.jena.fuseki.main.cmds.FusekiMainCmd ARGS ``` -------------------------------- ### start Source: https://jena.apache.org/documentation/javadoc/rdfpatch/org.apache.jena.rdfpatch/org/apache/jena/rdfpatch/changes/RDFChangesWrapper.html Starts processing. This method is part of the RDFChanges interface and indicates the beginning of a sequence of changes. ```APIDOC ## start ### Description Starts processing. The exact meaning is implementation dependent. This should be paired with a `finish()`. ### Method `public void start()` ### Interface `RDFChanges` ``` -------------------------------- ### logServerStarted Source: https://jena.apache.org/documentation/javadoc/fuseki2-main/org.apache.jena.fuseki.main/org/apache/jena/fuseki/main/runner/FusekiRunnerLogging.html Logs that the server has started. This method is called to indicate that the Fuseki server has successfully started. ```APIDOC ## logServerStarted ### Description Logs that the server has started. This method is called to indicate that the Fuseki server has successfully started. ### Method Signature `public static void logServerStarted(org.slf4j.Logger log, FusekiServer server)` ### Parameters * **log** (org.slf4j.Logger) - The logger instance to use for logging. * **server** (FusekiServer) - The FusekiServer instance that has started. ``` -------------------------------- ### Run Fuseki Loading a File Source: https://jena.apache.org/documentation/fuseki2/fuseki-server.html Loads a file (e.g., MyData.ttl) at startup and provides it as a read-only dataset at http://host:3030/NAME. Supports any RDF format for triples or quads. ```bash fuseki-server --file=MyData.ttl /NAME ``` -------------------------------- ### FRuleEngine.fastInit and init Methods Source: https://jena.apache.org/documentation/javadoc/jena/org.apache.jena.core/org/apache/jena/reasoner/class-use/Finder.html These methods initialize the rule engine, processing available data using a provided Finder object. ```APIDOC ## fastInit(Finder inserts) ### Description Process all available data. ### Method void ### Parameters - **inserts** (Finder) - The Finder object containing data to process. ### Return Value void ``` ```APIDOC ## init(boolean ignoreBrules, Finder inserts) ### Description Process all available data. ### Method void ### Parameters - **ignoreBrules** (boolean) - Flag to ignore backward rules. - **inserts** (Finder) - The Finder object containing data to process. ### Return Value void ``` -------------------------------- ### get Source: https://jena.apache.org/documentation/javadoc/rdfconnection/org.apache.jena.rdfconnection/org/apache/jena/rdflink/RDFLinkAdapter.html Fetch a named graph. This is SPARQL Graph Store Protocol HTTP GET or equivalent. ```APIDOC ## get ### Description Fetch a named graph. This is SPARQL Graph Store Protocol HTTP GET or equivalent. ### Method GET (or equivalent) ### Endpoint /graphs/{graphName} (or equivalent) ### Parameters #### Path Parameters - **graphName** (Node) - Required - URI string for the graph name (null or `Quad.defaultGraphIRI` for the default graph) ### Response #### Success Response (200) - **Graph** (Graph) - The requested graph. ```