/
Board.java
61 lines (51 loc) · 1.74 KB
/
Board.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package board;
import com.hp.hpl.jena.query.*;
import com.hp.hpl.jena.shared.*;
import com.hp.hpl.jena.rdf.model.*;
import java.util.*;
/**
* Interface for generic board operations. Supports registration of
* clients, posting of new data and querying the data stores.
*/
public interface Board {
/**
* Adds a client to the list of registered clients.
* @see Client#postUpdate
*/
public void registerClient (Client client);
/**
* Removes a client from the list of registered clients.
* @see #registerClientPattern
*/
public void unregisterClient (Client client);
/**
* Merges the given values with the world model.
*/
public void postWorldUpdate (Client client, Model model);
/**
* Merges the given sensor values. Only affects the sensor values
* model.
*/
public void postSensorUpdate (Model model);
/**
* Returns a pre-configured execution object. It is the callers
* responsibility to {@link QueryExecution#close} it afterwards
* (preferably in a finally block).
*/
public QueryExecution query (Query query);
/**
* Converts the query to a Query object prior to calling the
* {@link #query(Query)} method.
*/
public QueryExecution query (String query);
/**
* Returns a list models matched by example. That is, the closure of every
* (anonymous) node which has a specific RDF type and matches all fields
* from the primary key of that type with the example object.
* @param test The model where we look for results.
* @param marker The root node of the example object.
* @param klass The type information for the example object.
*/
public List<Model> matching (Model test, Resource marker, MateClass klass);
public PrefixMapping getDefaultPrefixMapping ();
}