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

org.bimserver.models.geometry.impl.GeometryFactoryImpl Maven / Gradle / Ivy

Go to download

Base project for BIMserver plugin development. Some plugins mights also need the Shared library

The newest version!
/**
 * Copyright (C) 2009-2014 BIMserver.org
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see .
 */
package org.bimserver.models.geometry.impl;

import org.bimserver.models.geometry.GeometryData;
import org.bimserver.models.geometry.GeometryFactory;
import org.bimserver.models.geometry.GeometryInfo;
import org.bimserver.models.geometry.GeometryPackage;
import org.bimserver.models.geometry.Vector3f;
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;

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

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

	/**
	 * 
	 * 
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
		case GeometryPackage.GEOMETRY_INFO:
			return (EObject) createGeometryInfo();
		case GeometryPackage.VECTOR3F:
			return (EObject) createVector3f();
		case GeometryPackage.GEOMETRY_DATA:
			return (EObject) createGeometryData();
		default:
			throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public GeometryInfo createGeometryInfo() {
		GeometryInfoImpl geometryInfo = new GeometryInfoImpl();
		return geometryInfo;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public Vector3f createVector3f() {
		Vector3fImpl vector3f = new Vector3fImpl();
		return vector3f;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public GeometryData createGeometryData() {
		GeometryDataImpl geometryData = new GeometryDataImpl();
		return geometryData;
	}

	/**
	 * 
	 * 
	 * @generated
	 */
	public GeometryPackage getGeometryPackage() {
		return (GeometryPackage) getEPackage();
	}

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

} //GeometryFactoryImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy