net.sourceforge.fluxion.runcible.graph.command
Class DuplicateSubtreeCommand
java.lang.Object
net.sourceforge.fluxion.runcible.graph.command.DuplicateSubtreeCommand
- All Implemented Interfaces:
- ChangeCommand
public class DuplicateSubtreeCommand
- extends java.lang.Object
- implements ChangeCommand
This command will replicate a subtree in the source version of an OWL Mapping
graph. In other words, it can only accept Nodes of a few types... namely,
MemberOfNode
s, RestrictedNode
s, WalkedToObjectNode
s, WalkedToDataNode
s and RestrictedNode
s. Eventually,
and if this proves useful, I may provide a method on OWLMappingNodes to
duplicate()
them.
The user must replicate the Node that is being duplicated and altered. I see
the main usage of this to select a restricted node, alter one of the
restrictions (selecting a different set of rows from a table) but then
duplicating the relationships which will be standard across all rows of the
table. To achieve this, the client will create a new node with the altered
restriction, then supply the one being copied and the new node. This method
then attaches this new node and replicates the entire subtree, attaching the
supplied prefix to all nodes in the tree.
- Version:
- 1.0
- Author:
- Tony Burdett
Method Summary |
void |
execute()
Execute this command |
void |
undo()
Undo this command |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DuplicateSubtreeCommand
public DuplicateSubtreeCommand(Graph graph,
Node duplicating,
Node duplicate,
java.lang.String prefix)
execute
public void execute()
- Description copied from interface:
ChangeCommand
- Execute this command
- Specified by:
execute
in interface ChangeCommand
undo
public void undo()
- Description copied from interface:
ChangeCommand
- Undo this command
- Specified by:
undo
in interface ChangeCommand
Copyright © 2010. All Rights Reserved.