org.eclipse.emf.mapping.ecore2xml_2.7.0.v20120130-0943

16:43:42.822 INFO  jd.cli.Main - Decompiling org.eclipse.emf.mapping.ecore2xml_2.7.0.v20120130-0943.jar
package org.eclipse.emf.mapping.ecore2xml;

import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLFactoryImpl;

public abstract interface Ecore2XMLFactory
  extends EFactory
{
  public static final Ecore2XMLFactory eINSTANCE = ;
  
  public abstract XMLInfo createXMLInfo();
  
  public abstract XMLMap createXMLMap();
  
  public abstract Ecore2XMLPackage getEcore2XMLPackage();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.Ecore2XMLFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml;

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

public abstract interface Ecore2XMLPackage$Literals
{
  public static final EClass XML_INFO = Ecore2XMLPackage.eINSTANCE.getXMLInfo();
  public static final EAttribute XML_INFO__NAME = Ecore2XMLPackage.eINSTANCE.getXMLInfo_Name();
  public static final EAttribute XML_INFO__TARGET_NAMESPACE = Ecore2XMLPackage.eINSTANCE.getXMLInfo_TargetNamespace();
  public static final EAttribute XML_INFO__XML_REPRESENTATION = Ecore2XMLPackage.eINSTANCE.getXMLInfo_XMLRepresentation();
  public static final EClass XML_MAP = Ecore2XMLPackage.eINSTANCE.getXMLMap();
  public static final EAttribute XML_MAP__ID_ATTRIBUTE_NAME = Ecore2XMLPackage.eINSTANCE.getXMLMap_IDAttributeName();
  public static final EReference XML_MAP__ECORE_TO_XML_INFO = Ecore2XMLPackage.eINSTANCE.getXMLMap_EcoreToXMLInfo();
  public static final EReference XML_MAP__NO_NAMESPACE_PACKAGE = Ecore2XMLPackage.eINSTANCE.getXMLMap_NoNamespacePackage();
  public static final EClass ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY = Ecore2XMLPackage.eINSTANCE.getENamedElementToXMLInfoMapEntry();
  public static final EReference ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__KEY = Ecore2XMLPackage.eINSTANCE.getENamedElementToXMLInfoMapEntry_Key();
  public static final EReference ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE = Ecore2XMLPackage.eINSTANCE.getENamedElementToXMLInfoMapEntry_Value();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage.Literals
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml;

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.emf.mapping.ecore2xml.impl.Ecore2XMLPackageImpl;

public abstract interface Ecore2XMLPackage
  extends EPackage
{
  public static final String eNAME = "ecore2xml";
  public static final String eNS_URI = "http://www.eclipse.org/emf/2005/Ecore2XML";
  public static final String eNS_PREFIX = "ecore2xml";
  public static final String eCONTENT_TYPE = "org.eclipse.emf.mapping.ecore2xml";
  public static final Ecore2XMLPackage eINSTANCE = ;
  public static final int XML_INFO = 0;
  public static final int XML_INFO__NAME = 0;
  public static final int XML_INFO__TARGET_NAMESPACE = 1;
  public static final int XML_INFO__XML_REPRESENTATION = 2;
  public static final int XML_INFO_FEATURE_COUNT = 3;
  public static final int XML_MAP = 1;
  public static final int XML_MAP__ID_ATTRIBUTE_NAME = 0;
  public static final int XML_MAP__ECORE_TO_XML_INFO = 1;
  public static final int XML_MAP__NO_NAMESPACE_PACKAGE = 2;
  public static final int XML_MAP_FEATURE_COUNT = 3;
  public static final int ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY = 2;
  public static final int ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__KEY = 0;
  public static final int ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE = 1;
  public static final int ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY_FEATURE_COUNT = 2;
  
  public abstract EClass getXMLInfo();
  
  public abstract EAttribute getXMLInfo_Name();
  
  public abstract EAttribute getXMLInfo_TargetNamespace();
  
  public abstract EAttribute getXMLInfo_XMLRepresentation();
  
  public abstract EClass getXMLMap();
  
  public abstract EAttribute getXMLMap_IDAttributeName();
  
  public abstract EReference getXMLMap_EcoreToXMLInfo();
  
  public abstract EReference getXMLMap_NoNamespacePackage();
  
  public abstract EClass getENamedElementToXMLInfoMapEntry();
  
  public abstract EReference getENamedElementToXMLInfoMapEntry_Key();
  
  public abstract EReference getENamedElementToXMLInfoMapEntry_Value();
  
  public abstract Ecore2XMLFactory getEcore2XMLFactory();
  
  public static abstract interface Literals
  {
    public static final EClass XML_INFO = Ecore2XMLPackage.eINSTANCE.getXMLInfo();
    public static final EAttribute XML_INFO__NAME = Ecore2XMLPackage.eINSTANCE.getXMLInfo_Name();
    public static final EAttribute XML_INFO__TARGET_NAMESPACE = Ecore2XMLPackage.eINSTANCE.getXMLInfo_TargetNamespace();
    public static final EAttribute XML_INFO__XML_REPRESENTATION = Ecore2XMLPackage.eINSTANCE.getXMLInfo_XMLRepresentation();
    public static final EClass XML_MAP = Ecore2XMLPackage.eINSTANCE.getXMLMap();
    public static final EAttribute XML_MAP__ID_ATTRIBUTE_NAME = Ecore2XMLPackage.eINSTANCE.getXMLMap_IDAttributeName();
    public static final EReference XML_MAP__ECORE_TO_XML_INFO = Ecore2XMLPackage.eINSTANCE.getXMLMap_EcoreToXMLInfo();
    public static final EReference XML_MAP__NO_NAMESPACE_PACKAGE = Ecore2XMLPackage.eINSTANCE.getXMLMap_NoNamespacePackage();
    public static final EClass ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY = Ecore2XMLPackage.eINSTANCE.getENamedElementToXMLInfoMapEntry();
    public static final EReference ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__KEY = Ecore2XMLPackage.eINSTANCE.getENamedElementToXMLInfoMapEntry_Key();
    public static final EReference ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY__VALUE = Ecore2XMLPackage.eINSTANCE.getENamedElementToXMLInfoMapEntry_Value();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml;

import org.eclipse.emf.ecore.xmi.XMLResource.XMLMap;

public abstract interface Ecore2XMLRegistry$Descriptor
{
  public abstract XMLResource.XMLMap getXMLMap();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry.Descriptor
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml;

import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.XMLResource.XMLMap;

public class Ecore2XMLRegistry$Reader$Ecore2XMLDescriptor
  implements Ecore2XMLRegistry.Descriptor
{
  private final IConfigurationElement element;
  private XMLResource.XMLMap xmlMap = null;
  
  protected Ecore2XMLRegistry$Reader$Ecore2XMLDescriptor(IConfigurationElement element)
  {
    this.element = element;
  }
  
  public XMLResource.XMLMap getXMLMap()
  {
    if (xmlMap == null) {
      try
      {
        xmlMap = 
          ((XMLResource.XMLMap)EcoreUtil.getObjectByType(
          new ResourceSetImpl().getResource(URI.createURI(element.getAttribute("xmlmap")), true).getContents(), 
          Ecore2XMLPackage.eINSTANCE.getXMLMap()));
      }
      catch (Exception e)
      {
        throw new WrappedException(e);
      }
    }
    return xmlMap;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry.Reader.Ecore2XMLDescriptor
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml;

import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.XMLResource.XMLMap;

public class Ecore2XMLRegistry$Reader
{
  protected static final String TAG_ECORE2XML = "ecore2xml";
  protected static final String ATT_URI = "uri";
  protected static final String ATT_XMLMAP = "xmlmap";
  private final IExtensionRegistry extensionRegistry;
  private final String namespace;
  private final String extensionPointID;
  
  protected static class Ecore2XMLDescriptor
    implements Ecore2XMLRegistry.Descriptor
  {
    private final IConfigurationElement element;
    private XMLResource.XMLMap xmlMap = null;
    
    protected Ecore2XMLDescriptor(IConfigurationElement element)
    {
      this.element = element;
    }
    
    public XMLResource.XMLMap getXMLMap()
    {
      if (xmlMap == null) {
        try
        {
          xmlMap = 
            ((XMLResource.XMLMap)EcoreUtil.getObjectByType(
            new ResourceSetImpl().getResource(URI.createURI(element.getAttribute("xmlmap")), true).getContents(), 
            Ecore2XMLPackage.eINSTANCE.getXMLMap()));
        }
        catch (Exception e)
        {
          throw new WrappedException(e);
        }
      }
      return xmlMap;
    }
  }
  
  public Ecore2XMLRegistry$Reader(IExtensionRegistry extensionRegistry, String namespace, String extensionPointID)
  {
    this.extensionRegistry = extensionRegistry;
    this.namespace = namespace;
    this.extensionPointID = extensionPointID;
  }
  
  protected void readElement(IConfigurationElement element)
  {
    if ("ecore2xml".equals(element.getName()))
    {
      String uri = element.getAttribute("uri");
      if ((uri != null) && (element.getAttribute("xmlmap") != null)) {
        Ecore2XMLRegistry.INSTANCE.put(uri, new Ecore2XMLDescriptor(element));
      }
    }
  }
  
  public void readRegistry()
  {
    IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(namespace, extensionPointID);
    if (extensionPoint != null)
    {
      IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
      for (int i = 0; i < elements.length; i++) {
        readElement(elements[i]);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry.Reader
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml;

import java.util.Map;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.XMLResource.XMLMap;
import org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLRegistryImpl;

public abstract interface Ecore2XMLRegistry
  extends Map<String, Object>
{
  public abstract XMLResource.XMLMap getXMLMap(String paramString);
  
  public static abstract interface Descriptor
  {
    public abstract XMLResource.XMLMap getXMLMap();
  }
  
  public static class Reader
  {
    protected static final String TAG_ECORE2XML = "ecore2xml";
    protected static final String ATT_URI = "uri";
    protected static final String ATT_XMLMAP = "xmlmap";
    private final IExtensionRegistry extensionRegistry;
    private final String namespace;
    private final String extensionPointID;
    
    protected static class Ecore2XMLDescriptor
      implements Ecore2XMLRegistry.Descriptor
    {
      private final IConfigurationElement element;
      private XMLResource.XMLMap xmlMap = null;
      
      protected Ecore2XMLDescriptor(IConfigurationElement element)
      {
        this.element = element;
      }
      
      public XMLResource.XMLMap getXMLMap()
      {
        if (xmlMap == null) {
          try
          {
            xmlMap = 
              ((XMLResource.XMLMap)EcoreUtil.getObjectByType(
              new ResourceSetImpl().getResource(URI.createURI(element.getAttribute("xmlmap")), true).getContents(), 
              Ecore2XMLPackage.eINSTANCE.getXMLMap()));
          }
          catch (Exception e)
          {
            throw new WrappedException(e);
          }
        }
        return xmlMap;
      }
    }
    
    public Reader(IExtensionRegistry extensionRegistry, String namespace, String extensionPointID)
    {
      this.extensionRegistry = extensionRegistry;
      this.namespace = namespace;
      this.extensionPointID = extensionPointID;
    }
    
    protected void readElement(IConfigurationElement element)
    {
      if ("ecore2xml".equals(element.getName()))
      {
        String uri = element.getAttribute("uri");
        if ((uri != null) && (element.getAttribute("xmlmap") != null)) {
          Ecore2XMLRegistry.INSTANCE.put(uri, new Ecore2XMLDescriptor(element));
        }
      }
    }
    
    public void readRegistry()
    {
      IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(namespace, extensionPointID);
      if (extensionPoint != null)
      {
        IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
        for (int i = 0; i < elements.length; i++) {
          readElement(elements[i]);
        }
      }
    }
  }
  
  public static final Ecore2XMLRegistry INSTANCE = new Ecore2XMLRegistryImpl();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.xmi.XMLResource.XMLInfo;

public abstract interface XMLInfo
  extends EObject, XMLResource.XMLInfo
{
  public abstract String getName();
  
  public abstract void setName(String paramString);
  
  public abstract String getTargetNamespace();
  
  public abstract void setTargetNamespace(String paramString);
  
  public abstract int getXMLRepresentation();
  
  public abstract void setXMLRepresentation(int paramInt);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.XMLInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml;

import org.eclipse.emf.common.util.EMap;
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.xmi.XMLResource.XMLMap;

public abstract interface XMLMap
  extends EObject, XMLResource.XMLMap
{
  public abstract String getIDAttributeName();
  
  public abstract void setIDAttributeName(String paramString);
  
  public abstract EMap<ENamedElement, XMLInfo> getEcoreToXMLInfo();
  
  public abstract EPackage getNoNamespacePackage();
  
  public abstract void setNoNamespacePackage(EPackage paramEPackage);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.XMLMap
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml.impl;

import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.BasicEMap.Entry;
import org.eclipse.emf.common.util.EMap;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage.Literals;
import org.eclipse.emf.mapping.ecore2xml.XMLInfo;

public class ENamedElementToXMLInfoMapEntryImpl
  extends EObjectImpl
  implements BasicEMap.Entry<ENamedElement, XMLInfo>
{
  protected ENamedElement key;
  protected XMLInfo value;
  
  protected EClass eStaticClass()
  {
    return Ecore2XMLPackage.Literals.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY;
  }
  
  public ENamedElement getTypedKey()
  {
    if ((key != null) && (key.eIsProxy()))
    {
      InternalEObject oldKey = (InternalEObject)key;
      key = ((ENamedElement)eResolveProxy(oldKey));
      if (key != oldKey) {
        if (eNotificationRequired()) {
          eNotify(new ENotificationImpl(this, 9, 0, oldKey, key));
        }
      }
    }
    return key;
  }
  
  public ENamedElement basicGetTypedKey()
  {
    return key;
  }
  
  public void setTypedKey(ENamedElement newKey)
  {
    ENamedElement oldKey = key;
    key = newKey;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 0, oldKey, key));
    }
  }
  
  public XMLInfo getTypedValue()
  {
    return value;
  }
  
  public NotificationChain basicSetTypedValue(XMLInfo newValue, NotificationChain msgs)
  {
    XMLInfo oldValue = value;
    value = newValue;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, 1, 1, oldValue, newValue);
      if (msgs == null) {
        msgs = notification;
      } else {
        msgs.add(notification);
      }
    }
    return msgs;
  }
  
  public void setTypedValue(XMLInfo newValue)
  {
    if (newValue != value)
    {
      NotificationChain msgs = null;
      if (value != null) {
        msgs = ((InternalEObject)value).eInverseRemove(this, -2, null, msgs);
      }
      if (newValue != null) {
        msgs = ((InternalEObject)newValue).eInverseAdd(this, -2, null, msgs);
      }
      msgs = basicSetTypedValue(newValue, msgs);
      if (msgs != null) {
        msgs.dispatch();
      }
    }
    else if (eNotificationRequired())
    {
      eNotify(new ENotificationImpl(this, 1, 1, newValue, newValue));
    }
  }
  
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
  {
    switch (featureID)
    {
    case 1: 
      return basicSetTypedValue(null, msgs);
    }
    return super.eInverseRemove(otherEnd, featureID, msgs);
  }
  
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
    case 0: 
      if (resolve) {
        return getTypedKey();
      }
      return basicGetTypedKey();
    case 1: 
      return getTypedValue();
    }
    return super.eGet(featureID, resolve, coreType);
  }
  
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
    case 0: 
      setTypedKey((ENamedElement)newValue);
      return;
    case 1: 
      setTypedValue((XMLInfo)newValue);
      return;
    }
    super.eSet(featureID, newValue);
  }
  
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
    case 0: 
      setTypedKey(null);
      return;
    case 1: 
      setTypedValue(null);
      return;
    }
    super.eUnset(featureID);
  }
  
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
    case 0: 
      return key != null;
    case 1: 
      return value != null;
    }
    return super.eIsSet(featureID);
  }
  
  protected int hash = -1;
  
  public int getHash()
  {
    if (hash == -1)
    {
      Object theKey = getKey();
      hash = (theKey == null ? 0 : theKey.hashCode());
    }
    return hash;
  }
  
  public void setHash(int hash)
  {
    this.hash = hash;
  }
  
  public ENamedElement getKey()
  {
    return getTypedKey();
  }
  
  public void setKey(ENamedElement key)
  {
    setTypedKey(key);
  }
  
  public XMLInfo getValue()
  {
    return getTypedValue();
  }
  
  public XMLInfo setValue(XMLInfo value)
  {
    XMLInfo oldValue = getValue();
    setTypedValue(value);
    return oldValue;
  }
  
  public EMap<ENamedElement, XMLInfo> getEMap()
  {
    EObject container = eContainer();
    return container == null ? null : (EMap)container.eGet(eContainmentFeature());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.impl.ENamedElementToXMLInfoMapEntryImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml.impl;

import java.util.Map.Entry;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.ENamedElement;
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.emf.mapping.ecore2xml.Ecore2XMLFactory;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage;
import org.eclipse.emf.mapping.ecore2xml.XMLInfo;
import org.eclipse.emf.mapping.ecore2xml.XMLMap;

public class Ecore2XMLFactoryImpl
  extends EFactoryImpl
  implements Ecore2XMLFactory
{
  public static Ecore2XMLFactory init()
  {
    try
    {
      Ecore2XMLFactory theEcore2XMLFactory = (Ecore2XMLFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/2005/Ecore2XML");
      if (theEcore2XMLFactory != null) {
        return theEcore2XMLFactory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new Ecore2XMLFactoryImpl();
  }
  
  public EObject create(EClass eClass)
  {
    switch (eClass.getClassifierID())
    {
    case 0: 
      return createXMLInfo();
    case 1: 
      return createXMLMap();
    case 2: 
      return (EObject)createENamedElementToXMLInfoMapEntry();
    }
    throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
  }
  
  public XMLInfo createXMLInfo()
  {
    XMLInfoImpl xmlInfo = new XMLInfoImpl();
    return xmlInfo;
  }
  
  public XMLMap createXMLMap()
  {
    XMLMapImpl xmlMap = new XMLMapImpl();
    return xmlMap;
  }
  
  public Map.Entry<ENamedElement, XMLInfo> createENamedElementToXMLInfoMapEntry()
  {
    ENamedElementToXMLInfoMapEntryImpl eNamedElementToXMLInfoMapEntry = new ENamedElementToXMLInfoMapEntryImpl();
    return eNamedElementToXMLInfoMapEntry;
  }
  
  public Ecore2XMLPackage getEcore2XMLPackage()
  {
    return (Ecore2XMLPackage)getEPackage();
  }
  
  @Deprecated
  public static Ecore2XMLPackage getPackage()
  {
    return Ecore2XMLPackage.eINSTANCE;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLFactoryImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml.impl;

import java.util.Map.Entry;
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.emf.mapping.ecore2xml.Ecore2XMLFactory;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage;
import org.eclipse.emf.mapping.ecore2xml.XMLInfo;
import org.eclipse.emf.mapping.ecore2xml.XMLMap;

public class Ecore2XMLPackageImpl
  extends EPackageImpl
  implements Ecore2XMLPackage
{
  private EClass xmlInfoEClass = null;
  private EClass xmlMapEClass = null;
  private EClass eNamedElementToXMLInfoMapEntryEClass = null;
  
  private Ecore2XMLPackageImpl()
  {
    super("http://www.eclipse.org/emf/2005/Ecore2XML", Ecore2XMLFactory.eINSTANCE);
  }
  
  private static boolean isInited = false;
  
  public static Ecore2XMLPackage init()
  {
    if (isInited) {
      return (Ecore2XMLPackage)EPackage.Registry.INSTANCE.getEPackage("http://www.eclipse.org/emf/2005/Ecore2XML");
    }
    Ecore2XMLPackageImpl theEcore2XMLPackage = (Ecore2XMLPackageImpl)((EPackage.Registry.INSTANCE.get("http://www.eclipse.org/emf/2005/Ecore2XML") instanceof Ecore2XMLPackageImpl) ? EPackage.Registry.INSTANCE.get("http://www.eclipse.org/emf/2005/Ecore2XML") : new Ecore2XMLPackageImpl());
    
    isInited = true;
    
    EcorePackage.eINSTANCE.eClass();
    
    theEcore2XMLPackage.createPackageContents();
    
    theEcore2XMLPackage.initializePackageContents();
    
    theEcore2XMLPackage.freeze();
    
    EPackage.Registry.INSTANCE.put("http://www.eclipse.org/emf/2005/Ecore2XML", theEcore2XMLPackage);
    return theEcore2XMLPackage;
  }
  
  public EClass getXMLInfo()
  {
    return xmlInfoEClass;
  }
  
  public EAttribute getXMLInfo_Name()
  {
    return (EAttribute)xmlInfoEClass.getEStructuralFeatures().get(0);
  }
  
  public EAttribute getXMLInfo_TargetNamespace()
  {
    return (EAttribute)xmlInfoEClass.getEStructuralFeatures().get(1);
  }
  
  public EAttribute getXMLInfo_XMLRepresentation()
  {
    return (EAttribute)xmlInfoEClass.getEStructuralFeatures().get(2);
  }
  
  public EClass getXMLMap()
  {
    return xmlMapEClass;
  }
  
  public EAttribute getXMLMap_IDAttributeName()
  {
    return (EAttribute)xmlMapEClass.getEStructuralFeatures().get(0);
  }
  
  public EReference getXMLMap_EcoreToXMLInfo()
  {
    return (EReference)xmlMapEClass.getEStructuralFeatures().get(1);
  }
  
  public EReference getXMLMap_NoNamespacePackage()
  {
    return (EReference)xmlMapEClass.getEStructuralFeatures().get(2);
  }
  
  public EClass getENamedElementToXMLInfoMapEntry()
  {
    return eNamedElementToXMLInfoMapEntryEClass;
  }
  
  public EReference getENamedElementToXMLInfoMapEntry_Key()
  {
    return (EReference)eNamedElementToXMLInfoMapEntryEClass.getEStructuralFeatures().get(0);
  }
  
  public EReference getENamedElementToXMLInfoMapEntry_Value()
  {
    return (EReference)eNamedElementToXMLInfoMapEntryEClass.getEStructuralFeatures().get(1);
  }
  
  public Ecore2XMLFactory getEcore2XMLFactory()
  {
    return (Ecore2XMLFactory)getEFactoryInstance();
  }
  
  private boolean isCreated = false;
  
  public void createPackageContents()
  {
    if (isCreated) {
      return;
    }
    isCreated = true;
    
    xmlInfoEClass = createEClass(0);
    createEAttribute(xmlInfoEClass, 0);
    createEAttribute(xmlInfoEClass, 1);
    createEAttribute(xmlInfoEClass, 2);
    
    xmlMapEClass = createEClass(1);
    createEAttribute(xmlMapEClass, 0);
    createEReference(xmlMapEClass, 1);
    createEReference(xmlMapEClass, 2);
    
    eNamedElementToXMLInfoMapEntryEClass = createEClass(2);
    createEReference(eNamedElementToXMLInfoMapEntryEClass, 0);
    createEReference(eNamedElementToXMLInfoMapEntryEClass, 1);
  }
  
  private boolean isInitialized = false;
  
  public void initializePackageContents()
  {
    if (isInitialized) {
      return;
    }
    isInitialized = true;
    
    setName("ecore2xml");
    setNsPrefix("ecore2xml");
    setNsURI("http://www.eclipse.org/emf/2005/Ecore2XML");
    
    EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage("http://www.eclipse.org/emf/2002/Ecore");
    
    initEClass(xmlInfoEClass, XMLInfo.class, "XMLInfo", false, false, true);
    initEAttribute(getXMLInfo_Name(), theEcorePackage.getEString(), "name", null, 0, 1, XMLInfo.class, false, true, true, false, false, true, false, true);
    initEAttribute(getXMLInfo_TargetNamespace(), theEcorePackage.getEString(), "targetNamespace", null, 0, 1, XMLInfo.class, false, true, true, false, false, true, false, true);
    initEAttribute(getXMLInfo_XMLRepresentation(), theEcorePackage.getEInt(), "xMLRepresentation", "-1", 0, 1, XMLInfo.class, false, true, true, false, false, true, false, true);
    
    initEClass(xmlMapEClass, XMLMap.class, "XMLMap", false, false, true);
    initEAttribute(getXMLMap_IDAttributeName(), theEcorePackage.getEString(), "iDAttributeName", null, 0, 1, XMLMap.class, false, true, true, false, false, true, false, true);
    initEReference(getXMLMap_EcoreToXMLInfo(), getENamedElementToXMLInfoMapEntry(), null, "ecoreToXMLInfo", null, 0, -1, XMLMap.class, false, false, true, true, false, false, true, false, true);
    initEReference(getXMLMap_NoNamespacePackage(), theEcorePackage.getEPackage(), null, "noNamespacePackage", null, 0, 1, XMLMap.class, false, true, true, false, true, false, true, false, true);
    
    initEClass(eNamedElementToXMLInfoMapEntryEClass, Map.Entry.class, "ENamedElementToXMLInfoMapEntry", false, false, false);
    initEReference(getENamedElementToXMLInfoMapEntry_Key(), theEcorePackage.getENamedElement(), null, "key", null, 1, 1, Map.Entry.class, false, false, true, false, true, false, true, false, true);
    initEReference(getENamedElementToXMLInfoMapEntry_Value(), getXMLInfo(), null, "value", null, 1, 1, Map.Entry.class, false, false, true, true, false, false, true, false, true);
    
    createResource("http://www.eclipse.org/emf/2005/Ecore2XML");
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLPackageImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml.impl;

import java.util.HashMap;
import org.eclipse.emf.ecore.xmi.XMLResource.XMLMap;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLRegistry.Descriptor;

public class Ecore2XMLRegistryImpl
  extends HashMap<String, Object>
  implements Ecore2XMLRegistry
{
  private static final long serialVersionUID = 1L;
  protected Ecore2XMLRegistry delegateRegistry;
  
  public Ecore2XMLRegistryImpl() {}
  
  public Ecore2XMLRegistryImpl(Ecore2XMLRegistry delegateRegistry)
  {
    this();
    
    this.delegateRegistry = delegateRegistry;
  }
  
  public XMLResource.XMLMap getXMLMap(String nsURI)
  {
    Object value = get(nsURI);
    if ((value instanceof XMLResource.XMLMap)) {
      return (XMLResource.XMLMap)value;
    }
    if ((value instanceof Ecore2XMLRegistry.Descriptor))
    {
      XMLResource.XMLMap xmlMap = ((Ecore2XMLRegistry.Descriptor)value).getXMLMap();
      put(nsURI, xmlMap);
      
      return xmlMap;
    }
    return delegatedGetXMLMap(nsURI);
  }
  
  protected XMLResource.XMLMap delegatedGetXMLMap(String nsURI)
  {
    return delegateRegistry == null ? null : delegateRegistry.getXMLMap(nsURI);
  }
  
  public boolean containsKey(Object key)
  {
    return (super.containsKey(key)) || ((delegateRegistry != null) && (delegateRegistry.containsKey(key)));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.impl.Ecore2XMLRegistryImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.xmi.XMLResource.XMLInfo;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage.Literals;
import org.eclipse.emf.mapping.ecore2xml.XMLInfo;

public class XMLInfoImpl
  extends EObjectImpl
  implements XMLInfo
{
  protected static final String NAME_EDEFAULT = null;
  protected static final String TARGET_NAMESPACE_EDEFAULT = null;
  protected static final int XML_REPRESENTATION_EDEFAULT = -1;
  
  protected XMLInfoImpl()
  {
    delegateXMLInfo = new org.eclipse.emf.ecore.xmi.impl.XMLInfoImpl();
  }
  
  protected EClass eStaticClass()
  {
    return Ecore2XMLPackage.Literals.XML_INFO;
  }
  
  public String getName()
  {
    return delegateXMLInfo.getName();
  }
  
  public void setName(String newName)
  {
    String oldName = delegateXMLInfo.getName();
    delegateXMLInfo.setName(newName);
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 0, oldName, newName));
    }
  }
  
  public String getTargetNamespace()
  {
    return delegateXMLInfo.getTargetNamespace();
  }
  
  public void setTargetNamespace(String newTargetNamespace)
  {
    String oldTargetNamespace = delegateXMLInfo.getTargetNamespace();
    delegateXMLInfo.setTargetNamespace(newTargetNamespace);
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 1, oldTargetNamespace, newTargetNamespace));
    }
  }
  
  public int getXMLRepresentation()
  {
    return delegateXMLInfo.getXMLRepresentation();
  }
  
  public void setXMLRepresentation(int newXMLRepresentation)
  {
    int oldXMLRepresentation = delegateXMLInfo.getXMLRepresentation();
    delegateXMLInfo.setXMLRepresentation(newXMLRepresentation);
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 2, oldXMLRepresentation, newXMLRepresentation));
    }
  }
  
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
    case 0: 
      return getName();
    case 1: 
      return getTargetNamespace();
    case 2: 
      return Integer.valueOf(getXMLRepresentation());
    }
    return super.eGet(featureID, resolve, coreType);
  }
  
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
    case 0: 
      setName((String)newValue);
      return;
    case 1: 
      setTargetNamespace((String)newValue);
      return;
    case 2: 
      setXMLRepresentation(((Integer)newValue).intValue());
      return;
    }
    super.eSet(featureID, newValue);
  }
  
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
    case 0: 
      setName(NAME_EDEFAULT);
      return;
    case 1: 
      setTargetNamespace(TARGET_NAMESPACE_EDEFAULT);
      return;
    case 2: 
      setXMLRepresentation(-1);
      return;
    }
    super.eUnset(featureID);
  }
  
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
    case 0: 
      return getName() != null;
    case 1: 
      return getTargetNamespace() != null;
    case 2: 
      return getXMLRepresentation() != -1;
    }
    return super.eIsSet(featureID);
  }
  
  protected XMLResource.XMLInfo delegateXMLInfo = null;
  
  protected XMLInfoImpl(XMLResource.XMLInfo delegateXMLInfo)
  {
    this.delegateXMLInfo = delegateXMLInfo;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.impl.XMLInfoImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml.impl;

import org.eclipse.emf.common.util.EMap;

public class XMLMapImpl$DelegateXMLMapImpl
  extends org.eclipse.emf.ecore.xmi.impl.XMLMapImpl
{
  protected XMLMapImpl$DelegateXMLMapImpl(XMLMapImpl paramXMLMapImpl)
  {
    ecoreToXMLInfo = paramXMLMapImpl.getEcoreToXMLInfo().map();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.impl.XMLMapImpl.DelegateXMLMapImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.ecore2xml.impl;

import java.util.List;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EMap;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EStructuralFeature.Setting;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.EcoreEMap;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.ecore.xmi.XMLResource.XMLInfo;
import org.eclipse.emf.ecore.xmi.XMLResource.XMLMap;
import org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage.Literals;
import org.eclipse.emf.mapping.ecore2xml.XMLInfo;
import org.eclipse.emf.mapping.ecore2xml.XMLMap;

public class XMLMapImpl
  extends EObjectImpl
  implements XMLMap
{
  protected static final String ID_ATTRIBUTE_NAME_EDEFAULT = null;
  protected EMap<ENamedElement, XMLInfo> ecoreToXMLInfo;
  
  protected EClass eStaticClass()
  {
    return Ecore2XMLPackage.Literals.XML_MAP;
  }
  
  public String getIDAttributeName()
  {
    return delegateXMLMap.getIDAttributeName();
  }
  
  public void setIDAttributeName(String newIDAttributeName)
  {
    String oldIDAttributeName = delegateXMLMap.getIDAttributeName();
    delegateXMLMap.setIDAttributeName(newIDAttributeName);
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 0, oldIDAttributeName, newIDAttributeName));
    }
  }
  
  public EMap<ENamedElement, XMLInfo> getEcoreToXMLInfo()
  {
    if (ecoreToXMLInfo == null) {
      ecoreToXMLInfo = new EcoreEMap(Ecore2XMLPackage.Literals.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY, ENamedElementToXMLInfoMapEntryImpl.class, this, 1);
    }
    return ecoreToXMLInfo;
  }
  
  public EPackage getNoNamespacePackage()
  {
    EPackage noNamespacePackage = basicGetNoNamespacePackage();
    return (noNamespacePackage != null) && (noNamespacePackage.eIsProxy()) ? (EPackage)eResolveProxy((InternalEObject)noNamespacePackage) : noNamespacePackage;
  }
  
  public EPackage basicGetNoNamespacePackage()
  {
    return delegateXMLMap.getNoNamespacePackage();
  }
  
  public void setNoNamespacePackage(EPackage newNoNamespacePackage)
  {
    EPackage oldNoNamespacePackage = delegateXMLMap.getNoNamespacePackage();
    delegateXMLMap.setNoNamespacePackage(newNoNamespacePackage);
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 2, oldNoNamespacePackage, newNoNamespacePackage));
    }
  }
  
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
  {
    switch (featureID)
    {
    case 1: 
      return ((InternalEList)getEcoreToXMLInfo()).basicRemove(otherEnd, msgs);
    }
    return super.eInverseRemove(otherEnd, featureID, msgs);
  }
  
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
    case 0: 
      return getIDAttributeName();
    case 1: 
      if (coreType) {
        return getEcoreToXMLInfo();
      }
      return getEcoreToXMLInfo().map();
    case 2: 
      if (resolve) {
        return getNoNamespacePackage();
      }
      return basicGetNoNamespacePackage();
    }
    return super.eGet(featureID, resolve, coreType);
  }
  
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
    case 0: 
      setIDAttributeName((String)newValue);
      return;
    case 1: 
      ((EStructuralFeature.Setting)getEcoreToXMLInfo()).set(newValue);
      return;
    case 2: 
      setNoNamespacePackage((EPackage)newValue);
      return;
    }
    super.eSet(featureID, newValue);
  }
  
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
    case 0: 
      setIDAttributeName(ID_ATTRIBUTE_NAME_EDEFAULT);
      return;
    case 1: 
      getEcoreToXMLInfo().clear();
      return;
    case 2: 
      setNoNamespacePackage(null);
      return;
    }
    super.eUnset(featureID);
  }
  
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
    case 0: 
      return getIDAttributeName() != null;
    case 1: 
      return (ecoreToXMLInfo != null) && (!ecoreToXMLInfo.isEmpty());
    case 2: 
      return basicGetNoNamespacePackage() != null;
    }
    return super.eIsSet(featureID);
  }
  
  protected class DelegateXMLMapImpl
    extends org.eclipse.emf.ecore.xmi.impl.XMLMapImpl
  {
    protected DelegateXMLMapImpl()
    {
      ecoreToXMLInfo = getEcoreToXMLInfo().map();
    }
  }
  
  protected XMLResource.XMLMap delegateXMLMap = new DelegateXMLMapImpl();
  
  public void add(ENamedElement element, XMLResource.XMLInfo info)
  {
    delegateXMLMap.add(element, XMLInfo.class.isInstance(info) ? info : new XMLInfoImpl(info));
  }
  
  public EClassifier getClassifier(String namespaceURI, String name)
  {
    return delegateXMLMap.getClassifier(namespaceURI, name);
  }
  
  public EStructuralFeature getFeature(EClass eClass, String namespaceURI, String name)
  {
    return delegateXMLMap.getFeature(eClass, namespaceURI, name);
  }
  
  public List<EStructuralFeature> getFeatures(EClass eClass)
  {
    return delegateXMLMap.getFeatures(eClass);
  }
  
  public XMLResource.XMLInfo getInfo(ENamedElement element)
  {
    return delegateXMLMap.getInfo(element);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ecore2xml.impl.XMLMapImpl
 * Java Class Ve
1 2

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