Xindice API
version 1.1

org.apache.xindice.client.xmldb
Class ResourceSetImpl

java.lang.Object
  |
  +--org.apache.xindice.client.xmldb.ResourceSetImpl
All Implemented Interfaces:
org.xmldb.api.base.ResourceSet

public class ResourceSetImpl
extends Object
implements org.xmldb.api.base.ResourceSet

ResourceSet contains a set of resources as returned from a query or other operation.

Version:
$Revision: 518460 $, $Date: 2007-03-14 23:47:19 -0400 (Wed, 14 Mar 2007) $

Field Summary
protected  org.xmldb.api.base.Collection collection
           
static String RESOURCE_SET_NS
           
protected  List resources
           
 
Constructor Summary
ResourceSetImpl(org.xmldb.api.base.Collection collection, org.w3c.dom.Document doc)
           
ResourceSetImpl(org.xmldb.api.base.Collection collection, SymbolTable symbols, byte[] bytes)
           
 
Method Summary
 void addResource(org.xmldb.api.base.Resource res)
          Adds a Resource instance to the set.
 void clear()
          Removes all Resource instances from the set.
 org.xmldb.api.base.ResourceIterator getIterator()
          Returns an iterator over all Resource instances stored in the set.
 org.xmldb.api.base.Resource getMembersAsResource()
          Returns a Resource containing an XML representation of all resources stored in the set.
 org.xmldb.api.base.Resource getResource(long index)
          Returns the Resource instance stored at the index specified by index.
 long getSize()
          Returns the number of resources contained in the set.
protected  void initResources(org.w3c.dom.Document document)
           
 void removeResource(long index)
          Removes the Resource located at index from the set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE_SET_NS

public static final String RESOURCE_SET_NS

resources

protected List resources

collection

protected org.xmldb.api.base.Collection collection
Constructor Detail

ResourceSetImpl

public ResourceSetImpl(org.xmldb.api.base.Collection collection,
                       org.w3c.dom.Document doc)
                throws org.xmldb.api.base.XMLDBException

ResourceSetImpl

public ResourceSetImpl(org.xmldb.api.base.Collection collection,
                       SymbolTable symbols,
                       byte[] bytes)
                throws org.xmldb.api.base.XMLDBException
Method Detail

initResources

protected void initResources(org.w3c.dom.Document document)
                      throws org.xmldb.api.base.XMLDBException

getIterator

public org.xmldb.api.base.ResourceIterator getIterator()
                                                throws org.xmldb.api.base.XMLDBException
Returns an iterator over all Resource instances stored in the set.
Specified by:
getIterator in interface org.xmldb.api.base.ResourceSet
Returns:
a ResourceIterator over all Resource instances in the set.
Throws:
org.xmldb.api.base.XMLDBException -  

getResource

public org.xmldb.api.base.Resource getResource(long index)
                                        throws org.xmldb.api.base.XMLDBException
Returns the Resource instance stored at the index specified by index.
Specified by:
getResource in interface org.xmldb.api.base.ResourceSet
Parameters:
index - the index of the resource to retrieve.
Returns:
the Resource instance.
Throws:
org.xmldb.api.base.XMLDBException -  

getSize

public long getSize()
             throws org.xmldb.api.base.XMLDBException
Returns the number of resources contained in the set.
Specified by:
getSize in interface org.xmldb.api.base.ResourceSet
Returns:
the number of Resource instances in the set.
Throws:
org.xmldb.api.base.XMLDBException -  

addResource

public void addResource(org.xmldb.api.base.Resource res)
                 throws org.xmldb.api.base.XMLDBException
Adds a Resource instance to the set.
Specified by:
addResource in interface org.xmldb.api.base.ResourceSet
Throws:
org.xmldb.api.base.XMLDBException -  

clear

public void clear()
           throws org.xmldb.api.base.XMLDBException
Removes all Resource instances from the set.
Specified by:
clear in interface org.xmldb.api.base.ResourceSet
Throws:
org.xmldb.api.base.XMLDBException -  

removeResource

public void removeResource(long index)
                    throws org.xmldb.api.base.XMLDBException
Removes the Resource located at index from the set.
Specified by:
removeResource in interface org.xmldb.api.base.ResourceSet
Parameters:
index - The index of the Resource instance to remove.
Throws:
org.xmldb.api.base.XMLDBException -  

getMembersAsResource

public org.xmldb.api.base.Resource getMembersAsResource()
                                                 throws org.xmldb.api.base.XMLDBException
Returns a Resource containing an XML representation of all resources stored in the set.
Specified by:
getMembersAsResource in interface org.xmldb.api.base.ResourceSet
Returns:
A Resource instance containing an XML representation of all set members.
Throws:
org.xmldb.api.base.XMLDBException -  

Xindice API
version 1.1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.