|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xoe.core.content.DocumentCache
The DocumentCache
class provides a convenient front-end to the
Content Cache for handling XML documents. The fetch and remove
operations apply to the Content Cache while the put operation only
applies to the Stash.
Constructor Summary | |
DocumentCache()
|
Method Summary | |
static org.xoe.core.dom.XDocument |
fetchDocument(String uri)
Returns the XML document specified by uri . |
static org.xoe.core.dom.XDocument |
fetchDocument(String uri,
org.xoe.core.dom.XDocument doc)
Returns the XML document specified by uri resolved relative
to doc . |
static org.xoe.core.dom.XDocument |
fetchDocument(URL url)
Returns the XML document specified by url . |
static org.xoe.core.dom.XDocument |
fetchFromPackageWorkspace(String filename,
String pkgWorkspace,
String pkgArchive)
Returns the XML document refered to by filename from the
package workspace. |
static void |
putDocument(URL url,
org.w3c.dom.Document doc)
Adds the XML document doc to the Stash using url
as the index. |
static void |
putDocument(org.xoe.core.dom.XDocument doc)
Adds the XML document doc to the Stash using the document's
URL as the index. |
static void |
removeDocument(org.xoe.core.dom.XDocument doc)
Removes the XML document doc from the Content Cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DocumentCache()
Method Detail |
public static org.xoe.core.dom.XDocument fetchDocument(String uri)
uri
.uri
- the String specifying the location of XML document to return.uri
.public static org.xoe.core.dom.XDocument fetchDocument(String uri, org.xoe.core.dom.XDocument doc)
uri
resolved relative
to doc
.uri
- the String specifying the location, relative to doc
of the XML document to return.doc
- the XML document to use as the base for resolving
uri
.uri
.public static org.xoe.core.dom.XDocument fetchDocument(URL url)
url
.url
- the URL specifying the location of XML document to return.public static void putDocument(URL url, org.w3c.dom.Document doc) throws IOException
doc
to the Stash using url
as the index.url
- the URL to use as the index into the Stash for this document.doc
- the XML document to put in the StashIOException
- if doc
is null.public static void putDocument(org.xoe.core.dom.XDocument doc) throws IOException
doc
to the Stash using the document's
URL as the index.doc
- the XML document to put in the StashIOException
- if doc
is null.public static void removeDocument(org.xoe.core.dom.XDocument doc) throws IOException
doc
from the Content Cache.doc
- the XML document to remove from the Content Cache.IOException
- if doc
is null.public static org.xoe.core.dom.XDocument fetchFromPackageWorkspace(String filename, String pkgWorkspace, String pkgArchive) throws IOException
filename
from the
package workspace. If the file isn't found, the read-only instance of
it is copied from the package archive, placed in the package workspace,
and returned.filename
- the name of the XML document to returnpkgWorkspace
- the workspace location of the packagepkgArchive
- the archive location of the packageIOException
- if an I/O error occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |