org.nodal.model
Interface NodeFactory

All Known Subinterfaces:
MapNode.Editor, NodeContent.Editor, RecordNode.Editor, SequenceNode.Editor
All Known Implementing Classes:
BareContent.Editor

public interface NodeFactory

Interface for creating new Nodes.

This interface is extended in contexts from which new Nodes may be created, namelu NodeEditor and Repository.

Author:
Lee Iverson

Method Summary
 NodeContent.Editor cloneNode(Node node)
          Create a clone of an existing Node using this factory as context.
 NodeContent.Editor cloneNode(Node node, Node context)
          Create a clone of an existing Node.
 NodeContent.Editor createNode(NodeType type)
          Create a new Node of the given type using this factory as context.
 NodeContent.Editor createNode(NodeType type, Node context)
          Create a new Node of the given type.
 

Method Detail

createNode

public NodeContent.Editor createNode(NodeType type)
Create a new Node of the given type using this factory as context.


createNode

public NodeContent.Editor createNode(NodeType type,
                                     Node context)
Create a new Node of the given type.

Parameters:
type - The NodeType that will be assigned to the new Node.
context - The Node from which context metadata wil be inherited.

cloneNode

public NodeContent.Editor cloneNode(Node node)
Create a clone of an existing Node using this factory as context.

Parameters:
node - The node to be cloned.

cloneNode

public NodeContent.Editor cloneNode(Node node,
                                    Node context)
Create a clone of an existing Node.

Parameters:
node - The node to be cloned.
context - The Node from which context metadata wil be inherited.