All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class aioli.variable.Variable

java.lang.Object
   |
   +----aioli.variable.Variable

public class Variable
extends Object
An encapsulator for Tree so modifications can be recorded


Constructor Index

 o Variable()
 o Variable(Tree)
Creates a new variable with

Method Index

 o addTool(VTool)
Adds a tool
 o change(Tree, Tree)
Replaces a tree
 o change(Tree, Tree, boolean)
Replaces a tree
 o commit()
Commits the modification, i.e.
 o delete(Tree)
Deletes a tree
 o delete(Tree, boolean)
Deletes a tree
 o deleteTool(VTool)
Removes a tool
 o getCurrentTree()
Gets the current tree, returns null if nothing is selected
 o getTool(String)
Finds a tool from its name, returns null if no tool is found.
 o insert(Tree, int, Tree)
Inserts an element in a tree
 o insert(Tree, int, Tree, boolean)
Inserts an element in a tree
 o insert(Tree, Move, Tree)
Inserts an element in a tree
 o insert(Tree, Move, Tree, boolean)
Inserts an element in a tree
 o insert(Tree, String, Tree)
Inserts an element in a tree
 o insert(Tree, String, Tree, boolean)
Inserts an element in a tree
 o reset()
 o root()
Returns the the root of the variable.
 o setRoot(Tree)
 o updateCurrentSelection(IPath)
Updates the current selection
 o updateCurrentSelection(IPath, boolean)
Updates the current selection
 o updateCurrentSelection(Tree)
Updates the current selection
 o updateCurrentSelection(Tree, boolean)
Updates the current selection
 o write(String, OutputStream, int)
Writes a file using a ppml specification

Constructors

 o Variable
 public Variable(Tree tree)
Creates a new variable with

Parameters:
tree - the root of the variable.
 o Variable
 public Variable()

Methods

 o reset
 public void reset()
 o root
 public Tree root()
Returns the the root of the variable.

 o setRoot
 public void setRoot(Tree tree)
 o insert
 public final void insert(Tree father,
                          int n,
                          Tree son)
Inserts an element in a tree

Parameters:
father - the tree to be inserted
n - the rank of the insertion
son - the tree to insert
 o insert
 public void insert(Tree father,
                    int n,
                    Tree son,
                    boolean b)
Inserts an element in a tree

Parameters:
father - the tree to be inserted
n - the rank of the insertion
son - the tree to insert
b - a boolean that says whether to propage the modif to the tools
 o insert
 public final void insert(Tree father,
                          String a,
                          Tree son)
Inserts an element in a tree

Parameters:
father - the tree to be inserted
a - the name of the annotation where to insert
son - the tree to insert
 o insert
 public void insert(Tree father,
                    String a,
                    Tree son,
                    boolean b)
Inserts an element in a tree

Parameters:
father - the tree to be inserted
a - the name of the annotation where to insert
son - the tree to insert
b - a boolean that says whether to propage the modif to the tools
 o insert
 public final void insert(Tree father,
                          Move m,
                          Tree son)
Inserts an element in a tree

Parameters:
father - the tree to be inserted
m - the move of the insertion
son - the tree to insert
 o insert
 public void insert(Tree father,
                    Move m,
                    Tree son,
                    boolean b)
Inserts an element in a tree

Parameters:
father - the tree to be inserted
m - the move of the insertion
son - the tree to insert
b - a boolean that says whether to propage the modif to the tools
 o delete
 public final void delete(Tree tree)
Deletes a tree

Parameters:
tree - the tree to delete
 o delete
 public void delete(Tree tree,
                    boolean b)
Deletes a tree

Parameters:
tree - the tree to delete
b - a boolean that says whether to propage the modif to the tools
 o change
 public final void change(Tree oldtree,
                          Tree newtree)
Replaces a tree

Parameters:
tree - the tree to be changed
newtree - the new tree
b - a boolean that says whether to propage the modif to the tools
 o change
 public void change(Tree oldtree,
                    Tree newtree,
                    boolean b)
Replaces a tree

Parameters:
tree - the tree to be changed
newtree - the newtree
b - a boolean that says whether to propage the modif to the tools
 o updateCurrentSelection
 public void updateCurrentSelection(Tree tree)
Updates the current selection

Parameters:
tree - the tree to select
 o updateCurrentSelection
 public void updateCurrentSelection(Tree tree,
                                    boolean b)
Updates the current selection

Parameters:
tree - the tree to select
b - a boolean that says whether to propage the modif to the tools
 o updateCurrentSelection
 public void updateCurrentSelection(IPath path)
Updates the current selection

Parameters:
path - the path of the selection
 o updateCurrentSelection
 public void updateCurrentSelection(IPath path,
                                    boolean b)
Updates the current selection

Parameters:
path - the path of the selection
b - a boolean that says whether to propage the modif to the tools
 o getCurrentTree
 public Tree getCurrentTree()
Gets the current tree, returns null if nothing is selected

 o commit
 public void commit()
Commits the modification, i.e. propagate them to the tools

 o addTool
 public void addTool(VTool tool)
Adds a tool

Parameters:
tool - the tool to be added
 o deleteTool
 public void deleteTool(VTool tool)
Removes a tool

Parameters:
tool - the tool to be removed
 o getTool
 public VTool getTool(String name)
Finds a tool from its name, returns null if no tool is found.

Parameters:
name - the name of the tool to be found
 o write
 public void write(String ppml,
                   OutputStream os,
                   int width)
Writes a file using a ppml specification

Parameters:
ppml - the name of the ppml to be used
os - the stream to be used
width - the number of character per line

All Packages  Class Hierarchy  This Package  Previous  Next  Index