public final class DocumentPool
extends java.lang.Object
The function of allocating document numbers is performed by the DocumentNumberAllocator in the Configuration, not by the DocumentPool. This has a number of effects: in particular it allows operations involving multiple documents (such as generateId() and document()) to occur in a free-standing XPath environment.
Constructor and Description |
---|
DocumentPool() |
Modifier and Type | Method and Description |
---|---|
void |
add(TreeInfo doc,
DocumentURI uri)
Add a document to the pool
|
void |
add(TreeInfo doc,
java.lang.String uri)
Add a document to the pool
|
boolean |
contains(TreeInfo doc)
Determine whether a given document is present in the pool
|
TreeInfo |
discard(TreeInfo doc)
Release a document from the document pool.
|
void |
discardIndexes(KeyManager keyManager)
Release all indexs for documents in this pool held by the KeyManager
|
TreeInfo |
find(DocumentURI uri)
Get the document with a given document-uri
|
TreeInfo |
find(java.lang.String uri)
Get the document with a given document-uri
|
java.lang.String |
getDocumentURI(NodeInfo doc)
Get the URI for a given document node, if it is present in the pool.
|
boolean |
isMarkedUnavailable(DocumentURI uri)
Ask whether a document URI is in the set of URIs known to be unavailable, because doc-available()
has been previously called and has returned false
|
void |
markUnavailable(DocumentURI uri)
Add a document URI to the set of URIs known to be unavailable (because doc-available() has returned
false
|
public void add(TreeInfo doc, java.lang.String uri)
doc
- The DocumentInfo for the document in questionuri
- The document-uri property of the document.public void add(TreeInfo doc, DocumentURI uri)
doc
- The DocumentInfo for the document in questionuri
- The document-uri property of the document.public TreeInfo find(java.lang.String uri)
uri
- The document-uri property of the document.public TreeInfo find(DocumentURI uri)
uri
- The document-uri property of the document.public java.lang.String getDocumentURI(NodeInfo doc)
doc
- The document nodepublic boolean contains(TreeInfo doc)
doc
- the document being soughtpublic TreeInfo discard(TreeInfo doc)
doc
- the document to be discarded from the poolpublic void discardIndexes(KeyManager keyManager)
keyManager
- the keymanager from which indexes are to be releasedpublic void markUnavailable(DocumentURI uri)
uri
- the URI of the unavailable documentpublic boolean isMarkedUnavailable(DocumentURI uri)
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.