// Path: spi/src/main/java/com/redhat/ceylon/cmr/spi/Node.java
// public interface Node {
//     String getLabel();
// 
//     <T> T getValue(Class<T> valueType);
// 
//     Node getChild(String label);
// 
//     Iterable<? extends Node> getChildren();
// 
//     boolean hasBinaries();
// 
//     /**
//      * @deprecated see getSizedInputStream
//      */
//     InputStream getInputStream() throws IOException;
// 
//     SizedInputStream getSizedInputStream() throws IOException;
// 
//     <T> T getContent(Class<T> contentType) throws IOException;
// 
//     long getLastModified() throws IOException;
// 
//     long getSize() throws IOException;
// 
//     Node getParent(String label);
// 
//     Iterable<? extends Node> getParents();
// 
//     boolean isRemote();
// 
//     String getDisplayString();
// 
//     String getStoreDisplayString();
// }


import java.io.File;
import java.util.LinkedList;
import java.util.List;
import com.redhat.ceylon.cmr.api.CmrRepository;
import com.redhat.ceylon.cmr.spi.Node;
import com.redhat.ceylon.cmr.spi.OpenNode;

    /**
     * Get full node path; using default File.separator
     *
     * @param node the node
     * @return full path
     */
    public static String getFullPath(Node node) {
        return getFullPath(node, File.separator);
    }

    /**
     * Get full node path.
     *
     * @param node      the node
     * @param separator the separator
     * @return full path
     */
    public static String getFullPath(Node node, String separator) {
        final StringBuilder path = new StringBuilder();
        buildFullPath(node, path, separator, false);
        return path.toString();
    }

    /**
     * Return path queue, with root being on top.
     *
     * @param node the node
     * @return paths queue
     */
// Path: spi/src/main/java/com/redhat/ceylon/cmr/spi/Node.java
// public interface Node {
//     String getLabel();
// 
//     <T> T getValue(Class<T> valueType);
// 
//     Node getChild(String label);
// 
//     Iterable<? extends Node> getChildren();
// 
//     boolean hasBinaries();
// 
//     /**
//      * @deprecated see getSizedInputStream
//      */
//     InputStream getInputStream() throws IOException;
// 
//     SizedInputStream getSizedInputStream() throws IOException;
// 
//     <T> T getContent(Class<T> contentType) throws IOException;
// 
//     long getLastModified() throws IOException;
// 
//     long getSize() throws IOException;
// 
//     Node getParent(String label);
// 
//     Iterable<? extends Node> getParents();
// 
//     boolean isRemote();
// 
//     String getDisplayString();
// 
//     String getStoreDisplayString();
// }


// Path: impl/src/main/java/com/redhat/ceylon/cmr/impl/NodeUtils.java
import java.io.File;
import java.util.LinkedList;
import java.util.List;
import com.redhat.ceylon.cmr.api.CmrRepository;
import com.redhat.ceylon.cmr.spi.Node;
import com.redhat.ceylon.cmr.spi.OpenNode;


    /**
     * Get full node path; using default File.separator
     *
     * @param node the node
     * @return full path
     */
    public static String getFullPath(Node node) {
        return getFullPath(node, File.separator);
    }

    /**
     * Get full node path.
     *
     * @param node      the node
     * @param separator the separator
     * @return full path
     */
    public static String getFullPath(Node node, String separator) {
        final StringBuilder path = new StringBuilder();
        buildFullPath(node, path, separator, false);
        return path.toString();
    }

    /**
     * Return path queue, with root being on top.
     *
     * @param node the node
     * @return paths queue
     */
    public static List<String> toLabelPath(Node node) {