org.eclipse.ocl.examples.pivot
Interface CollectionItem

All Superinterfaces:
CollectionLiteralPart, DomainElement, DomainNamedElement, DomainTypedElement, Element, org.eclipse.emf.ecore.EObject, Nameable, NamedElement, org.eclipse.emf.common.notify.Notifier, PivotObject, TypedElement, Visitable
All Known Implementing Classes:
CollectionItemImpl

public interface CollectionItem
extends CollectionLiteralPart

A representation of the model object 'Collection Item'.

The following features are supported:

See Also:
PivotPackage.getCollectionItem()
Generated
Model

Method Summary
 OCLExpression createItem(org.eclipse.emf.ecore.EClass eClass)
          Creates a new OCLExpression and sets the 'Item' containment reference.
 OCLExpression getItem()
          Returns the value of the 'Item' containment reference.
 void setItem(OCLExpression value)
          Sets the value of the 'Item' containment reference.
 boolean validateTypeIsItemType(org.eclipse.emf.common.util.DiagnosticChain diagnostics, java.util.Map<java.lang.Object,java.lang.Object> context)
          The type of a CollectionItem is the type of the item expression.
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.TypedElement
getType, setType
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.NamedElement
createOwnedAnnotation, createOwnedRule, getName, getOwnedAnnotation, getOwnedRule, isStatic, setIsStatic, setName
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.Element
allOwnedElements, createOwnedComment, getETarget, getOwnedComment, validateNotOwnSelf
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.util.Visitable
accept, eClass
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.ocl.examples.domain.elements.DomainNamedElement
getName
 

Method Detail

getItem

OCLExpression getItem()
Returns the value of the 'Item' containment reference.

If the meaning of the 'Item' containment reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Item' containment reference.
See Also:
setItem(OCLExpression), PivotPackage.getCollectionItem_Item()
Generated
Model
containment="true" required="true" ordered="false" annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/ocl/3.1.0/Pivot!CollectionItem!item'"

setItem

void setItem(OCLExpression value)
Sets the value of the 'Item' containment reference.

Parameters:
value - the new value of the 'Item' containment reference.
See Also:
getItem()
Generated

createItem

OCLExpression createItem(org.eclipse.emf.ecore.EClass eClass)
Creates a new OCLExpression and sets the 'Item' containment reference.

Parameters:
eClass - The Ecore class of the OCLExpression to create.
Returns:
The new OCLExpression.
See Also:
getItem()
Generated

validateTypeIsItemType

boolean validateTypeIsItemType(org.eclipse.emf.common.util.DiagnosticChain diagnostics,
                               java.util.Map<java.lang.Object,java.lang.Object> context)
The type of a CollectionItem is the type of the item expression.

Generated
Model
annotation="http://www.eclipse.org/emf/2002/GenModel body='/*\ntype = item.type\n\052/\ntry {\n\tfinal <%org.eclipse.ocl.examples.domain.evaluation.DomainEvaluator%> evaluator = new <%org.eclipse.ocl.examples.library.ecore.EcoreExecutorManager%>(this, null, <%org.eclipse.ocl.examples.pivot.PivotTables%>.LIBRARY);\n\tfinal <%org.eclipse.ocl.examples.domain.values.ValueFactory%> valueFactory = evaluator.getValueFactory();\n\tfinal <%org.eclipse.ocl.examples.domain.values.Value%> self = valueFactory.valueOf(this);\n\tfinal <%org.eclipse.ocl.examples.library.executor.ExecutorType%> T_Boolean = <%org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables%>.Types._Boolean;\n\t\n\tfinal <%org.eclipse.ocl.examples.domain.elements.DomainType%> returnType = T_Boolean;\n\tfinal <%org.eclipse.ocl.examples.domain.values.Value%> result = <%org.eclipse.ocl.examples.pivot.bodies.CollectionItemBodies%>._invariant_TypeIsItemType.INSTANCE.evaluate(evaluator, returnType, self);\n\tfinal boolean resultIsNull = result.isNull();\n\tif (!resultIsNull && result.asBoolean()) {\t// true => true, false/null => dropthrough, invalid => exception\n\t\treturn true;\n\t}\n\tif (diagnostics != null) {\n\t\tint severity = resultIsNull ? <%org.eclipse.emf.common.util.Diagnostic%>.ERROR : <%org.eclipse.emf.common.util.Diagnostic%>.WARNING;\n\t\tString message = <%org.eclipse.osgi.util.NLS%>.bind(<%org.eclipse.ocl.examples.domain.messages.EvaluatorMessages%>.ValidationConstraintIsNotSatisfied_ERROR_, new Object[]{\"CollectionItem\", \"TypeIsItemType\", <%org.eclipse.emf.ecore.util.EObjectValidator%>.getObjectLabel(this, context)});\n\t diagnostics.add(new <%org.eclipse.emf.common.util.BasicDiagnostic%>(severity, <%org.eclipse.ocl.examples.pivot.util.PivotValidator%>.DIAGNOSTIC_SOURCE, <%org.eclipse.ocl.examples.pivot.util.PivotValidator%>.COLLECTION_ITEM__TYPE_IS_ITEM_TYPE, message, new Object [] { this }));\n\t}\n\treturn false;\n} catch (<%org.eclipse.ocl.examples.domain.evaluation.InvalidValueException%> e) {\n\tString message = <%org.eclipse.osgi.util.NLS%>.bind(<%org.eclipse.ocl.examples.domain.messages.EvaluatorMessages%>.ValidationEvaluationFailed_ERROR_, new Object[]{\"CollectionItem\", \"TypeIsItemType\", <%org.eclipse.emf.ecore.util.EObjectValidator%>.getObjectLabel(this, context)});\n\tthrow new <%org.eclipse.emf.common.util.WrappedException%>(message, e);\n}\n'"