blob: 60b169450a6d71f8d33a5aca76adac35f0978480 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2010, 2013 E.D.Willink and others.
* 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:
* E.D.Willink - Initial API and implementation
*******************************************************************************/
package org.eclipse.ocl.pivot;
import java.util.List;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.ocl.pivot.ids.PropertyId;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Property</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A property is a typed element that represents an attribute of a class.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link org.eclipse.ocl.pivot.Property#getAssociationClass <em>Association Class</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#getDefaultValue <em>Default Value</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#getDefaultValueString <em>Default Value String</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#isComposite <em>Is Composite</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#isDerived <em>Is Derived</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#isID <em>Is ID</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#isImplicit <em>Is Implicit</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#isReadOnly <em>Is Read Only</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#isResolveProxies <em>Is Resolve Proxies</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#isTransient <em>Is Transient</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#isUnsettable <em>Is Unsettable</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#isVolatile <em>Is Volatile</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#getKeys <em>Keys</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#getOpposite <em>Opposite</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#getOwnedExpression <em>Owned Expression</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#getOwningClass <em>Owning Class</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#getRedefinedProperties <em>Redefined Properties</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#getReferredProperty <em>Referred Property</em>}</li>
* <li>{@link org.eclipse.ocl.pivot.Property#getSubsettedProperty <em>Subsetted Property</em>}</li>
* </ul>
*
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty()
* @generated
*/
public interface Property extends Feature {
/**
* Returns the value of the '<em><b>Association Class</b></em>' reference.
* It is bidirectional and its opposite is '{@link org.eclipse.ocl.pivot.AssociationClass#getUnownedAttributes <em>Unowned Attributes</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Association Class</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Association Class</em>' reference.
* @see #setAssociationClass(AssociationClass)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_AssociationClass()
* @see org.eclipse.ocl.pivot.AssociationClass#getUnownedAttributes
* @generated
*/
AssociationClass getAssociationClass();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#getAssociationClass <em>Association Class</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Association Class</em>' reference.
* @see #getAssociationClass()
* @generated
*/
void setAssociationClass(AssociationClass value);
/**
* Returns the value of the '<em><b>Is Read Only</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If isReadOnly is true, the attribute may not be written to after initialization.
* <!-- end-model-doc -->
* @return the value of the '<em>Is Read Only</em>' attribute.
* @see #setIsReadOnly(boolean)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_IsReadOnly()
* @generated
*/
boolean isReadOnly();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#isReadOnly <em>Is Read Only</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Read Only</em>' attribute.
* @see #isReadOnly()
* @generated
*/
void setIsReadOnly(boolean value);
/**
* Returns the value of the '<em><b>Is Composite</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If isComposite is true, the object containing the attribute is a container for the object or value contained in the attribute.
* <!-- end-model-doc -->
* @return the value of the '<em>Is Composite</em>' attribute.
* @see #setIsComposite(boolean)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_IsComposite()
* @generated
*/
boolean isComposite();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#isComposite <em>Is Composite</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Composite</em>' attribute.
* @see #isComposite()
* @generated
*/
void setIsComposite(boolean value);
/**
* Returns the value of the '<em><b>Is Derived</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* If isDerived is true, the value of the attribute is derived from information elsewhere.
* <!-- end-model-doc -->
* @return the value of the '<em>Is Derived</em>' attribute.
* @see #setIsDerived(boolean)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_IsDerived()
* @generated
*/
boolean isDerived();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#isDerived <em>Is Derived</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Derived</em>' attribute.
* @see #isDerived()
* @generated
*/
void setIsDerived(boolean value);
/**
* Returns the value of the '<em><b>Opposite</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Two attributes attr1 and attr2 of two objects o1 and o2 (which may be the same object) may be paired with each other so that o1.attr1 refers to o2 if and only if o2.attr2 refers to o1. In such a case attr1 is the opposite of attr2 and attr2 is the opposite of attr1.
* <!-- end-model-doc -->
* @return the value of the '<em>Opposite</em>' reference.
* @see #setOpposite(Property)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_Opposite()
* @generated
*/
Property getOpposite();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#getOpposite <em>Opposite</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Opposite</em>' reference.
* @see #getOpposite()
* @generated
*/
void setOpposite(Property value);
/**
* Returns the value of the '<em><b>Owned Expression</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Owned Expression</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>Owned Expression</em>' containment reference.
* @see #setOwnedExpression(LanguageExpression)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_OwnedExpression()
* @generated
*/
LanguageExpression getOwnedExpression();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#getOwnedExpression <em>Owned Expression</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Owned Expression</em>' containment reference.
* @see #getOwnedExpression()
* @generated
*/
void setOwnedExpression(LanguageExpression value);
/**
* Returns the value of the '<em><b>Is Implicit</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Implicit</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Is Implicit</em>' attribute.
* @see #setIsImplicit(boolean)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_IsImplicit()
* @generated
*/
boolean isImplicit();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#isImplicit <em>Is Implicit</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Implicit</em>' attribute.
* @see #isImplicit()
* @generated
*/
void setIsImplicit(boolean value);
/**
* Returns the value of the '<em><b>Default Value</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* An object that defines the initial value for the property when an object of the owning class is instantiated. The value is derived by interpreting the defaultValueString in accordance with the property type.
* <!-- end-model-doc -->
* @return the value of the '<em>Default Value</em>' attribute.
* @see #setDefaultValue(Object)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_DefaultValue()
* @generated
*/
Object getDefaultValue();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#getDefaultValue <em>Default Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Default Value</em>' attribute.
* @see #getDefaultValue()
* @generated
*/
void setDefaultValue(Object value);
/**
* Returns the value of the '<em><b>Default Value String</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A string that is used to give an initial value for the property when an object of the owning class is instantiated. Interpretation of the string depends on the property type. For a Boolean Property the string may be 'true' (without quotes) denoting the Boolean true value. For a String property, the string may again be 'true' (without quotes) denoting the four character sequence 't' 'r' 'u' 'e'.
* <!-- end-model-doc -->
* @return the value of the '<em>Default Value String</em>' attribute.
* @see #setDefaultValueString(String)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_DefaultValueString()
* @generated
*/
String getDefaultValueString();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#getDefaultValueString <em>Default Value String</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Default Value String</em>' attribute.
* @see #getDefaultValueString()
* @generated
*/
void setDefaultValueString(String value);
/**
* Returns the value of the '<em><b>Is ID</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Is ID</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Is ID</em>' attribute.
* @see #setIsID(boolean)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_IsID()
* @generated
*/
boolean isID();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#isID <em>Is ID</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is ID</em>' attribute.
* @see #isID()
* @generated
*/
void setIsID(boolean value);
/**
* Returns the value of the '<em><b>Keys</b></em>' reference list.
* The list contents are of type {@link org.eclipse.ocl.pivot.Property}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Keys</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>Keys</em>' reference list.
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_Keys()
* @generated
*/
List<Property> getKeys();
/**
* Returns the value of the '<em><b>Is Resolve Proxies</b></em>' attribute.
* The default value is <code>"true"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Resolve Proxies</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Is Resolve Proxies</em>' attribute.
* @see #setIsResolveProxies(boolean)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_IsResolveProxies()
* @generated
*/
boolean isResolveProxies();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#isResolveProxies <em>Is Resolve Proxies</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Resolve Proxies</em>' attribute.
* @see #isResolveProxies()
* @generated
*/
void setIsResolveProxies(boolean value);
/**
* Returns the value of the '<em><b>Is Transient</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Transient</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Is Transient</em>' attribute.
* @see #setIsTransient(boolean)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_IsTransient()
* @generated
*/
boolean isTransient();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#isTransient <em>Is Transient</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Transient</em>' attribute.
* @see #isTransient()
* @generated
*/
void setIsTransient(boolean value);
/**
* Returns the value of the '<em><b>Is Unsettable</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Unsettable</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Is Unsettable</em>' attribute.
* @see #setIsUnsettable(boolean)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_IsUnsettable()
* @generated
*/
boolean isUnsettable();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#isUnsettable <em>Is Unsettable</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Unsettable</em>' attribute.
* @see #isUnsettable()
* @generated
*/
void setIsUnsettable(boolean value);
/**
* Returns the value of the '<em><b>Is Volatile</b></em>' attribute.
* The default value is <code>"false"</code>.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Volatile</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Is Volatile</em>' attribute.
* @see #setIsVolatile(boolean)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_IsVolatile()
* @generated
*/
boolean isVolatile();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#isVolatile <em>Is Volatile</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Is Volatile</em>' attribute.
* @see #isVolatile()
* @generated
*/
void setIsVolatile(boolean value);
/**
* Returns the value of the '<em><b>Subsetted Property</b></em>' reference list.
* The list contents are of type {@link org.eclipse.ocl.pivot.Property}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Subsetted Property</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>Subsetted Property</em>' reference list.
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_SubsettedProperty()
* @generated
*/
List<Property> getSubsettedProperty();
/**
* Returns the value of the '<em><b>Referred Property</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Referred Property</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Referred Property</em>' reference.
* @see #setReferredProperty(Property)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_ReferredProperty()
* @generated
*/
Property getReferredProperty();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#getReferredProperty <em>Referred Property</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Referred Property</em>' reference.
* @see #getReferredProperty()
* @generated
*/
void setReferredProperty(Property value);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
boolean isAttribute(Property p);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
boolean validateCompatibleDefaultExpression(DiagnosticChain diagnostics, Map<Object, Object> context);
/**
* Returns the value of the '<em><b>Owning Class</b></em>' container reference.
* It is bidirectional and its opposite is '{@link org.eclipse.ocl.pivot.Class#getOwnedProperties <em>Owned Properties</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* The class that owns the property, and of which the property is an attribute.
* <!-- end-model-doc -->
* @return the value of the '<em>Owning Class</em>' container reference.
* @see #setOwningClass(org.eclipse.ocl.pivot.Class)
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_OwningClass()
* @see org.eclipse.ocl.pivot.Class#getOwnedProperties
* @generated
*/
@Override
org.eclipse.ocl.pivot.Class getOwningClass();
/**
* Sets the value of the '{@link org.eclipse.ocl.pivot.Property#getOwningClass <em>Owning Class</em>}' container reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Owning Class</em>' container reference.
* @see #getOwningClass()
* @generated
*/
void setOwningClass(org.eclipse.ocl.pivot.Class value);
/**
* Returns the value of the '<em><b>Redefined Properties</b></em>' reference list.
* The list contents are of type {@link org.eclipse.ocl.pivot.Property}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Redefined Properties</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>Redefined Properties</em>' reference list.
* @see org.eclipse.ocl.pivot.PivotPackage#getProperty_RedefinedProperties()
* @generated
*/
List<Property> getRedefinedProperties();
@NonNull PropertyId getPropertyId();
/**
* Return the Inheritance dispatch table for the owning type, or null for an orphan property owned by an Annotation.
*/
@Nullable CompleteInheritance getInheritance(@NonNull StandardLibrary standardLibrary);
/**
* Initialize the value of this property within objectValue to propertyValue.
* <p>
* This method is not thread-safe and should only be invoked to complete construction of objectvalue before
* making it visible to other threads.
*/
void initValue(@NonNull EObject object, @Nullable Object ecoreValue);
} // Property