|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.samples.context.reasoner.client.uaalinterface.ReasoningCaller
public class ReasoningCaller
This class is used to add/remove/get Situations/Queries/Rules to/from the Reasoner. Since all of the three operations are very similar for the three used types of objects a lot of methods can be reused using generics.
Field Summary | |
---|---|
static Random |
random
|
static String |
REASONER_CLIENT_NAMESPACE
|
Constructor Summary | |
---|---|
ReasoningCaller()
|
Method Summary | |
---|---|
Query |
addQuery(ContextEvent event,
String queryString,
boolean persistent)
Add a new Query with a random URI to the Reasoner. |
Query |
addQuery(String fullQuery)
Creates a new query with the given Query-String and a random URI. |
Query |
addQuery(String uri,
ContextEvent event,
String queryString,
boolean persistent)
Add a new Query with the given URI to the Reasoner. |
Query |
addQuery(String uri,
String fullQuery)
Creates a new query with the given Query-String and the given URI. |
Rule |
addRule(Situation situation,
Query query,
boolean persistent)
A rule combines the given Situation with the given Query. |
Rule |
addRule(String uri,
Situation situation,
Query query,
boolean persistent)
A rule combines the given Situation with the given Query. |
Situation |
addSituation(String subject,
String predicate,
String object,
boolean persistent)
Creates a new Situation-Object with a random URI, add it to the reasoner and return the new object. |
Situation |
addSituation(String uri,
String subject,
String predicate,
String object,
boolean persistent)
Creates a new Situation-Object with the given URI, add it to the reasoner and return the new object. |
void |
communicationChannelBroken()
|
List<Query> |
getQueries()
|
ContextEventRecorder |
getRecorder()
|
List<Rule> |
getRules()
|
List<Situation> |
getSituations()
|
static void |
postInfo(Class<?> targetClass,
String methodName,
String message)
|
boolean |
remove(Query query)
|
boolean |
remove(Rule rule)
|
boolean |
remove(Situation situation)
|
void |
unregister()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REASONER_CLIENT_NAMESPACE
public static final Random random
Constructor Detail |
---|
public ReasoningCaller()
Method Detail |
---|
public Situation addSituation(String subject, String predicate, String object, boolean persistent)
subject
- Can be a type-URI or an URI of a concrete instancepredicate
- Need to be a valid property URI of the subject or can be nullobject
- Need to be a valid property-value of the subject or can be
nullpersistent
- If it is true the Situation will be available also after a
restart of the system, otherwise not.
public Situation addSituation(String uri, String subject, String predicate, String object, boolean persistent)
uri
- URI to be given to the new Situationsubject
- Can be a type-URI or an URI of a concrete instancepredicate
- Need to be a valid property URI of the subject or can be nullobject
- Need to be a valid property-value of the subject or can be
nullpersistent
- If it is true the Situation will be available also after a
restart of the system, otherwise not.
public Query addQuery(String fullQuery)
fullQuery
- SPARQL-CONSTRUCT query to be performed at the CHE
public Query addQuery(String uri, String fullQuery)
uri
- URI for the new QueryfullQuery
- SPARQL-CONSTRUCT query to be performed at the CHE
public Query addQuery(ContextEvent event, String queryString, boolean persistent)
event
- Event to be generated by the QueryqueryString
- SPARQL Conditions-String to be checked at the CHEpersistent
- If it is true the Query will be available also after a restart
of the system, otherwise not.
public Query addQuery(String uri, ContextEvent event, String queryString, boolean persistent)
event
- Event to be generated by the QueryqueryString
- SPARQL Conditions-String to be checked at the CHEpersistent
- If it is true the Query will be available also after a restart
of the system, otherwise not.
public Rule addRule(Situation situation, Query query, boolean persistent)
situation
- Situation for the Rulequery
- Query to be performed for the Rulepersistent
- If it is true the Rule will be available also after a restart
of the system, otherwise not.
public Rule addRule(String uri, Situation situation, Query query, boolean persistent)
uri
- URI for the new Rule-Objectsituation
- Situation for the Rulequery
- Query to be performed for the Rulepersistent
- If it is true the Rule will be available also after a restart
of the system, otherwise not.
public List<Situation> getSituations()
public List<Query> getQueries()
public List<Rule> getRules()
public boolean remove(Situation situation)
public boolean remove(Query query)
public boolean remove(Rule rule)
public ContextEventRecorder getRecorder()
public void communicationChannelBroken()
public void unregister()
public static void postInfo(Class<?> targetClass, String methodName, String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |