Search in sources :

Example 31 with Bindings

use of it.unibo.arces.wot.sepa.commons.sparql.Bindings in project SEPA by arces-wot.

the class ActionListener method startListeningForAction.

public void startListeningForAction(String actionURI) throws SEPAProtocolException, SEPASecurityException {
    if (actionListener.containsKey(actionURI))
        return;
    WoTActionListener listener = new WoTActionListener();
    Bindings bindings = new Bindings();
    bindings.addBinding("action", new RDFTermURI(actionURI));
    listener.subscribe(bindings);
    actionListener.put(actionURI, listener);
}
Also used : RDFTermURI(it.unibo.arces.wot.sepa.commons.sparql.RDFTermURI) Bindings(it.unibo.arces.wot.sepa.commons.sparql.Bindings)

Example 32 with Bindings

use of it.unibo.arces.wot.sepa.commons.sparql.Bindings in project SEPA by arces-wot.

the class ThingDescription method addProperty.

public void addProperty(String property, String name, String dataType, String stability, String writable, String value) {
    Bindings bind = new Bindings();
    bind.addBinding("thing", thing);
    bind.addBinding("property", new RDFTermURI(property));
    bind.addBinding("name", new RDFTermLiteral(name));
    bind.addBinding("stability", new RDFTermLiteral(stability));
    bind.addBinding("writable", new RDFTermLiteral(writable));
    bind.addBinding("dataType", new RDFTermURI(dataType));
    bind.addBinding("value", new RDFTermLiteral(value));
    properties.update(bind);
}
Also used : RDFTermURI(it.unibo.arces.wot.sepa.commons.sparql.RDFTermURI) Bindings(it.unibo.arces.wot.sepa.commons.sparql.Bindings) RDFTermLiteral(it.unibo.arces.wot.sepa.commons.sparql.RDFTermLiteral)

Example 33 with Bindings

use of it.unibo.arces.wot.sepa.commons.sparql.Bindings in project SEPA by arces-wot.

the class ThingDescription method addTargetProperty.

public void addTargetProperty(String action_OR_event, String property) {
    Bindings bind = new Bindings();
    bind.addBinding("action_OR_event", new RDFTermURI(action_OR_event));
    bind.addBinding("property", new RDFTermURI(property));
    targetProperties.update(bind);
}
Also used : RDFTermURI(it.unibo.arces.wot.sepa.commons.sparql.RDFTermURI) Bindings(it.unibo.arces.wot.sepa.commons.sparql.Bindings)

Example 34 with Bindings

use of it.unibo.arces.wot.sepa.commons.sparql.Bindings in project SEPA by arces-wot.

the class ThingDescription method addEvent.

public void addEvent(String event, String name) {
    Bindings bind = new Bindings();
    bind.addBinding("thing", thing);
    bind.addBinding("event", new RDFTermURI(event));
    bind.addBinding("name", new RDFTermLiteral(name));
    events.update(bind);
}
Also used : RDFTermURI(it.unibo.arces.wot.sepa.commons.sparql.RDFTermURI) Bindings(it.unibo.arces.wot.sepa.commons.sparql.Bindings) RDFTermLiteral(it.unibo.arces.wot.sepa.commons.sparql.RDFTermLiteral)

Aggregations

Bindings (it.unibo.arces.wot.sepa.commons.sparql.Bindings)34 RDFTermURI (it.unibo.arces.wot.sepa.commons.sparql.RDFTermURI)21 RDFTermLiteral (it.unibo.arces.wot.sepa.commons.sparql.RDFTermLiteral)19 Response (it.unibo.arces.wot.sepa.commons.response.Response)12 ErrorResponse (it.unibo.arces.wot.sepa.commons.response.ErrorResponse)11 SubscribeResponse (it.unibo.arces.wot.sepa.commons.response.SubscribeResponse)9 QueryResponse (it.unibo.arces.wot.sepa.commons.response.QueryResponse)4 UpdateResponse (it.unibo.arces.wot.sepa.commons.response.UpdateResponse)4 JsonElement (com.google.gson.JsonElement)2 JsonObject (com.google.gson.JsonObject)2 SEPAProtocolException (it.unibo.arces.wot.sepa.commons.exceptions.SEPAProtocolException)2 ARBindingsResults (it.unibo.arces.wot.sepa.commons.sparql.ARBindingsResults)2 BindingsResults (it.unibo.arces.wot.sepa.commons.sparql.BindingsResults)2 RDFTerm (it.unibo.arces.wot.sepa.commons.sparql.RDFTerm)2 Producer (it.unibo.arces.wot.sepa.pattern.Producer)2 SEPAPropertiesException (it.unibo.arces.wot.sepa.commons.exceptions.SEPAPropertiesException)1 SEPASecurityException (it.unibo.arces.wot.sepa.commons.exceptions.SEPASecurityException)1 QueryRequest (it.unibo.arces.wot.sepa.commons.request.QueryRequest)1 Notification (it.unibo.arces.wot.sepa.commons.response.Notification)1 ApplicationProfile (it.unibo.arces.wot.sepa.pattern.ApplicationProfile)1