Search in sources :

Example 1 with EngineProperties

use of it.unibo.arces.wot.sepa.engine.core.EngineProperties in project SEPA by arces-wot.

the class SchedulerTest method main.

public static void main(String[] args) throws SEPAPropertiesException {
    EngineProperties properties = new EngineProperties("engine.jpar");
    System.out.println(properties.toString());
    scheduler = new Scheduler(properties, null);
    Handler handler = new SchedulerTest().new Handler();
    while (true) {
        try {
            Thread.sleep(50);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        UpdateRequest update = new UpdateRequest("PREFIX test:<http://sepa/test#> delete {?s ?p ?o} insert {test:s test:p \"" + Math.random() + "\"} where {OPTIONAL{?s ?p ?o}}");
        scheduler.schedule(update, handler);
        QueryRequest query = new QueryRequest("select * where {?s ?p ?o}");
        scheduler.schedule(query, handler);
    }
}
Also used : EngineProperties(it.unibo.arces.wot.sepa.engine.core.EngineProperties) QueryRequest(it.unibo.arces.wot.sepa.commons.request.QueryRequest) UpdateRequest(it.unibo.arces.wot.sepa.commons.request.UpdateRequest) Scheduler(it.unibo.arces.wot.sepa.engine.scheduling.Scheduler) ResponseHandler(it.unibo.arces.wot.sepa.engine.core.ResponseHandler)

Aggregations

QueryRequest (it.unibo.arces.wot.sepa.commons.request.QueryRequest)1 UpdateRequest (it.unibo.arces.wot.sepa.commons.request.UpdateRequest)1 EngineProperties (it.unibo.arces.wot.sepa.engine.core.EngineProperties)1 ResponseHandler (it.unibo.arces.wot.sepa.engine.core.ResponseHandler)1 Scheduler (it.unibo.arces.wot.sepa.engine.scheduling.Scheduler)1