org.barracudamvc.core.util.dom
Class XMLCStdDOMFactory

java.lang.Object
  extended byorg.barracudamvc.core.util.dom.XMLCStdDOMFactory
All Implemented Interfaces:
DOMFactory

public class XMLCStdDOMFactory
extends Object
implements DOMFactory

XMLC standard implementation of a DOMFactory. This class will load a DOM using XMLCStdFactory.


Field Summary
protected  boolean initialized
          used for flagging whether the xmlcFactory has been initialized and avoiding unnecessary synchronization.
protected static org.apache.log4j.Logger logger
          used for logging
protected  Object sync
          arbitrary object used to synchronize upon
protected  org.enhydra.xml.xmlc.XMLCStdFactory xmlcFactory
          XMLCFactory instance, stored so that it isn't re-created on every request.
 
Constructor Summary
XMLCStdDOMFactory()
           
 
Method Summary
 Document getInstance(Class clazz)
          Get a new instance of the DOM that is associated with the given class.
 Document getInstance(String docPath)
          This method is not supported by this dom factory and will immediately throw an IOException if called!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger
used for logging


sync

protected final Object sync
arbitrary object used to synchronize upon


initialized

protected boolean initialized
used for flagging whether the xmlcFactory has been initialized and avoiding unnecessary synchronization.


xmlcFactory

protected org.enhydra.xml.xmlc.XMLCStdFactory xmlcFactory
XMLCFactory instance, stored so that it isn't re-created on every request.

Constructor Detail

XMLCStdDOMFactory

public XMLCStdDOMFactory()
Method Detail

getInstance

public Document getInstance(Class clazz)
                     throws IOException
Get a new instance of the DOM that is associated with the given class.

Specified by:
getInstance in interface DOMFactory
Parameters:
clazz - the class to be loaded as a DOM object. In this case, this class should implement XMLObject or the underlying XMLCFactory will not be able to instantiate it.
Returns:
the document that most closely corresponds with the requested class/locale combination
Throws:
IOException

getInstance

public Document getInstance(String docPath)
                     throws IOException
This method is not supported by this dom factory and will immediately throw an IOException if called!

Specified by:
getInstance in interface DOMFactory
Parameters:
docPath - the path to the document to be loaded as a Document object
Returns:
a Document object
Throws:
IOException


Copyright © 2004 BarracudaMVC.org All Rights Reserved.