org.exist.dom
Class DocumentSet
java.lang.Object
org.exist.util.hashtable.AbstractHashtable
org.exist.util.hashtable.Int2ObjectHashMap
org.exist.dom.DocumentSet
- All Implemented Interfaces:
- NodeList
public class DocumentSet
- extends Int2ObjectHashMap
- implements NodeList
Manages a set of documents.
This class implements the NodeList interface for a collection of documents.
It also contains methods to retrieve the collections these documents
belong to.
- Author:
- wolf
EMPTY_DOCUMENT_SET
public static final DocumentSet EMPTY_DOCUMENT_SET
DocumentSet
public DocumentSet()
DocumentSet
public DocumentSet(int initialSize)
clear
public void clear()
- Overrides:
clear in class Int2ObjectHashMap
add
public void add(DocumentImpl doc)
add
public void add(DocumentImpl doc,
boolean checkDuplicates)
add
public void add(Node node)
addAll
public void addAll(NodeList other)
addAll
public void addAll(DBBroker broker,
Collection docs,
boolean checkPermissions)
- Fast method to add a bunch of documents from a
Java collection.
The method assumes that no duplicate entries are
in the input collection.
- Parameters:
docs -
addCollection
public void addCollection(Collection collection)
iterator
public Iterator iterator()
- Overrides:
iterator in class Int2ObjectHashMap
getCollectionIterator
public Iterator getCollectionIterator()
getLength
public int getLength()
- Specified by:
getLength in interface NodeList
getCollectionCount
public int getCollectionCount()
item
public Node item(int pos)
- Specified by:
item in interface NodeList
getDoc
public DocumentImpl getDoc(int docId)
getNames
public XmldbURI[] getNames()
intersection
public DocumentSet intersection(DocumentSet other)
union
public DocumentSet union(DocumentSet other)
contains
public boolean contains(DocumentSet other)
contains
public boolean contains(int id)
toNodeSet
public NodeSet toNodeSet()
getMinDocId
public int getMinDocId()
getMaxDocId
public int getMaxDocId()
equals
public boolean equals(Object other)
- Overrides:
equals in class Object
lock
public void lock(boolean exclusive)
throws LockException
- Throws:
LockException
unlock
public void unlock(boolean exclusive)
toString
public String toString()
- Overrides:
toString in class Object
Copyright (C) Wolfgang Meier. All rights reserved.