All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.afplib.base.impl.BaseFactoryImpl Maven / Gradle / Ivy

Go to download

Java object library able to read and write AFP (Advanced Function Presentation) files.

There is a newer version: 0.0.15
Show newest version
/**
 */
package org.afplib.base.impl;

import java.nio.charset.Charset;

import org.afplib.base.*;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * 
 * An implementation of the model Factory.
 * 
 * @generated
 */
public class BaseFactoryImpl extends EFactoryImpl implements BaseFactory {
	/**
	 * Creates the default factory implementation.
	 * 
	 * 
	 * @generated
	 */
	public static BaseFactory init() {
		try {
			BaseFactory theBaseFactory = (BaseFactory)EPackage.Registry.INSTANCE.getEFactory(BasePackage.eNS_URI);
			if (theBaseFactory != null) {
				return theBaseFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new BaseFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * 
	 * 
	 * @generated
	 */
	public BaseFactoryImpl() {
		super();
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case BasePackage.AFP: return createAFP();
			case BasePackage.UNKNSF: return createUNKNSF();
			case BasePackage.SF_GROUPER: return createSFGrouper();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public Object createFromString(EDataType eDataType, String initialValue) {
		switch (eDataType.getClassifierID()) {
			case BasePackage.MODCA_STRING:
				return createModcaStringFromString(eDataType, initialValue);
			case BasePackage.MODCA_STRING4:
				return createModcaString4FromString(eDataType, initialValue);
			case BasePackage.MODCA_STRING8:
				return createModcaString8FromString(eDataType, initialValue);
			case BasePackage.MODCA_STRING32:
				return createModcaString32FromString(eDataType, initialValue);
			case BasePackage.CHARSET:
				return createCharsetFromString(eDataType, initialValue);
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public String convertToString(EDataType eDataType, Object instanceValue) {
		switch (eDataType.getClassifierID()) {
			case BasePackage.MODCA_STRING:
				return convertModcaStringToString(eDataType, instanceValue);
			case BasePackage.MODCA_STRING4:
				return convertModcaString4ToString(eDataType, instanceValue);
			case BasePackage.MODCA_STRING8:
				return convertModcaString8ToString(eDataType, instanceValue);
			case BasePackage.MODCA_STRING32:
				return convertModcaString32ToString(eDataType, instanceValue);
			case BasePackage.CHARSET:
				return convertCharsetToString(eDataType, instanceValue);
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public AFP createAFP() {
		AFPImpl afp = new AFPImpl();
		return afp;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public UNKNSF createUNKNSF() {
		UNKNSFImpl unknsf = new UNKNSFImpl();
		return unknsf;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public SFGrouper createSFGrouper() {
		SFGrouperImpl sfGrouper = new SFGrouperImpl();
		return sfGrouper;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public String createModcaStringFromString(EDataType eDataType, String initialValue) {
		return (String)super.createFromString(eDataType, initialValue);
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public String convertModcaStringToString(EDataType eDataType, Object instanceValue) {
		return super.convertToString(eDataType, instanceValue);
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public String createModcaString4FromString(EDataType eDataType, String initialValue) {
		return (String)super.createFromString(eDataType, initialValue);
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public String convertModcaString4ToString(EDataType eDataType, Object instanceValue) {
		return super.convertToString(eDataType, instanceValue);
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public String createModcaString8FromString(EDataType eDataType, String initialValue) {
		return (String)super.createFromString(eDataType, initialValue);
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public String convertModcaString8ToString(EDataType eDataType, Object instanceValue) {
		return super.convertToString(eDataType, instanceValue);
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public String createModcaString32FromString(EDataType eDataType, String initialValue) {
		return (String)super.createFromString(eDataType, initialValue);
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public String convertModcaString32ToString(EDataType eDataType, Object instanceValue) {
		return super.convertToString(eDataType, instanceValue);
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public Charset createCharsetFromString(EDataType eDataType, String initialValue) {
		return (Charset)super.createFromString(eDataType, initialValue);
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public String convertCharsetToString(EDataType eDataType, Object instanceValue) {
		return super.convertToString(eDataType, instanceValue);
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public BasePackage getBasePackage() {
		return (BasePackage)getEPackage();
	}

	/**
	 * 
	 * 
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static BasePackage getPackage() {
		return BasePackage.eINSTANCE;
	}

} //BaseFactoryImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy