All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class aioli.path.MPath

java.lang.Object
   |
   +----aioli.path.MPath

public class MPath
extends Object
Implements modification path


Variable Index

 o Change
Change tag
 o Delete
Delete tag
 o Insert
Insertion tag
 o None
No modification tag

Constructor Index

 o MPath()
Creates an empty path
 o MPath(int)
Creates an atomic path
 o MPath(int, MPath)
Creates a move path
 o MPath(int, Tree)
Creates an atomic path
 o MPath(IPath, MPath)
Creates a move path
 o MPath(Move, MPath)
Creates a move path
 o MPath(String, MPath)
Creates a move path

Method Index

 o apply(Tree)
Applies a path to a tree
 o changep()
Is it a change path?
 o copy(MPath)
Copies a path
 o deletep()
Is it a delete path?
 o down(int)
Returns the subpath correspoding to a given move
 o down(String)
Returns the subpath correspoding to a given annot
 o emptyp()
Is it an empty path?
 o getALength()
Returns the number of annotation subpaths
 o getAnnots()
Returns the annots of the path, null if it is not a annot path
 o getAPaths()
Returns the immediate annotation subpath
 o getMLength()
Returns the number of pure subpaths
 o getMoves()
Returns the move of the path, null if it is not a move path
 o getMPaths()
Returns the immediate pure subpath
 o getTree()
Gets the tree of the path
 o getType()
Gets the type of the path
 o insertp()
Is it an insertion path?
 o makeChange(Tree, Tree, Tree)
Creates a change path
 o makeDelete(Tree, Tree)
Creates a remove path
 o makeInsert(Tree, Tree, Tree, int)
Creates an insertion path
 o makeInsert(Tree, Tree, Tree, String)
Creates an insertion path
 o merge(MPath)
Merges a path
 o movep()
Is it a move path?
 o normalize()
Normalizes a path
 o rDown(int)
Returns the subpath correspoding to a given negative move
 o setTree(Tree)
Sets the tree of the path
 o setType(int)
Sets the type of the path
 o toString()
Returns a string represenation of a modification path

Variables

 o None
 public static final int None
No modification tag

 o Change
 public static final int Change
Change tag

 o Insert
 public static final int Insert
Insertion tag

 o Delete
 public static final int Delete
Delete tag

Constructors

 o MPath
 public MPath()
Creates an empty path

 o MPath
 public MPath(int type)
Creates an atomic path

Parameters:
type - the tag of the path
 o MPath
 public MPath(int type,
              Tree tree)
Creates an atomic path

Parameters:
type - the tag of the path
tree - the tree of the path
 o MPath
 public MPath(int rank,
              MPath path)
Creates a move path

Parameters:
rank - the move
path - the subpath
 o MPath
 public MPath(String annot,
              MPath path)
Creates a move path

Parameters:
annot - the annotation
path - the subpath
 o MPath
 public MPath(Move m,
              MPath path)
Creates a move path

Parameters:
rank - the move
path - the subpath
 o MPath
 public MPath(IPath path,
              MPath endp)
Creates a move path

Parameters:
path - the conductor of the path
endp - the subpath

Methods

 o insertp
 public boolean insertp()
Is it an insertion path?

 o changep
 public boolean changep()
Is it a change path?

 o deletep
 public boolean deletep()
Is it a delete path?

 o movep
 public boolean movep()
Is it a move path?

 o merge
 public void merge(MPath path)
Merges a path

Parameters:
path - the path to be added
 o normalize
 public void normalize()
Normalizes a path

 o makeChange
 public static MPath makeChange(Tree root,
                                Tree tree,
                                Tree ntree)
Creates a change path

Parameters:
root - the root of the tree
tree - the tree to change
ntree - the new tree
 o makeInsert
 public static MPath makeInsert(Tree root,
                                Tree tree,
                                Tree son,
                                int n)
Creates an insertion path

Parameters:
root - the root of the tree
tree - the tree where to insert
son - the tree to insert
n - the rank where to do the insertion
 o makeInsert
 public static MPath makeInsert(Tree root,
                                Tree tree,
                                Tree son,
                                String a)
Creates an insertion path

Parameters:
root - the root of the tree
tree - the tree where to insert
son - the tree to insert
a - the annotation name where to do the insertion
 o makeDelete
 public static MPath makeDelete(Tree root,
                                Tree tree)
Creates a remove path

Parameters:
root - the root of the tree
tree - the tree to delete
 o emptyp
 public boolean emptyp()
Is it an empty path?

 o getMLength
 public int getMLength()
Returns the number of pure subpaths

 o getALength
 public int getALength()
Returns the number of annotation subpaths

 o getMoves
 public int[] getMoves()
Returns the move of the path, null if it is not a move path

 o getAnnots
 public String[] getAnnots()
Returns the annots of the path, null if it is not a annot path

 o getMPaths
 public MPath[] getMPaths()
Returns the immediate pure subpath

 o getAPaths
 public MPath[] getAPaths()
Returns the immediate annotation subpath

 o setType
 public void setType(int type)
Sets the type of the path

Parameters:
type - the new type
 o getType
 public int getType()
Gets the type of the path

 o setTree
 public void setTree(Tree tree)
Sets the tree of the path

Parameters:
tree - the new tree
 o getTree
 public Tree getTree()
Gets the tree of the path

 o down
 public MPath down(int move)
Returns the subpath correspoding to a given move

Parameters:
move - the move relative to the new tree
 o down
 public MPath down(String annot)
Returns the subpath correspoding to a given annot

Parameters:
annot - the annotation name
 o rDown
 public MPath rDown(int move)
Returns the subpath correspoding to a given negative move

Parameters:
move - the negative move, relative to the new tree
 o copy
 public void copy(MPath path)
Copies a path

Parameters:
path - the path to be copied
 o apply
 public Tree apply(Tree tree)
Applies a path to a tree

Parameters:
tree - the tree to which the path is applied
 o toString
 public String toString()
Returns a string represenation of a modification path

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index