/** * Checks whether a node at the given relative path exists. * <p> * The default implementation looks up the node using * {@link Node#getNode(String)} and returns <code>true</code> if * a {@link PathNotFoundException} is not thrown. * * @param relPath relative path * @return <code>true</code> if a node exists at the given path, * <code>false</code> otherwise * @throws RepositoryException if an error occurs */ public boolean hasNode(String relPath) throws RepositoryException { try { getNode(relPath); return true; } catch (PathNotFoundException e) { return false; } }
/** * Checks whether a node at the given relative path exists. * <p> * The default implementation looks up the node using * {@link Node#getNode(String)} and returns <code>true</code> if * a {@link PathNotFoundException} is not thrown. * * @param relPath relative path * @return <code>true</code> if a node exists at the given path, * <code>false</code> otherwise * @throws RepositoryException if an error occurs */ public boolean hasNode(String relPath) throws RepositoryException { try { getNode(relPath); return true; } catch (PathNotFoundException e) { return false; } }
/** * Checks whether a node at the given relative path exists. * <p> * The default implementation looks up the node using * {@link Node#getNode(String)} and returns <code>true</code> if * a {@link PathNotFoundException} is not thrown. * * @param relPath relative path * @return <code>true</code> if a node exists at the given path, * <code>false</code> otherwise * @throws RepositoryException if an error occurs */ public boolean hasNode(String relPath) throws RepositoryException { try { getNode(relPath); return true; } catch (PathNotFoundException e) { return false; } }
/** * Checks whether a node at the given relative path exists. * <p> * The default implementation looks up the node using * {@link Node#getNode(String)} and returns <code>true</code> if * a {@link PathNotFoundException} is not thrown. * * @param relPath relative path * @return <code>true</code> if a node exists at the given path, * <code>false</code> otherwise * @throws RepositoryException if an error occurs */ public boolean hasNode(String relPath) throws RepositoryException { try { getNode(relPath); return true; } catch (PathNotFoundException e) { return false; } }
relPath = relPath.substring(1); } else if (slash > 0) { node = getNode(relPath.substring(0, slash)); relPath = relPath.substring(slash + 1);
relPath = relPath.substring(1); } else if (slash > 0) { node = getNode(relPath.substring(0, slash)); relPath = relPath.substring(slash + 1);
relPath = relPath.substring(1); } else if (slash > 0) { node = getNode(relPath.substring(0, slash)); relPath = relPath.substring(slash + 1);
relPath = relPath.substring(1); } else if (slash > 0) { node = getNode(relPath.substring(0, slash)); relPath = relPath.substring(slash + 1);