|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.fluent.Resource
org.exist.fluent.Folder.DocumentsFacet
public class Folder.DocumentsFacet
The immediate documents facet of a folder. Gives access to the (conceptual) set of documents contained directly in a folder. All functions will not consider documents contained in subfolders.
Nested Class Summary | |
---|---|
class |
Folder.DocumentsFacet.ListenersFacet
The facet that gives control over listeners for documents contained directly within a folder. |
Method Summary | |
---|---|
ElementBuilder<XMLDocument> |
build(Name name)
Build a new XML document in this collection, with the given relative path. |
boolean |
contains(String documentPath)
Return whether this facet's folder contains a document with the given relative path. |
void |
export(File destination)
Export the immediately contained documents to the given directory. |
Document |
get(String documentPath)
Get the contained document with the given relative path. |
Iterator<Document> |
iterator()
Return an iterator over the folder's immediate documents. |
Folder.DocumentsFacet.ListenersFacet |
listeners()
Return the facet that allows control over listenersof the folder's immediate documents. |
Document |
load(Name name,
Source.Blob source)
Create a binary document with the given relative path, takings its contents from the given source. |
XMLDocument |
load(Name name,
Source.XML source)
Create an XML document with the given relative path, takings its contents from the given source. |
QueryService |
query()
Query over the documents immediately contained in the folder, ignoring any documents in subfolders. |
int |
size()
Return the number of documents immediately contained in the folder. |
Methods inherited from class org.exist.fluent.Resource |
---|
database, namespaceBindings |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Folder.DocumentsFacet.ListenersFacet listeners()
public ElementBuilder<XMLDocument> build(Name name)
commit
commit the builder when done. If the builder doesn't commit, no document is created.
name
- the relative path to the new document
public boolean contains(String documentPath)
documentPath
- the relative path of the document to check for
true
if the folder contains a document with the given path, false
otherwisepublic XMLDocument load(Name name, Source.XML source)
name
- the desired relative path of the documentsource
- the source of XML data to read in the document contents from; the folder's namespace bindings are not applied
DatabaseException
- if anything else goes wrongpublic Document load(Name name, Source.Blob source)
name
- the desired relative path of the documentsource
- the source to read the document contents from
DatabaseException
- if anything else goes wrongpublic Document get(String documentPath)
documentPath
- the relative path of the document to find
DatabaseException
- if unable to find or access the desired documentpublic int size()
public void export(File destination) throws IOException
destination
- the destination folder to export into
IOException
- if the export failed due to an I/O errorpublic QueryService query()
query
in class Resource
public Iterator<Document> iterator()
iterator
in interface Iterable<Document>
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |