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
-
Change
- Change tag
-
Delete
- Delete tag
-
Insert
- Insertion tag
-
None
- No modification tag
-
MPath()
- Creates an empty path
-
MPath(int)
- Creates an atomic path
-
MPath(int, MPath)
- Creates a move path
-
MPath(int, Tree)
- Creates an atomic path
-
MPath(IPath, MPath)
- Creates a move path
-
MPath(Move, MPath)
- Creates a move path
-
MPath(String, MPath)
- Creates a move path
-
apply(Tree)
- Applies a path to a tree
-
changep()
- Is it a change path?
-
copy(MPath)
- Copies a path
-
deletep()
- Is it a delete path?
-
down(int)
- Returns the subpath correspoding to a given move
-
down(String)
- Returns the subpath correspoding to a given annot
-
emptyp()
- Is it an empty path?
-
getALength()
- Returns the number of annotation subpaths
-
getAnnots()
- Returns the annots of the path, null if it is not a annot path
-
getAPaths()
- Returns the immediate annotation subpath
-
getMLength()
- Returns the number of pure subpaths
-
getMoves()
- Returns the move of the path, null if it is not a move path
-
getMPaths()
- Returns the immediate pure subpath
-
getTree()
- Gets the tree of the path
-
getType()
- Gets the type of the path
-
insertp()
- Is it an insertion path?
-
makeChange(Tree, Tree, Tree)
-
Creates a change path
-
makeDelete(Tree, Tree)
-
Creates a remove path
-
makeInsert(Tree, Tree, Tree, int)
-
Creates an insertion path
-
makeInsert(Tree, Tree, Tree, String)
-
Creates an insertion path
-
merge(MPath)
- Merges a path
-
movep()
- Is it a move path?
-
normalize()
- Normalizes a path
-
rDown(int)
- Returns the subpath correspoding to a given negative move
-
setTree(Tree)
- Sets the tree of the path
-
setType(int)
- Sets the type of the path
-
toString()
- Returns a string represenation of a modification path
None
public static final int None
- No modification tag
Change
public static final int Change
- Change tag
Insert
public static final int Insert
- Insertion tag
Delete
public static final int Delete
- Delete tag
MPath
public MPath()
- Creates an empty path
MPath
public MPath(int type)
- Creates an atomic path
- Parameters:
- type - the tag of the path
MPath
public MPath(int type,
Tree tree)
- Creates an atomic path
- Parameters:
- type - the tag of the path
- tree - the tree of the path
MPath
public MPath(int rank,
MPath path)
- Creates a move path
- Parameters:
- rank - the move
- path - the subpath
MPath
public MPath(String annot,
MPath path)
- Creates a move path
- Parameters:
- annot - the annotation
- path - the subpath
MPath
public MPath(Move m,
MPath path)
- Creates a move path
- Parameters:
- rank - the move
- path - the subpath
MPath
public MPath(IPath path,
MPath endp)
- Creates a move path
- Parameters:
- path - the conductor of the path
- endp - the subpath
insertp
public boolean insertp()
- Is it an insertion path?
changep
public boolean changep()
- Is it a change path?
deletep
public boolean deletep()
- Is it a delete path?
movep
public boolean movep()
- Is it a move path?
merge
public void merge(MPath path)
- Merges a path
- Parameters:
- path - the path to be added
normalize
public void normalize()
- Normalizes a path
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
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
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
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
emptyp
public boolean emptyp()
- Is it an empty path?
getMLength
public int getMLength()
- Returns the number of pure subpaths
getALength
public int getALength()
- Returns the number of annotation subpaths
getMoves
public int[] getMoves()
- Returns the move of the path, null if it is not a move path
getAnnots
public String[] getAnnots()
- Returns the annots of the path, null if it is not a annot path
getMPaths
public MPath[] getMPaths()
- Returns the immediate pure subpath
getAPaths
public MPath[] getAPaths()
- Returns the immediate annotation subpath
setType
public void setType(int type)
- Sets the type of the path
- Parameters:
- type - the new type
getType
public int getType()
- Gets the type of the path
setTree
public void setTree(Tree tree)
- Sets the tree of the path
- Parameters:
- tree - the new tree
getTree
public Tree getTree()
- Gets the tree of the path
down
public MPath down(int move)
- Returns the subpath correspoding to a given move
- Parameters:
- move - the move relative to the new tree
down
public MPath down(String annot)
- Returns the subpath correspoding to a given annot
- Parameters:
- annot - the annotation name
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
copy
public void copy(MPath path)
- Copies a path
- Parameters:
- path - the path to be copied
apply
public Tree apply(Tree tree)
- Applies a path to a tree
- Parameters:
- tree - the tree to which the path is applied
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