monitor
Class Monitor

java.lang.Object
  extended by monitor.Monitor
All Implemented Interfaces:
java.lang.Runnable

public class Monitor
extends java.lang.Object
implements java.lang.Runnable

This class represents a monitor able to load a TBox and a Query from an xml file, to load a current state from an other xml file, to convert it into ABox and eventually to evaluate the Query.

Version:
1.0 10/12/07
Author:
marco furlan

Field Summary
private static java.util.List<NodeType> agents
           
private static Concept c
           
private static Concept c2
           
private static Trapezoid D
           
private static java.lang.String evalStr
           
private static java.text.NumberFormat formatter
           
private static KnowledgeBase kb
           
private static MonitorJFrame monitorFrame
           
private static TBoxType mtbox
           
private static java.lang.String outFile
           
private static java.lang.String outStr
           
private static Quantifier q
           
private static Query qry
           
private  QueryType qryT
           
private static Role r
           
private static SimpleConcept sc
           
private static CurrentStateType state
           
private  java.io.File stateFile
           
private static java.io.OutputStreamWriter sw
           
private static ConcreteConcept tc
           
private static ConcreteConcept tc2
           
private  java.lang.Thread thread
           
private static Quantifier tq
           
private static boolean ulCreated
           
 
Constructor Summary
Monitor()
           
 
Method Summary
 void createULines()
           
private static double evalNode(Role r, NodeType n)
           
private static double evaluate(Trapezoid t, double d)
           
static KnowledgeBase getKb()
           
 java.io.File getStateFile()
           
static void loadCurrState(java.io.File file)
           
 void loadMTBox(java.io.File source)
           
static void main(java.lang.String[] args)
           
private static void outLog(java.lang.String s)
           
 void printConstraints()
           
private static void printEvaluation()
           
 void run()
           
private  void setConstraintText(java.lang.String s)
           
static void setKb(KnowledgeBase kb)
           
 void setState()
           
 void setStateFile(java.io.File stateFile)
           
static void setStateText(java.lang.String s)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

thread

private java.lang.Thread thread

monitorFrame

private static MonitorJFrame monitorFrame

outStr

private static java.lang.String outStr

outFile

private static java.lang.String outFile

evalStr

private static java.lang.String evalStr

stateFile

private java.io.File stateFile

sw

private static java.io.OutputStreamWriter sw

state

private static CurrentStateType state

mtbox

private static TBoxType mtbox

agents

private static java.util.List<NodeType> agents

sc

private static SimpleConcept sc

tc

private static ConcreteConcept tc

tc2

private static ConcreteConcept tc2

c

private static Concept c

c2

private static Concept c2

tq

private static Quantifier tq

q

private static Quantifier q

r

private static Role r

D

private static Trapezoid D

formatter

private static java.text.NumberFormat formatter

kb

private static KnowledgeBase kb

qry

private static Query qry

qryT

private QueryType qryT

ulCreated

private static boolean ulCreated
Constructor Detail

Monitor

public Monitor()
Method Detail

printConstraints

public void printConstraints()

setConstraintText

private void setConstraintText(java.lang.String s)
Parameters:
s -

loadCurrState

public static void loadCurrState(java.io.File file)
                          throws javax.xml.bind.JAXBException,
                                 java.io.FileNotFoundException
Parameters:
file -
Throws:
javax.xml.bind.JAXBException
java.io.FileNotFoundException

loadMTBox

public void loadMTBox(java.io.File source)
               throws javax.xml.bind.JAXBException,
                      java.io.FileNotFoundException
Parameters:
source -
Throws:
javax.xml.bind.JAXBException
java.io.FileNotFoundException

setState

public void setState()

evaluate

private static double evaluate(Trapezoid t,
                               double d)
Parameters:
t -
d -
Returns:

evalNode

private static double evalNode(Role r,
                               NodeType n)
Parameters:
r -
n -
Returns:

outLog

private static void outLog(java.lang.String s)
Parameters:
s -

createULines

public void createULines()

setStateText

public static void setStateText(java.lang.String s)
Parameters:
s -

main

public static void main(java.lang.String[] args)
                 throws java.io.FileNotFoundException,
                        javax.xml.bind.JAXBException
Parameters:
args -
Throws:
javax.xml.bind.JAXBException
java.io.FileNotFoundException

run

public void run()
Specified by:
run in interface java.lang.Runnable

printEvaluation

private static void printEvaluation()

start

public void start()

stop

public void stop()

getKb

public static KnowledgeBase getKb()
Returns:
the kb

setKb

public static void setKb(KnowledgeBase kb)
Parameters:
kb - the kb to set

getStateFile

public java.io.File getStateFile()
Returns:
the stateFile

setStateFile

public void setStateFile(java.io.File stateFile)
Parameters:
stateFile - the stateFile to set