|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.orbeon.oxf.resources.PriorityResourceManagerImpl
public class PriorityResourceManagerImpl
The priority resource manager delegates to two or more resource managers the loading of documents. For example, if a flat file resource manager doesn't contain a document, a second classloader resource manager might load it. This is an important feature that allows an application developer to bundle a resource, and still allow the user to override it easily.
Constructor Summary | |
---|---|
PriorityResourceManagerImpl(Map<String,String> props)
|
Method Summary | |
---|---|
boolean |
canWrite(String key)
Indicates if the resource manager implementation suports write operations |
boolean |
exists(String key)
Check if a resource exists given its key. |
Node |
getContentAsDOM(String key)
Gets a W3C DOM node for the specified key. |
org.dom4j.Document |
getContentAsDOM4J(String key)
Gets a DOM4J document for the specified key. |
org.dom4j.Document |
getContentAsDOM4J(String key,
XMLUtils.ParserConfiguration parserConfiguration,
boolean handleLexical)
Gets a DOM4J document for the specified key. |
void |
getContentAsSAX(String key,
XMLReceiver xmlReceiver)
Gets a document form the resource manager and send SAX events to the specified receiver. |
void |
getContentAsSAX(String key,
XMLReceiver xmlReceiver,
XMLUtils.ParserConfiguration parserConfiguration,
boolean handleLexical)
Gets a document form the resource manager and send SAX events to the specified receiver. |
InputStream |
getContentAsStream(String key)
Returns a binary input stream for the specified key. |
OutputStream |
getOutputStream(String key)
Allows writing to the resource |
String |
getRealPath(String key)
Returns the path to the given resource on the file system. |
XMLReceiver |
getWriteContentHandler(String key)
Returns a receiver that can write to the Resource Manager. |
Writer |
getWriter(String key)
Allow writing to the resource |
XMLReader |
getXMLReader()
Returns a XMLReader interface to the resource manager. |
long |
lastModified(String key,
boolean doNotThrowResourceNotFound)
Gets the last modified timestamp for the specified resource |
int |
length(String key)
Returns the length of the file denoted by this abstract pathname. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PriorityResourceManagerImpl(Map<String,String> props)
Method Detail |
---|
public Node getContentAsDOM(String key)
ResourceManager
getContentAsDOM
in interface ResourceManager
key
- a Resource Manager key
public org.dom4j.Document getContentAsDOM4J(String key)
ResourceManager
getContentAsDOM4J
in interface ResourceManager
key
- a Resource Manager key
public org.dom4j.Document getContentAsDOM4J(String key, XMLUtils.ParserConfiguration parserConfiguration, boolean handleLexical)
ResourceManager
getContentAsDOM4J
in interface ResourceManager
key
- a Resource Manager keyparserConfiguration
- parser configurationhandleLexical
- whether the XML parser must output SAX LexicalHandler events, including comments @return a document elementpublic void getContentAsSAX(String key, XMLReceiver xmlReceiver)
ResourceManager
getContentAsSAX
in interface ResourceManager
key
- a Resource Manager keyxmlReceiver
- receiver where SAX events are sentpublic void getContentAsSAX(String key, XMLReceiver xmlReceiver, XMLUtils.ParserConfiguration parserConfiguration, boolean handleLexical)
ResourceManager
getContentAsSAX
in interface ResourceManager
key
- a Resource Manager keyxmlReceiver
- receiver where SAX events are sentparserConfiguration
- parser configurationhandleLexical
- whether the XML parser must output SAX LexicalHandler events, including commentspublic InputStream getContentAsStream(String key)
ResourceManager
getContentAsStream
in interface ResourceManager
key
- a Resource Manager key
public long lastModified(String key, boolean doNotThrowResourceNotFound)
ResourceManager
lastModified
in interface ResourceManager
key
- a Resource Manager key
public int length(String key)
ResourceManager
length
in interface ResourceManager
public boolean canWrite(String key)
ResourceManager
canWrite
in interface ResourceManager
key
- a Resource Manager key
public OutputStream getOutputStream(String key)
ResourceManager
getOutputStream
in interface ResourceManager
key
- a Resource Manager key
public Writer getWriter(String key)
ResourceManager
getWriter
in interface ResourceManager
key
- a Resource Manager key
public String getRealPath(String key)
ResourceManager
getRealPath
in interface ResourceManager
public XMLReceiver getWriteContentHandler(String key)
ResourceManager
getWriteContentHandler
in interface ResourceManager
key
- a Resource Manager key
public XMLReader getXMLReader()
ResourceManager
setContentHandler() and parse(String key)
- Specified by:
getXMLReader
in interface ResourceManager
- Returns:
- An XML reader
public boolean exists(String key)
ResourceManager
exists
in interface ResourceManager
key
- a Resource Manager key
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |