/******************************************************************************* * Copyright (c) 2011-2013 University of Mannheim: Chair for Software Engineering * 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: * Ralph Gerbig - initial API and implementation and initial documentation *******************************************************************************/ package de.uni_mannheim.informatik.swt.models.plm.PLM; import org.eclipse.emf.common.util.EList; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Clabject</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Clabject#isInstantiable <em>Instantiable</em>}</li> * <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Clabject#getPotency <em>Potency</em>}</li> * <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Clabject#getLevel <em>Level</em>}</li> * <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Clabject#getContent <em>Content</em>}</li> * <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Clabject#getFeature <em>Feature</em>}</li> * </ul> * </p> * * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getClabject() * @model abstract="true" * annotation="Comment level\040derrived='Element container = (this.eContainer() instanceof Element) ? (Element)this.eContainer() : null;\r\n\t\t\r\n\t\twhile ( (container != null) && !(container instanceof Model) )\r\n\t\t\tcontainer = (container.eContainer() instanceof Element) ? (Element)container.eContainer() : null;\r\n\t\tif (container == null)\r\n\t\t\treturn -1;\r\n\t\treturn (container.eContainer() instanceof Ontology) ? ((Ontology)container.eContainer()).getModels().indexOf(container) : -1;'" * @generated */ public interface Clabject extends DomainElement, Context { /** * Returns the value of the '<em><b>Instantiable</b></em>' attribute. * The default value is <code>"true"</code>. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Instantiable</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Instantiable</em>' attribute. * @see #setInstantiable(boolean) * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getClabject_Instantiable() * @model default="true" required="true" * @generated */ boolean isInstantiable(); /** * Sets the value of the '{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Clabject#isInstantiable <em>Instantiable</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Instantiable</em>' attribute. * @see #isInstantiable() * @generated */ void setInstantiable(boolean value); /** * Returns the value of the '<em><b>Potency</b></em>' attribute. * The default value is <code>"1"</code>. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Potency</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Potency</em>' attribute. * @see #setPotency(int) * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getClabject_Potency() * @model default="1" required="true" * @generated */ int getPotency(); /** * Sets the value of the '{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Clabject#getPotency <em>Potency</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Potency</em>' attribute. * @see #getPotency() * @generated */ void setPotency(int value); /** * Returns the value of the '<em><b>Level</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Level</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Level</em>' attribute. * @see #setLevel(int) * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getClabject_Level() * @model required="true" * @generated */ int getLevel(); /** * Sets the value of the '{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Clabject#getLevel <em>Level</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Level</em>' attribute. * @see #getLevel() * @generated */ void setLevel(int value); /** * Returns the value of the '<em><b>Content</b></em>' containment reference list. * The list contents are of type {@link de.uni_mannheim.informatik.swt.models.plm.PLM.Clabject}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Content</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>Content</em>' containment reference list. * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getClabject_Content() * @model containment="true" * @generated */ EList<Clabject> getContent(); /** * Returns the value of the '<em><b>Feature</b></em>' containment reference list. * The list contents are of type {@link de.uni_mannheim.informatik.swt.models.plm.PLM.Feature}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Feature</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>Feature</em>' containment reference list. * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getClabject_Feature() * @model containment="true" * @generated */ EList<Feature> getFeature(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * This is needed for ATL to be able to use ontological levels (models) as meta-model. * <!-- end-model-doc --> * @model ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='Classification.allInstances()->select(i | i.type = self).instance->asSet()'" * @generated */ EList<Clabject> allInstancesFrom(String model); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the model the clabject is contained in, recursing up the containment path if necessary. * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let parent:ecore::EObject = \r\n\tself.oclAsType(ecore::EObject).eContainer()\r\nin\r\n\tif (parent.oclIsUndefined()) then\r\n\t\tnull\r\n\telse\r\n\t\tif (parent.oclIsTypeOf(Model)) then\r\n\t\t\tparent.oclAsType(Model)\r\n\t\telse\r\n\t\t\tif (parent.oclIsKindOf(Clabject)) then\r\n\t\t\t\tparent.oclAsType(Clabject).getModel()\r\n\t\t\telse\r\n\t\t\t\tnull\r\n\t\t\tendif\r\n\t\tendif\r\n\tendif'" * @generated */ Model getModel(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the ontology the clabject's model is contained in, recursing up the containment path if necessary. * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getModel().getOntology()'" * @generated */ Ontology getOntology(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects the clabject inherits properties from. A model supertype is a clabject reachable through generalization supertypes. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let directResult:OrderedSet(Clabject) =\r\n\tself.getDirectSupertypes()->asOrderedSet()\r\nin\r\n--Start recursion\r\ndirectResult->iterate(c:Clabject; type:OrderedSet(Clabject) = directResult|\r\n\ttype->union(c.getSupertypes(directResult))->asOrderedSet()\r\n)'" * @generated */ EList<Clabject> getSupertypes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects the clabject inherits properties from. A model supertype is a clabject reachable through generalization supertypes. * <!-- end-model-doc --> * @model immediateResultMany="true" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let directResult:OrderedSet(Clabject) =\r\n\tself.getDirectSupertypes()->asOrderedSet()\r\nin\r\n--Start recursion\r\ndirectResult->iterate(c:Clabject; type:OrderedSet(Clabject) = directResult|\r\n\tif (immediateResult->includes(c)) then\r\n\t\ttype\r\n\telse\r\n\t\ttype->union(c.getSupertypes(immediateResult->union(directResult)->asOrderedSet()))->asOrderedSet()\r\n\tendif\r\n)'" * @generated */ EList<Clabject> getSupertypes(EList<Clabject> immediateResult); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects that are supertypes in a generalization the current clabejct is a subtype in. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='Generalization.allInstances()->select(g | g.subtype->includes(self)).supertype->flatten()->asOrderedSet()'" * @generated */ EList<Clabject> getDirectSupertypes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects the clabject passes properties to. A model subtype is a clabject reachable through generalization subtypes. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let directResult:OrderedSet(Clabject) =\r\n\tGeneralization.allInstances()->select(g | g.supertype->includes(self)).subtype->flatten()->asOrderedSet()\r\nin\r\n--Start recursion\r\ndirectResult->iterate(c:Clabject; type:OrderedSet(Clabject) = directResult|\r\n\ttype->union(c.getSubtypes())->asOrderedSet()\r\n)'" * @generated */ EList<Clabject> getSubtypes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects the clabject passes properties to. A model subtype is a clabject reachable through generalization subtypes. Shallow subtypes to not add additional features to a supertype. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='getSubtypes()->select(st | st.feature->forAll(f | self.feature->one(selfF | selfF.name = f.name)))'" * @generated */ EList<Clabject> getHollowSubtypes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects the clabject passes properties to. A model subtype is a clabject reachable through generalization subtypes. Shallow subtypes to not add additional features to a supertype. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='getSupertypes()->select(st | self.feature->forAll(f | st.feature->one(selfF | selfF.name = f.name)))'" * @generated */ EList<Clabject> getHollowSupertypes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the classifications the clabject is the instance of. * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='Classification.allInstances()->select(i|i.instance = self)'" * @generated */ EList<Classification> getClassificationsAsInstance(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the classifications the clabject is the type of. * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='Classification.allInstances()->select(i|i.type = self)'" * @generated */ EList<Classification> getClassificationsAsType(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all the clabjects that are an instance of the clabject based on classification elements. * A clabject i is a model instance of t if there exists a classification c with c.type = t or a subtype of t and c.instance = i or a supertype of i * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let allTypes:OrderedSet(Clabject) = \r\n\tself.getSubtypes()->including(self)->asOrderedSet()\r\nin\r\n\tallTypes.getClassificationsAsType().instance->union(allTypes.getClassificationsAsType().instance.getSubtypes())->asOrderedSet()\r\n\r\n--\tallTypes->iterate(type:Clabject; instances:Set(Clabject) = Set(Clabject){}|\r\n--\t\t--Take all instances\r\n--\t\tinstances->union(type.getClassificationsAsType().instance)\r\n\t\t--Union with subtypes of instances\r\n--\t\t->union(type.getClassificationsAsType().instance.getSubtypes())->asSet()\r\n--\t)'" * @generated */ EList<Clabject> getInstances(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all the clabjects that are atype of the clabject based on classification elements. * A clabject t is a model type of i if there exists a classification c with c.type = t or a subtype of t and c.instance = i or a supertype of i * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let allTypes:Set(Clabject) = \r\n\tself.getSupertypes()->including(self)\r\nin\r\nallTypes.getClassificationsAsInstance().type->union(allTypes.getClassificationsAsInstance().type.getSupertypes())->asOrderedSet()\r\n\t\r\n\t--allTypes->iterate(type:Clabject; instances:Set(Clabject) =Set(Clabject){}|\r\n\t--\t--Take all types\r\n\t--\tinstances->union(type.getClassificationsAsInstance().type)\r\n\t\t--Union with supertypes of types\r\n\t--\t->union(type.getClassificationsAsInstance().type.getSupertypes())->asSet()\r\n\t--)'" * @generated */ EList<Clabject> getTypes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Returns the clabjects that are the type in a classification the current clabject is the instance of. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getClassificationsAsInstance().type->asOrderedSet()'" * @generated */ EList<Clabject> getDirectTypes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Returns the types and their supertypes of the clabject only. The clabject's inheritance hierarchy are not taken into account. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getClassificationsAsInstance().type->union(self.getClassificationsAsInstance().type.getSupertypes())->asOrderedSet()'" * @generated */ EList<Clabject> getModelTypes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects reachable from the clabject through classifications in the type direction. * In other words, all the model instances recursively including their model instances. * This does not take the clabject's own classification hierarchy into account. * The clabject is root instance in this tree. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let directResult:OrderedSet(Clabject) = \r\n\tself.getModelTypes()->asOrderedSet()\r\nin\r\n\tdirectResult->union(directResult.getTypes()->asOrderedSet())->asOrderedSet()'" * @generated */ EList<Clabject> getEigenClassificationTreeAsInstance(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects reachable from the clabject through classifications in the type direction. * In other words, all the model instances recursively including their model instances. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let directResult:OrderedSet(Clabject) = \r\n\tself.getTypes()->asOrderedSet()\r\nin\r\n\tdirectResult->union(directResult.getTypes()->asOrderedSet())->asOrderedSet()'" * @generated */ EList<Clabject> getClassificationTreeAsInstance(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Returns the clabjects that are the instances in a classification the current clabject is the type of. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getClassificationsAsType().instance->asOrderedSet()'" * @generated */ EList<Clabject> getDirectInstances(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Returns the instances and their subtypes of the clabject only. The clabject's inheritance hierarchy are not taken into account. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getClassificationsAsType().instance->union(self.getClassificationsAsType().instance.getSubtypes())->asOrderedSet()'" * @generated */ EList<Clabject> getEigenInstances(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects reachable from the clabject through classifications in the instance direction. * In other words, all the model instances recursively including their model instances. * This does not take the clabject's own classification hierarchy into account. * The clabject is root type in this tree. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let directResult:OrderedSet(Clabject) = \r\n\tself.getEigenInstances()->asOrderedSet()\r\nin\r\n\tdirectResult->union(directResult.getInstances()->asOrderedSet())->asOrderedSet()'" * @generated */ EList<Clabject> getEigenClassificationTreeAsType(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects reachable from the clabject through classifications in the instance direction. In other words, all the model instances recursively including their model instances. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let directResult:OrderedSet(Clabject) = \r\n\tself.getInstances()->asOrderedSet()\r\nin\r\n\tdirectResult->union(directResult.getInstances()->asOrderedSet())->asOrderedSet()'" * @generated */ EList<Clabject> getClassificationTreeAsType(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all the features the clabject defines. That includes features inherited from supertypes. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let features:OrderedSet(Feature) = \r\n\tself.getSupertypes()->including(self).feature->asOrderedSet()\r\nin\r\n\tfeatures\r\n\t\t\t->select(f | features\r\n\t\t\t\t->excluding(f)\r\n\t\t\t\t\t->forAll(f2 | f.name = f2.name implies not f.getClabject().getSubtypes()->includes(f2.getClabject())))->asOrderedSet()'" * @generated */ EList<Feature> getAllFeatures(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all the attributes the clabject defines. That includes the attributes inherited from supertypes. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getAllFeatures()->select(f | f.oclIsTypeOf(Attribute)).oclAsType(Attribute)->asOrderedSet()'" * @generated */ EList<Attribute> getAllAttributes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all the features the clabject defines. That includes features inherited from supertypes. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.feature->select(f | f.oclIsKindOf(Attribute)).oclAsType(Attribute)->asOrderedSet()'" * @generated */ EList<Attribute> getEigenAttributes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all the methods the clabject defines. That includes the methods inherited from supertypes. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getAllFeatures()->select(f | f.oclIsTypeOf(Method)).oclAsType(Method)->asOrderedSet()'" * @generated */ EList<Method> getAllMethods(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all the features the clabject defines. That includes features inherited from supertypes. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.feature->select(f | f.oclIsKindOf(Method))->asOrderedSet()'" * @generated */ EList<Feature> getEigenMethods(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns true if there is a classification connecting the clabject or a supertype to the type or a subtype. * In other words, if the clabject is in the model instances of the type. * <!-- end-model-doc --> * @model ordered="false" typeRequired="true" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='type.getInstances()->includes(self)'" * @generated */ boolean isInstanceOf(Clabject type); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns true if there is a classification connecting the instance or a supertype to the clabject or a subtype. * In other words, if the clabject is in the model types of the instance. * <!-- end-model-doc --> * @model ordered="false" instanceRequired="true" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='instance.getTypes()->includes(self)'" * @generated */ boolean isTypeOf(Clabject instance); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the connections that have a participation where the clabject is the destination. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='Participation.allInstances()->select(r | r.destination = self).connection->asOrderedSet()'" * @generated */ EList<Connection> getEigenConnections(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the connections which have a participation where either the clabject or a supertype is the destination of. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getInheritedConnections()->union(self.getEigenConnections())->asOrderedSet()'" * @generated */ EList<Connection> getConnections(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the connections that have a participation where a supertype of the clabject is the destination of * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getSupertypes().getEigenConnections()->asOrderedSet()'" * @generated */ EList<Connection> getInheritedConnections(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the types of classifications where the clabject is an instance of and the kind is isonym or instantiation * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getClassificationsAsInstance()->select((kind= ClassificationKind::isonym) or (kind= ClassificationKind::instantiation)).type->asSet()'" * @generated */ EList<Clabject> getModelCompleteTypes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the types of classifications where the clabject is an instance of and the kind is hyponym * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getClassificationsAsInstance()->select(kind= ClassificationKind::hyponym).type->asSet()'" * @generated */ EList<Clabject> getModelIncompleteTypes(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the type of a classification the clabject is the instance of and the kind is instantiation * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let blueprints:OrderedSet(Clabject) = \r\n\tself.getClassificationsAsInstance()->select(c | c.kind= ClassificationKind::instantiation).type->asOrderedSet()\r\nin\r\n\tif blueprints->size() > 0 then \r\n\t\tblueprints->first() \r\n\telse \r\n\t\tnull \r\n\tendif'" * @generated */ Clabject getBlueprint(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects that are the instance of classifications with kind instantiation and the clabject is the type of * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getClassificationsAsType()->select(c | c.kind = ClassificationKind::instantiation).instance->asOrderedSet()'" * @generated */ EList<Clabject> getOffspring(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects that are the instance of classifications with kind instantiation or isonym and the clabject is the type of * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getClassificationsAsType()->select(c | c.kind = ClassificationKind::isonym).instance->asOrderedSet()'" * @generated */ EList<Clabject> getIsonyms(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects that are the instance of classifications with kind hyponym and the clabject is the type of * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getClassificationsAsType()->select(c | c.kind = ClassificationKind::hyponym).instance->asOrderedSet()'" * @generated */ EList<Clabject> getHyponyms(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the destinations of the participations of the connection that are not the clabject itself (i.e. the other participants of the connection) * <!-- end-model-doc --> * @model connectionRequired="true" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='connection.getDomain(self)'" * @generated */ EList<Clabject> getDomainForConnection(Connection connection); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * searches for domain specific visualizers that can be used for visualization * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='--At first we look if a visualization descriptor is directly attached\r\nlet possibleVisualization:Set(AbstractDSLVisualizer) = \r\n\tself.visualizer.dslVisualizer->asSet()\r\nin\r\n--Now look at the superTypes if nothing is directly found\r\nlet possibleVisualizationOfModelSupertypes:Set(AbstractDSLVisualizer) =\r\n\tif (possibleVisualization->size() = 0) then\r\n\t\tself.getSupertypes().visualizer.dslVisualizer->asSet()\r\n\telse\r\n\t\tpossibleVisualization\r\n\tendif\r\nin\r\n--Look at the model types if nothing is found\r\nif (possibleVisualizationOfModelSupertypes->size() = 0) then\r\n\tself.getTypes().getPossibleDomainSpecificVisualizers()->asSet()\r\nelse\r\n\tpossibleVisualizationOfModelSupertypes\r\nendif'" * @generated */ EList<AbstractDSLVisualizer> getPossibleDomainSpecificVisualizers(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the generalizations where the clabject is (one of) the subtype * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='Generalization.allInstances()->select(g|g.subtype->includes(self))'" * @generated */ EList<Generalization> getGeneralizationsAsSubtype(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the generalizations where the clabject is (one of) the supertype * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='Generalization.allInstances()->select(g|g.supertype->includes(self))'" * @generated */ EList<Generalization> getGeneralizationsAsSupertype(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all the participations that define a navigation for the clabject * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let allConnections:Set(Connection)=\nConnection.allInstances()->select(c | c.getParticipants()->includes(self))->asSet()\nin\nallConnections->collect(c| if c.participation->select(r|r.destination=self)->size() = 1 then \n\tc.participation->reject(r|r.destination=self) else c.participation endif\n)->asOrderedSet()'" * @generated */ EList<Participation> getEigenNavigations(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the participations that define a navigation for a supertype of the clabject * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getSupertypes()->iterate(\nsuper;\nres : OrderedSet(Participation)= OrderedSet{} |\nres->union(super.getEigenNavigations())->asOrderedSet()\n)'" * @generated */ EList<Participation> getInheritedNavigations(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all the participations that define a navigation either for the clabject or one of its supertypes * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getEigenNavigations()->union(self.getInheritedNavigations())->asOrderedSet()'" * @generated */ EList<Participation> getAllNavigations(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the participationNames the clabject can navigate by, i.e. the participationNames of the participations from allNavigations * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getAllNavigations().participationName()->asOrderedSet()'" * @generated */ EList<String> getDomainParticipationNames(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * @deprecated * <!-- end-model-doc --> * @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getDirectSupertypes()->collect(getDomainForParticipationName(participationName))->asOrderedSet()->union(\r\n\tself.getEigenNavigations()->select(r|r.participationName() = participationName).destination->asOrderedSet()\r\n)->asOrderedSet()'" * @generated */ EList<Clabject> getDomainForParticipationName(String participationName); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the participations the clabject can navigate by filtered for the participationName * <!-- end-model-doc --> * @model participationNameRequired="true" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getAllNavigations()->select(r | r.participationName() = participationName)->asOrderedSet()'" * @generated */ EList<Participation> getAllNavigationsForParticipationName(String participationName); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all the participations either the clabject or one of its supertypes is reachable by * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.getEigenNavigationsAsDestination()->union(self.getInheritedNavigationsAsDestination())->asOrderedSet()'" * @generated */ EList<Participation> getAllNavigationsAsDestination(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all participations that the clabject is the destination of * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='Participation.allInstances()->select(destination = self)->asOrderedSet()'" * @generated */ EList<Participation> getEigenNavigationsAsDestination(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns all participations that the one of the clabjects supertype is the destination of * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='Participation.allInstances()->select(r| self.getSupertypes()->includes(r.destination))->asOrderedSet()'" * @generated */ EList<Participation> getInheritedNavigationsAsDestination(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns a human readable string representation * <!-- end-model-doc --> * @model required="true" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='if self.oclIsTypeOf(Connection) then \n\tself.oclAsType(Connection).represent() \nelse \n\tself.oclAsType(Entity).represent() \nendif'" * @generated */ String represent(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the feature with the matching name * <!-- end-model-doc --> * @model ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='if self.getAllFeatures()->select(f|f.name = name)->size() = 0 then \r\n\tnull\r\nelse\r\n\tself.getAllFeatures()->select(f|f.name = name)->asOrderedSet()->first()\r\nendif'" * @generated */ Feature getFeatureForName(String name); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns a human readable string representation * <!-- end-model-doc --> * @model kind="operation" required="true" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='if (self.potency > 0) then OrderedSet{1000000, 10000, 1000, 100, 10, 1}->iterate(\r\n\tdenominator : Integer; s : String = \'\'|\r\n\t\tlet numberAsString : String = \r\n\t\t\tOrderedSet{\'0\',\'1\',\'2\',\'3\',\'4\',\'5\',\'6\',\'7\',\'8\',\'9\'}->at(self.potency.div(denominator).mod(10) + 1)\r\n\t\tin\r\n\t\tif s=\'\' and numberAsString = \'0\' then\r\n\t\t\ts\r\n\t\telse\r\n\t\t\ts.concat(numberAsString)\r\n\t\tendif\r\n\t)\r\nelse\r\n\tif (self.potency = 0) then\r\n\t\t\'0\'\r\n\telse\r\n\t\t\'*\'\r\n\tendif\r\nendif\r\n\r\n'" * @generated */ String getPotencyAsString(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the clabjects reachable from the clabject through classifications in the type direction. * In other words, all the model instances recursively including their model instances. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let siblings:OrderedSet(Clabject) = \n\t--get all disjoint generalizations in which self participates\n\tself.getGeneralizationsAsSubtype()->reject(g | g.disjoint = null or not g.disjoint)\n\t--from these disjoint generalization get all subtypes except self\n\t.subtype->reject(s | s=self)->asOrderedSet()\n\nin \nsiblings->union(\n\tsiblings->collect(s | s.getSubtypes())->asOrderedSet()\n)->union(\n\tself.getSupertypes()->reject(super | super = self)->collect(super | super.getDisjointSiblings())->asOrderedSet()\n)->asOrderedSet()'" * @generated */ EList<Clabject> getDisjointSiblings(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * returns the model the clabject is contained in, recursing up the containment path if necessary. * <!-- end-model-doc --> * @model kind="operation" ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='--contained in model?\r\nif (self.oclAsType(ecore::EObject).eContainer().oclIsTypeOf(Model)) then\r\n\t--yes! -> is this clabject connected via a composition?\r\n\tlet containers:OrderedSet(Clabject) =\r\n\t\tself.getConnections().participation->select(r | r.oclAsType(Participation).destination <> self)->select(r | r.containment).destination->asOrderedSet()\r\n\tin\r\n\t\t--yes! -> return the containing clabject\r\n\t\tif (containers->size() = 0) then\r\n \t\t\tself.getModel()\r\n\t\t--no! -> return the containing model\r\n\t \telse\r\n \t\t\tcontainers->first().oclAsType(Element)\r\n \t\tendif\r\n--no! -> return the containing model\r\n else\r\n \tself.getModel()\r\n endif'" * @generated */ Element getContainer(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Searches for an Attribute with given name. Inherited attributes are considered if not overriden. * <!-- end-model-doc --> * @model nameRequired="true" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let foundAttributes:OrderedSet(Attribute) =\t\r\n\tself.getAllAttributes()->select(a | a.name = name)\r\nin \r\n\tif (foundAttributes->size() > 0) then \r\n\t\tfoundAttributes->first()\r\n\telse\r\n\t\tnull\r\n\tendif'" * @generated */ Attribute getAttributeByName(String name); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Checks wether the clabjects violates multiplicity constraints defined on type level with its connections * <!-- end-model-doc --> * @model ordered="false" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='--Type-level connections are needed to check constrainsts againt\r\nlet typeLevelConnections:OrderedSet(Connection) =\r\n\tself.getDirectTypes().getConnections()->asOrderedSet()\r\nin\r\n--Connections at instance levels are validated\r\nlet instanceLevelConnections:OrderedSet(Connection) =\r\n\tself.getConnections()\r\nin\r\n--All participations from which the context it self is not destination is interesting\r\nlet instanceLevelParticipations:OrderedSet(Participation) =\r\n\tinstanceLevelConnections.participation->select(p : Participation | p.destination <> self)->asOrderedSet()\r\nin\r\n--If there is no connection at the type/instance level nothing can be violated\r\nif (typeLevelConnections->size() = 0 or instanceLevelConnections->size() = 0) then\r\n\tfalse\r\nelse\r\n\t--For all connections at the type level constraints must be valid at instance level\r\n\ttypeLevelConnections->forAll(typeConnection : Connection | \r\n\t\t--All Connections that belong to checked type Connection\r\n\t\tlet relevantInstanceLevelConnections:OrderedSet(Connection)=\r\n\t\t\tinstanceLevelConnections->select(c : Connection | c.getTypes()->includes(typeConnection))\r\n\t\tin\r\n\t\t--Get the participations connected to the instance connections\r\n\t\tlet relevantInstanceParticipations:OrderedSet(Participation) = \r\n\t\t\tinstanceLevelParticipations->select(p : Participation | instanceLevelConnections.participation->includes(p))\r\n\t\tin\r\n\t\t--Get the right participations at the type level\r\n\t\tlet relevantTypeParticipation:Participation =\r\n\t\t\ttypeConnection.participation->select(p : Participation | p.navigable = instanceLevelParticipations->first().navigable)->first()\r\n\t\tin\r\n\t\t--Get the sum of multiplicities from the the to the instance connections connected participations\r\n\t\tnot (relevantTypeParticipation.upper = -1 or relevantInstanceParticipations.upper->sum() <= relevantTypeParticipation.upper)\r\n\t)\r\nendif'" * @generated */ boolean violatesMultiplicityConstraints(); } // Clabject