blob: 0d1553a5d3144463181c645d11d392e137529605 [file] [log] [blame]
/**
* Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* 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:
* Florian Pirchner - Initial implementation
*/
package org.eclipse.osbp.ecview.core.extension.model.extension.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.EMap;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EcoreEMap;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.osbp.ecview.core.common.model.core.CoreModelPackage;
import org.eclipse.osbp.ecview.core.common.model.core.YConverter;
import org.eclipse.osbp.ecview.core.common.model.core.YFlatAlignment;
import org.eclipse.osbp.ecview.core.common.model.core.impl.YStringToStringMapImpl;
import org.eclipse.osbp.ecview.core.common.model.datatypes.DatatypesFactory;
import org.eclipse.osbp.ecview.core.common.model.datatypes.YDatadescription;
import org.eclipse.osbp.ecview.core.extension.model.extension.ExtensionModelPackage;
import org.eclipse.osbp.ecview.core.extension.model.extension.YColumn;
// TODO: Auto-generated Javadoc
/**
* <!-- begin-user-doc --> An implementation of the model object '
* <em><b>YColumn</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getTags <em>Tags</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getId <em>Id</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getName <em>Name</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getProperties <em>Properties</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getIcon <em>Icon</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#isVisible <em>Visible</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getDatadescription <em>Datadescription</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getOrphanDatadescriptions <em>Orphan Datadescriptions</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#isOrderable <em>Orderable</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#isCollapsed <em>Collapsed</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#isCollapsible <em>Collapsible</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getAlignment <em>Alignment</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getExpandRatio <em>Expand Ratio</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getPropertyPath <em>Property Path</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getConverter <em>Converter</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getType <em>Type</em>}</li>
* <li>{@link org.eclipse.osbp.ecview.core.extension.model.extension.impl.YColumnImpl#getTypeQualifiedName <em>Type Qualified Name</em>}</li>
* </ul>
*
* @generated
*/
public class YColumnImpl extends MinimalEObjectImpl.Container implements
YColumn {
/**
* The cached value of the '{@link #getTags() <em>Tags</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTags()
* @generated
* @ordered
*/
protected EList<String> tags;
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @see #getId()
* @generated
* @ordered
*/
protected static final String ID_EDEFAULT = null;
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @see #getId()
* @generated
* @ordered
*/
protected String id = ID_EDEFAULT;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The cached value of the '{@link #getProperties() <em>Properties</em>}' map.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getProperties()
* @generated
* @ordered
*/
protected EMap<String, String> properties;
/**
* The default value of the '{@link #getIcon() <em>Icon</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getIcon()
* @generated
* @ordered
*/
protected static final String ICON_EDEFAULT = null;
/**
* The cached value of the '{@link #getIcon() <em>Icon</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getIcon()
* @generated
* @ordered
*/
protected String icon = ICON_EDEFAULT;
/**
* The default value of the '{@link #isVisible() <em>Visible</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #isVisible()
* @generated
* @ordered
*/
protected static final boolean VISIBLE_EDEFAULT = true;
/**
* The cached value of the '{@link #isVisible() <em>Visible</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #isVisible()
* @generated
* @ordered
*/
protected boolean visible = VISIBLE_EDEFAULT;
/**
* The cached value of the '{@link #getDatadescription() <em>Datadescription</em>}' reference.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
* @see #getDatadescription()
* @generated
* @ordered
*/
protected YDatadescription datadescription;
/**
* The cached value of the '{@link #getOrphanDatadescriptions()
* <em>Orphan Datadescriptions</em>}' containment reference list. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @see #getOrphanDatadescriptions()
* @generated
* @ordered
*/
protected EList<YDatadescription> orphanDatadescriptions;
/**
* The default value of the '{@link #isOrderable() <em>Orderable</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #isOrderable()
* @generated
* @ordered
*/
protected static final boolean ORDERABLE_EDEFAULT = true;
/**
* The cached value of the '{@link #isOrderable() <em>Orderable</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #isOrderable()
* @generated
* @ordered
*/
protected boolean orderable = ORDERABLE_EDEFAULT;
/**
* The default value of the '{@link #isCollapsed() <em>Collapsed</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #isCollapsed()
* @generated
* @ordered
*/
protected static final boolean COLLAPSED_EDEFAULT = false;
/**
* The cached value of the '{@link #isCollapsed() <em>Collapsed</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #isCollapsed()
* @generated
* @ordered
*/
protected boolean collapsed = COLLAPSED_EDEFAULT;
/**
* The default value of the '{@link #isCollapsible() <em>Collapsible</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #isCollapsible()
* @generated
* @ordered
*/
protected static final boolean COLLAPSIBLE_EDEFAULT = true;
/**
* The cached value of the '{@link #isCollapsible() <em>Collapsible</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #isCollapsible()
* @generated
* @ordered
*/
protected boolean collapsible = COLLAPSIBLE_EDEFAULT;
/**
* The default value of the '{@link #getAlignment() <em>Alignment</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getAlignment()
* @generated
* @ordered
*/
protected static final YFlatAlignment ALIGNMENT_EDEFAULT = YFlatAlignment.LEFT;
/**
* The cached value of the '{@link #getAlignment() <em>Alignment</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getAlignment()
* @generated
* @ordered
*/
protected YFlatAlignment alignment = ALIGNMENT_EDEFAULT;
/**
* The default value of the '{@link #getExpandRatio() <em>Expand Ratio</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getExpandRatio()
* @generated
* @ordered
*/
protected static final float EXPAND_RATIO_EDEFAULT = -1.0F;
/**
* The cached value of the '{@link #getExpandRatio() <em>Expand Ratio</em>}' attribute.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getExpandRatio()
* @generated
* @ordered
*/
protected float expandRatio = EXPAND_RATIO_EDEFAULT;
/**
* The default value of the '{@link #getPropertyPath() <em>Property Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPropertyPath()
* @generated
* @ordered
*/
protected static final String PROPERTY_PATH_EDEFAULT = null;
/**
* The cached value of the '{@link #getPropertyPath() <em>Property Path</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPropertyPath()
* @generated
* @ordered
*/
protected String propertyPath = PROPERTY_PATH_EDEFAULT;
/**
* The cached value of the '{@link #getConverter() <em>Converter</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getConverter()
* @generated
* @ordered
*/
protected YConverter converter;
/**
* The cached value of the '{@link #getType() <em>Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getType()
* @generated
* @ordered
*/
protected Class<?> type;
/**
* The default value of the '{@link #getTypeQualifiedName() <em>Type Qualified Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTypeQualifiedName()
* @generated
* @ordered
*/
protected static final String TYPE_QUALIFIED_NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getTypeQualifiedName() <em>Type Qualified Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTypeQualifiedName()
* @generated
* @ordered
*/
protected String typeQualifiedName = TYPE_QUALIFIED_NAME_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @generated
*/
protected YColumnImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the e class
* @generated
*/
@Override
protected EClass eStaticClass() {
return ExtensionModelPackage.Literals.YCOLUMN;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getId() <em>Id</em>}' attribute
* @generated
*/
public String getId() {
return id;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newId
* the new cached value of the '{@link #getId() <em>Id</em>}'
* attribute
* @generated
*/
public void setId(String newId) {
String oldId = id;
id = newId;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__ID, oldId, id));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getName() <em>Name</em>}'
* attribute
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newName
* the new cached value of the '{@link #getName() <em>Name</em>}'
* attribute
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__NAME, oldName, name));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getTags() <em>Tags</em>}'
* attribute list
* @generated
*/
public EList<String> getTags() {
if (tags == null) {
tags = new EDataTypeUniqueEList<String>(String.class, this, ExtensionModelPackage.YCOLUMN__TAGS);
}
return tags;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getProperties()
* <em>Properties</em>}' map
* @generated
*/
public EMap<String, String> getProperties() {
if (properties == null) {
properties = new EcoreEMap<String,String>(CoreModelPackage.Literals.YSTRING_TO_STRING_MAP, YStringToStringMapImpl.class, this, ExtensionModelPackage.YCOLUMN__PROPERTIES);
}
return properties;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getIcon() <em>Icon</em>}'
* attribute
* @generated
*/
public String getIcon() {
return icon;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newIcon
* the new cached value of the '{@link #getIcon() <em>Icon</em>}'
* attribute
* @generated
*/
public void setIcon(String newIcon) {
String oldIcon = icon;
icon = newIcon;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__ICON, oldIcon, icon));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #isVisible() <em>Visible</em>}'
* attribute
* @generated
*/
public boolean isVisible() {
return visible;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newVisible
* the new cached value of the '{@link #isVisible()
* <em>Visible</em>}' attribute
* @generated
*/
public void setVisible(boolean newVisible) {
boolean oldVisible = visible;
visible = newVisible;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__VISIBLE, oldVisible, visible));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getDatadescription()
* <em>Datadescription</em>}' reference
* @generated
*/
public YDatadescription getDatadescription() {
if (datadescription != null && datadescription.eIsProxy()) {
InternalEObject oldDatadescription = (InternalEObject)datadescription;
datadescription = (YDatadescription)eResolveProxy(oldDatadescription);
if (datadescription != oldDatadescription) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExtensionModelPackage.YCOLUMN__DATADESCRIPTION, oldDatadescription, datadescription));
}
}
return datadescription;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the y datadescription
* @generated
*/
public YDatadescription basicGetDatadescription() {
return datadescription;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newDatadescription
* the new cached value of the '{@link #getDatadescription()
* <em>Datadescription</em>}' reference
* @generated
*/
public void setDatadescription(YDatadescription newDatadescription) {
YDatadescription oldDatadescription = datadescription;
datadescription = newDatadescription;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__DATADESCRIPTION, oldDatadescription, datadescription));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getOrphanDatadescriptions()
* <em>Orphan Datadescriptions</em>}' containment reference list
* @generated
*/
public EList<YDatadescription> getOrphanDatadescriptions() {
if (orphanDatadescriptions == null) {
orphanDatadescriptions = new EObjectContainmentEList.Resolving<YDatadescription>(YDatadescription.class, this, ExtensionModelPackage.YCOLUMN__ORPHAN_DATADESCRIPTIONS);
}
return orphanDatadescriptions;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #isOrderable()
* <em>Orderable</em>}' attribute
* @generated
*/
public boolean isOrderable() {
return orderable;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newOrderable
* the new cached value of the '{@link #isOrderable()
* <em>Orderable</em>}' attribute
* @generated
*/
public void setOrderable(boolean newOrderable) {
boolean oldOrderable = orderable;
orderable = newOrderable;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__ORDERABLE, oldOrderable, orderable));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #isCollapsed()
* <em>Collapsed</em>}' attribute
* @generated
*/
public boolean isCollapsed() {
return collapsed;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newCollapsed
* the new cached value of the '{@link #isCollapsed()
* <em>Collapsed</em>}' attribute
* @generated
*/
public void setCollapsed(boolean newCollapsed) {
boolean oldCollapsed = collapsed;
collapsed = newCollapsed;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__COLLAPSED, oldCollapsed, collapsed));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #isCollapsible()
* <em>Collapsible</em>}' attribute
* @generated
*/
public boolean isCollapsible() {
return collapsible;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newCollapsible
* the new cached value of the '{@link #isCollapsible()
* <em>Collapsible</em>}' attribute
* @generated
*/
public void setCollapsible(boolean newCollapsible) {
boolean oldCollapsible = collapsible;
collapsible = newCollapsible;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__COLLAPSIBLE, oldCollapsible, collapsible));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getAlignment()
* <em>Alignment</em>}' attribute
* @generated
*/
public YFlatAlignment getAlignment() {
return alignment;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newAlignment
* the new cached value of the '{@link #getAlignment()
* <em>Alignment</em>}' attribute
* @generated
*/
public void setAlignment(YFlatAlignment newAlignment) {
YFlatAlignment oldAlignment = alignment;
alignment = newAlignment == null ? ALIGNMENT_EDEFAULT : newAlignment;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__ALIGNMENT, oldAlignment, alignment));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getExpandRatio()
* <em>Expand Ratio</em>}' attribute
* @generated
*/
public float getExpandRatio() {
return expandRatio;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newExpandRatio
* the new cached value of the '{@link #getExpandRatio()
* <em>Expand Ratio</em>}' attribute
* @generated
*/
public void setExpandRatio(float newExpandRatio) {
float oldExpandRatio = expandRatio;
expandRatio = newExpandRatio;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__EXPAND_RATIO, oldExpandRatio, expandRatio));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getPropertyPath()
* <em>Property Path</em>}' attribute
* @generated
*/
public String getPropertyPath() {
return propertyPath;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newPropertyPath
* the new cached value of the '{@link #getPropertyPath()
* <em>Property Path</em>}' attribute
* @generated
*/
public void setPropertyPath(String newPropertyPath) {
String oldPropertyPath = propertyPath;
propertyPath = newPropertyPath;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__PROPERTY_PATH, oldPropertyPath, propertyPath));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getConverter()
* <em>Converter</em>}' containment reference
* @generated
*/
public YConverter getConverter() {
if (converter != null && converter.eIsProxy()) {
InternalEObject oldConverter = (InternalEObject)converter;
converter = (YConverter)eResolveProxy(oldConverter);
if (converter != oldConverter) {
InternalEObject newConverter = (InternalEObject)converter;
NotificationChain msgs = oldConverter.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExtensionModelPackage.YCOLUMN__CONVERTER, null, null);
if (newConverter.eInternalContainer() == null) {
msgs = newConverter.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExtensionModelPackage.YCOLUMN__CONVERTER, null, msgs);
}
if (msgs != null) msgs.dispatch();
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExtensionModelPackage.YCOLUMN__CONVERTER, oldConverter, converter));
}
}
return converter;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the y converter
* @generated
*/
public YConverter basicGetConverter() {
return converter;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newConverter
* the new converter
* @param msgs
* the msgs
* @return the notification chain
* @generated
*/
public NotificationChain basicSetConverter(YConverter newConverter, NotificationChain msgs) {
YConverter oldConverter = converter;
converter = newConverter;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__CONVERTER, oldConverter, newConverter);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newConverter
* the new cached value of the '{@link #getConverter()
* <em>Converter</em>}' containment reference
* @generated
*/
public void setConverter(YConverter newConverter) {
if (newConverter != converter) {
NotificationChain msgs = null;
if (converter != null)
msgs = ((InternalEObject)converter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExtensionModelPackage.YCOLUMN__CONVERTER, null, msgs);
if (newConverter != null)
msgs = ((InternalEObject)newConverter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExtensionModelPackage.YCOLUMN__CONVERTER, null, msgs);
msgs = basicSetConverter(newConverter, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__CONVERTER, newConverter, newConverter));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getType() <em>Type</em>}'
* attribute
* @generated
*/
public Class<?> getType() {
return type;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newType
* the new cached value of the '{@link #getType() <em>Type</em>}'
* attribute
* @generated
*/
public void setType(Class<?> newType) {
Class<?> oldType = type;
type = newType;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__TYPE, oldType, type));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the cached value of the '{@link #getTypeQualifiedName()
* <em>Type Qualified Name</em>}' attribute
* @generated
*/
public String getTypeQualifiedName() {
return typeQualifiedName;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param newTypeQualifiedName
* the new cached value of the '{@link #getTypeQualifiedName()
* <em>Type Qualified Name</em>}' attribute
* @generated
*/
public void setTypeQualifiedName(String newTypeQualifiedName) {
String oldTypeQualifiedName = typeQualifiedName;
typeQualifiedName = newTypeQualifiedName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ExtensionModelPackage.YCOLUMN__TYPE_QUALIFIED_NAME, oldTypeQualifiedName, typeQualifiedName));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param otherEnd
* the other end
* @param featureID
* the feature id
* @param msgs
* the msgs
* @return the notification chain
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd,
int featureID, NotificationChain msgs) {
switch (featureID) {
case ExtensionModelPackage.YCOLUMN__PROPERTIES:
return ((InternalEList<?>)getProperties()).basicRemove(otherEnd, msgs);
case ExtensionModelPackage.YCOLUMN__ORPHAN_DATADESCRIPTIONS:
return ((InternalEList<?>)getOrphanDatadescriptions()).basicRemove(otherEnd, msgs);
case ExtensionModelPackage.YCOLUMN__CONVERTER:
return basicSetConverter(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param featureID
* the feature id
* @param resolve
* the resolve
* @param coreType
* the core type
* @return the object
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ExtensionModelPackage.YCOLUMN__TAGS:
return getTags();
case ExtensionModelPackage.YCOLUMN__ID:
return getId();
case ExtensionModelPackage.YCOLUMN__NAME:
return getName();
case ExtensionModelPackage.YCOLUMN__PROPERTIES:
if (coreType) return getProperties();
else return getProperties().map();
case ExtensionModelPackage.YCOLUMN__ICON:
return getIcon();
case ExtensionModelPackage.YCOLUMN__VISIBLE:
return isVisible();
case ExtensionModelPackage.YCOLUMN__DATADESCRIPTION:
if (resolve) return getDatadescription();
return basicGetDatadescription();
case ExtensionModelPackage.YCOLUMN__ORPHAN_DATADESCRIPTIONS:
return getOrphanDatadescriptions();
case ExtensionModelPackage.YCOLUMN__ORDERABLE:
return isOrderable();
case ExtensionModelPackage.YCOLUMN__COLLAPSED:
return isCollapsed();
case ExtensionModelPackage.YCOLUMN__COLLAPSIBLE:
return isCollapsible();
case ExtensionModelPackage.YCOLUMN__ALIGNMENT:
return getAlignment();
case ExtensionModelPackage.YCOLUMN__EXPAND_RATIO:
return getExpandRatio();
case ExtensionModelPackage.YCOLUMN__PROPERTY_PATH:
return getPropertyPath();
case ExtensionModelPackage.YCOLUMN__CONVERTER:
if (resolve) return getConverter();
return basicGetConverter();
case ExtensionModelPackage.YCOLUMN__TYPE:
return getType();
case ExtensionModelPackage.YCOLUMN__TYPE_QUALIFIED_NAME:
return getTypeQualifiedName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param featureID
* the feature id
* @param newValue
* the new value
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ExtensionModelPackage.YCOLUMN__TAGS:
getTags().clear();
getTags().addAll((Collection<? extends String>)newValue);
return;
case ExtensionModelPackage.YCOLUMN__ID:
setId((String)newValue);
return;
case ExtensionModelPackage.YCOLUMN__NAME:
setName((String)newValue);
return;
case ExtensionModelPackage.YCOLUMN__PROPERTIES:
((EStructuralFeature.Setting)getProperties()).set(newValue);
return;
case ExtensionModelPackage.YCOLUMN__ICON:
setIcon((String)newValue);
return;
case ExtensionModelPackage.YCOLUMN__VISIBLE:
setVisible((Boolean)newValue);
return;
case ExtensionModelPackage.YCOLUMN__DATADESCRIPTION:
setDatadescription((YDatadescription)newValue);
return;
case ExtensionModelPackage.YCOLUMN__ORPHAN_DATADESCRIPTIONS:
getOrphanDatadescriptions().clear();
getOrphanDatadescriptions().addAll((Collection<? extends YDatadescription>)newValue);
return;
case ExtensionModelPackage.YCOLUMN__ORDERABLE:
setOrderable((Boolean)newValue);
return;
case ExtensionModelPackage.YCOLUMN__COLLAPSED:
setCollapsed((Boolean)newValue);
return;
case ExtensionModelPackage.YCOLUMN__COLLAPSIBLE:
setCollapsible((Boolean)newValue);
return;
case ExtensionModelPackage.YCOLUMN__ALIGNMENT:
setAlignment((YFlatAlignment)newValue);
return;
case ExtensionModelPackage.YCOLUMN__EXPAND_RATIO:
setExpandRatio((Float)newValue);
return;
case ExtensionModelPackage.YCOLUMN__PROPERTY_PATH:
setPropertyPath((String)newValue);
return;
case ExtensionModelPackage.YCOLUMN__CONVERTER:
setConverter((YConverter)newValue);
return;
case ExtensionModelPackage.YCOLUMN__TYPE:
setType((Class<?>)newValue);
return;
case ExtensionModelPackage.YCOLUMN__TYPE_QUALIFIED_NAME:
setTypeQualifiedName((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param featureID
* the feature id
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ExtensionModelPackage.YCOLUMN__TAGS:
getTags().clear();
return;
case ExtensionModelPackage.YCOLUMN__ID:
setId(ID_EDEFAULT);
return;
case ExtensionModelPackage.YCOLUMN__NAME:
setName(NAME_EDEFAULT);
return;
case ExtensionModelPackage.YCOLUMN__PROPERTIES:
getProperties().clear();
return;
case ExtensionModelPackage.YCOLUMN__ICON:
setIcon(ICON_EDEFAULT);
return;
case ExtensionModelPackage.YCOLUMN__VISIBLE:
setVisible(VISIBLE_EDEFAULT);
return;
case ExtensionModelPackage.YCOLUMN__DATADESCRIPTION:
setDatadescription((YDatadescription)null);
return;
case ExtensionModelPackage.YCOLUMN__ORPHAN_DATADESCRIPTIONS:
getOrphanDatadescriptions().clear();
return;
case ExtensionModelPackage.YCOLUMN__ORDERABLE:
setOrderable(ORDERABLE_EDEFAULT);
return;
case ExtensionModelPackage.YCOLUMN__COLLAPSED:
setCollapsed(COLLAPSED_EDEFAULT);
return;
case ExtensionModelPackage.YCOLUMN__COLLAPSIBLE:
setCollapsible(COLLAPSIBLE_EDEFAULT);
return;
case ExtensionModelPackage.YCOLUMN__ALIGNMENT:
setAlignment(ALIGNMENT_EDEFAULT);
return;
case ExtensionModelPackage.YCOLUMN__EXPAND_RATIO:
setExpandRatio(EXPAND_RATIO_EDEFAULT);
return;
case ExtensionModelPackage.YCOLUMN__PROPERTY_PATH:
setPropertyPath(PROPERTY_PATH_EDEFAULT);
return;
case ExtensionModelPackage.YCOLUMN__CONVERTER:
setConverter((YConverter)null);
return;
case ExtensionModelPackage.YCOLUMN__TYPE:
setType((Class<?>)null);
return;
case ExtensionModelPackage.YCOLUMN__TYPE_QUALIFIED_NAME:
setTypeQualifiedName(TYPE_QUALIFIED_NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @param featureID
* the feature id
* @return true, if successful
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ExtensionModelPackage.YCOLUMN__TAGS:
return tags != null && !tags.isEmpty();
case ExtensionModelPackage.YCOLUMN__ID:
return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
case ExtensionModelPackage.YCOLUMN__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case ExtensionModelPackage.YCOLUMN__PROPERTIES:
return properties != null && !properties.isEmpty();
case ExtensionModelPackage.YCOLUMN__ICON:
return ICON_EDEFAULT == null ? icon != null : !ICON_EDEFAULT.equals(icon);
case ExtensionModelPackage.YCOLUMN__VISIBLE:
return visible != VISIBLE_EDEFAULT;
case ExtensionModelPackage.YCOLUMN__DATADESCRIPTION:
return datadescription != null;
case ExtensionModelPackage.YCOLUMN__ORPHAN_DATADESCRIPTIONS:
return orphanDatadescriptions != null && !orphanDatadescriptions.isEmpty();
case ExtensionModelPackage.YCOLUMN__ORDERABLE:
return orderable != ORDERABLE_EDEFAULT;
case ExtensionModelPackage.YCOLUMN__COLLAPSED:
return collapsed != COLLAPSED_EDEFAULT;
case ExtensionModelPackage.YCOLUMN__COLLAPSIBLE:
return collapsible != COLLAPSIBLE_EDEFAULT;
case ExtensionModelPackage.YCOLUMN__ALIGNMENT:
return alignment != ALIGNMENT_EDEFAULT;
case ExtensionModelPackage.YCOLUMN__EXPAND_RATIO:
return expandRatio != EXPAND_RATIO_EDEFAULT;
case ExtensionModelPackage.YCOLUMN__PROPERTY_PATH:
return PROPERTY_PATH_EDEFAULT == null ? propertyPath != null : !PROPERTY_PATH_EDEFAULT.equals(propertyPath);
case ExtensionModelPackage.YCOLUMN__CONVERTER:
return converter != null;
case ExtensionModelPackage.YCOLUMN__TYPE:
return type != null;
case ExtensionModelPackage.YCOLUMN__TYPE_QUALIFIED_NAME:
return TYPE_QUALIFIED_NAME_EDEFAULT == null ? typeQualifiedName != null : !TYPE_QUALIFIED_NAME_EDEFAULT.equals(typeQualifiedName);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->.
*
* @return the string
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (tags: ");
result.append(tags);
result.append(", id: ");
result.append(id);
result.append(", name: ");
result.append(name);
result.append(", icon: ");
result.append(icon);
result.append(", visible: ");
result.append(visible);
result.append(", orderable: ");
result.append(orderable);
result.append(", collapsed: ");
result.append(collapsed);
result.append(", collapsible: ");
result.append(collapsible);
result.append(", alignment: ");
result.append(alignment);
result.append(", expandRatio: ");
result.append(expandRatio);
result.append(", propertyPath: ");
result.append(propertyPath);
result.append(", type: ");
result.append(type);
result.append(", typeQualifiedName: ");
result.append(typeQualifiedName);
result.append(')');
return result.toString();
}
/**
* Sets the label by creating a new datadescription.
*
* @param label
* the new label
*/
public void setLabel(String label) {
YDatadescription ds = getDatadescription();
if (ds == null) {
setDatadescription(createDatadescription(label));
getOrphanDatadescriptions().add(getDatadescription());
} else {
ds.setLabel(label);
}
}
/**
* Sets the label i18nKey by creating a new datadescription.
*
* @param i18nKey
* the new label i18n key
*/
public void setLabelI18nKey(String i18nKey) {
YDatadescription ds = getDatadescription();
if (ds == null) {
setDatadescription(createDatadescriptionForI18n(i18nKey));
getOrphanDatadescriptions().add(getDatadescription());
} else {
ds.setLabelI18nKey(i18nKey);
}
}
/**
* Creates the datadescription.
*
* @param label
* the label
* @return the y datadescription
*/
protected YDatadescription createDatadescription(String label) {
YDatadescription dsc = DatatypesFactory.eINSTANCE
.createYDatadescription();
dsc.setLabel(label);
getOrphanDatadescriptions().add(dsc);
return dsc;
}
/**
* Creates the datadescription for i18n.
*
* @param i18nKey
* the i18n key
* @return the y datadescription
*/
protected YDatadescription createDatadescriptionForI18n(String i18nKey) {
YDatadescription dsc = DatatypesFactory.eINSTANCE
.createYDatadescription();
dsc.setLabelI18nKey(i18nKey);
getOrphanDatadescriptions().add(dsc);
return dsc;
}
} // YColumnImpl