Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2005-2006 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM - Initial API and implementation
 
 package org.eclipse.emf.examples.extlibrary.impl;
 
 
 
 
An implementation of the model Package.

Generated:
 
 public class EXTLibraryPackageImpl extends EPackageImpl implements EXTLibraryPackage
 {
  

Generated:
 
   private EClass bookEClass = null;

  

Generated:
 
   private EClass libraryEClass = null;

  

Generated:
 
   private EClass writerEClass = null;

  

Generated:
 
   private EClass itemEClass = null;

  

Generated:
 
   private EClass lendableEClass = null;

  

Generated:
 
   private EClass circulatingItemEClass = null;

  

Generated:
 
   private EClass periodicalEClass = null;

  

Generated:
  private EClass audioVisualItemEClass = null;

  

Generated:
  private EClass bookOnTapeEClass = null;

  

Generated:
  private EClass videoCassetteEClass = null;

  

Generated:
  private EClass borrowerEClass = null;

  

Generated:
  private EClass personEClass = null;

  

Generated:
  private EClass employeeEClass = null;

  

Generated:
  private EClass addressableEClass = null;

  

Generated:
  private EEnum bookCategoryEEnum = null;

  
Creates an instance of the model Package, registered with EPackage.Registry by the package package URI value.

Note: the correct way to create the package is via the static factory method init(), which also performs initialization of the package, or returns the registered package, if one already exists.

  {
  }

  

Generated:
  private static boolean isInited = false;

  
Creates, registers, and initializes the Package for this model, and for any others upon which it depends.

This method is used to initialize org.eclipse.emf.examples.extlibrary.EXTLibraryPackage.eINSTANCE when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.

  public static EXTLibraryPackage init()
  {
    // Obtain or create and register package
     = true;
    // Create package meta-data objects
    theEXTLibraryPackage.createPackageContents();
    // Initialize created meta-data
    theEXTLibraryPackage.initializePackageContents();
    // Mark meta-data to indicate it can't be changed
    theEXTLibraryPackage.freeze();
  
    // Update the registry and return the package
    ...put(.theEXTLibraryPackage);
    return theEXTLibraryPackage;
  }

  

Generated:
  public EClass getBook()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  public EClass getLibrary()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  public EClass getWriter()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  public EClass getItem()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  public EClass getLendable()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
    return ;
  }

  

Generated:
  public EClass getPeriodical()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  public EClass getBookOnTape()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  public EClass getBorrower()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  public EClass getPerson()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  {
  }

  

Generated:
  public EClass getEmployee()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  public EClass getAddressable()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  public EEnum getBookCategory()
  {
    return ;
  }

  

Generated:
  {
  }

  

Generated:
  private boolean isCreated = false;

  
Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its first.

Generated:
  public void createPackageContents()
  {
    if (return;
     = true;
    // Create classes and their features
    // Create enums
  }

  

Generated:
  private boolean isInitialized = false;

  
Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any invocation but its first.

Generated:
  public void initializePackageContents()
  {
    if (return;
     = true;
    // Initialize package
    setName();
    // Create type parameters
    // Set bounds for type parameters
    // Add supertypes to classes
    // Initialize classes and features; add operations and parameters
    initEClass(Book.class"Book", !, !); //$NON-NLS-1$
    initEAttribute(getBook_Title(), .getEString(), "title"null, 0, 1, Book.class, !, !, !, !, !); //$NON-NLS-1$
    initEAttribute(getBook_Pages(), .getEInt(), "pages""100", 0, 1, Book.class, !, !, !, !, !); //$NON-NLS-1$ //$NON-NLS-2$
    initEAttribute(getBook_Category(), this.getBookCategory(), "category"null, 0, 1, Book.class, !, !, !, !); //$NON-NLS-1$
    initEReference(getBook_Author(), this.getWriter(), this.getWriter_Books(), "author"null, 1, 1, Book.class, !, !, !, !, !); //$NON-NLS-1$
    initEClass(Library.class"Library", !, !); //$NON-NLS-1$
    initEAttribute(getLibrary_Name(), .getEString(), "name"null, 0, 1, Library.class, !, !, !, !, !); //$NON-NLS-1$
    initEReference(getLibrary_Writers(), this.getWriter(), null"writers"null, 0, -1, Library.class, !, !); //$NON-NLS-1$
    initEReference(getLibrary_Employees(), this.getEmployee(), null"employees"null, 0, -1, Library.class, !, !); //$NON-NLS-1$
    initEReference(getLibrary_Borrowers(), this.getBorrower(), null"borrowers"null, 0, -1, Library.class, !, !); //$NON-NLS-1$
    initEReference(getLibrary_Stock(), this.getItem(), null"stock"null, 0, -1, Library.class, !, !, !, !, !, !); //$NON-NLS-1$
    initEReference(getLibrary_Books(), this.getBook(), null"books"null, 0, -1, Library.class, !, !, !, !); //$NON-NLS-1$
    initEClass(Writer.class"Writer", !, !); //$NON-NLS-1$
    initEReference(getWriter_Books(), this.getBook(), this.getBook_Author(), "books"null, 0, -1, Writer.class, !, !, !, !, !); //$NON-NLS-1$
    initEClass(Item.class"Item", !); //$NON-NLS-1$
    initEAttribute(getItem_PublicationDate(), .getEDate(), "publicationDate"null, 0, 1, Item.class, !, !, !, !, !); //$NON-NLS-1$
    initEClass(Lendable.class"Lendable"); //$NON-NLS-1$
    initEAttribute(getLendable_Copies(), .getEInt(), "copies"null, 1, 1, Lendable.class, !, !, !, !, !); //$NON-NLS-1$
    initEClass(Periodical.class"Periodical", !); //$NON-NLS-1$
    initEAttribute(getPeriodical_IssuesPerYear(), .getEInt(), "issuesPerYear"null, 1, 1, Periodical.class, !, !, !, !, !); //$NON-NLS-1$
    initEClass(BookOnTape.class"BookOnTape", !, !); //$NON-NLS-1$
    initEReference(getBookOnTape_Reader(), this.getPerson(), null"reader"null, 0, 1, BookOnTape.class, !, !, !, !, !); //$NON-NLS-1$
    initEReference(getBookOnTape_Author(), this.getWriter(), null"author"null, 0, 1, BookOnTape.class, !, !, !, !, !); //$NON-NLS-1$
    initEClass(VideoCassette.class"VideoCassette", !, !); //$NON-NLS-1$
    initEClass(Borrower.class"Borrower", !, !); //$NON-NLS-1$
    initEClass(Person.class"Person", !, !); //$NON-NLS-1$
    initEAttribute(getPerson_FirstName(), .getEString(), "firstName"null, 1, 1, Person.class, !, !, !, !, !); //$NON-NLS-1$
    initEAttribute(getPerson_LastName(), .getEString(), "lastName"null, 1, 1, Person.class, !, !, !, !, !); //$NON-NLS-1$
    initEClass(Employee.class"Employee", !, !); //$NON-NLS-1$
    initEReference(getEmployee_Manager(), this.getEmployee(), null"manager"null, 0, 1, Employee.class, !, !, !, !, !); //$NON-NLS-1$
    // Initialize enums and add enum literals
    initEEnum(BookCategory.class"BookCategory"); //$NON-NLS-1$
    // Create resource
    // Create annotations
    // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
  }

  
Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData.

Generated:
  {
    String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"//$NON-NLS-1$		
      (getLibrary_Writers(), 
       source
       new String[] 
       {
       "group""#people" //$NON-NLS-1$ //$NON-NLS-2$
       });		
      (getLibrary_Employees(), 
       source
       new String[] 
       {
       "group""#people" //$NON-NLS-1$ //$NON-NLS-2$
       });		
      (getLibrary_Borrowers(), 
       source
       new String[] 
       {
       "group""#people" //$NON-NLS-1$ //$NON-NLS-2$
       });		
      (getLibrary_People(), 
       source
       new String[] 
       {
       "kind""group" //$NON-NLS-1$ //$NON-NLS-2$
       });
  }
//EXTLibraryPackageImpl
New to GrepCode? Check out our FAQ X