org.universAAL.context.che.database.impl
Class SesameBackendCrdClcCnf

Package class diagram package SesameBackendCrdClcCnf
java.lang.Object
  extended by org.universAAL.context.che.database.impl.SesameBackend
      extended by org.universAAL.context.che.database.impl.SesameBackendCrdClc
          extended by org.universAAL.context.che.database.impl.SesameBackendCrdClcCnf
All Implemented Interfaces:
Backend

public class SesameBackendCrdClcCnf
extends SesameBackendCrdClc

Extension of SesameBackendCrdClc that interprets the confidence value of received events before storing them. If the confidence is greater than the threshold passed to this class in the constructor or setThreshold, the event will be stored unchanged as in SesameBackend. Otherwise, only statements having the event as subject will be stored, but not reified statements about its subject nor object. Example: An "event1" with "subject2" "predicate3" and "object4" with enough confidence will result in having the statements in the store: "event1" "hasSubject" "subject2" "event1" "hasPredicate" "predicate3" "event1" "hasObject" "object4" "subject2" "predicate3" "object4" But if the confidence is below the threshold, the last reified statement is not stored.

Author:
alfiva

Field Summary
 
Fields inherited from class org.universAAL.context.che.database.impl.SesameBackend
uAALParser
 
Constructor Summary
SesameBackendCrdClcCnf()
          Default constructor.
SesameBackendCrdClcCnf(int confidence)
          Constructor with confidence.
 
Method Summary
 int getThreshold()
          Get the confidence threshold.
 void setThreshold(int thr)
          Set confidence threshold.
 void storeEvent(ContextEvent e)
          Stores a ContextEvent in the underlying store.
 
Methods inherited from class org.universAAL.context.che.database.impl.SesameBackendCrdClc
connect
 
Methods inherited from class org.universAAL.context.che.database.impl.SesameBackend
close, populate, queryBySPARQL, removeOldEvents, retrieveEvent, retrieveEventsBetweenTstmp, retrieveEventsBySPARQL, retrieveEventsFromTstmp, retrieveEventsToTstmp, setuAALParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SesameBackendCrdClcCnf

public SesameBackendCrdClcCnf()
Default constructor.


SesameBackendCrdClcCnf

public SesameBackendCrdClcCnf(int confidence)
Constructor with confidence.

Parameters:
confidence - 0 to 100.
Method Detail

storeEvent

public void storeEvent(ContextEvent e)
Description copied from interface: Backend
Stores a ContextEvent in the underlying store.

Specified by:
storeEvent in interface Backend
Overrides:
storeEvent in class SesameBackend
Parameters:
e - The context event to be stored.

getThreshold

public int getThreshold()
Get the confidence threshold.

Returns:
Confidence.

setThreshold

public void setThreshold(int thr)
Set confidence threshold.

Parameters:
threshold - 0 to 100.


Copyright © 2014 universAAL Consortium. All Rights Reserved.