org.eclipse.ocl.examples.pivot.utilities
Class PivotStandardLibrary

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.utilities.PivotStandardLibrary
All Implemented Interfaces:
StandardLibrary
Direct Known Subclasses:
TypeCaches

public abstract class PivotStandardLibrary
extends java.lang.Object
implements StandardLibrary


Field Summary
static java.lang.String DEFAULT_OCL_STDLIB_URI
          The URI used by default for the MDT/OCL Standard Library.
protected  java.lang.String defaultStandardLibraryURI
          The URI to provide the default Standard Library.
 
Constructor Summary
PivotStandardLibrary()
           
 
Method Summary
protected  void defineLibraryType(Type pivotType)
           
 BagType getBagType()
          Obtains the generic instance of the BagType metatype, named Bag(T).
 PrimitiveType getBooleanType()
          Obtains the instance of the PrimitiveType metatype, named Boolean.
 ClassifierType getClassifierType()
          Obtains the single instance of the ClassifierType metatype, named Classifier.
 CollectionType getCollectionType()
          Obtains the generic instance of the CollectionType metatype, named Collection(T).
 Class getEnumerationType()
          Obtains the single instance of the EnumerationType metatype, named Enumeration.
 PrimitiveType getIntegerType()
          Obtains the instance of the PrimitiveType metatype, named Integer.
 Type getLibraryType(java.lang.String typeName)
           
 AnyType getOclAnyType()
          Obtains the single instance of the AnyType metatype, named OclAny.
 InvalidType getOclInvalidType()
          Obtains the single instance of the InvalidType metatype, named OclInvalid.
 Type getOclMessageType()
          Obtains the generic instance of the MessageType metatype, named OclMessage.
 VoidType getOclVoidType()
          Obtains the single instance of the VoidType metatype, named OclVoid.
 OrderedSetType getOrderedSetType()
          Obtains the generic instance of the OrderedSetType metatype, named OrderedSet(T).
 PrimitiveType getRealType()
          Obtains the instance of the PrimitiveType metatype, named Real.
 Type getRequiredLibraryType(java.lang.String typeName)
           
 SequenceType getSequenceType()
          Obtains the generic instance of the SequenceType metatype, named Sequence(T).
 SetType getSetType()
          Obtains the generic instance of the SetType metatype, named Set(T).
 PrimitiveType getStringType()
          Obtains the instance of the PrimitiveType metatype, named String.
 TupleType getTupleType()
           
 PrimitiveType getUnlimitedNaturalType()
          Obtains the instance of the PrimitiveType metatype, named UnlimitedNatural.
 boolean isOrdered(Type sourceType)
           
 boolean isUnique(Type sourceType)
           
protected abstract  org.eclipse.emf.ecore.resource.Resource loadDefaultLibrary(java.lang.String uri)
           
 void resetLibrary()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.StandardLibrary
conformsTo, conformsTo, getPivotType
 

Field Detail

DEFAULT_OCL_STDLIB_URI

public static final java.lang.String DEFAULT_OCL_STDLIB_URI
The URI used by default for the MDT/OCL Standard Library. NB. This constant is repeated in GenersateOCLstdlibModel.mwe2 an in org.eclipse.ocl.examples.library/plugin.xml.

See Also:
Constant Field Values

defaultStandardLibraryURI

protected java.lang.String defaultStandardLibraryURI
The URI to provide the default Standard Library. This value may be reassigned pior to any OCL analysis or evaluation to select a different default. Alternatively the need for default may be bypassed by explicitly invoking loadLibrary().

Constructor Detail

PivotStandardLibrary

public PivotStandardLibrary()
Method Detail

defineLibraryType

protected void defineLibraryType(Type pivotType)

getBagType

public BagType getBagType()
Description copied from interface: StandardLibrary
Obtains the generic instance of the BagType metatype, named Bag(T).

Specified by:
getBagType in interface StandardLibrary
Returns:
the Bag(T) type (an instance of BagType)

getBooleanType

public PrimitiveType getBooleanType()
Description copied from interface: StandardLibrary
Obtains the instance of the PrimitiveType metatype, named Boolean.

Specified by:
getBooleanType in interface StandardLibrary
Returns:
the Boolean type (an instance of PrimitiveType)

getClassifierType

public ClassifierType getClassifierType()
Description copied from interface: StandardLibrary
Obtains the single instance of the ClassifierType metatype, named Classifier.

Specified by:
getClassifierType in interface StandardLibrary
Returns:
the Classifier type (an instance of Classifier)

getCollectionType

public CollectionType getCollectionType()
Description copied from interface: StandardLibrary
Obtains the generic instance of the CollectionType metatype, named Collection(T).

Specified by:
getCollectionType in interface StandardLibrary
Returns:
the Collection(T) type (an instance of CollectionType)

getEnumerationType

public Class getEnumerationType()
Description copied from interface: StandardLibrary
Obtains the single instance of the EnumerationType metatype, named Enumeration.

Specified by:
getEnumerationType in interface StandardLibrary
Returns:
the Enumeration type (an instance of Enumeration)

getIntegerType

public PrimitiveType getIntegerType()
Description copied from interface: StandardLibrary
Obtains the instance of the PrimitiveType metatype, named Integer.

Specified by:
getIntegerType in interface StandardLibrary
Returns:
the Integer type (an instance of PrimitiveType)

getLibraryType

public Type getLibraryType(java.lang.String typeName)

getOclAnyType

public AnyType getOclAnyType()
Description copied from interface: StandardLibrary
Obtains the single instance of the AnyType metatype, named OclAny.

Specified by:
getOclAnyType in interface StandardLibrary
Returns:
the OclAny type (an instance of AnyType)

getOclInvalidType

public InvalidType getOclInvalidType()
Description copied from interface: StandardLibrary
Obtains the single instance of the InvalidType metatype, named OclInvalid.

Specified by:
getOclInvalidType in interface StandardLibrary
Returns:
the OclInvalid type (an instance of InvalidType)

getOclMessageType

public Type getOclMessageType()
Description copied from interface: StandardLibrary
Obtains the generic instance of the MessageType metatype, named OclMessage.

Specified by:
getOclMessageType in interface StandardLibrary
Returns:
the OclMessage type (an instance of MessageType)

getOclVoidType

public VoidType getOclVoidType()
Description copied from interface: StandardLibrary
Obtains the single instance of the VoidType metatype, named OclVoid.

Specified by:
getOclVoidType in interface StandardLibrary
Returns:
the OclVoid type (an instance of VoidType)

getOrderedSetType

public OrderedSetType getOrderedSetType()
Description copied from interface: StandardLibrary
Obtains the generic instance of the OrderedSetType metatype, named OrderedSet(T).

Specified by:
getOrderedSetType in interface StandardLibrary
Returns:
the OrderedSet(T) type (an instance of OrderedSetType)

getRealType

public PrimitiveType getRealType()
Description copied from interface: StandardLibrary
Obtains the instance of the PrimitiveType metatype, named Real.

Specified by:
getRealType in interface StandardLibrary
Returns:
the Real type (an instance of PrimitiveType)

getRequiredLibraryType

public Type getRequiredLibraryType(java.lang.String typeName)

getSequenceType

public SequenceType getSequenceType()
Description copied from interface: StandardLibrary
Obtains the generic instance of the SequenceType metatype, named Sequence(T).

Specified by:
getSequenceType in interface StandardLibrary
Returns:
the Sequence(T) type (an instance of SequenceType)

getSetType

public SetType getSetType()
Description copied from interface: StandardLibrary
Obtains the generic instance of the SetType metatype, named Set(T).

Specified by:
getSetType in interface StandardLibrary
Returns:
the Set(T) type (an instance of SetType)

getStringType

public PrimitiveType getStringType()
Description copied from interface: StandardLibrary
Obtains the instance of the PrimitiveType metatype, named String.

Specified by:
getStringType in interface StandardLibrary
Returns:
the String type (an instance of PrimitiveType)

getTupleType

public TupleType getTupleType()

getUnlimitedNaturalType

public PrimitiveType getUnlimitedNaturalType()
Description copied from interface: StandardLibrary
Obtains the instance of the PrimitiveType metatype, named UnlimitedNatural.

Specified by:
getUnlimitedNaturalType in interface StandardLibrary
Returns:
the UnlimitedNatural type (an instance of PrimitiveType)

isOrdered

public boolean isOrdered(Type sourceType)
Specified by:
isOrdered in interface StandardLibrary

isUnique

public boolean isUnique(Type sourceType)
Specified by:
isUnique in interface StandardLibrary

loadDefaultLibrary

protected abstract org.eclipse.emf.ecore.resource.Resource loadDefaultLibrary(java.lang.String uri)

resetLibrary

public void resetLibrary()