jInfer

cz.cuni.mff.ksi.jinfer.base.utils
Class RunningProject

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.base.utils.RunningProject

public final class RunningProject
extends Object

Class for determining which jInfer Project actually runs inference.


Method Summary
static Project getActiveProject()
          Gets active project.
static Properties getActiveProjectProps(String moduleName)
          Gets Properties of active project.
static Capabilities getNextModuleCaps()
          Returns the capabilities of the next module in the inference chain.
static boolean isActiveProject()
          Returns whether active project is set or not.
static void removeActiveProject()
          Removes active project.
static boolean setActiveProject(Project project)
          Sets project as active and return true if there is no active project, otherwise return false.
static void setDefaultProperties(Properties p)
          Sets the default properties - those will be returned if there is no running project.
static void setNextModuleCaps(Capabilities aNextModuleCaps)
          Sets the capabilities of the next module in the inference chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setActiveProject

public static boolean setActiveProject(Project project)
Sets project as active and return true if there is no active project, otherwise return false.

Parameters:
project - to be set as active.
Returns:
true if project is set to active, otherwise returns false.

removeActiveProject

public static void removeActiveProject()
Removes active project.


getActiveProject

public static Project getActiveProject()
Gets active project.

Returns:
Active project.

isActiveProject

public static boolean isActiveProject()
Returns whether active project is set or not.

Returns:
true if active project is set, otherwise returns false.

getActiveProjectProps

public static Properties getActiveProjectProps(String moduleName)
Gets Properties of active project. If there is no project running, default properties will be returned.

Returns:
Properties of active project or default properties, if no project is running.

getNextModuleCaps

public static Capabilities getNextModuleCaps()
Returns the capabilities of the next module in the inference chain.

Returns:
Capabilities of the next module in the inference chain. Empty capabilities (Capabilities object returning an empty list of capabilities) if next module is null for any reason.

setNextModuleCaps

public static void setNextModuleCaps(Capabilities aNextModuleCaps)
Sets the capabilities of the next module in the inference chain. Used by Runner implementations.


setDefaultProperties

public static void setDefaultProperties(Properties p)
Sets the default properties - those will be returned if there is no running project.

Parameters:
p - Properties to be set as default.

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011