1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.util; |
8 | |
9 | import de.uka.ipd.sdq.dsexplore.qml.profile.QMLProfile.QMLProfilePackage; |
10 | |
11 | import java.util.Map; |
12 | |
13 | import org.eclipse.emf.ecore.EPackage; |
14 | |
15 | import org.eclipse.emf.ecore.resource.Resource; |
16 | |
17 | import org.eclipse.emf.ecore.xmi.util.XMLProcessor; |
18 | |
19 | /** |
20 | * This class contains helper methods to serialize and deserialize XML documents |
21 | * <!-- begin-user-doc --> |
22 | * <!-- end-user-doc --> |
23 | * @generated |
24 | */ |
25 | public class QMLProfileXMLProcessor extends XMLProcessor { |
26 | |
27 | /** |
28 | * Public constructor to instantiate the helper. |
29 | * <!-- begin-user-doc --> |
30 | * <!-- end-user-doc --> |
31 | * @generated |
32 | */ |
33 | public QMLProfileXMLProcessor() { |
34 | super((EPackage.Registry.INSTANCE)); |
35 | QMLProfilePackage.eINSTANCE.eClass(); |
36 | } |
37 | |
38 | /** |
39 | * Register for "*" and "xml" file extensions the QMLProfileResourceFactoryImpl factory. |
40 | * <!-- begin-user-doc --> |
41 | * <!-- end-user-doc --> |
42 | * @generated |
43 | */ |
44 | @Override |
45 | protected Map<String, Resource.Factory> getRegistrations() { |
46 | if (registrations == null) { |
47 | super.getRegistrations(); |
48 | registrations.put(XML_EXTENSION, new QMLProfileResourceFactoryImpl()); |
49 | registrations.put(STAR_EXTENSION, new QMLProfileResourceFactoryImpl()); |
50 | } |
51 | return registrations; |
52 | } |
53 | |
54 | } //QMLProfileXMLProcessor |