org.afplib.afplib.impl.BDTImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of afplib Show documentation
Show all versions of afplib Show documentation
Java object library able to read and write AFP (Advanced Function Presentation) files.
/**
*/
package org.afplib.afplib.impl;
import java.util.Collection;
import org.afplib.afplib.AfplibPackage;
import org.afplib.afplib.BDT;
import org.afplib.base.Triplet;
import org.afplib.base.impl.SFImpl;
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.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'BDT'.
*
*
* The following features are implemented:
*
* - {@link org.afplib.afplib.impl.BDTImpl#getDocName Doc Name}
* - {@link org.afplib.afplib.impl.BDTImpl#getReserved Reserved}
* - {@link org.afplib.afplib.impl.BDTImpl#getTriplets Triplets}
*
*
*
* @generated
*/
public class BDTImpl extends SFImpl implements BDT {
/**
* The default value of the '{@link #getDocName() Doc Name}' attribute.
*
*
* @see #getDocName()
* @generated
* @ordered
*/
protected static final String DOC_NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getDocName() Doc Name}' attribute.
*
*
* @see #getDocName()
* @generated
* @ordered
*/
protected String docName = DOC_NAME_EDEFAULT;
/**
* The default value of the '{@link #getReserved() Reserved}' attribute.
*
*
* @see #getReserved()
* @generated
* @ordered
*/
protected static final Integer RESERVED_EDEFAULT = null;
/**
* The cached value of the '{@link #getReserved() Reserved}' attribute.
*
*
* @see #getReserved()
* @generated
* @ordered
*/
protected Integer reserved = RESERVED_EDEFAULT;
/**
* The cached value of the '{@link #getTriplets() Triplets}' containment reference list.
*
*
* @see #getTriplets()
* @generated
* @ordered
*/
protected EList triplets;
/**
*
*
* @generated
*/
protected BDTImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return AfplibPackage.eINSTANCE.getBDT();
}
/**
*
*
* @generated
*/
public String getDocName() {
return docName;
}
/**
*
*
* @generated
*/
public void setDocName(String newDocName) {
String oldDocName = docName;
docName = newDocName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.BDT__DOC_NAME, oldDocName, docName));
}
/**
*
*
* @generated
*/
public Integer getReserved() {
return reserved;
}
/**
*
*
* @generated
*/
public void setReserved(Integer newReserved) {
Integer oldReserved = reserved;
reserved = newReserved;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.BDT__RESERVED, oldReserved, reserved));
}
/**
*
*
* @generated
*/
public EList getTriplets() {
if (triplets == null) {
triplets = new EObjectContainmentEList.Resolving(Triplet.class, this, AfplibPackage.BDT__TRIPLETS);
}
return triplets;
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case AfplibPackage.BDT__TRIPLETS:
return ((InternalEList>)getTriplets()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case AfplibPackage.BDT__DOC_NAME:
return getDocName();
case AfplibPackage.BDT__RESERVED:
return getReserved();
case AfplibPackage.BDT__TRIPLETS:
return getTriplets();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AfplibPackage.BDT__DOC_NAME:
setDocName((String)newValue);
return;
case AfplibPackage.BDT__RESERVED:
setReserved((Integer)newValue);
return;
case AfplibPackage.BDT__TRIPLETS:
getTriplets().clear();
getTriplets().addAll((Collection extends Triplet>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case AfplibPackage.BDT__DOC_NAME:
setDocName(DOC_NAME_EDEFAULT);
return;
case AfplibPackage.BDT__RESERVED:
setReserved(RESERVED_EDEFAULT);
return;
case AfplibPackage.BDT__TRIPLETS:
getTriplets().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AfplibPackage.BDT__DOC_NAME:
return DOC_NAME_EDEFAULT == null ? docName != null : !DOC_NAME_EDEFAULT.equals(docName);
case AfplibPackage.BDT__RESERVED:
return RESERVED_EDEFAULT == null ? reserved != null : !RESERVED_EDEFAULT.equals(reserved);
case AfplibPackage.BDT__TRIPLETS:
return triplets != null && !triplets.isEmpty();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (DocName: ");
result.append(docName);
result.append(", Reserved: ");
result.append(reserved);
result.append(')');
return result.toString();
}
} //BDTImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy