INRIA & FluxMedia

fr.fluxmedia.transmorpher.stdlib
Class TestingDispatcher

java.lang.Object
  extended by fr.fluxmedia.transmorpher.engine.TProcess_Impl
      extended by fr.fluxmedia.transmorpher.engine.TProcessBasic
          extended by fr.fluxmedia.transmorpher.engine.TDispatcher
              extended by fr.fluxmedia.transmorpher.stdlib.TestingDispatcher
All Implemented Interfaces:
TProcess, java.lang.Runnable, org.xml.sax.ContentHandler

public final class TestingDispatcher
extends TDispatcher

This is a simple dispatcher with test. It compares two values, if these values are equals, input is sent to the first output, if these value are not equals, input is sent to the second output. Input is sent to only one output. An empty document is sent to the other.

Author:
triolet

Field Summary
(package private)  java.lang.String test
          the test value
(package private)  boolean then
          a boolean to store the test result
(package private)  java.lang.String value
          the value to compare with the test value
 
Fields inherited from class fr.fluxmedia.transmorpher.engine.TDispatcher
contentHandlers
 
Fields inherited from class fr.fluxmedia.transmorpher.engine.TProcessBasic
finished, isThread, param, procThread, type
 
Fields inherited from class fr.fluxmedia.transmorpher.engine.TProcess_Impl
debug, id, iListIn, iListOut, iNbIn, iNbOut, nameFather, nameIn, nameOut
 
Constructor Summary
TestingDispatcher(java.lang.String[] pIn, java.lang.String[] pOut, Parameters pParam)
          the constructor
 
Method Summary
 void characters(char[] ch, int start, int length)
          the characters method of content handler interface
 void endDocument()
          the endDocument method of content handler interface
 void endElement(java.lang.String ns, java.lang.String localName, java.lang.String name)
          the endElement method of content handler interface
 void endPrefixMapping(java.lang.String prefix)
          the endPrefixMapping method of content handler interface
 void ignorableWhitespace(char[] ch, int start, int length)
          the ignorableWhitespace method of content handler interface
 void processingInstruction(java.lang.String target, java.lang.String data)
          the processingInstruction method of content handler interface
 void setDocumentLocator(org.xml.sax.Locator locator)
          the setDocumentLocator method of content handler interface
 void skippedEntity(java.lang.String name)
          the skippedEntity method of content handler interface
 void startDocument()
          the startDocument method of content handler interface
 void startElement(java.lang.String ns, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes atts)
          the start element method of content handler interface
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
          the startPrefixMapping method of content handler interface
 
Methods inherited from class fr.fluxmedia.transmorpher.engine.TDispatcher
generatePort, setContentHandler
 
Methods inherited from class fr.fluxmedia.transmorpher.engine.TProcessBasic
execProcess, getFinished, getType, initParameters, run, setFinished, setThread, setType
 
Methods inherited from class fr.fluxmedia.transmorpher.engine.TProcess_Impl
bindParameters, getFatherName, getId, getIn, getIn, getIn, getName, getNameIn, getNameIn, getNameOut, getNameOut, getOut, getOut, getOut, getParameter, getParameterNames, getParameters, reset, setDebug, setFatherName, setId, setIn, setName, setOut, setParameter, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

test

java.lang.String test
the test value


value

java.lang.String value
the value to compare with the test value


then

boolean then
a boolean to store the test result

Constructor Detail

TestingDispatcher

public TestingDispatcher(java.lang.String[] pIn,
                         java.lang.String[] pOut,
                         Parameters pParam)
the constructor

Parameters:
pIn - Description of the Parameter
pOut - Description of the Parameter
pParam - Description of the Parameter
Method Detail

startElement

public final void startElement(java.lang.String ns,
                               java.lang.String localName,
                               java.lang.String name,
                               org.xml.sax.Attributes atts)
                        throws org.xml.sax.SAXException
the start element method of content handler interface

Parameters:
ns - Description of the Parameter
localName - Description of the Parameter
name - Description of the Parameter
atts - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

endElement

public final void endElement(java.lang.String ns,
                             java.lang.String localName,
                             java.lang.String name)
                      throws org.xml.sax.SAXException
the endElement method of content handler interface

Parameters:
ns - Description of the Parameter
localName - Description of the Parameter
name - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

setDocumentLocator

public final void setDocumentLocator(org.xml.sax.Locator locator)
the setDocumentLocator method of content handler interface

Parameters:
locator - The new documentLocator value

startDocument

public final void startDocument()
                         throws org.xml.sax.SAXException
the startDocument method of content handler interface

Throws:
org.xml.sax.SAXException - Description of the Exception

endDocument

public final void endDocument()
                       throws org.xml.sax.SAXException
the endDocument method of content handler interface

Throws:
org.xml.sax.SAXException - Description of the Exception

skippedEntity

public final void skippedEntity(java.lang.String name)
                         throws org.xml.sax.SAXException
the skippedEntity method of content handler interface

Parameters:
name - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

processingInstruction

public final void processingInstruction(java.lang.String target,
                                        java.lang.String data)
                                 throws org.xml.sax.SAXException
the processingInstruction method of content handler interface

Parameters:
target - Description of the Parameter
data - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

ignorableWhitespace

public final void ignorableWhitespace(char[] ch,
                                      int start,
                                      int length)
                               throws org.xml.sax.SAXException
the ignorableWhitespace method of content handler interface

Parameters:
ch - Description of the Parameter
start - Description of the Parameter
length - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

characters

public final void characters(char[] ch,
                             int start,
                             int length)
                      throws org.xml.sax.SAXException
the characters method of content handler interface

Parameters:
ch - Description of the Parameter
start - Description of the Parameter
length - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

startPrefixMapping

public final void startPrefixMapping(java.lang.String prefix,
                                     java.lang.String uri)
                              throws org.xml.sax.SAXException
the startPrefixMapping method of content handler interface

Parameters:
prefix - Description of the Parameter
uri - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

endPrefixMapping

public final void endPrefixMapping(java.lang.String prefix)
                            throws org.xml.sax.SAXException
the endPrefixMapping method of content handler interface

Parameters:
prefix - Description of the Parameter
Throws:
org.xml.sax.SAXException - Description of the Exception

INRIA & FluxMedia

..no bottom yet...