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