* @param path the path
* @return the node
*/
@NotNull
public Node getNode( @NotNull Path path ) {
Node current = getRootNode();
for ( String element : path.getElements() ) {
try {
current = findChild( current, element );
} catch ( ChildNotFoundException ignore ) {
DefaultNode created = new DefaultNode( element );
current.addChild( created );
current = created;
}
}
return current;
}