| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package de.fzi.se.quality.parameters.pcm.util; |
| 8 | |
| 9 | import de.fzi.se.quality.parameters.pcm.PCMPackage; |
| 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 PCMXMLProcessor extends XMLProcessor { |
| 26 | |
| 27 | /** |
| 28 | * Public constructor to instantiate the helper. |
| 29 | * <!-- begin-user-doc --> |
| 30 | * <!-- end-user-doc --> |
| 31 | * @generated |
| 32 | */ |
| 33 | public PCMXMLProcessor() { |
| 34 | super((EPackage.Registry.INSTANCE)); |
| 35 | PCMPackage.eINSTANCE.eClass(); |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Register for "*" and "xml" file extensions the PCMResourceFactoryImpl 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 PCMResourceFactoryImpl()); |
| 49 | registrations.put(STAR_EXTENSION, new PCMResourceFactoryImpl()); |
| 50 | } |
| 51 | return registrations; |
| 52 | } |
| 53 | |
| 54 | } //PCMXMLProcessor |