|
Berkeley DB XML version 2.2.13 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.dbxml.XmlResolver
Provides an unimplemented base class that is used for file resolution
policy. Implementations of this class are used for URI resolution, or
for public and system ids resolution. XmlResolver implementations are
identified for use using XmlManager.registerResolver(com.sleepycat.dbxml.XmlResolver)
.
The XmlResolver class allows applications to provide named access to application-specific objects, such as documents, collections of documents, DTDs, and XML schema. Berkeley DB XML can resolve references to names within a container, or a file system; applications can create XmlResolver instances that can resolve entities in other locations.
For an example of an XmlResolver implementation, see the Berkeley DB XML distribution file test/cpp/util/TestResolver.cpp.
If an application uses multiple threads, custom implementations of XmlResolver must be free threaded, and allow multiple, simultaneous calls for resolution.
Constructor Summary | |
XmlResolver()
|
Method Summary | |
void |
delete()
Free the native resources associated with this object. |
boolean |
resolveCollection(XmlTransaction txn,
XmlManager mgr,
String uri,
XmlResults result)
When implemented, should resolve a URI to an XmlResults . |
boolean |
resolveDocument(XmlTransaction txn,
XmlManager mgr,
String uri,
XmlValue result)
When implemented, should resolve a URI to an XmlValue . |
XmlInputStream |
resolveEntity(XmlTransaction txn,
XmlManager mgr,
String systemId,
String publicId)
When implemented, should resolve a System ID and Public ID to a new XmlInputStream . |
XmlInputStream |
resolveSchema(XmlTransaction txn,
XmlManager mgr,
String schemaLocation,
String nameSpace)
When implemented, should resolve schema location and namespace information to a new XmlInputStream . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XmlResolver()
Method Detail |
public void delete()
public boolean resolveCollection(XmlTransaction txn, XmlManager mgr, String uri, XmlResults result) throws XmlException
XmlResults
. If the
URI cannot be resolved by this resolver, this method should return
false. Otherwise, it should return true.
txn
- If a transaction is in force, a pointer to the XmlTransaction
object; otherwise, null
.mgr
- The XmlManager
object associated with the operation.uri
- The URI to resolve.result
- The XmlResults
object in which the results of the resolution are to be
placed.
XmlException
public boolean resolveDocument(XmlTransaction txn, XmlManager mgr, String uri, XmlValue result) throws XmlException
XmlValue
. If the
URI cannot be resolved by this resolver, this method should return
false. Otherwise, it should return true.
txn
- If a transaction is in force, a pointer to the XmlTransaction
object; otherwise, null
.mgr
- The XmlManager
object associated with the operation.uri
- The URI to resolve.result
- The XmlValue
object in which the results of the resolution are to be placed.
XmlException
public XmlInputStream resolveEntity(XmlTransaction txn, XmlManager mgr, String systemId, String publicId) throws XmlException
XmlInputStream
. If the IDs cannot be resolved by this resolver,
this method should return null
. The XmlInputStream object will be
deleted by the caller.
txn
- If a transaction is in force, a pointer to the XmlTransaction
object; otherwise, null
.mgr
- The XmlManager
object associated with the operation.systemId
- The System ID to resolve.publicId
- The Public ID to resolve.
XmlException
public XmlInputStream resolveSchema(XmlTransaction txn, XmlManager mgr, String schemaLocation, String nameSpace) throws XmlException
XmlInputStream
. If this information cannot
be resolved by this resolver, this method should return null
. The
XmlInputStream object will be deleted by the caller.
txn
- If a transaction is in force, a pointer to the XmlTransaction
object; otherwise, null
.mgr
- The XmlManager
object associated with the operation.schemaLocation
- The location where the schema resides.nameSpace
- The namespace used by the schema.
XmlException
|
Berkeley DB XML version 2.2.13 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |