public class ReasoningCaller extends Object
Modifier and Type | Field and Description |
---|---|
static Random |
random |
static String |
REASONER_CLIENT_NAMESPACE |
Constructor and Description |
---|
ReasoningCaller() |
Modifier and Type | Method and Description |
---|---|
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() |
public static final String REASONER_CLIENT_NAMESPACE
public static final Random random
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 CHEpublic Query addQuery(String uri, String fullQuery)
uri
- URI for the new QueryfullQuery
- SPARQL-CONSTRUCT query to be performed at the CHEpublic 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 boolean remove(Situation situation)
public boolean remove(Query query)
public boolean remove(Rule rule)
public ContextEventRecorder getRecorder()
public void communicationChannelBroken()
public void unregister()
Copyright © 2018 universAAL Consortium. All rights reserved.