org.onemind.jxp
Class JxpFactory

java.lang.Object
  extended by org.onemind.jxp.JxpFactory

public final class JxpFactory
extends java.lang.Object

The JxpPageSource factory

Author:
TiongHiang Lee (thlee@onemindsoft.org)

Field Summary
private static javax.xml.parsers.SAXParser _parser
          the parser *
 
Constructor Summary
private JxpFactory()
          Constructor
 
Method Summary
static JxpPageSource getPageSource(java.lang.String configFile)
          Get the page source from the config
private static javax.xml.parsers.SAXParser getParser()
          set up
static JxpProcessor getProcessor(java.io.InputStream config)
          Get the processor from the config
static JxpProcessor getProcessor(java.lang.String configFile)
          Get the processor from the config
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_parser

private static javax.xml.parsers.SAXParser _parser
the parser *

Constructor Detail

JxpFactory

private JxpFactory()
Constructor

Method Detail

getParser

private static javax.xml.parsers.SAXParser getParser()
                                              throws java.lang.Exception
set up

Returns:
the parser
Throws:
java.lang.Exception - if there's problem

getPageSource

public static JxpPageSource getPageSource(java.lang.String configFile)
                                   throws org.xml.sax.SAXException,
                                          java.io.IOException,
                                          java.lang.Exception
Get the page source from the config

Parameters:
configFile - the config
Returns:
the config
Throws:
java.io.IOException - if there's IO problem
org.xml.sax.SAXException - if there's parsing exception
java.lang.Exception - if there's other problem

getProcessor

public static JxpProcessor getProcessor(java.lang.String configFile)
                                 throws org.xml.sax.SAXException,
                                        java.io.IOException,
                                        java.lang.Exception
Get the processor from the config

Parameters:
configFile - the config
Returns:
the processor
Throws:
java.io.IOException - if there's IO problem
org.xml.sax.SAXException - if there's parsing problem
java.lang.Exception - if there's other problem

getProcessor

public static JxpProcessor getProcessor(java.io.InputStream config)
                                 throws org.xml.sax.SAXException,
                                        java.io.IOException,
                                        java.lang.Exception
Get the processor from the config

Parameters:
config - the config input stream
Returns:
the processor
Throws:
java.io.IOException - if there's IO problem
org.xml.sax.SAXException - if there's parsing problem
java.lang.Exception - if there's other problem