de.tuberlin.cs.cis.ocl.model.mofbridge
Class MofFacade

java.lang.Object
  |
  +--de.tuberlin.cs.cis.ocl.model.mofbridge.MofFacade
All Implemented Interfaces:
ModelFacade, TypeFacade
Direct Known Subclasses:
MofModelFacade, UmlFacade

public class MofFacade
extends java.lang.Object
implements ModelFacade

Facade Pattern plus abstract binding.

Author:
fchabar

Constructor Summary
MofFacade(MofRepository mofRepository)
           
MofFacade(MofRepository mofRepository, ConceptFactory oclMapper)
           
 
Method Summary
 java.util.Set getAllClassifiers()
          Returns the set of all classifier defined in the model.
 java.util.Set getAllStates()
          Returns the set of all states defined in the model.
 ClassifierDescriptor getClassifier(java.lang.String name)
          Returns the type described by its name (primarily through its qualified name).
 ConceptFactory getOclMapper()
           
 java.lang.String getQNSeperator()
           
 ReflectionFactory getReflectionFactory()
          Returns a ReflectionFactory in order to provide reflective informations about the model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MofFacade

public MofFacade(MofRepository mofRepository)

MofFacade

public MofFacade(MofRepository mofRepository,
                 ConceptFactory oclMapper)
Method Detail

getQNSeperator

public java.lang.String getQNSeperator()

getClassifier

public ClassifierDescriptor getClassifier(java.lang.String name)
                                   throws UndefinedTypeException,
                                          AmbiguousTypeException
Description copied from interface: TypeFacade
Returns the type described by its name (primarily through its qualified name). This method is called each time the context checker has to resolve a type from the model. The name of the type is directly derived from OCL- constraints. The OCL Type Checker tries to resolve the type both: qualified and unqualified. A type may be a classifier or especially an enumeration type.

Specified by:
getClassifier in interface TypeFacade
Parameters:
name - The name of the model type to resolve. Namespaces of qualified names are seperated through '::'. A utility class to transform qualified names into java.util.Lists or to change the seperator (to be specific '.') is provided QualifiedName.
Returns:
The type specified through the qualified name.
Throws:
UndefinedTypeException - if the type is undefined in the model.
AmbiguousTypeException - if the type is ambigious in the model, in case of an unqualified name specifier.

getReflectionFactory

public ReflectionFactory getReflectionFactory()
Description copied from interface: ModelFacade
Returns a ReflectionFactory in order to provide reflective informations about the model. The informations are primaryly used to describe the OCL type OclType. But most importantly the ReflectionFactory provides access to all instances of a context or a classifier.

Specified by:
getReflectionFactory in interface ModelFacade
Returns:
a ReflectionFactory.

getAllStates

public java.util.Set getAllStates()
Description copied from interface: ModelFacade
Returns the set of all states defined in the model. The states are used to implement the Operation OclState.allInstances().

Specified by:
getAllStates in interface ModelFacade
Returns:
all states defined in the model. The states are described by their names. The names contained by the returned set are of type String.
See Also:
  • OCL 1.5 Standard

  • getAllClassifiers

    public java.util.Set getAllClassifiers()
    Description copied from interface: ModelFacade
    Returns the set of all classifier defined in the model. The classifiers are used to implement the Operation OclType.allInstances().

    Specified by:
    getAllClassifiers in interface ModelFacade
    Returns:
    all types defined in the model. The types are of type ClassifierDescriptor.
    See Also:
  • OCL 1.5 Standard

  • getOclMapper

    public ConceptFactory getOclMapper()