Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryFactoryImpl.java')
-rw-r--r--deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryFactoryImpl.java190
1 files changed, 0 insertions, 190 deletions
diff --git a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryFactoryImpl.java b/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryFactoryImpl.java
deleted file mode 100644
index ff9a0bfaa..000000000
--- a/deprecated/library (emf 2.3)/Library/src/org/eclipse/example/library/impl/LibraryFactoryImpl.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: LibraryFactoryImpl.java,v 1.1 2008/04/01 07:29:07 mtaal Exp $
- */
-package org.eclipse.example.library.impl;
-
-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;
-
-import org.eclipse.example.library.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryFactoryImpl extends EFactoryImpl implements LibraryFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static LibraryFactory init() {
- try {
- LibraryFactory theLibraryFactory = (LibraryFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.example.eclipse.org/Library");
- if (theLibraryFactory != null) {
- return theLibraryFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new LibraryFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case LibraryPackage.BOOK: return createBook();
- case LibraryPackage.LIBRARY: return createLibrary();
- case LibraryPackage.WRITER: return createWriter();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Object createFromString(EDataType eDataType, String initialValue) {
- switch (eDataType.getClassifierID()) {
- case LibraryPackage.BOOK_CATEGORY:
- return createBookCategoryFromString(eDataType, initialValue);
- case LibraryPackage.BOOK_CATEGORY_OBJECT:
- return createBookCategoryObjectFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertToString(EDataType eDataType, Object instanceValue) {
- switch (eDataType.getClassifierID()) {
- case LibraryPackage.BOOK_CATEGORY:
- return convertBookCategoryToString(eDataType, instanceValue);
- case LibraryPackage.BOOK_CATEGORY_OBJECT:
- return convertBookCategoryObjectToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Book createBook() {
- BookImpl book = new BookImpl();
- return book;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Library createLibrary() {
- LibraryImpl library = new LibraryImpl();
- return library;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Writer createWriter() {
- WriterImpl writer = new WriterImpl();
- return writer;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BookCategory createBookCategoryFromString(EDataType eDataType, String initialValue) {
- BookCategory result = BookCategory.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertBookCategoryToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BookCategory createBookCategoryObjectFromString(EDataType eDataType, String initialValue) {
- return createBookCategoryFromString(LibraryPackage.Literals.BOOK_CATEGORY, initialValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertBookCategoryObjectToString(EDataType eDataType, Object instanceValue) {
- return convertBookCategoryToString(LibraryPackage.Literals.BOOK_CATEGORY, instanceValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryPackage getLibraryPackage() {
- return (LibraryPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- public static LibraryPackage getPackage() {
- return LibraryPackage.eINSTANCE;
- }
-
-} //LibraryFactoryImpl

Back to the top