/**
 */
package ua.ansymo.hintco;

import org.eclipse.emf.common.util.EList;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>Port Instance</b></em>'.
 * <!-- end-user-doc -->
 *
 * <p>
 * The following features are supported:
 * </p>
 * <ul>
 *   <li>{@link ua.ansymo.hintco.PortInstance#getUnit <em>Unit</em>}</li>
 *   <li>{@link ua.ansymo.hintco.PortInstance#getAdaptation <em>Adaptation</em>}</li>
 * </ul>
 *
 * @see ua.ansymo.hintco.HintcoPackage#getPortInstance()
 * @model abstract="true"
 * @generated
 */
public interface PortInstance extends PrecendenceNode, IDed {
	/**
	 * Returns the value of the '<em><b>Unit</b></em>' container reference.
	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.UnitInstance#getPorts <em>Ports</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Unit</em>' container reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Unit</em>' container reference.
	 * @see #setUnit(UnitInstance)
	 * @see ua.ansymo.hintco.HintcoPackage#getPortInstance_Unit()
	 * @see ua.ansymo.hintco.UnitInstance#getPorts
	 * @model opposite="ports" transient="false"
	 * @generated
	 */
	UnitInstance getUnit();

	/**
	 * Sets the value of the '{@link ua.ansymo.hintco.PortInstance#getUnit <em>Unit</em>}' container reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Unit</em>' container reference.
	 * @see #getUnit()
	 * @generated
	 */
	void setUnit(UnitInstance value);

	/**
	 * Returns the value of the '<em><b>Adaptation</b></em>' containment reference.
	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.PortAdaptation#getPort <em>Port</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Adaptation</em>' containment reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Adaptation</em>' containment reference.
	 * @see #setAdaptation(PortAdaptation)
	 * @see ua.ansymo.hintco.HintcoPackage#getPortInstance_Adaptation()
	 * @see ua.ansymo.hintco.PortAdaptation#getPort
	 * @model opposite="port" containment="true"
	 * @generated
	 */
	PortAdaptation getAdaptation();

	/**
	 * Sets the value of the '{@link ua.ansymo.hintco.PortInstance#getAdaptation <em>Adaptation</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Adaptation</em>' containment reference.
	 * @see #getAdaptation()
	 * @generated
	 */
	void setAdaptation(PortAdaptation value);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model unique="false"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='&lt;%ua.ansymo.hintco.PortAdaptation%&gt; _adaptation = this.getAdaptation();\nboolean _tripleEquals = (_adaptation == null);\nif (_tripleEquals)\n{\n\treturn new &lt;%org.eclipse.emf.common.util.BasicEList%&gt;&lt;&lt;%ua.ansymo.hintco.PortAdaptation%&gt;&gt;(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%&gt;&gt;unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%&gt;&gt;newArrayList()));\n}\nboolean _isSelected = this.getAdaptation().isSelected();\nif (_isSelected)\n{\n\t&lt;%ua.ansymo.hintco.PortAdaptation%&gt; _adaptation_1 = this.getAdaptation();\n\tif ((_adaptation_1 instanceof &lt;%ua.ansymo.hintco.DecompositionPortAdaptation%&gt;))\n\t{\n\t\t&lt;%ua.ansymo.hintco.PortAdaptation%&gt; _adaptation_2 = this.getAdaptation();\n\t\treturn ((&lt;%ua.ansymo.hintco.DecompositionPortAdaptation%&gt;) _adaptation_2).selectedAdaptations();\n\t}\n\t&lt;%ua.ansymo.hintco.PortAdaptation%&gt; _adaptation_3 = this.getAdaptation();\n\treturn new &lt;%org.eclipse.emf.common.util.BasicEList%&gt;&lt;&lt;%ua.ansymo.hintco.PortAdaptation%&gt;&gt;(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%&gt;&gt;unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%&gt;&gt;newArrayList(_adaptation_3)));\n}\nreturn new &lt;%org.eclipse.emf.common.util.BasicEList%&gt;&lt;&lt;%ua.ansymo.hintco.PortAdaptation%&gt;&gt;(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%&gt;&gt;unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%&gt;&gt;newArrayList()));'"
	 * @generated
	 */
	EList<PortAdaptation> selectedAdaptations();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model kind="operation" unique="false"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='return false;'"
	 * @generated
	 */
	boolean isInput();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model unique="false" pUnique="false"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='return false;'"
	 * @generated
	 */
	boolean getsValueFrom(PortInstance p);

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @model unique="false"
	 *        annotation="http://www.eclipse.org/emf/2002/GenModel body='&lt;%java.lang.String%&gt; _string = this.getUnit().toString();\n&lt;%java.lang.String%&gt; _plus = (_string + \".\");\n&lt;%java.lang.String%&gt; _identifier = this.getIdentifier();\nreturn (_plus + _identifier);'"
	 * @generated
	 */
	String toString();

} // PortInstance
