net.obsearch.example.ted
Class SliceASTForStandardTed

java.lang.Object
  extended by antlr.BaseAST
      extended by net.obsearch.example.ted.SliceAST
          extended by net.obsearch.example.ted.SliceASTIds
              extended by net.obsearch.example.ted.SliceASTForStandardTed
All Implemented Interfaces:
antlr.collections.AST, java.io.Serializable

public class SliceASTForStandardTed
extends SliceASTIds

This class provides extra functionality required by tree edit distance algorithms and the like

Author:
amuller
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.obsearch.example.ted.SliceAST
decendants, text
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
SliceASTForStandardTed()
           
SliceASTForStandardTed(int t, java.lang.String txt)
           
SliceASTForStandardTed(SliceASTForStandardTed t)
           
SliceASTForStandardTed(antlr.Token tok)
           
 
Method Summary
protected  int detailedTreeAux(antlr.collections.AST t)
          Is tree rooted at 'this' equal to 't'? The siblings of 'this' are ignored.
 int detailedTreeComparison(antlr.collections.AST t)
           
 boolean equalsTree(antlr.collections.AST t)
           
 SliceASTForStandardTed findFirstNodeThatMatches(java.lang.String label)
           
 int getDescendants()
           
 SliceASTForStandardTed getHeavy()
           
 SliceASTForStandardTed getLeftmostChild()
           
 int getSize()
           
 java.lang.String getText()
          Get the token text for this node
 int getType()
          Get the token type for this node
 void initialize(antlr.collections.AST t)
           
 void initialize(int t, java.lang.String txt)
           
 void initialize(antlr.Token tok)
           
 java.lang.String prettyPrint()
          Print out a child-sibling tree in LISP notation
 void setText(java.lang.String text_)
          Set the token text for this node
 void setType(int ttype_)
          Set the token type for this node
 java.util.LinkedList<SliceASTForStandardTed> topLight()
          toplight never
protected  void topLightAux(java.util.LinkedList<SliceASTForStandardTed> m)
           
 int updateDecendantInformation()
           
 void updateHeavyPathInformation()
           
 
Methods inherited from class net.obsearch.example.ted.SliceASTIds
containedNodes, containsNode, getId, updateContains, updateContainsAux, updateIdInfo, updateIdInfoAux
 
Methods inherited from class net.obsearch.example.ted.SliceAST
depthFirst, depthFirstAux, toFuriaChanTreeAux, toQ
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTreePartial, findAll, findAllPartial, getColumn, getFirstChild, getLine, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SliceASTForStandardTed

public SliceASTForStandardTed()

SliceASTForStandardTed

public SliceASTForStandardTed(int t,
                              java.lang.String txt)

SliceASTForStandardTed

public SliceASTForStandardTed(antlr.Token tok)

SliceASTForStandardTed

public SliceASTForStandardTed(SliceASTForStandardTed t)
Method Detail

updateDecendantInformation

public int updateDecendantInformation()
Overrides:
updateDecendantInformation in class SliceAST

getDescendants

public int getDescendants()
Overrides:
getDescendants in class SliceAST

getSize

public int getSize()
Overrides:
getSize in class SliceAST

topLight

public java.util.LinkedList<SliceASTForStandardTed> topLight()
toplight never

Returns:

topLightAux

protected void topLightAux(java.util.LinkedList<SliceASTForStandardTed> m)

getHeavy

public SliceASTForStandardTed getHeavy()

updateHeavyPathInformation

public void updateHeavyPathInformation()

findFirstNodeThatMatches

public SliceASTForStandardTed findFirstNodeThatMatches(java.lang.String label)
Overrides:
findFirstNodeThatMatches in class SliceAST

getText

public java.lang.String getText()
Get the token text for this node

Specified by:
getText in interface antlr.collections.AST
Overrides:
getText in class SliceAST

getType

public int getType()
Get the token type for this node

Specified by:
getType in interface antlr.collections.AST
Overrides:
getType in class SliceAST

initialize

public void initialize(int t,
                       java.lang.String txt)
Specified by:
initialize in interface antlr.collections.AST
Overrides:
initialize in class SliceAST

initialize

public void initialize(antlr.collections.AST t)
Specified by:
initialize in interface antlr.collections.AST
Overrides:
initialize in class SliceAST

initialize

public void initialize(antlr.Token tok)
Specified by:
initialize in interface antlr.collections.AST
Overrides:
initialize in class SliceAST

setText

public void setText(java.lang.String text_)
Set the token text for this node

Specified by:
setText in interface antlr.collections.AST
Overrides:
setText in class SliceAST

setType

public void setType(int ttype_)
Set the token type for this node

Specified by:
setType in interface antlr.collections.AST
Overrides:
setType in class SliceAST

getLeftmostChild

public SliceASTForStandardTed getLeftmostChild()
Overrides:
getLeftmostChild in class SliceAST

prettyPrint

public java.lang.String prettyPrint()
Print out a child-sibling tree in LISP notation

Overrides:
prettyPrint in class SliceAST

equalsTree

public boolean equalsTree(antlr.collections.AST t)
Specified by:
equalsTree in interface antlr.collections.AST
Overrides:
equalsTree in class SliceAST

detailedTreeComparison

public int detailedTreeComparison(antlr.collections.AST t)
Overrides:
detailedTreeComparison in class SliceAST

detailedTreeAux

protected int detailedTreeAux(antlr.collections.AST t)
Is tree rooted at 'this' equal to 't'? The siblings of 'this' are ignored.

Overrides:
detailedTreeAux in class SliceAST


Copyright © 2007-2008 Arnoldo Jose Muller Molina. All Rights Reserved.