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:
- org.w3c.dom.NodeList
- public class DocumentSet
- extends Int2ObjectHashMap
- implements org.w3c.dom.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
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
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(org.w3c.dom.Node node)
addAll
public void addAll(org.w3c.dom.NodeList other)
addAll
public void addAll(DBBroker broker,
java.util.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 java.util.Iterator iterator()
- Overrides:
iterator
in class Int2ObjectHashMap
getCollectionIterator
public java.util.Iterator getCollectionIterator()
getLength
public int getLength()
- Specified by:
getLength
in interface org.w3c.dom.NodeList
getCollectionCount
public int getCollectionCount()
item
public org.w3c.dom.Node item(int pos)
- Specified by:
item
in interface org.w3c.dom.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(java.lang.Object other)
lock
public void lock(boolean exclusive)
throws LockException
- Throws:
LockException
unlock
public void unlock(boolean exclusive)
toString
public java.lang.String toString()
Copyright (C) Wolfgang Meier. All rights reserved.