uk.ac.ucl.cs.emofocl.jmigen.extended
Class JMIContext

java.lang.Object
  extended by uk.ac.ucl.cs.emofocl.jmigen.extended.JMIContext

public class JMIContext
extends Object

Author:
James

Constructor Summary
JMIContext(String namespace, String interfacePrefix, String implementationPrefix, URL metamodelURL, NameConverter nameConverter)
           
 
Method Summary
static String capitalise(String name)
           
static String decapitalise(String name)
           
static Collection getAllAttributes(MOFClass mOFClass)
          Gets all owned properties recursively.
static Collection getAllConcreteClasses(Specification specification)
           
static Collection getAllOperations(MOFClass mOFClass)
           
 Collection getDelegatedOperations(MOFClass mOFClass)
          Returns all operations that a class delegates to its superclasses.
 Collection getDelegatedProperties(MOFClass mOFClass)
          Returns all attributes that a class delegates to its superclasses.
 List getImmediatePackagePath(MOFClass mOFClass)
          Returns the path to the immediate package of a class.
 String getImplementationPackage(NamedElement element)
           
 String getImplementationPrefix()
           
 String getInterfacePackage(NamedElement element)
           
 String getInterfacePrefix()
           
 String getMetamodelFilename()
           
 String getMetamodelURL()
           
 NameConverter getNameConverter()
           
static String getOCLEquivalentBoxOp(OCLEquivalentPrimitiveType type)
          Returns the operation used for boxing a primitive type.
static String getOCLEquivalentBoxType(OCLEquivalentPrimitiveType type)
           
static String getOCLEquivalentParseOp(OCLEquivalentPrimitiveType type)
          Returns the parse operation for deserializing an OCL equivalent type.
static String getOCLEquivalentType(OCLEquivalentPrimitiveType type)
           
static String getOCLEquivalentUnboxOp(OCLEquivalentPrimitiveType type)
          Returns the unboxing operation for a primitive type.
 String getXMLNamespace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMIContext

public JMIContext(String namespace,
                  String interfacePrefix,
                  String implementationPrefix,
                  URL metamodelURL,
                  NameConverter nameConverter)
Method Detail

getInterfacePrefix

public String getInterfacePrefix()

getMetamodelFilename

public String getMetamodelFilename()

getMetamodelURL

public String getMetamodelURL()

getImplementationPrefix

public String getImplementationPrefix()
Returns:

getInterfacePackage

public String getInterfacePackage(NamedElement element)

getImplementationPackage

public String getImplementationPackage(NamedElement element)

getXMLNamespace

public String getXMLNamespace()

capitalise

public static String capitalise(String name)

decapitalise

public static String decapitalise(String name)

getAllConcreteClasses

public static Collection getAllConcreteClasses(Specification specification)

getAllAttributes

public static Collection getAllAttributes(MOFClass mOFClass)
Gets all owned properties recursively.

Parameters:
class1 -
Returns:

getDelegatedProperties

public Collection getDelegatedProperties(MOFClass mOFClass)
Returns all attributes that a class delegates to its superclasses.

Parameters:
class1 -
Returns:

getAllOperations

public static Collection getAllOperations(MOFClass mOFClass)

getDelegatedOperations

public Collection getDelegatedOperations(MOFClass mOFClass)
Returns all operations that a class delegates to its superclasses.

Parameters:
class1 -
Returns:

getImmediatePackagePath

public List getImmediatePackagePath(MOFClass mOFClass)
Returns the path to the immediate package of a class.

Parameters:
superClass -
Returns:

getOCLEquivalentType

public static String getOCLEquivalentType(OCLEquivalentPrimitiveType type)

getOCLEquivalentBoxType

public static String getOCLEquivalentBoxType(OCLEquivalentPrimitiveType type)

getOCLEquivalentBoxOp

public static String getOCLEquivalentBoxOp(OCLEquivalentPrimitiveType type)
Returns the operation used for boxing a primitive type.

Parameters:
type -
Returns:

getOCLEquivalentUnboxOp

public static String getOCLEquivalentUnboxOp(OCLEquivalentPrimitiveType type)
Returns the unboxing operation for a primitive type.

Parameters:
type -
Returns:

getOCLEquivalentParseOp

public static String getOCLEquivalentParseOp(OCLEquivalentPrimitiveType type)
Returns the parse operation for deserializing an OCL equivalent type.

Parameters:
type -
Returns:

getNameConverter

public NameConverter getNameConverter()
Returns: