|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnenok.net.Knowledgebase
public class Knowledgebase
A knowledgebase is basically a set of Locator
objects. Because each locator identifies unambigously a valuation
object stored on a Nenok processor, this represents indeed the mathematical idea of a distributed knowledgebase.
Knowledgebases contain only elements of the same type. However, because Locator
objects are only pointer on the
storage place (processor) of a valuation, this type checking cannot be done at compile-time. So, the first added element
determines which type this knowledgebase accepts. If this constraint is not satisfied, an IllegalArgumentException
is thrown.
Constructor Summary | |
---|---|
Knowledgebase()
Constructor: |
|
Knowledgebase(Locator[] locators)
Constructor: |
Method Summary | |
---|---|
boolean |
add(Locator loc)
Adds a new locator to this knowledgebase. |
boolean |
addAll(Collection<Locator> locators)
Adds a new collection of locators to this knowledgebase. |
boolean |
addAll(Locator[] locators)
Adds a new array of locators to this knowledgebase. |
boolean |
contains(Locator loc)
Looks for a given locator within this knowledgebase. |
Class |
getContentClass()
Loads dynamically the class type of the valuations referenced by this knowledgebase. |
Domain |
getDomain()
|
String |
getName()
|
Predictor |
getPredictor()
|
Iterator<Locator> |
iterator()
|
boolean |
remove(Locator loc)
Removes a given locator from this knowledgebase. |
void |
setName(String name)
Sets the name of this knowledgebase. |
int |
size()
|
Locator[] |
toArray()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Knowledgebase()
public Knowledgebase(Locator[] locators)
locators
- The locators to add to the new knowledgebase.Method Detail |
---|
public boolean add(Locator loc)
loc
- The locator to add.
true
, it the locator has been added successfully.public boolean addAll(Collection<Locator> locators)
locators
- The locators to add.
true
, it all locators have been added successfully.public boolean addAll(Locator[] locators)
locators
- The locators to add.
true
, it all locators have been added successfully.public boolean remove(Locator loc)
loc
- The locator to remove.
true
, if the locator has been removed successfully.public boolean contains(Locator loc)
loc
- The locator to search.
true
, if the locator has been found.public int size()
public Locator[] toArray()
public void setName(String name)
name
- The name of the knoelwedgebase.public String getName()
public Iterator<Locator> iterator()
iterator
in interface Iterable<Locator>
Iterable.iterator()
public String toString()
toString
in class Object
Object.toString()
public Domain getDomain()
public Predictor getPredictor() throws RemoteException
RemoteException
- This operation performs remote calls and therefore forewards RemoteExceptions.public Class getContentClass() throws RemoteException
null
, if this knowledgebase is empty.
RemoteException
- This operation performs remote calls and therefore forewards RemoteExceptions.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |