@Override
  public InternalResource getParentResource(InternalResource resource)
  {
    String parentPath = PathUtils.getParentPath(resource.getPath());

    if(parentPath.equals(resource.getPath()))
      // we are at the root...
      return resource;
    else
      return doBuildResource(parentPath);
  }
@ Override public InternalResource getParentResource ( InternalResource resource ) { String parentPath = PathUtils . getParentPath ( resource . getPath ( ) ) ; if ( parentPath . equals ( resource . getPath ( ) ) ) return resource ; else return doBuildResource ( parentPath ) ; }
@param resource
@return the parent of a resource