Debian Codegraph @

plugins/org.eclipse.xsd/src/org/eclipse/xsd/impl/XSDSchemaContentImpl.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.XSDSchemaContent;
20 import org.eclipse.xsd.util.XSDConstants;
21
22
23 /**
24 * <!-- begin-user-doc -->
25 * An implementation of the model object '<em><b>Schema Content</b></em>'.
26 * <!-- end-user-doc -->
27 *
28 * @generated
29 */
30 public abstract class XSDSchemaContentImpl
31 extends XSDConcreteComponentImpl
32 implements XSDSchemaContent
33 {
34 public static XSDSchemaContent createSchemaContent(Node node)
35 {
36 switch (XSDConstants.nodeType(node))
37 {
38 case XSDConstants.ANNOTATION_ELEMENT:
39 {
40 return XSDAnnotationImpl.createAnnotation(node);
41 }
42 case XSDConstants.ATTRIBUTE_ELEMENT:
43 {
44 return XSDAttributeDeclarationImpl.createAttributeDeclaration(node);
45 }
46 case XSDConstants.ELEMENT_ELEMENT:
47 {
48 return XSDElementDeclarationImpl.createElementDeclaration(node);
49 }
50 case XSDConstants.SIMPLETYPE_ELEMENT:
51 {
52 return XSDSimpleTypeDefinitionImpl.createSimpleTypeDefinition(node);
53 }
54 case XSDConstants.COMPLEXTYPE_ELEMENT:
55 {
56 return XSDComplexTypeDefinitionImpl.createComplexTypeDefinition(node);
57 }
58 case XSDConstants.ATTRIBUTEGROUP_ELEMENT:
59 {
60 return XSDAttributeGroupDefinitionImpl.createAttributeGroupDefinition(node);
61 }
62 case XSDConstants.GROUP_ELEMENT:
63 {
64 return XSDModelGroupDefinitionImpl.createModelGroupDefinition(node);
65 }
66 case XSDConstants.INCLUDE_ELEMENT:
67 {
68 return XSDIncludeImpl.createInclude(node);
69 }
70 case XSDConstants.IMPORT_ELEMENT:
71 {
72 return XSDImportImpl.createImport(node);
73 }
74 case XSDConstants.REDEFINE_ELEMENT:
75 {
76 return XSDRedefineImpl.createRedefine(node);
77 }
78 case XSDConstants.NOTATION_ELEMENT:
79 {
80 return XSDNotationDeclarationImpl.createNotationDeclaration(node);
81 }
82 }
83
84 return null;
85 }
86
87 /**
88 * <!-- begin-user-doc -->
89 * <!-- end-user-doc -->
90 * @generated
91 */
92 protected XSDSchemaContentImpl()
93 {
94 super();
95 }
96
97 /**
98 * <!-- begin-user-doc -->
99 * <!-- end-user-doc -->
100 * @generated
101 */
102 @Override
103 protected EClass eStaticClass()
104 {
105 return XSDPackage.Literals.XSD_SCHEMA_CONTENT;
106 }
107
108 }