agg.parser
Interface PairContainer

All Superinterfaces:
XMLObject
All Known Subinterfaces:
LayeredPairContainer
All Known Implementing Classes:
DependencyPairContainer, ExcludePairContainer, LayeredDependencyPairContainer, LayeredExcludePairContainer, PriorityDependencyPairContainer, PriorityExcludePairContainer

public interface PairContainer
extends XMLObject

A container for critical pairs This interface represents the abstract class of a stategy. All classes which implements this interface are concrete strategies and can be used to confige the parser. This interface supports access to critical pairs.


Method Summary
 void addPairEventListener(ParserEventListener l)
          Adds a PairEventListener.
 void clear()
          Clears all container.
 void enableUseHostGraph(boolean enable, Graph g)
           
 ExcludePair getActiveExcludePair()
           
 java.util.Hashtable<Rule,java.util.Hashtable<Rule,Pair<java.lang.Boolean,java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>>>>> getContainer(int kind)
          This container is a Hashtable with a rule as key.
 java.lang.Object getCritical(Rule r1, Rule r2, int kind)
          Deprecated. replaced by getCriticalPair(Rule r1, Rule r2, int kind)
 java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>> getCriticalPair(Rule r1, Rule r2, int kind)
          Computes the critical part of two rules.
 java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>> getCriticalPair(Rule r1, Rule r2, int kind, boolean local)
           
 java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>> getCriticalSet(int kind, Rule rule)
          This method computes which rules are in a relation of a special kind.
 GraGra getGrammar()
          Returns the grammar the critical pairs a computed for.
 int getKindOfConflict()
          Returns CriticalPair.CONFLICT or CriticalPair.DEPENDENCY constant.
 LayerFunction getLayer()
           
 MorphCompletionStrategy getMorphCompletionStrategy()
           
 int getNumberOfContainers()
          Returns the number of containers for the critical pair.
 java.util.List<Rule> getRules()
           
 void initAllContainer()
          Initials all containers.
 boolean isAlive()
           
 boolean isComputed()
           
 boolean isEmpty()
           
 void setComputeAsymetrically(boolean b)
           
 void setGrammar(GraGra grammar)
          Sets the graph grammar the critical pairs are computed for.
 void setMorphCompletionStrategy(MorphCompletionStrategy strat)
           
 void setRules(java.util.List<Rule> ruleList)
           
 void setStop(boolean b)
           
 void stop()
           
 boolean useHostGraphEnabled()
           
 boolean wasStopped()
           
 
Methods inherited from interface agg.util.XMLObject
XreadObject, XwriteObject
 

Method Detail

getCriticalPair

java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>> getCriticalPair(Rule r1,
                                                                                                                        Rule r2,
                                                                                                                        int kind)
                                                                                                                        throws InvalidAlgorithmException
Computes the critical part of two rules. This can be a Vector of overlaping graphs.

Parameters:
r1 - The first part of a critical pair
r2 - The second part of a critical pair
kind - The kind of critical pair
Returns:
The critic object of two rules.
Throws:
InvalidAlgorithmException - Thrown if a algorithm is desired which is not provided.

getCriticalPair

java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>> getCriticalPair(Rule r1,
                                                                                                                        Rule r2,
                                                                                                                        int kind,
                                                                                                                        boolean local)
                                                                                                                        throws InvalidAlgorithmException
Throws:
InvalidAlgorithmException

getCritical

java.lang.Object getCritical(Rule r1,
                             Rule r2,
                             int kind)
                             throws InvalidAlgorithmException
Deprecated. replaced by getCriticalPair(Rule r1, Rule r2, int kind)

Throws:
InvalidAlgorithmException

getNumberOfContainers

int getNumberOfContainers()
Returns the number of containers for the critical pair.

Returns:
The number of containers.

getContainer

java.util.Hashtable<Rule,java.util.Hashtable<Rule,Pair<java.lang.Boolean,java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>>>>> getContainer(int kind)
                                                                                                                                                                                                 throws InvalidAlgorithmException
This container is a Hashtable with a rule as key. The value will be a set of rules.

Parameters:
kind - The kind of algorithm
Returns:
The hashtable with critical pairs.
Throws:
InvalidAlgorithmException - Thrown if a algorithm is desired which is not provided.

getCriticalSet

java.util.Vector<Pair<Pair<OrdinaryMorphism,OrdinaryMorphism>,Pair<OrdinaryMorphism,OrdinaryMorphism>>> getCriticalSet(int kind,
                                                                                                                       Rule rule)
                                                                                                                       throws InvalidAlgorithmException
This method computes which rules are in a relation of a special kind.

Parameters:
kind - The kind of critical pair
rule - The rule which is the first part of a critical pair
Returns:
All rules that are critic with the parameter.
Throws:
InvalidAlgorithmException - Thrown if a algorithm is desired which is not provided.

setGrammar

void setGrammar(GraGra grammar)
Sets the graph grammar the critical pairs are computed for.

Parameters:
grammar - The graph grammar.

getGrammar

GraGra getGrammar()
Returns the grammar the critical pairs a computed for.

Returns:
The graph grammar.

setComputeAsymetrically

void setComputeAsymetrically(boolean b)

setRules

void setRules(java.util.List<Rule> ruleList)

getRules

java.util.List<Rule> getRules()

setMorphCompletionStrategy

void setMorphCompletionStrategy(MorphCompletionStrategy strat)

getMorphCompletionStrategy

MorphCompletionStrategy getMorphCompletionStrategy()

initAllContainer

void initAllContainer()
Initials all containers. So there are at least empty objects as containers.


clear

void clear()
Clears all container.


getKindOfConflict

int getKindOfConflict()
Returns CriticalPair.CONFLICT or CriticalPair.DEPENDENCY constant.


addPairEventListener

void addPairEventListener(ParserEventListener l)
Adds a PairEventListener.

Parameters:
l - The listener.

getLayer

LayerFunction getLayer()

isAlive

boolean isAlive()

stop

void stop()

setStop

void setStop(boolean b)

wasStopped

boolean wasStopped()

isEmpty

boolean isEmpty()

enableUseHostGraph

void enableUseHostGraph(boolean enable,
                        Graph g)

useHostGraphEnabled

boolean useHostGraphEnabled()

isComputed

boolean isComputed()

getActiveExcludePair

ExcludePair getActiveExcludePair()