Debian Codegraph @

plugins/org.eclipse.xsd/src/org/eclipse/xsd/impl/XSDParticleContentImpl.java

raw
1 /**
2 * Copyright (c) 2002-2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v2.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v20.html
7 *
8 * Contributors:
9 * IBM - Initial API and implementation
10 */
11 package org.eclipse.xsd.impl;
12
13
14 import org.w3c.dom.Node;
15
16 import org.eclipse.emf.ecore.EClass;
17
18 import org.eclipse.xsd.XSDPackage;
19 import org.eclipse.xsd.XSDParticleContent;
20 import org.eclipse.xsd.util.XSDConstants;
21
22
23 /**
24 * <!-- begin-user-doc -->
25 * An implementation of the model object '<em><b>Particle Content</b></em>'.
26 * <!-- end-user-doc -->
27 *
28 * @generated
29 */
30 public abstract class XSDParticleContentImpl
31 extends XSDConcreteComponentImpl
32 implements XSDParticleContent
33 {
34 public static XSDParticleContent createParticleContent(Node node)
35 {
36 switch (XSDConstants.nodeType(node))
37 {
38 case XSDConstants.ALL_ELEMENT:
39 case XSDConstants.CHOICE_ELEMENT:
40 case XSDConstants.SEQUENCE_ELEMENT:
41 {
42 return XSDModelGroupImpl.createModelGroup(node);
43 }
44 case XSDConstants.ELEMENT_ELEMENT:
45 {
46 return XSDElementDeclarationImpl.createElementDeclaration(node);
47 }
48 case XSDConstants.GROUP_ELEMENT:
49 {
50 return XSDModelGroupDefinitionImpl.createModelGroupDefinition(node);
51 }
52 case XSDConstants.ANY_ELEMENT:
53 {
54 return XSDWildcardImpl.createWildcard(node);
55 }
56 }
57
58 return null;
59 }
60
61 /**
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @generated
65 */
66 protected XSDParticleContentImpl()
67 {
68 super();
69 }
70
71 /**
72 * <!-- begin-user-doc -->
73 * <!-- end-user-doc -->
74 * @generated
75 */
76 @Override
77 protected EClass eStaticClass()
78 {
79 return XSDPackage.Literals.XSD_PARTICLE_CONTENT;
80 }
81
82 }