org.eclipse.jst.j2ee.core_1.2.102.v201202090300

16:45:42.365 INFO  jd.cli.Main - Decompiling org.eclipse.jst.j2ee.core_1.2.102.v201202090300.jar
package org.eclipse.jst.j2ee.application;

import org.eclipse.emf.common.util.EList;
import org.eclipse.jst.j2ee.common.CompatibilityDescriptionGroup;
import org.eclipse.jst.j2ee.common.SecurityRole;

public abstract interface Application
  extends CompatibilityDescriptionGroup
{
  public abstract boolean containsSecurityRole(String paramString);
  
  public abstract Module getModule(String paramString1, String paramString2);
  
  /**
   * @deprecated
   */
  public abstract Module getModule(String paramString);
  
  public abstract int getJ2EEVersionID()
    throws IllegalStateException;
  
  public abstract int getVersionID()
    throws IllegalStateException;
  
  public abstract Module getFirstModule(String paramString);
  
  public abstract Module getModuleHavingAltDD(String paramString);
  
  public abstract SecurityRole getSecurityRoleNamed(String paramString);
  
  /**
   * @deprecated
   */
  public abstract boolean isVersion1_2Descriptor();
  
  /**
   * @deprecated
   */
  public abstract boolean isVersion1_3Descriptor();
  
  public abstract String getVersion();
  
  public abstract void setVersion(String paramString);
  
  public abstract EList getSecurityRoles();
  
  public abstract EList getModules();
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.Application
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application;

import org.eclipse.emf.ecore.EFactory;
import org.eclipse.jst.j2ee.application.internal.impl.ApplicationFactoryImpl;

public abstract interface ApplicationFactory
  extends EFactory
{
  public static final ApplicationFactory eINSTANCE = ;
  
  public abstract Application createApplication();
  
  public abstract Module createModule();
  
  public abstract WebModule createWebModule();
  
  public abstract JavaClientModule createJavaClientModule();
  
  public abstract EjbModule createEjbModule();
  
  public abstract ConnectorModule createConnectorModule();
  
  public abstract ApplicationPackage getApplicationPackage();
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.ApplicationFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EReference;

public abstract interface ApplicationPackage$Literals
{
  public static final EClass APPLICATION = ApplicationPackage.eINSTANCE.getApplication();
  public static final EAttribute APPLICATION__VERSION = ApplicationPackage.eINSTANCE.getApplication_Version();
  public static final EReference APPLICATION__SECURITY_ROLES = ApplicationPackage.eINSTANCE.getApplication_SecurityRoles();
  public static final EReference APPLICATION__MODULES = ApplicationPackage.eINSTANCE.getApplication_Modules();
  public static final EClass MODULE = ApplicationPackage.eINSTANCE.getModule();
  public static final EAttribute MODULE__URI = ApplicationPackage.eINSTANCE.getModule_Uri();
  public static final EAttribute MODULE__ALT_DD = ApplicationPackage.eINSTANCE.getModule_AltDD();
  public static final EReference MODULE__APPLICATION = ApplicationPackage.eINSTANCE.getModule_Application();
  public static final EClass WEB_MODULE = ApplicationPackage.eINSTANCE.getWebModule();
  public static final EAttribute WEB_MODULE__CONTEXT_ROOT = ApplicationPackage.eINSTANCE.getWebModule_ContextRoot();
  public static final EClass JAVA_CLIENT_MODULE = ApplicationPackage.eINSTANCE.getJavaClientModule();
  public static final EClass EJB_MODULE = ApplicationPackage.eINSTANCE.getEjbModule();
  public static final EClass CONNECTOR_MODULE = ApplicationPackage.eINSTANCE.getConnectorModule();
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.ApplicationPackage.Literals
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.jst.j2ee.application.internal.impl.ApplicationPackageImpl;

public abstract interface ApplicationPackage
  extends EPackage
{
  public static final String eNAME = "application";
  public static final int APPLICATION = 0;
  public static final int APPLICATION__ICONS = 0;
  public static final int APPLICATION__DISPLAY_NAMES = 1;
  public static final int APPLICATION__DESCRIPTIONS = 2;
  public static final int APPLICATION__SMALL_ICON = 3;
  public static final int APPLICATION__LARGE_ICON = 4;
  public static final int APPLICATION__DESCRIPTION = 5;
  public static final int APPLICATION__DISPLAY_NAME = 6;
  public static final int APPLICATION__VERSION = 7;
  public static final int APPLICATION__SECURITY_ROLES = 8;
  public static final int APPLICATION__MODULES = 9;
  public static final int APPLICATION_FEATURE_COUNT = 10;
  public static final int MODULE = 1;
  public static final int MODULE__URI = 0;
  public static final int MODULE__ALT_DD = 1;
  public static final int MODULE__APPLICATION = 2;
  public static final int MODULE_FEATURE_COUNT = 3;
  public static final int WEB_MODULE = 2;
  public static final int WEB_MODULE__URI = 0;
  public static final int WEB_MODULE__ALT_DD = 1;
  public static final int WEB_MODULE__APPLICATION = 2;
  public static final int WEB_MODULE__CONTEXT_ROOT = 3;
  public static final int WEB_MODULE_FEATURE_COUNT = 4;
  public static final int JAVA_CLIENT_MODULE = 3;
  public static final int JAVA_CLIENT_MODULE__URI = 0;
  public static final int JAVA_CLIENT_MODULE__ALT_DD = 1;
  public static final int JAVA_CLIENT_MODULE__APPLICATION = 2;
  public static final int JAVA_CLIENT_MODULE_FEATURE_COUNT = 3;
  public static final int EJB_MODULE = 4;
  public static final int EJB_MODULE__URI = 0;
  public static final int EJB_MODULE__ALT_DD = 1;
  public static final int EJB_MODULE__APPLICATION = 2;
  public static final int EJB_MODULE_FEATURE_COUNT = 3;
  public static final int CONNECTOR_MODULE = 5;
  public static final int CONNECTOR_MODULE__URI = 0;
  public static final int CONNECTOR_MODULE__ALT_DD = 1;
  public static final int CONNECTOR_MODULE__APPLICATION = 2;
  public static final int CONNECTOR_MODULE_FEATURE_COUNT = 3;
  public static final String eNS_URI = "application.xmi";
  public static final String eNS_PREFIX = "org.eclipse.jst.j2ee.application";
  public static final ApplicationPackage eINSTANCE = ;
  
  public abstract EClass getApplication();
  
  public abstract EAttribute getApplication_Version();
  
  public abstract EReference getApplication_SecurityRoles();
  
  public abstract EReference getApplication_Modules();
  
  public abstract EClass getModule();
  
  public abstract EAttribute getModule_Uri();
  
  public abstract EAttribute getModule_AltDD();
  
  public abstract EReference getModule_Application();
  
  public abstract EClass getWebModule();
  
  public abstract EAttribute getWebModule_ContextRoot();
  
  public abstract EClass getJavaClientModule();
  
  public abstract EClass getEjbModule();
  
  public abstract EClass getConnectorModule();
  
  public abstract ApplicationFactory getApplicationFactory();
  
  public static abstract interface Literals
  {
    public static final EClass APPLICATION = ApplicationPackage.eINSTANCE.getApplication();
    public static final EAttribute APPLICATION__VERSION = ApplicationPackage.eINSTANCE.getApplication_Version();
    public static final EReference APPLICATION__SECURITY_ROLES = ApplicationPackage.eINSTANCE.getApplication_SecurityRoles();
    public static final EReference APPLICATION__MODULES = ApplicationPackage.eINSTANCE.getApplication_Modules();
    public static final EClass MODULE = ApplicationPackage.eINSTANCE.getModule();
    public static final EAttribute MODULE__URI = ApplicationPackage.eINSTANCE.getModule_Uri();
    public static final EAttribute MODULE__ALT_DD = ApplicationPackage.eINSTANCE.getModule_AltDD();
    public static final EReference MODULE__APPLICATION = ApplicationPackage.eINSTANCE.getModule_Application();
    public static final EClass WEB_MODULE = ApplicationPackage.eINSTANCE.getWebModule();
    public static final EAttribute WEB_MODULE__CONTEXT_ROOT = ApplicationPackage.eINSTANCE.getWebModule_ContextRoot();
    public static final EClass JAVA_CLIENT_MODULE = ApplicationPackage.eINSTANCE.getJavaClientModule();
    public static final EClass EJB_MODULE = ApplicationPackage.eINSTANCE.getEjbModule();
    public static final EClass CONNECTOR_MODULE = ApplicationPackage.eINSTANCE.getConnectorModule();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.ApplicationPackage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application;

import org.eclipse.jst.j2ee.internal.common.XMLResource;

public abstract interface ApplicationResource
  extends XMLResource
{
  public abstract Application getApplication();
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.ApplicationResource
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application;

public abstract interface ConnectorModule
  extends Module
{}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.ConnectorModule
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application;

public abstract interface EjbModule
  extends Module
{}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.EjbModule
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application;

public abstract interface JavaClientModule
  extends Module
{}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.JavaClientModule
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application;

import org.eclipse.jst.j2ee.common.J2EEEObject;

public abstract interface Module
  extends J2EEEObject
{
  public abstract boolean isConnectorModule();
  
  public abstract boolean isEjbModule();
  
  public abstract boolean isJavaModule();
  
  public abstract boolean isWebModule();
  
  public abstract String getUri();
  
  public abstract void setUri(String paramString);
  
  public abstract String getAltDD();
  
  public abstract void setAltDD(String paramString);
  
  public abstract Application getApplication();
  
  public abstract void setApplication(Application paramApplication);
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.Module
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application;

public abstract interface WebModule
  extends Module
{
  public abstract String getContextRoot();
  
  public abstract void setContextRoot(String paramString);
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.WebModule
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application.internal.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage.Registry;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.jst.j2ee.application.Application;
import org.eclipse.jst.j2ee.application.ApplicationFactory;
import org.eclipse.jst.j2ee.application.ApplicationPackage;
import org.eclipse.jst.j2ee.application.ConnectorModule;
import org.eclipse.jst.j2ee.application.EjbModule;
import org.eclipse.jst.j2ee.application.JavaClientModule;
import org.eclipse.jst.j2ee.application.Module;
import org.eclipse.jst.j2ee.application.WebModule;

public class ApplicationFactoryImpl
  extends EFactoryImpl
  implements ApplicationFactory
{
  public static ApplicationFactory init()
  {
    try
    {
      ApplicationFactory theApplicationFactory = (ApplicationFactory)EPackage.Registry.INSTANCE.getEFactory("application.xmi");
      if (theApplicationFactory != null) {
        return theApplicationFactory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new ApplicationFactoryImpl();
  }
  
  public EObject create(EClass eClass)
  {
    switch (eClass.getClassifierID())
    {
    case 0: 
      return createApplication();
    case 1: 
      return createModule();
    case 2: 
      return createWebModule();
    case 3: 
      return createJavaClientModule();
    case 4: 
      return createEjbModule();
    case 5: 
      return createConnectorModule();
    }
    throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
  }
  
  public static ApplicationFactory getActiveFactory()
  {
    return (ApplicationFactory)getPackage().getEFactoryInstance();
  }
  
  public Application createApplication()
  {
    ApplicationImpl application = new ApplicationImpl();
    return application;
  }
  
  public Module createModule()
  {
    ModuleImpl module = new ModuleImpl();
    return module;
  }
  
  public WebModule createWebModule()
  {
    WebModuleImpl webModule = new WebModuleImpl();
    return webModule;
  }
  
  public JavaClientModule createJavaClientModule()
  {
    JavaClientModuleImpl javaClientModule = new JavaClientModuleImpl();
    return javaClientModule;
  }
  
  public EjbModule createEjbModule()
  {
    EjbModuleImpl ejbModule = new EjbModuleImpl();
    return ejbModule;
  }
  
  public ConnectorModule createConnectorModule()
  {
    ConnectorModuleImpl connectorModule = new ConnectorModuleImpl();
    return connectorModule;
  }
  
  public ApplicationPackage getApplicationPackage()
  {
    return (ApplicationPackage)getEPackage();
  }
  
  public static ApplicationPackage getPackage()
  {
    return ApplicationPackage.eINSTANCE;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.internal.impl.ApplicationFactoryImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application.internal.impl;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.jst.j2ee.application.Application;
import org.eclipse.jst.j2ee.application.ApplicationPackage.Literals;
import org.eclipse.jst.j2ee.application.Module;
import org.eclipse.jst.j2ee.common.SecurityRole;
import org.eclipse.jst.j2ee.common.internal.impl.CompatibilityDescriptionGroupImpl;
import org.eclipse.jst.j2ee.common.internal.util.CommonUtil;
import org.eclipse.jst.j2ee.internal.common.J2EEVersionResource;
import org.eclipse.jst.j2ee.internal.common.XMLResource;
import org.eclipse.jst.jee.application.ICommonApplication;
import org.eclipse.jst.jee.application.ICommonModule;
import org.eclipse.wst.common.internal.emf.utilities.StringUtil;

public class ApplicationImpl
  extends CompatibilityDescriptionGroupImpl
  implements Application, ICommonApplication
{
  protected static final String VERSION_EDEFAULT = null;
  protected String version = VERSION_EDEFAULT;
  protected EList securityRoles = null;
  protected EList modules = null;
  
  protected EClass eStaticClass()
  {
    return ApplicationPackage.Literals.APPLICATION;
  }
  
  public boolean containsSecurityRole(String name)
  {
    return getSecurityRoleNamed(name) != null;
  }
  
  public Module getModule(String uri)
  {
    return getFirstModule(uri);
  }
  
  public Module getModule(String uri, String altDD)
  {
    List allModules = getModules();
    for (int i = 0; i < allModules.size(); i++)
    {
      Module aModule = (Module)allModules.get(i);
      if ((StringUtil.stringsEqual(uri, aModule.getUri())) && (StringUtil.stringsEqual(altDD, aModule.getAltDD()))) {
        return aModule;
      }
    }
    return null;
  }
  
  public Module getFirstModule(String uri)
  {
    if (uri == null) {
      return null;
    }
    Iterator allModules = getModules().iterator();
    while (allModules.hasNext())
    {
      Module aModule = (Module)allModules.next();
      if (uri.equals(aModule.getUri())) {
        return aModule;
      }
    }
    return null;
  }
  
  public Module getModuleHavingAltDD(String uri)
  {
    if (uri == null) {
      return null;
    }
    List aModules = getModules();
    for (int i = 0; i < aModules.size(); i++)
    {
      Module aModule = (Module)aModules.get(i);
      if (uri.equals(aModule.getAltDD())) {
        return aModule;
      }
    }
    return null;
  }
  
  public SecurityRole getSecurityRoleNamed(String roleName)
  {
    List tempRoles = getSecurityRoles();
    for (int i = 0; i < tempRoles.size(); i++)
    {
      SecurityRole role = (SecurityRole)tempRoles.get(i);
      if (role.getRoleName().equals(roleName)) {
        return role;
      }
    }
    return null;
  }
  
  /**
   * @deprecated
   */
  public boolean isVersion1_2Descriptor()
  {
    CommonUtil.checkDDObjectForVersion(this);
    String systemId = ((XMLResource)eResource()).getSystemId();
    return systemId == null ? false : systemId.equals("http://java.sun.com/j2ee/dtds/application_1_2.dtd");
  }
  
  /**
   * @deprecated
   */
  public boolean isVersion1_3Descriptor()
  {
    CommonUtil.checkDDObjectForVersion(this);
    String systemId = ((XMLResource)eResource()).getSystemId();
    return systemId == null ? false : systemId.equals("http://java.sun.com/dtd/application_1_3.dtd");
  }
  
  public void setDisplayName(String newDisplayName)
  {
    super.setDisplayName(newDisplayName);
  }
  
  public String getVersion()
  {
    return version;
  }
  
  public int getVersionID()
    throws IllegalStateException
  {
    J2EEVersionResource res = (J2EEVersionResource)eResource();
    if (res == null) {
      throw new IllegalStateException();
    }
    return res.getModuleVersionID();
  }
  
  public int getJ2EEVersionID()
    throws IllegalStateException
  {
    J2EEVersionResource res = (J2EEVersionResource)eResource();
    if (res == null) {
      throw new IllegalStateException();
    }
    return res.getJ2EEVersionID();
  }
  
  public void setVersion(String newVersion)
  {
    String oldVersion = version;
    version = newVersion;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 7, oldVersion, version));
    }
  }
  
  public EList getSecurityRoles()
  {
    if (securityRoles == null) {
      securityRoles = new EObjectContainmentEList(SecurityRole.class, this, 8);
    }
    return securityRoles;
  }
  
  public EList getModules()
  {
    if (modules == null) {
      modules = new EObjectContainmentWithInverseEList(Module.class, this, 9, 2);
    }
    return modules;
  }
  
  public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
  {
    switch (featureID)
    {
    case 9: 
      return ((InternalEList)getModules()).basicAdd(otherEnd, msgs);
    }
    return super.eInverseAdd(otherEnd, featureID, msgs);
  }
  
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
  {
    switch (featureID)
    {
    case 8: 
      return ((InternalEList)getSecurityRoles()).basicRemove(otherEnd, msgs);
    case 9: 
      return ((InternalEList)getModules()).basicRemove(otherEnd, msgs);
    }
    return super.eInverseRemove(otherEnd, featureID, msgs);
  }
  
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
    case 7: 
      return getVersion();
    case 8: 
      return getSecurityRoles();
    case 9: 
      return getModules();
    }
    return super.eGet(featureID, resolve, coreType);
  }
  
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
    case 7: 
      setVersion((String)newValue);
      return;
    case 8: 
      getSecurityRoles().clear();
      getSecurityRoles().addAll((Collection)newValue);
      return;
    case 9: 
      getModules().clear();
      getModules().addAll((Collection)newValue);
      return;
    }
    super.eSet(featureID, newValue);
  }
  
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
    case 7: 
      setVersion(VERSION_EDEFAULT);
      return;
    case 8: 
      getSecurityRoles().clear();
      return;
    case 9: 
      getModules().clear();
      return;
    }
    super.eUnset(featureID);
  }
  
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
    case 7: 
      return version != null;
    case 8: 
      return (securityRoles != null) && (!securityRoles.isEmpty());
    case 9: 
      return (modules != null) && (!modules.isEmpty());
    }
    return super.eIsSet(featureID);
  }
  
  public String toString()
  {
    if (eIsProxy()) {
      return super.toString();
    }
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (version: ");
    result.append(version);
    result.append(')');
    return result.toString();
  }
  
  public List getEARModules()
  {
    return getModules();
  }
  
  public ICommonModule getFirstEARModule(String uri)
  {
    return (ICommonModule)getFirstModule(uri);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.internal.impl.ApplicationImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application.internal.impl;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage.Registry;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.jem.java.JavaRefPackage;
import org.eclipse.jst.j2ee.application.Application;
import org.eclipse.jst.j2ee.application.ApplicationFactory;
import org.eclipse.jst.j2ee.application.ApplicationPackage;
import org.eclipse.jst.j2ee.application.ConnectorModule;
import org.eclipse.jst.j2ee.application.EjbModule;
import org.eclipse.jst.j2ee.application.JavaClientModule;
import org.eclipse.jst.j2ee.application.Module;
import org.eclipse.jst.j2ee.application.WebModule;
import org.eclipse.jst.j2ee.common.CommonPackage;
import org.eclipse.jst.j2ee.core.internal.plugin.J2EECorePlugin;
import org.eclipse.jst.j2ee.internal.J2EEInit;

public class ApplicationPackageImpl
  extends EPackageImpl
  implements ApplicationPackage
{
  private EClass applicationEClass = null;
  private EClass moduleEClass = null;
  private EClass webModuleEClass = null;
  private EClass javaClientModuleEClass = null;
  private EClass ejbModuleEClass = null;
  private EClass connectorModuleEClass = null;
  
  private ApplicationPackageImpl()
  {
    super("application.xmi", ApplicationFactory.eINSTANCE);
  }
  
  private static volatile boolean isInited = false;
  
  public static ApplicationPackage init()
  {
    if (isInited) {
      return (ApplicationPackage)EPackage.Registry.INSTANCE.getEPackage("application.xmi");
    }
    ApplicationPackageImpl theApplicationPackage = (ApplicationPackageImpl)((EPackage.Registry.INSTANCE.get("application.xmi") instanceof ApplicationPackageImpl) ? EPackage.Registry.INSTANCE.get("application.xmi") : new ApplicationPackageImpl());
    
    isInited = true;
    
    EcorePackage.eINSTANCE.eClass();
    JavaRefPackage.eINSTANCE.eClass();
    
    theApplicationPackage.createPackageContents();
    
    theApplicationPackage.initializePackageContents();
    
    theApplicationPackage.freeze();
    
    EPackage.Registry.INSTANCE.put("application.xmi", theApplicationPackage);
    
    J2EEInit.initEMFModels();
    return theApplicationPackage;
  }
  
  public EClass getApplication()
  {
    return applicationEClass;
  }
  
  public EAttribute getApplication_Version()
  {
    return (EAttribute)applicationEClass.getEStructuralFeatures().get(0);
  }
  
  public EReference getApplication_SecurityRoles()
  {
    return (EReference)applicationEClass.getEStructuralFeatures().get(1);
  }
  
  public EReference getApplication_Modules()
  {
    return (EReference)applicationEClass.getEStructuralFeatures().get(2);
  }
  
  public EClass getModule()
  {
    return moduleEClass;
  }
  
  public EAttribute getModule_Uri()
  {
    return (EAttribute)moduleEClass.getEStructuralFeatures().get(0);
  }
  
  public EAttribute getModule_AltDD()
  {
    return (EAttribute)moduleEClass.getEStructuralFeatures().get(1);
  }
  
  public EReference getModule_Application()
  {
    return (EReference)moduleEClass.getEStructuralFeatures().get(2);
  }
  
  public EClass getWebModule()
  {
    return webModuleEClass;
  }
  
  public EAttribute getWebModule_ContextRoot()
  {
    return (EAttribute)webModuleEClass.getEStructuralFeatures().get(0);
  }
  
  public EClass getJavaClientModule()
  {
    return javaClientModuleEClass;
  }
  
  public EClass getEjbModule()
  {
    return ejbModuleEClass;
  }
  
  public EClass getConnectorModule()
  {
    return connectorModuleEClass;
  }
  
  public ApplicationFactory getApplicationFactory()
  {
    return (ApplicationFactory)getEFactoryInstance();
  }
  
  private boolean isCreated = false;
  
  public void createPackageContents()
  {
    if (isCreated) {
      return;
    }
    isCreated = true;
    
    applicationEClass = createEClass(0);
    createEAttribute(applicationEClass, 7);
    createEReference(applicationEClass, 8);
    createEReference(applicationEClass, 9);
    
    moduleEClass = createEClass(1);
    createEAttribute(moduleEClass, 0);
    createEAttribute(moduleEClass, 1);
    createEReference(moduleEClass, 2);
    
    webModuleEClass = createEClass(2);
    createEAttribute(webModuleEClass, 3);
    
    javaClientModuleEClass = createEClass(3);
    
    ejbModuleEClass = createEClass(4);
    
    connectorModuleEClass = createEClass(5);
  }
  
  private boolean isInitialized = false;
  
  public void initializePackageContents()
  {
    if (isInitialized) {
      return;
    }
    isInitialized = true;
    
    setName("application");
    setNsPrefix("org.eclipse.jst.j2ee.application");
    setNsURI("application.xmi");
    
    CommonPackage theCommonPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage("common.xmi");
    ApplicationPackage theApplicationPackage_1 = (ApplicationPackage)EPackage.Registry.INSTANCE.getEPackage("application.xmi");
    
    boolean hasLock = false;
    try
    {
      hasLock = J2EEInit.aquireInitializePackageContentsLock();
    }
    catch (InterruptedException e)
    {
      J2EECorePlugin.logError(e);
    }
    try
    {
      applicationEClass.getESuperTypes().add(theCommonPackage.getCompatibilityDescriptionGroup());
      moduleEClass.getESuperTypes().add(theCommonPackage.getJ2EEEObject());
      webModuleEClass.getESuperTypes().add(theApplicationPackage_1.getModule());
      javaClientModuleEClass.getESuperTypes().add(theApplicationPackage_1.getModule());
      ejbModuleEClass.getESuperTypes().add(theApplicationPackage_1.getModule());
      connectorModuleEClass.getESuperTypes().add(theApplicationPackage_1.getModule());
      
      initEClass(applicationEClass, Application.class, "Application", false, false, true);
      initEAttribute(getApplication_Version(), ecorePackage.getEString(), "version", null, 0, 1, Application.class, false, false, true, false, false, true, false, true);
      initEReference(getApplication_SecurityRoles(), theCommonPackage.getSecurityRole(), null, "securityRoles", null, 0, -1, Application.class, false, false, true, true, false, false, true, false, true);
      initEReference(getApplication_Modules(), theApplicationPackage_1.getModule(), theApplicationPackage_1.getModule_Application(), "modules", null, 1, -1, Application.class, false, false, true, true, false, false, true, false, true);
      
      initEClass(moduleEClass, Module.class, "Module", false, false, true);
      initEAttribute(getModule_Uri(), ecorePackage.getEString(), "uri", null, 0, 1, Module.class, false, false, true, false, false, true, false, true);
      initEAttribute(getModule_AltDD(), ecorePackage.getEString(), "altDD", null, 0, 1, Module.class, false, false, true, false, false, true, false, true);
      initEReference(getModule_Application(), theApplicationPackage_1.getApplication(), theApplicationPackage_1.getApplication_Modules(), "application", null, 0, 1, Module.class, true, false, true, false, false, false, true, false, true);
      
      initEClass(webModuleEClass, WebModule.class, "WebModule", false, false, true);
      initEAttribute(getWebModule_ContextRoot(), ecorePackage.getEString(), "contextRoot", null, 0, 1, WebModule.class, false, false, true, false, false, true, false, true);
      
      initEClass(javaClientModuleEClass, JavaClientModule.class, "JavaClientModule", false, false, true);
      
      initEClass(ejbModuleEClass, EjbModule.class, "EjbModule", false, false, true);
      
      initEClass(connectorModuleEClass, ConnectorModule.class, "ConnectorModule", false, false, true);
    }
    finally
    {
      if (hasLock) {
        J2EEInit.releaseInitializePackageContentsLock();
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.internal.impl.ApplicationPackageImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application.internal.impl;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource.Factory;
import org.eclipse.jst.j2ee.common.internal.impl.J2EEResourceFactoryRegistry;
import org.eclipse.jst.j2ee.internal.J2EEConstants;
import org.eclipse.jst.j2ee.internal.xml.J2EEXmlDtDEntityResolver;
import org.eclipse.wst.common.internal.emf.resource.FileNameResourceFactoryRegistry;
import org.eclipse.wst.common.internal.emf.resource.Renderer;
import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory;

public class ApplicationResourceFactory
  extends TranslatorResourceFactory
{
  public static void registerDtds()
  {
    J2EEXmlDtDEntityResolver.registerDtD("http://java.sun.com/j2ee/dtds/application_1_2.dtd", "application_1_2.dtd");
    J2EEXmlDtDEntityResolver.registerDtD("http://java.sun.com/j2ee/dtds/application_1.2.dtd", "application_1.2.dtd");
    J2EEXmlDtDEntityResolver.registerDtD("http://java.sun.com/dtd/application_1_3.dtd", "application_1_3.dtd");
    J2EEXmlDtDEntityResolver.registerDtD("http://java.sun.com/dtd/application_1.3.dtd", "application_1.3.dtd");
    J2EEXmlDtDEntityResolver.registerDtD("http://java.sun.com/xml/ns/j2ee/application_1_4.xsd", "application_1_4.xsd");
    
    J2EEXmlDtDEntityResolver.registerDtD("j2ee_1_4.xsd", "j2ee_1_4.xsd");
  }
  
  public ApplicationResourceFactory()
  {
    super(RendererFactory.getDefaultRendererFactory());
  }
  
  public ApplicationResourceFactory(RendererFactory aRendererFactory)
  {
    super(aRendererFactory);
  }
  
  protected TranslatorResource createResource(URI uri, Renderer aRenderer)
  {
    return new ApplicationResourceImpl(uri, aRenderer);
  }
  
  public static void registerWith(RendererFactory aRendererFactory)
  {
    J2EEResourceFactoryRegistry.INSTANCE.registerLastFileSegment("application.xml", new ApplicationResourceFactory(aRendererFactory));
  }
  
  public static void register()
  {
    registerWith(RendererFactory.getDefaultRendererFactory());
  }
  
  public static void register(FileNameResourceFactoryRegistry aRegistry)
  {
    aRegistry.registerLastFileSegment("application.xml", new ApplicationResourceFactory(RendererFactory.getDefaultRendererFactory()));
  }
  
  public static Resource.Factory getRegisteredFactory()
  {
    return J2EEResourceFactoryRegistry.INSTANCE.getFactory(J2EEConstants.APPLICATION_DD_URI_OBJ);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.internal.impl.ApplicationResourceFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application.internal.impl;

import org.eclipse.emf.common.util.URI;
import org.eclipse.jst.j2ee.application.Application;
import org.eclipse.jst.j2ee.application.ApplicationResource;
import org.eclipse.jst.j2ee.common.internal.impl.XMLResourceImpl;
import org.eclipse.jst.j2ee.internal.model.translator.application.ApplicationTranslator;
import org.eclipse.wst.common.internal.emf.resource.Renderer;
import org.eclipse.wst.common.internal.emf.resource.Translator;

public class ApplicationResourceImpl
  extends XMLResourceImpl
  implements ApplicationResource
{
  public ApplicationResourceImpl(URI uri, Renderer aRenderer)
  {
    super(uri, aRenderer);
  }
  
  public ApplicationResourceImpl(Renderer aRenderer)
  {
    super(aRenderer);
  }
  
  public Application getApplication()
  {
    return (Application)getRootObject();
  }
  
  public int getType()
  {
    return 2;
  }
  
  public String getDoctype()
  {
    switch (getJ2EEVersionID())
    {
    case 12: 
    case 13: 
      return "application";
    }
    return null;
  }
  
  public int getJ2EEVersionID()
  {
    return getModuleVersionID();
  }
  
  public Translator getRootTranslator()
  {
    return ApplicationTranslator.INSTANCE;
  }
  
  public String getJ2EE_1_2_SystemID()
  {
    return "http://java.sun.com/j2ee/dtds/application_1_2.dtd";
  }
  
  public String getJ2EE_Alt_1_2_SystemID()
  {
    return "http://java.sun.com/j2ee/dtds/application_1.2.dtd";
  }
  
  public String getJ2EE_1_3_SystemID()
  {
    return "http://java.sun.com/dtd/application_1_3.dtd";
  }
  
  public String getJ2EE_Alt_1_3_SystemID()
  {
    return "http://java.sun.com/dtd/application_1.3.dtd";
  }
  
  public String getJ2EE_1_2_PublicID()
  {
    return "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN";
  }
  
  public String getJ2EE_1_3_PublicID()
  {
    return "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN";
  }
  
  public void setModuleVersionID(int id)
  {
    super.setVersionID(id);
    switch (id)
    {
    case 14: 
      super.setDoctypeValues(null, null);
      break;
    case 13: 
      super.setDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID());
      break;
    case 12: 
      super.setDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID());
    }
    syncVersionOfRootObject();
  }
  
  public void setJ2EEVersionID(int id)
  {
    primSetVersionID(id);
    switch (id)
    {
    case 14: 
      primSetDoctypeValues(null, null);
      break;
    case 13: 
      primSetDoctypeValues(getJ2EE_1_3_PublicID(), getJ2EE_1_3_SystemID());
      break;
    case 12: 
      primSetDoctypeValues(getJ2EE_1_2_PublicID(), getJ2EE_1_2_SystemID());
    }
    syncVersionOfRootObject();
  }
  
  protected void syncVersionOfRootObject()
  {
    Application app = getApplication();
    if (app == null) {
      return;
    }
    String version = app.getVersion();
    String newVersion = getModuleVersionString();
    if (!newVersion.equals(version)) {
      app.setVersion(newVersion);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.internal.impl.ApplicationResourceImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application.internal.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.jst.j2ee.application.ApplicationPackage.Literals;
import org.eclipse.jst.j2ee.application.ConnectorModule;

public class ConnectorModuleImpl
  extends ModuleImpl
  implements ConnectorModule
{
  protected EClass eStaticClass()
  {
    return ApplicationPackage.Literals.CONNECTOR_MODULE;
  }
  
  public boolean isConnectorModule()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.internal.impl.ConnectorModuleImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application.internal.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.jst.j2ee.application.ApplicationPackage.Literals;
import org.eclipse.jst.j2ee.application.EjbModule;

public class EjbModuleImpl
  extends ModuleImpl
  implements EjbModule
{
  protected EClass eStaticClass()
  {
    return ApplicationPackage.Literals.EJB_MODULE;
  }
  
  public boolean isEjbModule()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.internal.impl.EjbModuleImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application.internal.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.jst.j2ee.application.ApplicationPackage.Literals;
import org.eclipse.jst.j2ee.application.JavaClientModule;

public class JavaClientModuleImpl
  extends ModuleImpl
  implements JavaClientModule
{
  protected EClass eStaticClass()
  {
    return ApplicationPackage.Literals.JAVA_CLIENT_MODULE;
  }
  
  public boolean isJavaModule()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.j2ee.application.internal.impl.JavaClientModuleImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.j2ee.application.internal.impl;

import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.jst.j2ee.application.Application;
import org.eclipse.jst.j2ee.application.ApplicationPackage.Literals;
import org.eclipse.jst.j2ee.application.Module;
import org.eclipse.jst.j2ee.common.internal.impl.J2EEEObjectImpl;
import org.eclipse.jst.j2ee.internal.ICommonEMFModule;
import org.eclipse.jst.jee.application.ICommonModule;

public class ModuleImpl
  extends J2EEEObjectImpl
  implements Module, ICommonModule, ICommonEMFModule
{
  protected static final String URI_EDEFAULT = null;
  protected static final char FORWARD_SLASH = '/';
  protected static final char BACKWARD_SLASH = '\\';
  protected String uri = URI_EDEFAULT;
  protected static final String ALT_DD_EDEFAULT = null;
  protected String altDD = ALT_DD_EDEFAULT;
  
  protected EClass eStaticClass()
  {
    return ApplicationPackage.Literals.MODULE;
  }
  
  public boolean isConnectorModule()
  {
    return false;
  }
  
  public boolean isEjbModule()
  {
    return false;
  }
  
  public boolean isJavaModule()
  {
    return false;
  }
  
  public boolean isWebModule()
  {
    return false;
  }
  
  public String getUri()
  {
    return uri;
  }
  
  public void setUri(String newUri)
  {
    String oldUri = uri;
    uri = newUri;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 0, oldUri, uri));
    }
  }
  
  public String getAltDD()
  {
    return altDD;
  }
  
  public void setAltDD(String newAltDD)
  {
    String oldAltDD = altDD;
    altDD = newAltDD;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 1, oldAltDD, altDD));
    }
  }
  
  public Application getApplication()
  {
    if (eContainerFeatureID != 2) {
      return null;
    }
    return (Application)eContainer();
  }
  
  public NotificationChain basicSetApplication(Application newApplication, NotificationChain msgs)
  {
    NotificationChain innerMsgs = eBasicSetContainer((InternalEObject)newApplication, 2, msgs);
    return innerMsgs;
  }
  
  public void setApplication(Application newApplic
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd