blob: df06b565014f7d0fa41114b814166efdb40640c5 [file] [log] [blame]
/**
* Copyright (c) 2016 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.moka.fmi.modeldescription.util;
import java.util.Map;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
import org.eclipse.papyrus.moka.fmi.modeldescription.FmiPackage;
/**
* This class contains helper methods to serialize and deserialize XML documents
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class FmiXMLProcessor extends XMLProcessor {
/**
* Public constructor to instantiate the helper.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FmiXMLProcessor() {
super(new EPackageRegistryImpl(EPackage.Registry.INSTANCE));
extendedMetaData.putPackage(null, FmiPackage.eINSTANCE);
}
/**
* Register for "*" and "xml" file extensions the FmiResourceFactoryImpl 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 FmiResourceFactoryImpl());
registrations.put(STAR_EXTENSION, new FmiResourceFactoryImpl());
}
return registrations;
}
} //FmiXMLProcessor