edu.isi.ontosaurus.acme
Class Ontosaurus

java.lang.Object
  extended by Acme.Serve.Serve
      extended by edu.isi.ontosaurus.acme.Ontosaurus
All Implemented Interfaces:
Acme.Serve.servlet.ServletContext

public class Ontosaurus
extends Acme.Serve.Serve

Ontosaurus main class. Based on the Acme.Serve class Takes serveral command line options, specified below:

 -l                 Listener.  Start up a PowerLoom listener loop for
                    interaction with the PowerLoom code in the server.
                    Useful for debugging and examining the KBs.
 -p port            Port.  TCP port for HTTP service.  Defaults to 9090.
 -port port         Port, alias for -p.
 -d directoryRoot   Directory.  Pathname to the directory containing the HTML
                    documents.  This will normally be the htdocs/ontosaurus
                    subdirectory of the distribution.  Defaults value is
                    htdocs/ontosaurus in the current directory.
 -t throttlefile    Throttles.  See Acme.Serve documentation.
 -systeminit        System initialization functions.  These are the startup
                    functions for Stella/PowerLoom systems.  They must be
                    fully qualified names.  They should not have trailing ().
                    These systems wll be initialized after the PowerLoom
                    initialization but before loading any KBs.
 -kb kbFileName     KB.  Loads the specified kb file.  May be repeated as
                    often as desired.  All such kb files will be loaded.
 -dot filepath      File path to the dot program.  Used for producing
                    concept hierarchy graphs.
 -temp directory    Temporary directory location.  Defaults to the value
                    of the "java.io.tmpdir" system property or "/tmp/".
                    This is used only for producing graphs with dot.

 


Field Summary
 java.lang.String directoryRoot
           
static java.lang.String dotProgram
           
static java.lang.String tempDir
           
 
Fields inherited from class Acme.Serve.Serve
servlets
 
Constructor Summary
Ontosaurus()
          Constructor, default port, directory and log stream.
Ontosaurus(int port)
          Constructor.
Ontosaurus(int port, java.lang.String directory)
          Constructor.
Ontosaurus(int port, java.lang.String directory, java.lang.String throttles)
          Constructor.
Ontosaurus(int port, java.lang.String directory, java.lang.String throttles, java.io.PrintStream logStream)
          Constructor.
 
Method Summary
 java.lang.String getRealPath(java.lang.String path)
          Applies alias rules to the specified virtual path and returns the corresponding real path.
static void main(java.lang.String[] args)
           
 void setup(java.lang.String directory, java.lang.String throttles)
          Does standard setup of an Ontosaurus server.
 
Methods inherited from class Acme.Serve.Serve
addDefaultServlets, addDefaultServlets, addServlet, addServlet, destroyAllServlets, getAttribute, getMimeType, getServerInfo, getServlet, getServletNames, getServlets, log, log, serve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directoryRoot

public java.lang.String directoryRoot

dotProgram

public static java.lang.String dotProgram

tempDir

public static java.lang.String tempDir
Constructor Detail

Ontosaurus

public Ontosaurus(int port,
                  java.lang.String directory,
                  java.lang.String throttles,
                  java.io.PrintStream logStream)
           throws java.io.IOException
Constructor.

Parameters:
port - The port for the Ontosaurus server
directory - The directory where the top-level ontosaurus HTML files are located
throttles - Location of throttles file.
logStream - Stream for logging of Ontosaurus messages
Throws:
java.io.IOException

Ontosaurus

public Ontosaurus(int port,
                  java.lang.String directory,
                  java.lang.String throttles)
           throws java.io.IOException
Constructor. Default log stream os System.err.

Parameters:
port - The port for the Ontosaurus server
directory - The directory where the top-level ontosaurus HTML files are located
throttles - Location of throttles file.
Throws:
java.io.IOException

Ontosaurus

public Ontosaurus(int port,
                  java.lang.String directory)
           throws java.io.IOException
Constructor. Default log stream os System.err. No throttles.

Parameters:
port - The port for the Ontosaurus server
directory - The directory where the top-level ontosaurus HTML files are located
Throws:
java.io.IOException

Ontosaurus

public Ontosaurus(int port)
           throws java.io.IOException
Constructor. Default log stream os System.err. No throttles. Top level directory for HTML files defaults to ontosaurus/html below the current working directory.

Parameters:
port - The port for the Ontosaurus server
Throws:
java.io.IOException

Ontosaurus

public Ontosaurus()
           throws java.io.IOException
Constructor, default port, directory and log stream. No throttles. We don't use 80 as the default port because we don't want to encourage people to run a Java web server as root because Java currently has no way of giving up root privs! Instead, the current default port is 9090. Top level directory for HTML files defaults to ontosaurus/html below the current working directory.

Throws:
java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)

setup

public void setup(java.lang.String directory,
                  java.lang.String throttles)
           throws java.io.IOException
Does standard setup of an Ontosaurus server.

Parameters:
directory - The root directory for Ontosaurus files.
throttles - File name of a throttles file.
Throws:
java.io.IOException

getRealPath

public java.lang.String getRealPath(java.lang.String path)
Applies alias rules to the specified virtual path and returns the corresponding real path. It returns null if the translation cannot be performed.

Specified by:
getRealPath in interface Acme.Serve.servlet.ServletContext
Overrides:
getRealPath in class Acme.Serve.Serve
Parameters:
path - the path to be translated