org.afplib.base.impl.TripletImpl 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.base.impl;
import java.nio.charset.Charset;
import org.afplib.base.BasePackage;
import org.afplib.base.Triplet;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
/**
*
* An implementation of the model object 'Triplet'.
*
*
* The following features are implemented:
*
* - {@link org.afplib.base.impl.TripletImpl#getLabel Label}
* - {@link org.afplib.base.impl.TripletImpl#getCharset Charset}
* - {@link org.afplib.base.impl.TripletImpl#getFileOffset File Offset}
* - {@link org.afplib.base.impl.TripletImpl#getTripletLength Triplet Length}
* - {@link org.afplib.base.impl.TripletImpl#getTripletId Triplet Id}
* - {@link org.afplib.base.impl.TripletImpl#getTripletNumber Triplet Number}
*
*
*
* @generated
*/
public abstract class TripletImpl extends EObjectImpl implements Triplet {
/**
* The default value of the '{@link #getLabel() Label}' attribute.
*
*
* @see #getLabel()
* @generated
* @ordered
*/
protected static final String LABEL_EDEFAULT = null;
/**
* The cached value of the '{@link #getLabel() Label}' attribute.
*
*
* @see #getLabel()
* @generated
* @ordered
*/
protected String label = LABEL_EDEFAULT;
/**
* The default value of the '{@link #getCharset() Charset}' attribute.
*
*
* @see #getCharset()
* @generated
* @ordered
*/
protected static final Charset CHARSET_EDEFAULT = null;
/**
* The cached value of the '{@link #getCharset() Charset}' attribute.
*
*
* @see #getCharset()
* @generated
* @ordered
*/
protected Charset charset = CHARSET_EDEFAULT;
/**
* The default value of the '{@link #getFileOffset() File Offset}' attribute.
*
*
* @see #getFileOffset()
* @generated
* @ordered
*/
protected static final long FILE_OFFSET_EDEFAULT = 0L;
/**
* The cached value of the '{@link #getFileOffset() File Offset}' attribute.
*
*
* @see #getFileOffset()
* @generated
* @ordered
*/
protected long fileOffset = FILE_OFFSET_EDEFAULT;
/**
* The default value of the '{@link #getTripletLength() Triplet Length}' attribute.
*
*
* @see #getTripletLength()
* @generated
* @ordered
*/
protected static final int TRIPLET_LENGTH_EDEFAULT = 0;
/**
* The cached value of the '{@link #getTripletLength() Triplet Length}' attribute.
*
*
* @see #getTripletLength()
* @generated
* @ordered
*/
protected int tripletLength = TRIPLET_LENGTH_EDEFAULT;
/**
* The default value of the '{@link #getTripletId() Triplet Id}' attribute.
*
*
* @see #getTripletId()
* @generated
* @ordered
*/
protected static final int TRIPLET_ID_EDEFAULT = 0;
/**
* The cached value of the '{@link #getTripletId() Triplet Id}' attribute.
*
*
* @see #getTripletId()
* @generated
* @ordered
*/
protected int tripletId = TRIPLET_ID_EDEFAULT;
/**
* The default value of the '{@link #getTripletNumber() Triplet Number}' attribute.
*
*
* @see #getTripletNumber()
* @generated
* @ordered
*/
protected static final int TRIPLET_NUMBER_EDEFAULT = 0;
/**
* The cached value of the '{@link #getTripletNumber() Triplet Number}' attribute.
*
*
* @see #getTripletNumber()
* @generated
* @ordered
*/
protected int tripletNumber = TRIPLET_NUMBER_EDEFAULT;
/**
*
*
* @generated
*/
protected TripletImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return BasePackage.Literals.TRIPLET;
}
/**
*
*
* @generated
*/
public String getLabel() {
return label;
}
/**
*
*
* @generated
*/
public void setLabel(String newLabel) {
String oldLabel = label;
label = newLabel;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BasePackage.TRIPLET__LABEL, oldLabel, label));
}
/**
*
*
* @generated
*/
public Charset getCharset() {
return charset;
}
/**
*
*
* @generated
*/
public void setCharset(Charset newCharset) {
Charset oldCharset = charset;
charset = newCharset;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BasePackage.TRIPLET__CHARSET, oldCharset, charset));
}
/**
*
*
* @generated
*/
public long getFileOffset() {
return fileOffset;
}
/**
*
*
* @generated
*/
public void setFileOffset(long newFileOffset) {
long oldFileOffset = fileOffset;
fileOffset = newFileOffset;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BasePackage.TRIPLET__FILE_OFFSET, oldFileOffset, fileOffset));
}
/**
*
*
* @generated
*/
public int getTripletLength() {
return tripletLength;
}
/**
*
*
* @generated
*/
public void setTripletLength(int newTripletLength) {
int oldTripletLength = tripletLength;
tripletLength = newTripletLength;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BasePackage.TRIPLET__TRIPLET_LENGTH, oldTripletLength, tripletLength));
}
/**
*
*
* @generated
*/
public int getTripletId() {
return tripletId;
}
/**
*
*
* @generated
*/
public void setTripletId(int newTripletId) {
int oldTripletId = tripletId;
tripletId = newTripletId;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BasePackage.TRIPLET__TRIPLET_ID, oldTripletId, tripletId));
}
/**
*
*
* @generated
*/
public int getTripletNumber() {
return tripletNumber;
}
/**
*
*
* @generated
*/
public void setTripletNumber(int newTripletNumber) {
int oldTripletNumber = tripletNumber;
tripletNumber = newTripletNumber;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BasePackage.TRIPLET__TRIPLET_NUMBER, oldTripletNumber, tripletNumber));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BasePackage.TRIPLET__LABEL:
return getLabel();
case BasePackage.TRIPLET__CHARSET:
return getCharset();
case BasePackage.TRIPLET__FILE_OFFSET:
return getFileOffset();
case BasePackage.TRIPLET__TRIPLET_LENGTH:
return getTripletLength();
case BasePackage.TRIPLET__TRIPLET_ID:
return getTripletId();
case BasePackage.TRIPLET__TRIPLET_NUMBER:
return getTripletNumber();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BasePackage.TRIPLET__LABEL:
setLabel((String)newValue);
return;
case BasePackage.TRIPLET__CHARSET:
setCharset((Charset)newValue);
return;
case BasePackage.TRIPLET__FILE_OFFSET:
setFileOffset((Long)newValue);
return;
case BasePackage.TRIPLET__TRIPLET_LENGTH:
setTripletLength((Integer)newValue);
return;
case BasePackage.TRIPLET__TRIPLET_ID:
setTripletId((Integer)newValue);
return;
case BasePackage.TRIPLET__TRIPLET_NUMBER:
setTripletNumber((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BasePackage.TRIPLET__LABEL:
setLabel(LABEL_EDEFAULT);
return;
case BasePackage.TRIPLET__CHARSET:
setCharset(CHARSET_EDEFAULT);
return;
case BasePackage.TRIPLET__FILE_OFFSET:
setFileOffset(FILE_OFFSET_EDEFAULT);
return;
case BasePackage.TRIPLET__TRIPLET_LENGTH:
setTripletLength(TRIPLET_LENGTH_EDEFAULT);
return;
case BasePackage.TRIPLET__TRIPLET_ID:
setTripletId(TRIPLET_ID_EDEFAULT);
return;
case BasePackage.TRIPLET__TRIPLET_NUMBER:
setTripletNumber(TRIPLET_NUMBER_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BasePackage.TRIPLET__LABEL:
return LABEL_EDEFAULT == null ? label != null : !LABEL_EDEFAULT.equals(label);
case BasePackage.TRIPLET__CHARSET:
return CHARSET_EDEFAULT == null ? charset != null : !CHARSET_EDEFAULT.equals(charset);
case BasePackage.TRIPLET__FILE_OFFSET:
return fileOffset != FILE_OFFSET_EDEFAULT;
case BasePackage.TRIPLET__TRIPLET_LENGTH:
return tripletLength != TRIPLET_LENGTH_EDEFAULT;
case BasePackage.TRIPLET__TRIPLET_ID:
return tripletId != TRIPLET_ID_EDEFAULT;
case BasePackage.TRIPLET__TRIPLET_NUMBER:
return tripletNumber != TRIPLET_NUMBER_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (label: ");
result.append(label);
result.append(", charset: ");
result.append(charset);
result.append(", fileOffset: ");
result.append(fileOffset);
result.append(", tripletLength: ");
result.append(tripletLength);
result.append(", tripletId: ");
result.append(tripletId);
result.append(", tripletNumber: ");
result.append(tripletNumber);
result.append(')');
return result.toString();
}
} //TripletImpl
© 2015 - 2025 Weber Informatics LLC | Privacy Policy