public Set getMembers() throws DAVException {

        // Query the DAV:resource-type property to depth one.
        Collection querySet = new Vector();
        querySet.add(DAV_RESOURCE_TYPE);
        URLTable resourceTable = getProperties(querySet, IContext.DEPTH_ONE);

        // Create a collection for the reply, and remove
        // ourselves from the answer.
        Set reply = new HashSet();
        try {
            resourceTable.remove(locator.getResourceURL());
        } catch (MalformedURLException exception) {
            throw new DAVException(Policy.bind("exception.malformedLocator")); //$NON-NLS-1$
        }

        // The keys of the result correspond to the receiver's internal members.
        Enumeration resourceNameEnum = resourceTable.keys();
        while (resourceNameEnum.hasMoreElements()) {
            URL url = (URL) resourceNameEnum.nextElement();

            // Get the props for that resource
            Hashtable propertyTable = (Hashtable) resourceTable.get(url);
            Assert.isNotNull(propertyTable);
            PropertyStatus propertyStatus = (PropertyStatus) propertyTable.get(DAV_RESOURCE_TYPE);
            Assert.isNotNull(propertyStatus);

            // If we have a DAV:collection element, then create a collection handle,
            // all other resource types are created as regular resource handles.
            ILocator newLocator = davClient.getDAVFactory().newLocator(url.toString());
            Element property = propertyStatus.getProperty();
            try {
                if (ElementEditor.hasChild(property, DAV_COLLECTION_RESOURCE_TYPE))
                    reply.add(new CollectionHandle(davClient, newLocator));
                else
                    reply.add(new ResourceHandle(davClient, newLocator));
            } catch (MalformedElementException exception) {
                throw new SystemException(exception);
            }
        } // end-while

        return reply;
    }
public Set getMembers() throws DAVException {

        
        Collection querySet = new Vector();
        querySet.add(DAV_RESOURCE_TYPE);
        URLTable resourceTable = getProperties(querySet, IContext.DEPTH_ONE);

        
        
        Set reply = new HashSet();
        try {
            resourceTable.remove(locator.getResourceURL());
        } catch (MalformedURLException exception) {
            throw new DAVException(Policy.bind("exception.malformedLocator")); 
        }

        
        Enumeration resourceNameEnum = resourceTable.keys();
        while (resourceNameEnum.hasMoreElements()) {
            URL url = (URL) resourceNameEnum.nextElement();

            
            Hashtable propertyTable = (Hashtable) resourceTable.get(url);
            Assert.isNotNull(propertyTable);
            PropertyStatus propertyStatus = (PropertyStatus) propertyTable.get(DAV_RESOURCE_TYPE);
            Assert.isNotNull(propertyStatus);

            
            
            ILocator newLocator = davClient.getDAVFactory().newLocator(url.toString());
            Element property = propertyStatus.getProperty();
            try {
                if (ElementEditor.hasChild(property, DAV_COLLECTION_RESOURCE_TYPE))
                    reply.add(new CollectionHandle(davClient, newLocator));
                else
                    reply.add(new ResourceHandle(davClient, newLocator));
            } catch (MalformedElementException exception) {
                throw new SystemException(exception);
            }
        } 

        return reply;
    }
public Set getMembers ( ) throws DAVException { // Query the DAV:resource-type property to depth one. Collection querySet = new Vector ( ) ; querySet . add ( DAV_RESOURCE_TYPE ) ; URLTable resourceTable = getProperties ( querySet , IContext . DEPTH_ONE ) ; // Create a collection for the reply, and remove // ourselves from the answer. Set reply = new HashSet ( ) ; try { resourceTable . remove ( locator . getResourceURL ( ) ) ; } catch ( MalformedURLException exception ) { throw new DAVException ( Policy . bind ( "exception.malformedLocator" ) ) ; //$NON-NLS-1$ } // The keys of the result correspond to the receiver's internal members. Enumeration resourceNameEnum = resourceTable . keys ( ) ; while ( resourceNameEnum . hasMoreElements ( ) ) { URL url = ( URL ) resourceNameEnum . nextElement ( ) ; // Get the props for that resource Hashtable propertyTable = ( Hashtable ) resourceTable . get ( url ) ; Assert . isNotNull ( propertyTable ) ; PropertyStatus propertyStatus = ( PropertyStatus ) propertyTable . get ( DAV_RESOURCE_TYPE ) ; Assert . isNotNull ( propertyStatus ) ; // If we have a DAV:collection element, then create a collection handle, // all other resource types are created as regular resource handles. ILocator newLocator = davClient . getDAVFactory ( ) . newLocator ( url . toString ( ) ) ; Element property = propertyStatus . getProperty ( ) ; try { if ( ElementEditor . hasChild ( property , DAV_COLLECTION_RESOURCE_TYPE ) ) reply . add ( new CollectionHandle ( davClient , newLocator ) ) ; else reply . add ( new ResourceHandle ( davClient , newLocator ) ) ; } catch ( MalformedElementException exception ) { throw new SystemException ( exception ) ; } } // end-while return reply ; }
Return a set of handles representing the members of this
collection.
<p>
Each member of the set will be typed to be a <code>ResourceHandle</code>
or a <code>CollectionHandle</code> depending upon whether it implements
collection semantics.  Note that workspaces will be returned as
regular collection handles and should be converted to workspace handles
if required (test using isWorkspace()).</p>

@return a <code>Set</code> of <code>ResourceHandle</code> and/or <code>
CollectionHandle</code> or an empty set if the receiver has no members.
@exception DAVException if there was a problem getting the members.
Return a set of handles representing the members of this collection . <p > Each member of the set will be typed to be a <code > ResourceHandle< / code > or a <code > CollectionHandle< / code > depending upon whether it implements collection semantics . Note that workspaces will be returned as regular collection handles and should be converted to workspace handles if required ( test using isWorkspace () ) . < / p >