Search in sources :

Example 51 with Context

use of org.apache.jena.sparql.util.Context in project jena by apache.

the class EnvTDB method processGlobalSystemProperties.

public static void processGlobalSystemProperties() {
    Context context = processProperties(System.getProperties());
    TDB.getContext().putAll(context);
}
Also used : Context(org.apache.jena.sparql.util.Context)

Example 52 with Context

use of org.apache.jena.sparql.util.Context in project jena by apache.

the class TextDatasetFactory method create.

/** Create a text-indexed DatasetGraph, optionally allowing the text index to be closed if the DatasetGraph is */
public static DatasetGraph create(DatasetGraph dsg, TextIndex textIndex, boolean closeIndexOnDSGClose, TextDocProducer producer) {
    if (producer == null)
        producer = new TextDocProducerTriples(textIndex);
    DatasetGraph dsgt = new DatasetGraphText(dsg, textIndex, producer, closeIndexOnDSGClose);
    // Also set on dsg
    Context c = dsgt.getContext();
    c.set(TextQuery.textIndex, textIndex);
    return dsgt;
}
Also used : Context(org.apache.jena.sparql.util.Context) DatasetGraph(org.apache.jena.sparql.core.DatasetGraph)

Aggregations

Context (org.apache.jena.sparql.util.Context)52 Test (org.junit.Test)36 ExecutionContext (org.apache.jena.sparql.engine.ExecutionContext)15 Map (java.util.Map)11 BaseTest (org.apache.jena.atlas.junit.BaseTest)11 SerializationContext (org.apache.jena.sparql.serializer.SerializationContext)11 HashMap (java.util.HashMap)10 QueryIterSort (org.apache.jena.sparql.engine.iterator.QueryIterSort)9 HttpClient (org.apache.http.client.HttpClient)7 QueryEngineHTTP (org.apache.jena.sparql.engine.http.QueryEngineHTTP)7 Query (org.apache.jena.query.Query)5 QueryCancelledException (org.apache.jena.query.QueryCancelledException)4 SocketException (java.net.SocketException)3 ConnectTimeoutException (org.apache.http.conn.ConnectTimeoutException)3 HttpContext (org.apache.http.protocol.HttpContext)3 JsonObject (org.apache.jena.atlas.json.JsonObject)3 JsonString (org.apache.jena.atlas.json.JsonString)3 Node (org.apache.jena.graph.Node)3 Model (org.apache.jena.rdf.model.Model)3 JsonLDWriteContext (org.apache.jena.riot.JsonLDWriteContext)3