diff options
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/util/TimingXMLProcessor.java')
-rw-r--r-- | extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/util/TimingXMLProcessor.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/util/TimingXMLProcessor.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/util/TimingXMLProcessor.java new file mode 100644 index 00000000000..2afe8d0a0eb --- /dev/null +++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/util/TimingXMLProcessor.java @@ -0,0 +1,60 @@ +/***************************************************************************** + * Copyright (c) 2010 CEA LIST. + * + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Sara TUCCI (CEA LIST) sara.tucci@cea.fr - Initial API and implementation + * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation + * David SERVAT (CEA LIST) david.servat@cea.fr - Initial API and implementation + * + *****************************************************************************/ +package org.eclipse.papyrus.eastadl.timing.util; + +import java.util.Map; + +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.xmi.util.XMLProcessor; +import org.eclipse.papyrus.eastadl.timing.TimingPackage; + + +/** + * This class contains helper methods to serialize and deserialize XML documents + * <!-- begin-user-doc + * --> <!-- end-user-doc --> + * @generated + */ +public class TimingXMLProcessor extends XMLProcessor { + + /** + * Public constructor to instantiate the helper. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @generated + */ + public TimingXMLProcessor() { + super((EPackage.Registry.INSTANCE)); + TimingPackage.eINSTANCE.eClass(); + } + + /** + * Register for "*" and "xml" file extensions the TimingResourceFactoryImpl factory. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected Map<String, Resource.Factory> getRegistrations() { + if (registrations == null) { + super.getRegistrations(); + registrations.put(XML_EXTENSION, new TimingResourceFactoryImpl()); + registrations.put(STAR_EXTENSION, new TimingResourceFactoryImpl()); + } + return registrations; + } + +} // TimingXMLProcessor |