|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.barracuda.core.util.dom.DefaultDOMLoader
Default implementation of a DOMLoader
DOMLoader
Field Summary | |
protected Map |
classmap
|
protected DOMFactory |
defaultDOMFactory
|
protected Map |
factories
|
protected static DefaultDOMLoader |
globalLoader
|
protected static boolean |
initialized
used for flagging whether the globalLoader has been initialized and avoiding unnecessary instantiation and synchronization. |
protected static org.apache.log4j.Logger |
logger
|
protected static Object |
sync
arbitrary object used to synchronize upon |
Method Summary | |
void |
deregisterDOMFactory(String key)
Deregister a DOMFactory keyed against a fully qualified class name or a document path |
Document |
getDOM(Class clazz)
Get the DOM associated with the provided class, based on the default locale |
Document |
getDOM(Class clazz,
Locale locale)
Get the DOM associated with the provided class, based on the specified locale |
Document |
getDOM(String docPath)
Note: the default locale is currently ignored in this implementation |
Document |
getDOM(String docPath,
Locale locale)
Note: the specified locale is currently ignored in this implementation |
static DefaultDOMLoader |
getGlobalInstance()
Get the global instance of the DefaultDOMLoader |
protected Class |
lookupClass(String className)
Find a stored reference to a class. |
void |
registerDOMFactory(DOMFactory df,
String key)
Register a DOMFactory keyed against a fully qualified class name or a document path |
void |
setDefaultDOMFactory(DOMFactory df)
Specify the default DOM factory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final org.apache.log4j.Logger logger
protected static DefaultDOMLoader globalLoader
getGlobalInstance()
protected static final Object sync
protected static boolean initialized
protected DOMFactory defaultDOMFactory
setDefaultDOMFactory(DOMFactory)
protected Map factories
registerDOMFactory(DOMFactory, String)
,
deregisterDOMFactory(String)
protected Map classmap
lookupClass(String)
Method Detail |
public Document getDOM(Class clazz) throws IOException
DOMLoader
getDOM
in interface DOMLoader
clazz
- the class to be loaded as a Document object
IOException
DOMLoader.getDOM(Class)
public Document getDOM(Class clazz, Locale locale) throws IOException
DOMLoader
getDOM
in interface DOMLoader
clazz
- the class to be loaded as a Document objectlocale
- the target Locale (may be null)
IOException
DOMLoader.getDOM(Class, Locale)
public Document getDOM(String docPath) throws IOException
getDOM
in interface DOMLoader
docPath
- the path to the document to be loaded as a Document object
IOException
DOMLoader.getDOM(String)
public Document getDOM(String docPath, Locale locale) throws IOException
getDOM
in interface DOMLoader
docPath
- the path to the document to be loaded as a Document objectlocale
- the target Locale (may be null)
IOException
DOMLoader.getDOM(String, Locale)
protected Class lookupClass(String className)
className
- the fully qualified name of a class
public void setDefaultDOMFactory(DOMFactory df)
df
- the DOMFactory to be used by defaultpublic void registerDOMFactory(DOMFactory df, String key)
df
- the DOMFactorykey
- the string which key's a particular DOMFactory to be usedpublic void deregisterDOMFactory(String key)
key
- the string which key's a particular DOMFactory to be removedpublic static DefaultDOMLoader getGlobalInstance()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |