/** * Copyright (c) 2015-2016 Obeo, Inria * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * - William Piers <william.piers@obeo.fr> * - Philippe Merle <philippe.merle@inria.fr> */ package org.occiware.clouddesigner.occi; import java.util.Map; import org.eclipse.emf.common.util.DiagnosticChain; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Kind</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link org.occiware.clouddesigner.occi.Kind#getParent <em>Parent</em>}</li> * <li>{@link org.occiware.clouddesigner.occi.Kind#getActions <em>Actions</em>}</li> * <li>{@link org.occiware.clouddesigner.occi.Kind#getEntities <em>Entities</em>}</li> * </ul> * * @see org.occiware.clouddesigner.occi.OCCIPackage#getKind() * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='ActionTermUnicity CorrectScheme NoCyclicInheritance EntityKindIsRootParent AttributesNameNotAlreadyDefinedInParent'" * @generated */ public interface Kind extends Category { /** * Returns the value of the '<em><b>Parent</b></em>' reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Parent</em>' reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Parent</em>' reference. * @see #setParent(Kind) * @see org.occiware.clouddesigner.occi.OCCIPackage#getKind_Parent() * @model annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://schemas.ogf.org/occi/core/ecore!Kind!parent'" * @generated */ Kind getParent(); /** * Sets the value of the '{@link org.occiware.clouddesigner.occi.Kind#getParent <em>Parent</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Parent</em>' reference. * @see #getParent() * @generated */ void setParent(Kind value); /** * Returns the value of the '<em><b>Actions</b></em>' containment reference list. * The list contents are of type {@link org.occiware.clouddesigner.occi.Action}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Actions</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Actions</em>' containment reference list. * @see org.occiware.clouddesigner.occi.OCCIPackage#getKind_Actions() * @model containment="true" * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://schemas.ogf.org/occi/core/ecore!Kind!actions'" * @generated */ EList<Action> getActions(); /** * Returns the value of the '<em><b>Entities</b></em>' reference list. * The list contents are of type {@link org.occiware.clouddesigner.occi.Entity}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Entities</em>' reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Entities</em>' reference list. * @see org.occiware.clouddesigner.occi.OCCIPackage#getKind_Entities() * @model transient="true" changeable="false" volatile="true" derived="true" ordered="false" * annotation="http://www.eclipse.org/emf/2002/GenModel get='/**\n * Entity.allInstances()->select(kind = self)\n \052/\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.evaluation.Executor%> executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.ids.IdResolver%> idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.Class%> TYP_occi_c_c_Entity_0 = idResolver.getClass(<%org.occiware.clouddesigner.occi.OCCITables%>.CLSSid_Entity, null);\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.values.SetValue%> allInstances = <%org.eclipse.ocl.pivot.library.classifier.ClassifierAllInstancesOperation%>.INSTANCE.evaluate(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Entity, TYP_occi_c_c_Entity_0);\n/*@Thrown\052/ <%org.eclipse.ocl.pivot.values.SetValue%>.Accumulator accumulator = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createSetAccumulatorValue(<%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Entity);\n/*@NonNull\052/ <%java.util.Iterator%><<%java.lang.Object%>> ITERATOR__1 = allInstances.iterator();\n/*@Thrown\052/ <%org.eclipse.ocl.pivot.values.SetValue%> select;\nwhile (true) {\n if (!ITERATOR__1.hasNext()) {\n select = accumulator;\n break;\n }\n /*@NonInvalid\052/ <%org.occiware.clouddesigner.occi.Entity%> _1 = (<%org.occiware.clouddesigner.occi.Entity%>)ITERATOR__1.next();\n /**\n * kind = self\n \052/\n final /*@Thrown\052/ <%org.occiware.clouddesigner.occi.Kind%> kind = _1.getKind();\n final /*@Thrown\052/ boolean eq = kind.equals(this);\n //\n if (eq == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\n accumulator.add(_1);\n }\n}\nfinal /*@Thrown\052/ <%java.util.List%><<%org.occiware.clouddesigner.occi.Entity%>> ECORE_select = ((<%org.eclipse.ocl.pivot.ids.IdResolver%>.IdResolverExtension)idResolver).ecoreValueOfAll(<%org.occiware.clouddesigner.occi.Entity%>.class, select);\nreturn (<%org.eclipse.emf.common.util.EList%><<%org.occiware.clouddesigner.occi.Entity%>>)ECORE_select;'" * @generated */ EList<Entity> getEntities(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * \n * inv CorrectScheme:\n * let severity : Integer[1] = \'Kind::CorrectScheme\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let status : OclAny[1] = scheme =\n * self.oclContainer()\n * .oclAsType(Extension).scheme\n * in\n * \'Kind::CorrectScheme\'.logDiagnostic(self, null, diagnostics, context, null, severity, status, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.evaluation.Executor%> executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.ids.IdResolver%> idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.values.IntegerValue%> severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.STR_Kind_c_c_CorrectScheme);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.occiware.clouddesigner.occi.OCCITables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_0;\nif (le) {\n symbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n /*@Caught\052/ /*@NonNull\052/ <%java.lang.Object%> CAUGHT_status;\n try {\n final /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.Class%> TYP_occi_c_c_Extension = idResolver.getClass(<%org.occiware.clouddesigner.occi.OCCITables%>.CLSSid_Extension, null);\n final /*@Thrown\052/ <%java.lang.String%> scheme = this.getScheme();\n final /*@NonInvalid\052/ <%java.lang.Object%> oclContainer = <%org.eclipse.ocl.pivot.library.classifier.ClassifierOclContainerOperation%>.INSTANCE.evaluate(executor, this);\n final /*@Thrown\052/ <%org.occiware.clouddesigner.occi.Extension%> oclAsType = <%org.eclipse.ocl.pivot.utilities.ClassUtil%>.nonNullState((<%org.occiware.clouddesigner.occi.Extension%>)<%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsTypeOperation%>.INSTANCE.evaluate(executor, oclContainer, TYP_occi_c_c_Extension));\n final /*@Thrown\052/ <%java.lang.String%> scheme_0 = oclAsType.getScheme();\n final /*@Thrown\052/ boolean status = scheme.equals(scheme_0);\n CAUGHT_status = status;\n }\n catch (<%java.lang.Exception%> e) {\n CAUGHT_status = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n }\n final /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.occiware.clouddesigner.occi.OCCITables%>.STR_Kind_c_c_CorrectScheme, this, null, diagnostics, context, null, severity_0, CAUGHT_status, <%org.occiware.clouddesigner.occi.OCCITables%>.INT_0).booleanValue();\n symbol_0 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_0;'" * @generated */ boolean CorrectScheme(DiagnosticChain diagnostics, Map<Object, Object> context); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * \n * inv NoCyclicInheritance:\n * let severity : Integer[1] = \'Kind::NoCyclicInheritance\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let status : OclAny[1] = parent->closure(parent)->excludes(self)\n * in\n * \'Kind::NoCyclicInheritance\'.logDiagnostic(self, null, diagnostics, context, null, severity, status, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.evaluation.Executor%> executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.ids.IdResolver%> idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.StandardLibrary%> standardLibrary = idResolver.getStandardLibrary();\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.values.IntegerValue%> severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.STR_Kind_c_c_NoCyclicInheritance);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.occiware.clouddesigner.occi.OCCITables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_1;\nif (le) {\n symbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n /*@Caught\052/ /*@NonNull\052/ <%java.lang.Object%> CAUGHT_status;\n try {\n final /*@Thrown\052/ <%org.occiware.clouddesigner.occi.Kind%> parent = this.getParent();\n final /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.SetValue%> oclAsSet = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsSetOperation%>.INSTANCE.evaluate(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Kind, parent);\n final <%org.eclipse.ocl.pivot.Class%> TYPE_closure_0 = executor.getStaticTypeOf(oclAsSet);\n final <%org.eclipse.ocl.pivot.library.LibraryIteration%>.LibraryIterationExtension IMPL_closure_0 = (<%org.eclipse.ocl.pivot.library.LibraryIteration%>.LibraryIterationExtension)TYPE_closure_0.lookupImplementation(standardLibrary, <%org.eclipse.ocl.pivot.oclstdlib.OCLstdlibTables%>.Operations._Set__closure);\n final /*@NonNull\052/ Object ACC_closure_0 = IMPL_closure_0.createAccumulatorValue(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Kind, <%org.occiware.clouddesigner.occi.OCCITables%>.CLSSid_Kind);\n /**\n * Implementation of the iterator body.\n \052/\n final /*@NonNull\052/ <%org.eclipse.ocl.pivot.library.AbstractBinaryOperation%> BODY_closure_0 = new <%org.eclipse.ocl.pivot.library.AbstractBinaryOperation%>()\n {\n /**\n * parent\n \052/\n @Override\n public /*@Nullable\052/ Object evaluate(final /*@NonNull\052/ <%org.eclipse.ocl.pivot.evaluation.Executor%> executor, final /*@NonNull\052/ <%org.eclipse.ocl.pivot.ids.TypeId%> typeId, final /*@Nullable\052/ Object oclAsSet, final /*@NonInvalid\052/ <%java.lang.Object%> _1) {\n final /*@NonInvalid\052/ <%org.occiware.clouddesigner.occi.Kind%> symbol_0 = (<%org.occiware.clouddesigner.occi.Kind%>)_1;\n if (symbol_0 == null) {\n throw new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'\\\'http://schemas.ogf.org/occi/core/ecore\\\'::Kind::parent\\\'\");\n }\n final /*@Thrown\052/ <%org.occiware.clouddesigner.occi.Kind%> parent_0 = symbol_0.getParent();\n return parent_0;\n }\n };\n final /*@NonNull\052/ <%org.eclipse.ocl.pivot.internal.library.executor.ExecutorSingleIterationManager%> MGR_closure_0 = new <%org.eclipse.ocl.pivot.internal.library.executor.ExecutorSingleIterationManager%>(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Kind, BODY_closure_0, oclAsSet, ACC_closure_0);\n final /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.SetValue%> closure = <%org.eclipse.ocl.pivot.utilities.ClassUtil%>.nonNullState((<%org.eclipse.ocl.pivot.values.SetValue%>)IMPL_closure_0.evaluateIteration(MGR_closure_0));\n final /*@Thrown\052/ boolean status = <%org.eclipse.ocl.pivot.library.collection.CollectionExcludesOperation%>.INSTANCE.evaluate(closure, this).booleanValue();\n CAUGHT_status = status;\n }\n catch (<%java.lang.Exception%> e) {\n CAUGHT_status = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n }\n final /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.occiware.clouddesigner.occi.OCCITables%>.STR_Kind_c_c_NoCyclicInheritance, this, null, diagnostics, context, null, severity_0, CAUGHT_status, <%org.occiware.clouddesigner.occi.OCCITables%>.INT_0).booleanValue();\n symbol_1 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_1;'" * @generated */ boolean NoCyclicInheritance(DiagnosticChain diagnostics, Map<Object, Object> context); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * \n * inv AttributesNameNotAlreadyDefinedInParent:\n * let\n * severity : Integer[1] = \'Kind::AttributesNameNotAlreadyDefinedInParent\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let\n * status : OclAny[1] = attributes.name->excludesAll(\n * parent->closure(parent).attributes.name)\n * in\n * \'Kind::AttributesNameNotAlreadyDefinedInParent\'.logDiagnostic(self, null, diagnostics, context, null, severity, status, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.evaluation.Executor%> executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.ids.IdResolver%> idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.StandardLibrary%> standardLibrary = idResolver.getStandardLibrary();\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.values.IntegerValue%> severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.STR_Kind_c_c_AttributesNameNotAlreadyDefinedInParent);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.occiware.clouddesigner.occi.OCCITables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_1;\nif (le) {\n symbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n /*@Caught\052/ /*@NonNull\052/ <%java.lang.Object%> CAUGHT_status;\n try {\n final /*@Thrown\052/ <%java.util.List%><<%org.occiware.clouddesigner.occi.Attribute%>> attributes = this.getAttributes();\n final /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.OrderedSetValue%> BOXED_attributes = idResolver.createOrderedSetOfAll(<%org.occiware.clouddesigner.occi.OCCITables%>.ORD_CLSSid_Attribute, attributes);\n /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.SequenceValue%>.Accumulator accumulator = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createSequenceAccumulatorValue(<%org.occiware.clouddesigner.occi.OCCITables%>.SEQ_PRIMid_String);\n /*@NonNull\052/ <%java.util.Iterator%><<%java.lang.Object%>> ITERATOR__1 = BOXED_attributes.iterator();\n /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.SequenceValue%> collect;\n while (true) {\n if (!ITERATOR__1.hasNext()) {\n collect = accumulator;\n break;\n }\n /*@NonInvalid\052/ <%org.occiware.clouddesigner.occi.Attribute%> _1 = (<%org.occiware.clouddesigner.occi.Attribute%>)ITERATOR__1.next();\n /**\n * name\n \052/\n final /*@Thrown\052/ <%java.lang.String%> name = _1.getName();\n //\n accumulator.add(name);\n }\n final /*@Thrown\052/ <%org.occiware.clouddesigner.occi.Kind%> parent = this.getParent();\n final /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.SetValue%> oclAsSet = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsSetOperation%>.INSTANCE.evaluate(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Kind, parent);\n final <%org.eclipse.ocl.pivot.Class%> TYPE_closure_0 = executor.getStaticTypeOf(oclAsSet);\n final <%org.eclipse.ocl.pivot.library.LibraryIteration%>.LibraryIterationExtension IMPL_closure_0 = (<%org.eclipse.ocl.pivot.library.LibraryIteration%>.LibraryIterationExtension)TYPE_closure_0.lookupImplementation(standardLibrary, <%org.eclipse.ocl.pivot.oclstdlib.OCLstdlibTables%>.Operations._Set__closure);\n final /*@NonNull\052/ Object ACC_closure_0 = IMPL_closure_0.createAccumulatorValue(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Kind, <%org.occiware.clouddesigner.occi.OCCITables%>.CLSSid_Kind);\n /**\n * Implementation of the iterator body.\n \052/\n final /*@NonNull\052/ <%org.eclipse.ocl.pivot.library.AbstractBinaryOperation%> BODY_closure_0 = new <%org.eclipse.ocl.pivot.library.AbstractBinaryOperation%>()\n {\n /**\n * parent\n \052/\n @Override\n public /*@Nullable\052/ Object evaluate(final /*@NonNull\052/ <%org.eclipse.ocl.pivot.evaluation.Executor%> executor, final /*@NonNull\052/ <%org.eclipse.ocl.pivot.ids.TypeId%> typeId, final /*@Nullable\052/ Object oclAsSet, final /*@NonInvalid\052/ <%java.lang.Object%> _1_0) {\n final /*@NonInvalid\052/ <%org.occiware.clouddesigner.occi.Kind%> symbol_0 = (<%org.occiware.clouddesigner.occi.Kind%>)_1_0;\n if (symbol_0 == null) {\n throw new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'\\\'http://schemas.ogf.org/occi/core/ecore\\\'::Kind::parent\\\'\");\n }\n final /*@Thrown\052/ <%org.occiware.clouddesigner.occi.Kind%> parent_0 = symbol_0.getParent();\n return parent_0;\n }\n };\n final /*@NonNull\052/ <%org.eclipse.ocl.pivot.internal.library.executor.ExecutorSingleIterationManager%> MGR_closure_0 = new <%org.eclipse.ocl.pivot.internal.library.executor.ExecutorSingleIterationManager%>(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Kind, BODY_closure_0, oclAsSet, ACC_closure_0);\n final /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.SetValue%> closure = <%org.eclipse.ocl.pivot.utilities.ClassUtil%>.nonNullState((<%org.eclipse.ocl.pivot.values.SetValue%>)IMPL_closure_0.evaluateIteration(MGR_closure_0));\n /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.BagValue%>.Accumulator accumulator_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createBagAccumulatorValue(<%org.occiware.clouddesigner.occi.OCCITables%>.BAG_CLSSid_Attribute);\n /*@Nullable\052/ <%java.util.Iterator%><<%java.lang.Object%>> ITERATOR__1_1 = closure.iterator();\n /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.BagValue%> collect_1;\n while (true) {\n if (!ITERATOR__1_1.hasNext()) {\n collect_1 = accumulator_0;\n break;\n }\n /*@NonInvalid\052/ <%org.occiware.clouddesigner.occi.Kind%> _1_1 = (<%org.occiware.clouddesigner.occi.Kind%>)ITERATOR__1_1.next();\n /**\n * attributes\n \052/\n if (_1_1 == null) {\n throw new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'\\\'http://schemas.ogf.org/occi/core/ecore\\\'::Category::attributes\\\'\");\n }\n final /*@Thrown\052/ <%java.util.List%><<%org.occiware.clouddesigner.occi.Attribute%>> attributes_0 = _1_1.getAttributes();\n final /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.OrderedSetValue%> BOXED_attributes_0 = idResolver.createOrderedSetOfAll(<%org.occiware.clouddesigner.occi.OCCITables%>.ORD_CLSSid_Attribute, attributes_0);\n //\n for (Object value : BOXED_attributes_0.flatten().getElements()) {\n accumulator_0.add(value);\n }\n }\n /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.BagValue%>.Accumulator accumulator_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createBagAccumulatorValue(<%org.occiware.clouddesigner.occi.OCCITables%>.BAG_PRIMid_String);\n /*@NonNull\052/ <%java.util.Iterator%><<%java.lang.Object%>> ITERATOR__1_2 = collect_1.iterator();\n /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.BagValue%> collect_0;\n while (true) {\n if (!ITERATOR__1_2.hasNext()) {\n collect_0 = accumulator_1;\n break;\n }\n /*@NonInvalid\052/ <%org.occiware.clouddesigner.occi.Attribute%> _1_2 = (<%org.occiware.clouddesigner.occi.Attribute%>)ITERATOR__1_2.next();\n /**\n * name\n \052/\n final /*@Thrown\052/ <%java.lang.String%> name_0 = _1_2.getName();\n //\n accumulator_1.add(name_0);\n }\n final /*@Thrown\052/ boolean status = <%org.eclipse.ocl.pivot.library.collection.CollectionExcludesAllOperation%>.INSTANCE.evaluate(collect, collect_0).booleanValue();\n CAUGHT_status = status;\n }\n catch (<%java.lang.Exception%> e) {\n CAUGHT_status = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n }\n final /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.occiware.clouddesigner.occi.OCCITables%>.STR_Kind_c_c_AttributesNameNotAlreadyDefinedInParent, this, null, diagnostics, context, null, severity_0, CAUGHT_status, <%org.occiware.clouddesigner.occi.OCCITables%>.INT_0).booleanValue();\n symbol_1 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_1;'" * @generated */ boolean AttributesNameNotAlreadyDefinedInParent(DiagnosticChain diagnostics, Map<Object, Object> context); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * \n * inv ActionTermUnicity:\n * let severity : Integer[1] = \'Kind::ActionTermUnicity\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let status : OclAny[1] = actions->isUnique(term)\n * in\n * \'Kind::ActionTermUnicity\'.logDiagnostic(self, null, diagnostics, context, null, severity, status, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.evaluation.Executor%> executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.ids.IdResolver%> idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.values.IntegerValue%> severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.STR_Kind_c_c_ActionTermUnicity);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.occiware.clouddesigner.occi.OCCITables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_0;\nif (le) {\n symbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n /*@Caught\052/ /*@NonNull\052/ <%java.lang.Object%> CAUGHT_status;\n try {\n final /*@Thrown\052/ <%java.util.List%><<%org.occiware.clouddesigner.occi.Action%>> actions = this.getActions();\n final /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.OrderedSetValue%> BOXED_actions = idResolver.createOrderedSetOfAll(<%org.occiware.clouddesigner.occi.OCCITables%>.ORD_CLSSid_Action, actions);\n /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.SetValue%>.Accumulator accumulator = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createSetAccumulatorValue(<%org.occiware.clouddesigner.occi.OCCITables%>.ORD_CLSSid_Action);\n /*@NonNull\052/ <%java.util.Iterator%><<%java.lang.Object%>> ITERATOR__1 = BOXED_actions.iterator();\n /*@Thrown\052/ boolean status;\n while (true) {\n if (!ITERATOR__1.hasNext()) {\n status = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n break;\n }\n /*@NonInvalid\052/ <%org.occiware.clouddesigner.occi.Action%> _1 = (<%org.occiware.clouddesigner.occi.Action%>)ITERATOR__1.next();\n /**\n * term\n \052/\n final /*@Thrown\052/ <%java.lang.String%> term = _1.getTerm();\n //\n if (accumulator.includes(term) == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\n status = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE;\t\t\t// Abort after second find\n break;\n }\n else {\n accumulator.add(term);\n }\n }\n CAUGHT_status = status;\n }\n catch (<%java.lang.Exception%> e) {\n CAUGHT_status = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n }\n final /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.occiware.clouddesigner.occi.OCCITables%>.STR_Kind_c_c_ActionTermUnicity, this, null, diagnostics, context, null, severity_0, CAUGHT_status, <%org.occiware.clouddesigner.occi.OCCITables%>.INT_0).booleanValue();\n symbol_0 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_0;'" * @generated */ boolean ActionTermUnicity(DiagnosticChain diagnostics, Map<Object, Object> context); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * \n * inv EntityKindIsRootParent:\n * let severity : Integer[1] = \'Kind::EntityKindIsRootParent\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let\n * status : OclAny[?] = self->closure(parent)\n * ->exists(k | k.term = \'entity\' and k.scheme = \'http://schemas.ogf.org/occi/core#\' and k.parent = null)\n * in\n * \'Kind::EntityKindIsRootParent\'.logDiagnostic(self, null, diagnostics, context, null, severity, status, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.evaluation.Executor%> executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.ids.IdResolver%> idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.StandardLibrary%> standardLibrary = idResolver.getStandardLibrary();\nfinal /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.values.IntegerValue%> severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.STR_Kind_c_c_EntityKindIsRootParent);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.occiware.clouddesigner.occi.OCCITables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_1;\nif (le) {\n symbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n /*@Caught\052/ /*@Nullable\052/ <%java.lang.Object%> CAUGHT_status;\n try {\n final /*@NonInvalid\052/ <%org.eclipse.ocl.pivot.values.SetValue%> oclAsSet = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsSetOperation%>.INSTANCE.evaluate(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Kind, this);\n final <%org.eclipse.ocl.pivot.Class%> TYPE_closure_0 = executor.getStaticTypeOf(oclAsSet);\n final <%org.eclipse.ocl.pivot.library.LibraryIteration%>.LibraryIterationExtension IMPL_closure_0 = (<%org.eclipse.ocl.pivot.library.LibraryIteration%>.LibraryIterationExtension)TYPE_closure_0.lookupImplementation(standardLibrary, <%org.eclipse.ocl.pivot.oclstdlib.OCLstdlibTables%>.Operations._Set__closure);\n final /*@NonNull\052/ Object ACC_closure_0 = IMPL_closure_0.createAccumulatorValue(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Kind, <%org.occiware.clouddesigner.occi.OCCITables%>.CLSSid_Kind);\n /**\n * Implementation of the iterator body.\n \052/\n final /*@NonNull\052/ <%org.eclipse.ocl.pivot.library.AbstractBinaryOperation%> BODY_closure_0 = new <%org.eclipse.ocl.pivot.library.AbstractBinaryOperation%>()\n {\n /**\n * parent\n \052/\n @Override\n public /*@Nullable\052/ Object evaluate(final /*@NonNull\052/ <%org.eclipse.ocl.pivot.evaluation.Executor%> executor, final /*@NonNull\052/ <%org.eclipse.ocl.pivot.ids.TypeId%> typeId, final /*@Nullable\052/ Object oclAsSet, final /*@NonInvalid\052/ <%java.lang.Object%> _1) {\n final /*@NonInvalid\052/ <%org.occiware.clouddesigner.occi.Kind%> symbol_0 = (<%org.occiware.clouddesigner.occi.Kind%>)_1;\n if (symbol_0 == null) {\n throw new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'\\\'http://schemas.ogf.org/occi/core/ecore\\\'::Kind::parent\\\'\");\n }\n final /*@Thrown\052/ <%org.occiware.clouddesigner.occi.Kind%> parent = symbol_0.getParent();\n return parent;\n }\n };\n final /*@NonNull\052/ <%org.eclipse.ocl.pivot.internal.library.executor.ExecutorSingleIterationManager%> MGR_closure_0 = new <%org.eclipse.ocl.pivot.internal.library.executor.ExecutorSingleIterationManager%>(executor, <%org.occiware.clouddesigner.occi.OCCITables%>.SET_CLSSid_Kind, BODY_closure_0, oclAsSet, ACC_closure_0);\n final /*@Thrown\052/ <%org.eclipse.ocl.pivot.values.SetValue%> closure = <%org.eclipse.ocl.pivot.utilities.ClassUtil%>.nonNullState((<%org.eclipse.ocl.pivot.values.SetValue%>)IMPL_closure_0.evaluateIteration(MGR_closure_0));\n /*@Thrown\052/ <%java.lang.Object%> accumulator = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE;\n /*@Nullable\052/ <%java.util.Iterator%><<%java.lang.Object%>> ITERATOR_k = closure.iterator();\n /*@Thrown\052/ <%java.lang.Boolean%> status;\n while (true) {\n if (!ITERATOR_k.hasNext()) {\n if (accumulator == null) {\n status = null;\n }\n else if (accumulator == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE) {\n status = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE;\n }\n else {\n throw (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)accumulator;\n }\n break;\n }\n /*@NonInvalid\052/ <%org.occiware.clouddesigner.occi.Kind%> k = (<%org.occiware.clouddesigner.occi.Kind%>)ITERATOR_k.next();\n /**\n * k.term = \'entity\' and k.scheme = \'http://schemas.ogf.org/occi/core#\' and k.parent = null\n \052/\n /*@Caught\052/ /*@Nullable\052/ <%java.lang.Object%> CAUGHT_and_0;\n try {\n /*@Caught\052/ /*@Nullable\052/ <%java.lang.Object%> CAUGHT_and;\n try {\n /*@Caught\052/ /*@NonNull\052/ <%java.lang.Object%> CAUGHT_eq;\n try {\n if (k == null) {\n throw new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'\\\'http://schemas.ogf.org/occi/core/ecore\\\'::Category::term\\\'\");\n }\n final /*@Thrown\052/ <%java.lang.String%> term = k.getTerm();\n final /*@Thrown\052/ boolean eq = term.equals(<%org.occiware.clouddesigner.occi.OCCITables%>.STR_entity);\n CAUGHT_eq = eq;\n }\n catch (<%java.lang.Exception%> e) {\n CAUGHT_eq = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n }\n /*@Caught\052/ /*@NonNull\052/ <%java.lang.Object%> CAUGHT_eq_0;\n try {\n if (k == null) {\n throw new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'\\\'http://schemas.ogf.org/occi/core/ecore\\\'::Category::scheme\\\'\");\n }\n final /*@Thrown\052/ <%java.lang.String%> scheme = k.getScheme();\n final /*@Thrown\052/ boolean eq_0 = scheme.equals(<%org.occiware.clouddesigner.occi.OCCITables%>.STR_http_c_s_s_schemas_ogf_org_s_occi_s_core_35);\n CAUGHT_eq_0 = eq_0;\n }\n catch (<%java.lang.Exception%> e) {\n CAUGHT_eq_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n }\n final /*@Thrown\052/ <%java.lang.Boolean%> and = <%org.eclipse.ocl.pivot.library.logical.BooleanAndOperation%>.INSTANCE.evaluate(CAUGHT_eq, CAUGHT_eq_0);\n CAUGHT_and = and;\n }\n catch (<%java.lang.Exception%> e) {\n CAUGHT_and = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n }\n /*@Caught\052/ /*@NonNull\052/ <%java.lang.Object%> CAUGHT_eq_1;\n try {\n if (k == null) {\n throw new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'\\\'http://schemas.ogf.org/occi/core/ecore\\\'::Kind::parent\\\'\");\n }\n final /*@Thrown\052/ <%org.occiware.clouddesigner.occi.Kind%> parent_0 = k.getParent();\n final /*@Thrown\052/ boolean eq_1 = parent_0 == null;\n CAUGHT_eq_1 = eq_1;\n }\n catch (<%java.lang.Exception%> e) {\n CAUGHT_eq_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n }\n final /*@Thrown\052/ <%java.lang.Boolean%> and_0 = <%org.eclipse.ocl.pivot.library.logical.BooleanAndOperation%>.INSTANCE.evaluate(CAUGHT_and, CAUGHT_eq_1);\n CAUGHT_and_0 = and_0;\n }\n catch (<%java.lang.Exception%> e) {\n CAUGHT_and_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n }\n //\n if (CAUGHT_and_0 == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\t\t\t\t\t// Normal successful body evaluation result\n status = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n break;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Stop immediately \n }\n else if (CAUGHT_and_0 == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE) {\t\t\t\t// Normal unsuccessful body evaluation result\n ;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Carry on\n }\n else if (CAUGHT_and_0 == null) {\t\t\t\t\t\t\t\t// Abnormal null body evaluation result\n if (accumulator == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE) {\n accumulator = null;\t\t\t\t\t\t\t\t\t\t// Cache a null failure\n }\n }\n else if (CAUGHT_and_0 instanceof <%org.eclipse.ocl.pivot.values.InvalidValueException%>) {\t\t// Abnormal exception evaluation result\n accumulator = CAUGHT_and_0;\t\t\t\t\t\t\t\t\t// Cache an exception failure\n }\n else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Impossible badly typed result\n accumulator = new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(<%org.eclipse.ocl.pivot.messages.PivotMessages%>.NonBooleanBody, \"exists\");\n }\n }\n CAUGHT_status = status;\n }\n catch (<%java.lang.Exception%> e) {\n CAUGHT_status = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n }\n final /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.occiware.clouddesigner.occi.OCCITables%>.STR_Kind_c_c_EntityKindIsRootParent, this, null, diagnostics, context, null, severity_0, CAUGHT_status, <%org.occiware.clouddesigner.occi.OCCITables%>.INT_0).booleanValue();\n symbol_1 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_1;'" * @generated */ boolean EntityKindIsRootParent(DiagnosticChain diagnostics, Map<Object, Object> context); } // Kind