EDU.utwente.CoCompose.translate
Class AppliedPatterns

java.lang.Object
  |
  +--EDU.utwente.CoCompose.translate.AppliedPatterns
All Implemented Interfaces:
java.lang.Cloneable

public class AppliedPatterns
extends java.lang.Object
implements java.lang.Cloneable

Caches applied SolutionPatterns during flattening.

Version:
0.1.07, 12 March 2003
Author:
Dennis Wagelaar

Constructor Summary
AppliedPatterns()
          Constructs an AppliedPatterns.
 
Method Summary
 void addAppliedPattern(SolutionPattern pattern, Model model, UniqueRealm typeRealm)
          Adds SolutionPattern and its Model to the cache of applied patterns.
 void addValidatedPattern(SolutionPattern pattern)
           
 java.lang.Object clone()
          Creates a deep copy of this (cache only).
 boolean containsPattern(java.lang.String filename)
          Determines whether this pattern is already in the cache.
 Model getSolutionModel(java.lang.String filename)
          Retrieves the solution Model for the given solution pattern.
 UniqueRealm getTypeRealm(java.lang.String filename)
          Retrieves the type realm for the given solution pattern.
 boolean isValidatedPattern(java.lang.String filename)
          Determines whether the given solution pattern (by filename) has been validated.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppliedPatterns

public AppliedPatterns()
Constructs an AppliedPatterns.
Method Detail

clone

public java.lang.Object clone()
Creates a deep copy of this (cache only).
Overrides:
clone in class java.lang.Object
Returns:
The copy.

addAppliedPattern

public void addAppliedPattern(SolutionPattern pattern,
                              Model model,
                              UniqueRealm typeRealm)
Adds SolutionPattern and its Model to the cache of applied patterns.
Parameters:
pattern - The applied solution pattern.
model - The applied solution model.
typeRealm - The composite type unique realm.

addValidatedPattern

public void addValidatedPattern(SolutionPattern pattern)

containsPattern

public boolean containsPattern(java.lang.String filename)
Determines whether this pattern is already in the cache.
Parameters:
filename - The solution pattern filename.
Returns:
True if the pattern is in the cache.

getSolutionModel

public Model getSolutionModel(java.lang.String filename)
Retrieves the solution Model for the given solution pattern.
Parameters:
filename - The solution pattern filename.
Returns:
The solution Model, if it is in the cache, null otherwise.

getTypeRealm

public UniqueRealm getTypeRealm(java.lang.String filename)
Retrieves the type realm for the given solution pattern.
Parameters:
filename - The solution pattern filename.
Returns:
The type realm, if it is in the cache, null otherwise.

isValidatedPattern

public boolean isValidatedPattern(java.lang.String filename)
Determines whether the given solution pattern (by filename) has been validated.
Parameters:
The - filename of the SolutionPattern to check.
Returns:
True if this solution pattern has been validated.