org.autopipes
Class FloorImp

java.lang.Object
  extended by org.autopipes.FloorImp
All Implemented Interfaces:
Floor

public class FloorImp
extends java.lang.Object
implements Floor

Primary implementation of Floor.


Nested Class Summary
static class FloorImp.AreaImp
          Default implementation.
static class FloorImp.CommandImp
          Default implementation.
 
Nested classes/interfaces inherited from interface org.autopipes.Floor
Floor.Area, Floor.Command
 
Constructor Summary
FloorImp()
          Default constructor.
 
Method Summary
 void buildGraph()
          Builds a graph representation of a drawing.
 void exportLabels(org.w3c.dom.Node nd)
          DOM version of add branch labels.
 void exportLabels(java.io.Writer wri)
          Writes branch labels to stream.
 ConfigurationMgr getConfiguration()
          Gets current drawing configuration.
 DrawingMgr getDrawing()
          Gets current drawing.
 java.util.Map getGraphs()
          Gets a map of connected components of a graph built from a drawing.
static java.lang.String getNamespace()
          Gets namespace used by XML messages processed by this class.
static void main(java.lang.String[] args)
          Entry point of a command line server.
 void processComand(Floor.Command cmd, org.w3c.dom.Node out)
          Top level message dispatcher.
 void processDrawing(org.xml.sax.InputSource cfgIs, org.xml.sax.InputSource dwgIs)
          Entry point for all drawing processing.
 void setConfiguration(ConfigurationMgr conf)
          Sets current drawing configuration.
 void setDrawing(DrawingMgr dwg)
          Sets current drawing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloorImp

public FloorImp()
Default constructor.

Method Detail

getNamespace

public static java.lang.String getNamespace()
Gets namespace used by XML messages processed by this class.

Returns:
the namespace

getConfiguration

public ConfigurationMgr getConfiguration()
Gets current drawing configuration.

Specified by:
getConfiguration in interface Floor
Returns:
the configuration

setConfiguration

public void setConfiguration(ConfigurationMgr conf)
Sets current drawing configuration.

Specified by:
setConfiguration in interface Floor
Parameters:
conf - the configuration

getDrawing

public DrawingMgr getDrawing()
Gets current drawing.

Specified by:
getDrawing in interface Floor
Returns:
the drawing

setDrawing

public void setDrawing(DrawingMgr dwg)
Sets current drawing.

Specified by:
setDrawing in interface Floor
Parameters:
dwg - the drawing

getGraphs

public java.util.Map getGraphs()
Gets a map of connected components of a graph built from a drawing. The map is indexed by a raiser entry point.

Specified by:
getGraphs in interface Floor
Returns:
the map

processDrawing

public void processDrawing(org.xml.sax.InputSource cfgIs,
                           org.xml.sax.InputSource dwgIs)
                    throws javax.xml.bind.JAXBException,
                           java.lang.IllegalAccessException,
                           java.lang.CloneNotSupportedException
Entry point for all drawing processing.

Specified by:
processDrawing in interface Floor
Parameters:
cfgIs - configuration source
dwgIs - drawing source
Throws:
javax.xml.bind.JAXBException
java.lang.IllegalAccessException
java.lang.CloneNotSupportedException

buildGraph

public void buildGraph()
                throws java.lang.IllegalAccessException,
                       java.lang.CloneNotSupportedException
Builds a graph representation of a drawing.

Specified by:
buildGraph in interface Floor
Throws:
java.lang.IllegalAccessException
java.lang.CloneNotSupportedException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Entry point of a command line server.

Parameters:
args - Run with no arguments to see usage.
Throws:
java.lang.Exception

exportLabels

public void exportLabels(java.io.Writer wri)
                  throws java.lang.IllegalAccessException,
                         javax.xml.bind.JAXBException
Writes branch labels to stream.

Specified by:
exportLabels in interface Floor
Parameters:
wri - the stream
Throws:
java.lang.IllegalAccessException
javax.xml.bind.JAXBException

exportLabels

public void exportLabels(org.w3c.dom.Node nd)
                  throws java.lang.IllegalAccessException,
                         javax.xml.bind.JAXBException
DOM version of add branch labels.

Parameters:
nd - the node output
Throws:
java.lang.IllegalAccessException
javax.xml.bind.JAXBException

processComand

public void processComand(Floor.Command cmd,
                          org.w3c.dom.Node out)
                   throws java.lang.IllegalAccessException,
                          javax.xml.bind.JAXBException
Top level message dispatcher. Processes a message and builds a reply XML.

Specified by:
processComand in interface Floor
Parameters:
cmd - the message
out - the node to which the reply is attached
Throws:
java.lang.IllegalAccessException
javax.xml.bind.JAXBException