public List<Resource> getResources() throws RepositoryException, IllegalResourceTypeException
   {
      NodeIterator children = node.getNodes();
      List<Resource> resources = new ArrayList<Resource>();
      while (children.hasNext())
      {
         Node node = children.nextNode();
         String name = node.getName() + (node.getIndex() > 1 ? "[" + node.getIndex() + "]" : "");
         if (ResourceUtil.isVersioned(node))
         {
            if (ResourceUtil.isFile(node))
            {
               resources.add(new VersionedFileResource(childURI(name), node, namespaceContext));
            }
            else
            {
               resources.add(new VersionedCollectionResource(childURI(name), node, namespaceContext));
            }
         }
         else
         {
            if (ResourceUtil.isFile(node))
            {
               resources.add(new FileResource(childURI(name), node, namespaceContext));
            }
            else
            {
               resources.add(new CollectionResource(childURI(name), node, namespaceContext));
            }
         }

      }
      return resources;
   }
public List < Resource > getResources ( ) throws RepositoryException , IllegalResourceTypeException { NodeIterator children = node . getNodes ( ) ; List < Resource > resources = new ArrayList < Resource > ( ) ; while ( children . hasNext ( ) ) { Node node = children . nextNode ( ) ; String name = node . getName ( ) + ( node . getIndex ( ) > 1 ? "[" + node . getIndex ( ) + "]" : "" ) ; if ( ResourceUtil . isVersioned ( node ) ) { if ( ResourceUtil . isFile ( node ) ) { resources . add ( new VersionedFileResource ( childURI ( name ) , node , namespaceContext ) ) ; } else { resources . add ( new VersionedCollectionResource ( childURI ( name ) , node , namespaceContext ) ) ; } } else { if ( ResourceUtil . isFile ( node ) ) { resources . add ( new FileResource ( childURI ( name ) , node , namespaceContext ) ) ; } else { resources . add ( new CollectionResource ( childURI ( name ) , node , namespaceContext ) ) ; } } } return resources ; }
@return the list of all child resources
@throws RepositoryException {@link RepositoryException}
@throws IllegalResourceTypeException {@link IllegalResourceTypeException}