Search in sources :

Example 1 with SPARQL11Properties

use of it.unibo.arces.wot.sepa.commons.protocol.SPARQL11Properties in project SEPA by arces-wot.

the class QueryProcessorTest method main.

public static void main(String[] args) throws SEPAProtocolException, SEPAPropertiesException {
    SPARQL11Properties properties = new SPARQL11Properties("endpoint.jpar");
    System.out.println(properties.toString());
    processor = new QueryProcessor(properties, null);
    while (true) {
        try {
            Thread.sleep(10);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        System.out.println(processor.process(new QueryRequest("select ?s ?p ?o where {?s ?p ?o}"), 0));
    }
}
Also used : SPARQL11Properties(it.unibo.arces.wot.sepa.commons.protocol.SPARQL11Properties) QueryRequest(it.unibo.arces.wot.sepa.commons.request.QueryRequest) QueryProcessor(it.unibo.arces.wot.sepa.engine.processing.QueryProcessor)

Example 2 with SPARQL11Properties

use of it.unibo.arces.wot.sepa.commons.protocol.SPARQL11Properties in project SEPA by arces-wot.

the class UpdateProcessorTest method main.

public static void main(String[] args) throws SEPAPropertiesException, SEPAProtocolException {
    SPARQL11Properties properties = new SPARQL11Properties("endpoint.jpar");
    System.out.println(properties.toString());
    processor = new UpdateProcessor(properties, null);
    while (true) {
        try {
            Thread.sleep(500);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        System.out.println(processor.process(new UpdateRequest("PREFIX test:<http://sepa/test#> delete {?s ?p ?o} insert {test:s test:p \"" + Math.random() + "\"} where {?s ?p ?o}"), 0));
    }
}
Also used : SPARQL11Properties(it.unibo.arces.wot.sepa.commons.protocol.SPARQL11Properties) UpdateProcessor(it.unibo.arces.wot.sepa.engine.processing.UpdateProcessor) UpdateRequest(it.unibo.arces.wot.sepa.commons.request.UpdateRequest)

Aggregations

SPARQL11Properties (it.unibo.arces.wot.sepa.commons.protocol.SPARQL11Properties)2 QueryRequest (it.unibo.arces.wot.sepa.commons.request.QueryRequest)1 UpdateRequest (it.unibo.arces.wot.sepa.commons.request.UpdateRequest)1 QueryProcessor (it.unibo.arces.wot.sepa.engine.processing.QueryProcessor)1 UpdateProcessor (it.unibo.arces.wot.sepa.engine.processing.UpdateProcessor)1