/*******************************************************************************
* 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;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Attribute</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Attribute#getValue <em>Value</em>}</li>
* <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Attribute#getMutability <em>Mutability</em>}</li>
* <li>{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Attribute#getDatatype <em>Datatype</em>}</li>
* </ul>
* </p>
*
* @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getAttribute()
* @model
* @generated
*/
public interface Attribute extends Feature {
/**
* Returns the value of the '<em><b>Value</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Value</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Value</em>' attribute.
* @see #setValue(String)
* @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getAttribute_Value()
* @model
* @generated
*/
String getValue();
/**
* Sets the value of the '{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Attribute#getValue <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Value</em>' attribute.
* @see #getValue()
* @generated
*/
void setValue(String value);
/**
* Returns the value of the '<em><b>Mutability</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Mutability</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Mutability</em>' attribute.
* @see #setMutability(int)
* @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getAttribute_Mutability()
* @model
* @generated
*/
int getMutability();
/**
* Sets the value of the '{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Attribute#getMutability <em>Mutability</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Mutability</em>' attribute.
* @see #getMutability()
* @generated
*/
void setMutability(int value);
/**
* Returns the value of the '<em><b>Datatype</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Datatype</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Datatype</em>' attribute.
* @see #setDatatype(String)
* @see de.uni_mannheim.informatik.swt.models.plm.PLM.PLMPackage#getAttribute_Datatype()
* @model
* @generated
*/
String getDatatype();
/**
* Sets the value of the '{@link de.uni_mannheim.informatik.swt.models.plm.PLM.Attribute#getDatatype <em>Datatype</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Datatype</em>' attribute.
* @see #getDatatype()
* @generated
*/
void setDatatype(String value);
/**
* <!-- 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.mutability > 0) then OrderedSet{1000000, 10000, 1000, 100, 10, 1}->iterate(\r\n\tdenominator : Integer;\ts : String = \'\'|\r\n\t\tlet numberAsString : String = \r\n\t\t\tOrderedSet{\'0\',\'1\',\'2\',\'3\',\'4\',\'5\',\'6\',\'7\',\'8\',\'9\'}->at(self.mutability.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.mutability = 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 getMutabilityAsString();
/**
* <!-- 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.datatype.oclIsUndefined() or self.datatype = \'\' then\r\n\tself.name\r\nelse\r\n\tself.name.concat(\'[\').concat(self.datatype).concat(\']\')\r\nendif'"
* @generated
*/
String represent();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* returns all possible datatypes
* <!-- end-model-doc -->
* @model kind="operation" required="true"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL body='let primitiveDatatypes:Sequence(String) = \r\n\tself.oclAsType(ecore::EObject).eClass().eAllAttributes->select(a | a.name = \'datatype\').eAnnotations.details.key\r\nin\r\nlet enumerationDatatypes:Sequence(String) =\r\n\tself.getClabject().getOntology().enumerations.name\r\nin\r\n primitiveDatatypes->union(enumerationDatatypes)->asOrderedSet()'"
* @generated
*/
boolean isPrimitiveDatatypeAttribute();
} // Attribute