code: public Node getNode( Node node,
                           String relativePath,
                           boolean required ) throws RepositoryException {
          isNotNull(node, "node");
          isNotNull(relativePath, "relativePath");
          Node result = null;
          try {
              result = node.getNode(relativePath);
          } catch (PathNotFoundException e) {
              if (required) {
                  throw e;
              }
          }
  
          return result;
      }
docs: Get the node under a specified node at a location defined by the specified relative path. If node is required, then a
  problem is created and added to the Problems list.
  
  @param node a parent node from which to obtain a node relative to. may not be null
  @param relativePath the path of the desired node. may not be null
  @param required true if node is required to exist under the given node.
  @return the node located relative the the input node
  @throws RepositoryException
  @throws IllegalArgumentException if the node, relativePath or problems argument is null