edu.isi.ontosaurus.tomcat
Class OntosaurusServlet
java.lang.Object
HttpServlet
edu.isi.ontosaurus.tomcat.PowerLoomTomcatServlet
edu.isi.ontosaurus.tomcat.OntosaurusServlet
public class OntosaurusServlet
- extends PowerLoomTomcatServlet
Servlet class for Ontosaurus to work with the Tomcat or
other servers which follow the javax servlet standards
Method Summary |
protected void |
doGet(HttpServletRequest req,
HttpServletResponse res)
Services a single GET request from the client. |
protected void |
doPost(HttpServletRequest req,
HttpServletResponse res)
Services a single POST request from the client. |
java.lang.String |
getServletInfo()
|
static boolean |
grapherAvailable()
|
void |
init()
Configure the common stuff. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dotProgram
public static java.lang.String dotProgram
tempDir
public static java.lang.String tempDir
OntosaurusServlet
public OntosaurusServlet()
init
public void init()
throws ServletException
- Configure the common stuff.
This will initialize PowerLoom and other required systems.
It will set the values of the dot program and temporary directory.
It will also congifure common stuff.
Information for setting these values comes from the config object.
The following initialization parameters are supported:
COMMON:
SystemInits Whitespace separated list of Stella/PowerLoom system
initialization code to call. This must be the fully
qualified name to invoke with now parameters. Encoding of
whitespace and other unusual characters is like in URLs.
KBHome Path to the top of the KB directory. Must end
with a directory separator character. Encoding of
whitespace and other unusual characters is like in URLs.
KBs Whitespace separated list of paths (relative to kbhome)
of knowledge bases to load. They will be loaded after
any additional systems are initialized. Encoding of
whitespace and other unusual characters is like in URLs.
SPECIFIC
dot Path to executable for dot graphing program
tempDir Path to temporary directory for graphs. Must
end with a directory separator character. Default
value is the system property java.io.tempdir Note that
this must match the location in the OntosaurusContext.xml
file for graph locations.
- Overrides:
init
in class PowerLoomTomcatServlet
- Throws:
ServletException
getServletInfo
public java.lang.String getServletInfo()
- Overrides:
getServletInfo
in class PowerLoomTomcatServlet
doPost
protected void doPost(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
java.io.IOException
- Services a single POST request from the client. This is an interface
to the Stella-generated Ontosaurus code.
- Overrides:
doPost
in class PowerLoomTomcatServlet
- Parameters:
req
- the servlet requestreq
- the servlet response
- Throws:
ServletException
- when an exception has occurred
java.io.IOException
doGet
protected void doGet(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
java.io.IOException
- Services a single GET request from the client. This is an interface
to the Stella-generated Ontosaurus code.
- Overrides:
doGet
in class PowerLoomTomcatServlet
- Parameters:
req
- the servlet requestreq
- the servlet response
- Throws:
ServletException
- when an exception has occurred
java.io.IOException
grapherAvailable
public static boolean grapherAvailable()