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