package org.jboss.shrinkwrap.api;

import java.util.Set;

import org.jboss.shrinkwrap.api.asset.Asset;

Represents an entry inside an Archive. Indicates an empty directory if getAsset() returns null. May be the parent of child Nodes. Lives inside the Archive under the context denoted by getPath().
Author:German Escobar
/** * Represents an entry inside an {@link Archive}. Indicates an empty directory if {@link Node#getAsset()} returns null. May be * the parent of child {@link Node}s. Lives inside the {@link Archive} under the context denoted by * {@link Node#getPath()}. * * @author <a href="mailto:german.escobarc@gmail.com">German Escobar</a> */
public interface Node {
Returns:The Asset this node holds, null if it is an empty directory
/** * @return The {@link Asset} this node holds, null if it is an empty directory */
Asset getAsset();
Returns:The child nodes of this node or, an empty set if it has no children or holds an asset. This method will never return null. The returned Set will be an immutable view.
/** * @return The child nodes of this node or, an empty set if it has no children or holds an asset. This method will * never return null. The returned Set will be an immutable view. */
Set<Node> getChildren();
Returns:The path where this node is placed within the Archive
/** * @return The path where this node is placed within the {@link Archive} */
ArchivePath getPath(); }