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

java.lang.Object
  extended by org.eclipse.ocl.examples.domain.types.AbstractStandardLibrary
      extended by org.eclipse.ocl.examples.pivot.manager.PivotStandardLibrary
All Implemented Interfaces:
DomainStandardLibrary
Direct Known Subclasses:
MetaModelManager

public abstract class PivotStandardLibrary
extends AbstractStandardLibrary


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)
          Names of all iterations in the libraries.
 void dispose()
           
 BagType getBagType()
          Obtains the generic instance of the BagType metatype, named Bag(T).
 PrimitiveType getBooleanType()
          Obtains the instance of the PrimitiveType metatype, named Boolean.
 Class getClassType()
           
 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)
           
 Metaclass getMetaclassType()
          Obtains the single instance of the DomainMetaclass metatype, named Metaclass.
 AnyType getOclAnyType()
          Obtains the single instance of the AnyType metatype, named OclAny.
 Class getOclComparableType()
          Obtains the single instance of the OclComparable metatype, named OclAny.
 Class getOclElementType()
          Obtains the single instance of the Class metatype, named OclElement.
 InvalidType getOclInvalidType()
          Obtains the single instance of the InvalidType metatype, named OclInvalid.
 Class getOclLambdaType()
           
 Type getOclMessageType()
          Obtains the generic instance of the MessageType metatype, named OclMessage.
 SelfType getOclSelfType()
          Obtains the single instance of the OclSelf pseudo-metatype, named OclSelf.
 Class getOclSummableType()
          Obtains the single instance of the OclSummable metatype, named OclAny.
 Class getOclTupleType()
          Obtains the single instance of the OclTupleType metatype, named OclVoid.
 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.
 CollectionType getUniqueCollectionType()
          Obtains the generic instance of the UniqueCollection metatype, named Set(T).
 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()
           
protected
<T extends TemplateableElement>
T
resolveRequiredSimpleType(java.lang.Class<T> requiredClassType, java.lang.String name)
           
protected
<T extends TemplateableElement>
T
resolveRequiredTemplateableType(java.lang.Class<T> requiredClassType, java.lang.String name, int parameterCount)
           
 
Methods inherited from class org.eclipse.ocl.examples.domain.types.AbstractStandardLibrary
conformsToCollectionType, conformsToLambdaType, conformsToTupleType, getBagType, getCollectionType, getCollectionType, getEnumeration, getMetaType, getNestedPackage, getNestedType, getNsURIPackage, getOperationTemplateParameter, getOrderedSetType, getPrimitiveType, getRootPackage, getSequenceType, getSetType, isEqualToCollectionType, isEqualToTupleType, weakGet
 
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.domain.elements.DomainStandardLibrary
getBagType, getInheritance, getMetaclass, getOclType, getOrderedSetType, getSequenceType, getSetType
 

Field Detail

DEFAULT_OCL_STDLIB_URI

@NonNull
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

@NonNull
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)
Names of all iterations in the libraries.


dispose

public void dispose()
Overrides:
dispose in class AbstractStandardLibrary

getBagType

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

Returns:
the Bag(T) type (an instance of BagType)

getBooleanType

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

Returns:
the Boolean type (an instance of PrimitiveType)

getClassType

@NonNull
public Class getClassType()

getCollectionType

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

Returns:
the Collection(T) type (an instance of CollectionType)

getEnumerationType

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

Returns:
the Enumeration type (an instance of Enumeration)

getIntegerType

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

Returns:
the Integer type (an instance of PrimitiveType)

getLibraryType

public Type getLibraryType(@NonNull
                           java.lang.String typeName)

getMetaclassType

@NonNull
public Metaclass getMetaclassType()
Description copied from interface: DomainStandardLibrary
Obtains the single instance of the DomainMetaclass metatype, named Metaclass.

Returns:
the Metaclass type (an instance of Metaclass)

getOclAnyType

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

Returns:
the OclAny type (an instance of AnyType)

getOclComparableType

@NonNull
public Class getOclComparableType()
Description copied from interface: DomainStandardLibrary
Obtains the single instance of the OclComparable metatype, named OclAny.

Returns:
the OclAny type (an instance of Class)

getOclElementType

@NonNull
public Class getOclElementType()
Description copied from interface: DomainStandardLibrary
Obtains the single instance of the Class metatype, named OclElement.

Returns:
the OclElement type (an instance of Class)

getOclInvalidType

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

Returns:
the OclInvalid type (an instance of InvalidType)

getOclLambdaType

@NonNull
public Class getOclLambdaType()

getOclMessageType

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

Returns:
the OclMessage type (an instance of MessageType)

getOclSelfType

@NonNull
public SelfType getOclSelfType()
Description copied from interface: DomainStandardLibrary
Obtains the single instance of the OclSelf pseudo-metatype, named OclSelf.

Returns:
the OclSelf type (an instance of SelfType)

getOclSummableType

@NonNull
public Class getOclSummableType()
Description copied from interface: DomainStandardLibrary
Obtains the single instance of the OclSummable metatype, named OclAny.

Returns:
the OclAny type (an instance of Class)

getOclTupleType

@NonNull
public Class getOclTupleType()
Description copied from interface: DomainStandardLibrary
Obtains the single instance of the OclTupleType metatype, named OclVoid.

Returns:
the OclTuple type (an instance of Class)

getOclVoidType

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

Returns:
the OclVoid type (an instance of VoidType)

getOrderedSetType

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

Returns:
the OrderedSet(T) type (an instance of OrderedSetType)

getRealType

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

Returns:
the Real type (an instance of PrimitiveType)

getRequiredLibraryType

@NonNull
public Type getRequiredLibraryType(@NonNull
                                           java.lang.String typeName)

getSequenceType

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

Returns:
the Sequence(T) type (an instance of SequenceType)

getSetType

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

Returns:
the Set(T) type (an instance of SetType)

getStringType

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

Returns:
the String type (an instance of PrimitiveType)

getUniqueCollectionType

@NonNull
public CollectionType getUniqueCollectionType()
Description copied from interface: DomainStandardLibrary
Obtains the generic instance of the UniqueCollection metatype, named Set(T).

Returns:
the Set(T) type (an instance of CollectionType)

getUnlimitedNaturalType

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

Returns:
the UnlimitedNatural type (an instance of PrimitiveType)

isOrdered

public boolean isOrdered(Type sourceType)

isUnique

public boolean isUnique(Type sourceType)

loadDefaultLibrary

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

resetLibrary

public void resetLibrary()

resolveRequiredSimpleType

@NonNull
protected <T extends TemplateableElement> T resolveRequiredSimpleType(@NonNull
                                                                              java.lang.Class<T> requiredClassType,
                                                                              @NonNull
                                                                              java.lang.String name)

resolveRequiredTemplateableType

@NonNull
protected <T extends TemplateableElement> T resolveRequiredTemplateableType(@NonNull
                                                                                    java.lang.Class<T> requiredClassType,
                                                                                    @NonNull
                                                                                    java.lang.String name,
                                                                                    int parameterCount)