/******************************************************************************* * 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; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>LML Visualizer</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.LMLVisualizer#getAttributes <em>Attributes</em>}</li> * <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.LMLVisualizer#getDurability <em>Durability</em>}</li> * <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.LMLVisualizer#getTemplate <em>Template</em>}</li> * <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.LMLVisualizer#getDslVisualizer <em>Dsl Visualizer</em>}</li> * </ul> * </p> * * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getLMLVisualizer() * @model * @generated */ public interface LMLVisualizer extends EObject { /** * Returns the value of the '<em><b>Attributes</b></em>' attribute list. * The list contents are of type {@link java.lang.String}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Attributes</em>' attribute list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Attributes</em>' attribute list. * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getLMLVisualizer_Attributes() * @model * @generated */ EList<String> getAttributes(); /** * Returns the value of the '<em><b>Durability</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Durability</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Durability</em>' attribute. * @see #setDurability(int) * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getLMLVisualizer_Durability() * @model required="true" * @generated */ int getDurability(); /** * Sets the value of the '{@link de.uni_mannheim.informatik.swt.models.plm.PLM.LMLVisualizer#getDurability <em>Durability</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Durability</em>' attribute. * @see #getDurability() * @generated */ void setDurability(int value); /** * Returns the value of the '<em><b>Template</b></em>' reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Template</em>' reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Template</em>' reference. * @see #setTemplate(LMLVisualizer) * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getLMLVisualizer_Template() * @model * @generated */ LMLVisualizer getTemplate(); /** * Sets the value of the '{@link de.uni_mannheim.informatik.swt.models.plm.PLM.LMLVisualizer#getTemplate <em>Template</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Template</em>' reference. * @see #getTemplate() * @generated */ void setTemplate(LMLVisualizer value); /** * Returns the value of the '<em><b>Dsl Visualizer</b></em>' containment reference list. * The list contents are of type {@link de.uni_mannheim.informatik.swt.models.plm.PLM.AbstractDSLVisualizer}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Dsl Visualizer</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>Dsl Visualizer</em>' containment reference list. * @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getLMLVisualizer_DslVisualizer() * @model containment="true" * @generated */ EList<AbstractDSLVisualizer> getDslVisualizer(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Returns the default visualization values depending on the containing model element. * <!-- end-model-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let default:OrderedSet(String) = self.oclAsType(ecore::EObject).eContainer().eClass().eAllAttributes->collect(a | if a.name <> \'level\' then a.name.concat(\'= default\') else a.name.concat(\'= noshow\') endif)->asOrderedSet()\r\nin\r\nif (self.getContainingElement().oclIsTypeOf(Entity)) then\r\n\tdefault->append(\'ProximityClassification= 1\')\r\n\t\t->append(\'DSLRendering= false\')\r\n\t\t->append(\'ProximityIndication= [](){0}\')\r\nelse\r\n\tif (self.getContainingElement().oclIsTypeOf(Connection)) then\r\n\tdefault->append(\'ProximityClassification= 1\')\r\n\t\t->append(\'DSLRendering= false\')\r\n\t\t->append(\'ProximityIndication= [](){0}\')\r\n\t\t->append(\'collapsed= false\')\r\n\telse\r\n\t\tif (self.getContainingElement().oclIsTypeOf(Generalization)\r\n\t\t\tor self.getContainingElement().oclIsTypeOf(SetRelationship)) then\r\n\t\t\t\tdefault->append(\'collapsed= false\')\r\n\t\telse\r\n\t\t\tif (self.getContainingElement().oclIsTypeOf(Ontology)) then\r\n\t\t\t\tdefault->append(\'showClassificationParticipationNames = false\')\r\n\t\t\telse\r\n\t\t\t\tdefault\r\n\t\t\tendif\r\n\t\tendif\r\n\tendif\r\nendif'" * @generated */ EList<String> getDefaultVisualizationValues(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model required="true" ordered="false" keyRequired="true" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let keyValueList : Sequence(String) =\r\n\tself.attributes->select(a | a.size() > key.size())->select(a | a.substring(1, key.size()) = key)->asSequence()\r\nin\r\nlet keyValue : String =\r\n\tif (keyValueList->size() > 0) then\r\n\t\tkeyValueList->first()\r\n\telse\r\n\t\t\'\'\r\n\tendif\r\nin\r\nlet indexOfEquals:Integer =\r\n\t--Key not found?\r\n\tif (keyValue <> \'\') then\r\n\t\tSequence{1 .. keyValue.size()}->iterate(i:Integer; index:Integer = -1 | \r\n\t\t\tif (index = -1 and keyValue.substring(i,i) = \'=\') then i else index endif)\r\n\telse\r\n\t\t-1\r\n\tendif\r\nin\r\nlet value:String =\r\n\t--No Equals found in keyValue\r\n\tif(indexOfEquals <> -1) then\r\n\t\tkeyValue.substring(indexOfEquals + 1, keyValue.size())\r\n\telse\r\n\t\t\'\'\r\n\tendif\r\nin\r\nlet valueWithoutLeadingSpace:String = \r\n\t--No value found\r\n\tif (value <> \'\') then\r\n\t\tif (value.substring(1,1) = \' \' and value.size() > 1) then\r\n\t\t\tvalue.substring(2, value.size())\r\n\t\telse\r\n\t\t\tvalue\r\n\t\tendif\r\n\telse\r\n\t\t\'\'\r\n\tendif\r\nin\r\n\tvalueWithoutLeadingSpace'" * @generated */ String getValueForKey(String key); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model kind="operation" * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='self.oclAsType(ecore::EObject).eContainer().oclAsType(Element)'" * @generated */ Element getContainingElement(); /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model * @generated */ void EOperation0(); } // LMLVisualizer