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

org.nasdanika.models.party.impl.PartyFactoryImpl Maven / Gradle / Ivy

/**
 */
package org.nasdanika.models.party.impl;

import org.eclipse.emf.ecore.EClass;
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;

import org.nasdanika.models.party.*;

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

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

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case PartyPackage.ROLE: return createRole();
			case PartyPackage.ORGANIZATION: return createOrganization();
			case PartyPackage.PERSON: return createPerson();
			case PartyPackage.CONTACT_METHOD: return createContactMethod();
			case PartyPackage.EMAIL: return createEMail();
			case PartyPackage.PHONE: return createPhone();
			case PartyPackage.POSTAL_ADDRESS: return createPostalAddress();
			case PartyPackage.WEB_ADDRESS: return createWebAddress();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public Role createRole() {
		RoleImpl role = new RoleImpl();
		return role;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public Organization createOrganization() {
		OrganizationImpl organization = new OrganizationImpl();
		return organization;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public Person createPerson() {
		PersonImpl person = new PersonImpl();
		return person;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public ContactMethod createContactMethod() {
		ContactMethodImpl contactMethod = new ContactMethodImpl();
		return contactMethod;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public EMail createEMail() {
		EMailImpl eMail = new EMailImpl();
		return eMail;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public Phone createPhone() {
		PhoneImpl phone = new PhoneImpl();
		return phone;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public PostalAddress createPostalAddress() {
		PostalAddressImpl postalAddress = new PostalAddressImpl();
		return postalAddress;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public WebAddress createWebAddress() {
		WebAddressImpl webAddress = new WebAddressImpl();
		return webAddress;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public PartyPackage getPartyPackage() {
		return (PartyPackage)getEPackage();
	}

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

} //PartyFactoryImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy