|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.content.mediator.Mediator
public class Mediator
The Mediator provides three main methods:
1. it executes queries: The
source queries are formulated in terms of OIO. The Mediator maps
them to the target-Ontologies that belong to the registered
KnowledgeBases.
EBNF for queries:
Relation = "isA" | "isFor" | "id" | "requires" | "isRequiredBy" | "inverseIsA" | "inverseIsFor"
Class = "InstructionalObject" | "Concept" | "Satellite" | ...
ID = id of an item
Property = "learningcontext" | "difficulty" | "typicallearningtime" | ...
Value = "high" | "low" | ...
RelationQuery = "(" "relation" Relation ID ")"
ClassQuery = "(" "class" Class ")"
PropertyQuery = "(" "property" Property Value ")"
Query = {ClassQuery} {RelationQuery} {PropertyQuery}
2. it returns the metadata of a given foreign item.
3. it returns the body (i.e. the whole) of an item as a String.
| Field Summary | |
|---|---|
protected static boolean |
DEBUG
|
| Constructor Summary | |
|---|---|
Mediator()
|
|
| Method Summary | |
|---|---|
void |
clearCache()
|
List |
execQuery(String string)
Constructs and executes the query to all registered KBCallers. |
List |
execQuery(String string,
boolean withCaching)
Constructs and executes the query to all registered KBCallers. |
QueryCache |
getCache()
|
String |
getContent(String uri)
Returns the whole content of the learning object corresponding to the given uri. |
int |
getCounter()
|
List |
getMetadata(String uri)
Returns the whole metadata of a learning object whichs URI is given. |
static String |
Iterator2String(Iterator it)
|
void |
registerKB(KBCaller kbCaller)
Registers a KnowledgeBase to the Mediator. |
void |
unregisterKB(KBCaller kbCaller)
Removes a kbCaller from the internal List. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final boolean DEBUG
| Constructor Detail |
|---|
public Mediator()
throws MediatorException
MediatorException| Method Detail |
|---|
public List execQuery(String string,
boolean withCaching)
throws MediatorException
string - the query stringwithCaching - if true, caching is done, MediatorException
public List execQuery(String string)
throws MediatorException
string -
MediatorExceptionpublic void unregisterKB(KBCaller kbCaller)
kbCaller - The KB not to query anymore.public void registerKB(KBCaller kbCaller)
kbCaller - public List getMetadata(String uri)
uri -
public String getContent(String uri)
uri -
public static String Iterator2String(Iterator it)
public QueryCache getCache()
public int getCounter()
public void clearCache()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||