|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VirtualDocumentResolver
A resolver for virtual documents.
Fields of virtual type return
a list of virtual document fragments
containing a document specification (e.g., its URI) and the virtual text associated with the document. Since there are
many ways of defining the virtual document, Scan
requires
a virtual-document resolver for each virtual field: the resolver takes in the string defining a document,
and returns a document number. See URLMPHVirtualDocumentResolver
for a
natural example.
Method Summary | |
---|---|
void |
context(Document document)
Sets the context document. |
int |
numberOfDocuments()
Returns the number of documents handled by this resolver, if it is known. |
int |
resolve(CharSequence virtualDocumentSpec)
Resolves a virtual document specification. |
Method Detail |
---|
void context(Document document)
resolve(CharSequence)
will
assume the virtual-document specification was found in document
.
document
- the context document.int resolve(CharSequence virtualDocumentSpec)
Note that the resolution process is carried out in the context of the last document
passed to context(Document)
(e.g., for relative URI resolution). If context(Document)
was never called, the behaviour is undefined.
virtualDocumentSpec
- the virtual document specification.
virtualDocumentSpec
refers to, or -1 if the specification could not be resolved.int numberOfDocuments()
resolve(CharSequence)
will always return a number
smaller than the one returned by this method.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |