code: public Node findOrCreateNode( Session session,
                                    String path,
                                    String defaultNodeType,
                                    String finalNodeType ) throws RepositoryException {
          isNotNull(session, "session");
          Node root = session.getRootNode();
          return findOrCreateNode(root, path, defaultNodeType, finalNodeType);
      }
docs: Get or create a node at the specified path.
  
  @param session the JCR session. may not be null
  @param path the path of the desired node to be found or created. may not be null
  @param defaultNodeType the default node type. may be null
  @param finalNodeType the optional final node type. may be null
  @return the existing or newly created node
  @throws RepositoryException
  @throws IllegalArgumentException if either the session or path argument is null