|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.meyling.principia.module.ModuleContext
This class provides static access methods for loading modules.
| Inner Class Summary | |
private static class |
ModuleContext.PeekTextInput
This thread watches the reading process of a TextInput object.
|
| Field Summary | |
private static Version |
kernelVersion
version of this kernel |
private static int |
logLevel
current logging level: 0 = no logging, 1 = elementary events, 2 = more events |
private static Map |
modules
already loaded modules |
private static ModuleContext.PeekTextInput |
peek
thread for watching loading process |
private static Version |
ruleVersion
maximum version of supported rules |
| Constructor Summary | |
ModuleContext()
|
|
| Method Summary | |
(package private) static void |
Make attribut initialization. |
static boolean |
compress(String address)
Remove double and unused lines of all propositions of a module and save modified local buffer back. |
static String |
getKernelVersion()
Get version of this kernel. |
static String |
getRuleVersion()
Get maximum version of supported rules. |
static Module |
loadLocalModule(ModuleAddress moduleAddress)
Load a module. |
static Module |
loadModule(ModuleAddress moduleAddress)
Get a certain module. |
static Module |
loadModule(Module module,
Specification spec)
Load a certain module. |
static Module |
loadModule(String address)
Get a certain module. |
static void |
log(int level,
Object object)
Log message object with certain level to System.out:
1 = elementary events,
2 = more events.
|
private static boolean |
makeLocalCopy(ModuleAddress moduleAddress)
Make local copy of a module. |
static boolean |
reduceToBasicRules(String address)
Reduce module file to module file that uses only basic rules. |
static void |
setLogLevel(int level)
Set logging level: 0 = no logging, 1 = elementary events, 2 = more events |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
| Field Detail |
private static final Version kernelVersion
private static final Version ruleVersion
private static final Map modules
private static int logLevel
private static final ModuleContext.PeekTextInput peek
| Constructor Detail |
public ModuleContext()
| Method Detail |
static void()
public static final String getRuleVersion()
public static final String getKernelVersion()
public static final boolean compress(String address)
throws IOException,
ParsingException
address - address of moduleIOException - if module file couldn't be read or writtenParsingException - if
public static final boolean reduceToBasicRules(String address)
throws IOException,
ParsingException
address - address of moduleIOException - if writing the resulting file is not possible
(e.g. because there is already a module file of
that name)ParsingException - if there were a parsing problem for
the referenced (or one indirectly connected) moduleIllegalArgumentException - if something unexpected happens
(e.g. a programming error occurs)
public static final Module loadModule(String address)
throws ParsingException,
IOException
address - address of moduleIOException - if loading was not successfullParsingException - if loading the module lead to
an parsing error
public static final Module loadModule(ModuleAddress moduleAddress)
throws ParsingException,
IOException
address - address of moduleIOException - if loading was not successfullParsingException - if loading the module lead to
an parsing error
public static final Module loadModule(Module module,
Specification spec)
throws ArgumentException,
ParsingException
module - this is the current modulespec - specification of wanted moduleArgumentException - if loading was not successfullParsingException - if loading another module lead to
an parsing error
public static final Module loadLocalModule(ModuleAddress moduleAddress)
throws NullPointerException,
IOException,
ParsingException
address - module addressNullPointerException - if local file was not foundIOException - if loading failedParsingException - if loading the module lead to
an parsing error
private static final boolean makeLocalCopy(ModuleAddress moduleAddress)
throws IOException
address - module addressIOException - if address was malformedpublic static final void setLogLevel(int level)
level - logging level
public static final void log(int level,
Object object)
System.out:
1 = elementary events,
2 = more events.
Logging only occurs if current logging level is set
to value equal or below level.
(See setLogLevel(int)).level - logging levelobject - this object will be logged
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||