1<?xml version="1.0" encoding="UTF-8"?>
2<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
4 name="WebApp" nsURI="http://www.example.org/webapp" nsPrefix="webapp">
5
6 <!-- WebApp: Root container for the web application -->
7 <eClassifiers xsi:type="ecore:EClass" name="WebApp">
8 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
9 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
10 <eStructuralFeatures xsi:type="ecore:EAttribute" name="baseUrl"
11 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
12 <eStructuralFeatures xsi:type="ecore:EAttribute" name="version"
13 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
14 <eStructuralFeatures xsi:type="ecore:EReference" name="pages" upperBound="-1"
15 eType="#//Page" containment="true"/>
16 <eStructuralFeatures xsi:type="ecore:EReference" name="entities" upperBound="-1"
17 eType="#//Entity" containment="true"/>
18 <eStructuralFeatures xsi:type="ecore:EReference" name="stylesheets" upperBound="-1"
19 eType="#//Stylesheet" containment="true"/>
20 </eClassifiers>
21
22 <!-- Page: Represents a web page with a route -->
23 <eClassifiers xsi:type="ecore:EClass" name="Page">
24 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
25 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
26 <eStructuralFeatures xsi:type="ecore:EAttribute" name="route" lowerBound="1"
27 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
28 <eStructuralFeatures xsi:type="ecore:EAttribute" name="title"
29 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
30 <eStructuralFeatures xsi:type="ecore:EAttribute" name="requiresAuth"
31 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
32 <eStructuralFeatures xsi:type="ecore:EReference" name="components" upperBound="-1"
33 eType="#//Component" containment="true"/>
34 <eStructuralFeatures xsi:type="ecore:EReference" name="linkedPages" upperBound="-1"
35 eType="#//Page"/>
36 </eClassifiers>
37
38 <!-- Component: Abstract base for UI components -->
39 <eClassifiers xsi:type="ecore:EClass" name="Component" abstract="true">
40 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
41 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
42 <eStructuralFeatures xsi:type="ecore:EAttribute" name="cssClass"
43 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
44 <eStructuralFeatures xsi:type="ecore:EAttribute" name="isVisible"
45 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="true"/>
46 </eClassifiers>
47
48 <!-- Form: Input form with fields and validation -->
49 <eClassifiers xsi:type="ecore:EClass" name="Form" eSuperTypes="#//Component">
50 <eStructuralFeatures xsi:type="ecore:EAttribute" name="action"
51 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
52 <eStructuralFeatures xsi:type="ecore:EAttribute" name="method"
53 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral="POST"/>
54 <eStructuralFeatures xsi:type="ecore:EReference" name="fields" upperBound="-1"
55 eType="#//Field" containment="true"/>
56 <eStructuralFeatures xsi:type="ecore:EReference" name="boundEntity"
57 eType="#//Entity"/>
58 </eClassifiers>
59
60 <!-- Field: Form input field -->
61 <eClassifiers xsi:type="ecore:EClass" name="Field">
62 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
63 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
64 <eStructuralFeatures xsi:type="ecore:EAttribute" name="label"
65 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
66 <eStructuralFeatures xsi:type="ecore:EAttribute" name="fieldType" lowerBound="1"
67 eType="#//FieldType"/>
68 <eStructuralFeatures xsi:type="ecore:EAttribute" name="isRequired"
69 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
70 <eStructuralFeatures xsi:type="ecore:EAttribute" name="placeholder"
71 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
72 <eStructuralFeatures xsi:type="ecore:EAttribute" name="validationPattern"
73 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
74 <eStructuralFeatures xsi:type="ecore:EReference" name="boundAttribute"
75 eType="#//Attribute"/>
76 </eClassifiers>
77
78 <!-- FieldType: Enumeration of input types -->
79 <eClassifiers xsi:type="ecore:EEnum" name="FieldType">
80 <eLiterals name="text" value="0"/>
81 <eLiterals name="email" value="1"/>
82 <eLiterals name="password" value="2"/>
83 <eLiterals name="number" value="3"/>
84 <eLiterals name="date" value="4"/>
85 <eLiterals name="textarea" value="5"/>
86 <eLiterals name="select" value="6"/>
87 <eLiterals name="checkbox" value="7"/>
88 <eLiterals name="hidden" value="8"/>
89 </eClassifiers>
90
91 <!-- DataTable: Displays tabular data -->
92 <eClassifiers xsi:type="ecore:EClass" name="DataTable" eSuperTypes="#//Component">
93 <eStructuralFeatures xsi:type="ecore:EAttribute" name="isPaginated"
94 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="true"/>
95 <eStructuralFeatures xsi:type="ecore:EAttribute" name="pageSize"
96 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="10"/>
97 <eStructuralFeatures xsi:type="ecore:EReference" name="columns" upperBound="-1"
98 eType="#//Column" containment="true"/>
99 <eStructuralFeatures xsi:type="ecore:EReference" name="dataSource"
100 eType="#//Entity"/>
101 </eClassifiers>
102
103 <!-- Column: Table column definition -->
104 <eClassifiers xsi:type="ecore:EClass" name="Column">
105 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
106 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
107 <eStructuralFeatures xsi:type="ecore:EAttribute" name="header"
108 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
109 <eStructuralFeatures xsi:type="ecore:EAttribute" name="isSortable"
110 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
111 <eStructuralFeatures xsi:type="ecore:EAttribute" name="width"
112 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
113 <eStructuralFeatures xsi:type="ecore:EReference" name="boundAttribute"
114 eType="#//Attribute"/>
115 </eClassifiers>
116
117 <!-- Navigation: Menu or navigation component -->
118 <eClassifiers xsi:type="ecore:EClass" name="Navigation" eSuperTypes="#//Component">
119 <eStructuralFeatures xsi:type="ecore:EAttribute" name="navType"
120 eType="#//NavType" defaultValueLiteral="horizontal"/>
121 <eStructuralFeatures xsi:type="ecore:EReference" name="items" upperBound="-1"
122 eType="#//NavItem" containment="true"/>
123 </eClassifiers>
124
125 <!-- NavType: Navigation layout type -->
126 <eClassifiers xsi:type="ecore:EEnum" name="NavType">
127 <eLiterals name="horizontal" value="0"/>
128 <eLiterals name="vertical" value="1"/>
129 <eLiterals name="dropdown" value="2"/>
130 </eClassifiers>
131
132 <!-- NavItem: Navigation menu item -->
133 <eClassifiers xsi:type="ecore:EClass" name="NavItem">
134 <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" lowerBound="1"
135 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
136 <eStructuralFeatures xsi:type="ecore:EAttribute" name="icon"
137 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
138 <eStructuralFeatures xsi:type="ecore:EAttribute" name="isActive"
139 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
140 <eStructuralFeatures xsi:type="ecore:EReference" name="targetPage"
141 eType="#//Page"/>
142 <eStructuralFeatures xsi:type="ecore:EReference" name="subItems" upperBound="-1"
143 eType="#//NavItem" containment="true"/>
144 </eClassifiers>
145
146 <!-- Entity: Data model entity -->
147 <eClassifiers xsi:type="ecore:EClass" name="Entity">
148 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
149 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
150 <eStructuralFeatures xsi:type="ecore:EAttribute" name="tableName"
151 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
152 <eStructuralFeatures xsi:type="ecore:EReference" name="attributes" upperBound="-1"
153 eType="#//Attribute" containment="true"/>
154 <eStructuralFeatures xsi:type="ecore:EReference" name="relationships" upperBound="-1"
155 eType="#//Relationship" containment="true"/>
156 </eClassifiers>
157
158 <!-- Attribute: Entity property -->
159 <eClassifiers xsi:type="ecore:EClass" name="Attribute">
160 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
161 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
162 <eStructuralFeatures xsi:type="ecore:EAttribute" name="dataType" lowerBound="1"
163 eType="#//DataType"/>
164 <eStructuralFeatures xsi:type="ecore:EAttribute" name="isPrimaryKey"
165 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
166 <eStructuralFeatures xsi:type="ecore:EAttribute" name="isNullable"
167 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="true"/>
168 <eStructuralFeatures xsi:type="ecore:EAttribute" name="defaultValue"
169 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
170 <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxLength"
171 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
172 </eClassifiers>
173
174 <!-- DataType: Attribute data types -->
175 <eClassifiers xsi:type="ecore:EEnum" name="DataType">
176 <eLiterals name="string" value="0"/>
177 <eLiterals name="integer" value="1"/>
178 <eLiterals name="decimal" value="2"/>
179 <eLiterals name="boolean" value="3"/>
180 <eLiterals name="date" value="4"/>
181 <eLiterals name="datetime" value="5"/>
182 <eLiterals name="text" value="6"/>
183 </eClassifiers>
184
185 <!-- Relationship: Entity relationship -->
186 <eClassifiers xsi:type="ecore:EClass" name="Relationship">
187 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
188 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
189 <eStructuralFeatures xsi:type="ecore:EAttribute" name="relationType" lowerBound="1"
190 eType="#//RelationType"/>
191 <eStructuralFeatures xsi:type="ecore:EReference" name="targetEntity" lowerBound="1"
192 eType="#//Entity"/>
193 </eClassifiers>
194
195 <!-- RelationType: Relationship cardinality -->
196 <eClassifiers xsi:type="ecore:EEnum" name="RelationType">
197 <eLiterals name="oneToOne" value="0"/>
198 <eLiterals name="oneToMany" value="1"/>
199 <eLiterals name="manyToOne" value="2"/>
200 <eLiterals name="manyToMany" value="3"/>
201 </eClassifiers>
202
203 <!-- Stylesheet: CSS stylesheet reference -->
204 <eClassifiers xsi:type="ecore:EClass" name="Stylesheet">
205 <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1"
206 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
207 <eStructuralFeatures xsi:type="ecore:EAttribute" name="path"
208 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
209 <eStructuralFeatures xsi:type="ecore:EAttribute" name="isExternal"
210 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
211 </eClassifiers>
212
213</ecore:EPackage>