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

org.eclipse.xsd.impl.XSDParticleContentImpl Maven / Gradle / Ivy

/**
 * Copyright (c) 2002-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 v2.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v20.html
 * 
 * Contributors: 
 *   IBM - Initial API and implementation
 */
package org.eclipse.xsd.impl;


import org.w3c.dom.Node;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.xsd.XSDPackage;
import org.eclipse.xsd.XSDParticleContent;
import org.eclipse.xsd.util.XSDConstants;


/**
 * 
 * An implementation of the model object 'Particle Content'.
 * 
 *
 * @generated
 */
public abstract class XSDParticleContentImpl 
  extends XSDConcreteComponentImpl 
  implements XSDParticleContent
{
  public static XSDParticleContent createParticleContent(Node node)
  {
    switch (XSDConstants.nodeType(node))
    {
      case XSDConstants.ALL_ELEMENT:
      case XSDConstants.CHOICE_ELEMENT:
      case XSDConstants.SEQUENCE_ELEMENT:
      {
        return XSDModelGroupImpl.createModelGroup(node);
      }
      case XSDConstants.ELEMENT_ELEMENT:
      {
        return XSDElementDeclarationImpl.createElementDeclaration(node);
      }
      case XSDConstants.GROUP_ELEMENT:
      {
        return XSDModelGroupDefinitionImpl.createModelGroupDefinition(node);
      }
      case XSDConstants.ANY_ELEMENT:
      {
        return XSDWildcardImpl.createWildcard(node);
      }
    }

    return null;
  }

  /**
   * 
   * 
   * @generated
   */
  protected XSDParticleContentImpl()
  {
    super();
  }

  /**
   * 
   * 
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return XSDPackage.Literals.XSD_PARTICLE_CONTENT;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy