org.dllearner.server
Class ClientState

java.lang.Object
  extended by org.dllearner.server.ClientState

public class ClientState
extends Object

Stores the state of a DL-Learner client session.

Author:
Jens Lehmann

Constructor Summary
ClientState()
           
 
Method Summary
 int addKnowledgeSource(KnowledgeSource ks)
          Adds a knowledge source to the client session.
 int addQuery(SparqlQuery query)
           
 Component getComponent(int id)
           
 Set<KnowledgeSource> getKnowledgeSources()
           
 LearningAlgorithm getLearningAlgorithm()
           
 LearningProblem getLearningProblem()
           
 SparqlQuery getQuery(int id)
           
 ReasonerComponent getReasonerComponent()
           
 boolean isAlgorithmRunning()
          Deprecated. 
 boolean removeKnowledgeSource(int componentID)
           
 boolean removeKnowledgeSource(String url)
          Removes a knowledge source with the given URL (independant of its type).
 void setAlgorithmRunning(boolean isAlgorithmRunning)
          Deprecated. 
 int setLearningAlgorithm(LearningAlgorithm learningAlgorithm)
           
 int setLearningProblem(LearningProblem learningProblem)
           
 int setReasonerComponent(ReasonerComponent reasonerComponent)
          Sets the reasoner component and creates the corresponding ReasonerComponent instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientState

public ClientState()
Method Detail

addQuery

public int addQuery(SparqlQuery query)

getQuery

public SparqlQuery getQuery(int id)

isAlgorithmRunning

@Deprecated
public boolean isAlgorithmRunning()
Deprecated. 

Returns:
the isAlgorithmRunning

setAlgorithmRunning

@Deprecated
public void setAlgorithmRunning(boolean isAlgorithmRunning)
Deprecated. 

Parameters:
isAlgorithmRunning - the isAlgorithmRunning to set

removeKnowledgeSource

public boolean removeKnowledgeSource(String url)
Removes a knowledge source with the given URL (independant of its type).

Parameters:
url - URL of the OWL file or SPARQL Endpoint.
Returns:
True if a knowledge source was deleted, false otherwise.

getLearningProblem

public LearningProblem getLearningProblem()
Returns:
the learningProblem

setLearningProblem

public int setLearningProblem(LearningProblem learningProblem)
Parameters:
learningProblem - the learningProblem to set

getReasonerComponent

public ReasonerComponent getReasonerComponent()
Returns:
the reasonerComponent

setReasonerComponent

public int setReasonerComponent(ReasonerComponent reasonerComponent)
Sets the reasoner component and creates the corresponding ReasonerComponent instance.

Parameters:
reasonerComponent - the reasonerComponent to set

getLearningAlgorithm

public LearningAlgorithm getLearningAlgorithm()
Returns:
the learningAlgorithm

setLearningAlgorithm

public int setLearningAlgorithm(LearningAlgorithm learningAlgorithm)
Parameters:
learningAlgorithm - the learningAlgorithm to set

getComponent

public Component getComponent(int id)
Parameters:
id - A component ID.
Returns:
The component associated with this ID.
See Also:
Map.get(java.lang.Object)

addKnowledgeSource

public int addKnowledgeSource(KnowledgeSource ks)
Adds a knowledge source to the client session. Use the returned value to refer to this knowledge source.

Parameters:
ks - The knowledge source to add.
Returns:
The component ID for the newly added knowledge source.

removeKnowledgeSource

public boolean removeKnowledgeSource(int componentID)

getKnowledgeSources

public Set<KnowledgeSource> getKnowledgeSources()
Returns:
the knowledgeSources


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2008 Jens Lehmann