/** * Returns the parent resource of this resource. * <p> * This method is implemented calling the {@link ResourceResolver#getParent(Resource)} method. */ public Resource getParent() { return getResourceResolver().getParent(this); }
/** * Returns an iterator on the direct child resources. * <p> * This method is implemented calling the * {@link ResourceResolver#listChildren(Resource)} method. * <p> * Implementations should not generally overwrite this method without * calling this base class implementation. */ public Iterator<Resource> listChildren() { return getResourceResolver().listChildren(this); }
/** * Checks to see if there are direct children of this resource by invoking * {@link ResourceResolver#hasChildren(Resource)}. */ public boolean hasChildren() { return getResourceResolver().hasChildren(this); }
/** * Returns <code>true</code> if this resource is of the given resource type * or if any of the super resource types equals the given resource type. * <p> * This method delegates to {@link ResourceResolver#isResourceType(Resource, String)} */ public boolean isResourceType(final String resourceType) { return this.getResourceResolver().isResourceType(this, resourceType); }
/** * Returns the indicated child of this resource. * <p> * This method is implemented calling the * {@link ResourceResolver#getResource(Resource, String)} method. As such * the <code>relPath</code> argument may even be an absolute path or a path * containing relative path segments <code>.</code> (current resource) and * <code>..</code> (parent resource). * <p> * Implementations should not generally overwrite this method without * calling this base class implementation. */ public Resource getChild(String relPath) { return getResourceResolver().getResource(this, relPath); }