core/com.nokia.carbide.cpp.codescanner/src/com/nokia/carbide/cpp/internal/codescanner/gen/CSConfig/util/CSConfigXMLProcessor.java
author cawthron
Tue, 24 Mar 2009 22:20:21 -0500
changeset 2 d760517a8095
permissions -rw-r--r--
new
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
cawthron
parents:
diff changeset
     1
/*
cawthron
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
cawthron
parents:
diff changeset
     3
* All rights reserved.
cawthron
parents:
diff changeset
     4
* This component and the accompanying materials are made available
cawthron
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
cawthron
parents:
diff changeset
     6
* which accompanies this distribution, and is available
cawthron
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
cawthron
parents:
diff changeset
     8
*
cawthron
parents:
diff changeset
     9
* Initial Contributors:
cawthron
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
cawthron
parents:
diff changeset
    11
*
cawthron
parents:
diff changeset
    12
* Contributors:
cawthron
parents:
diff changeset
    13
*
cawthron
parents:
diff changeset
    14
* Description: 
cawthron
parents:
diff changeset
    15
*
cawthron
parents:
diff changeset
    16
*/
cawthron
parents:
diff changeset
    17
cawthron
parents:
diff changeset
    18
package com.nokia.carbide.cpp.internal.codescanner.gen.CSConfig.util;
cawthron
parents:
diff changeset
    19
cawthron
parents:
diff changeset
    20
import com.nokia.carbide.cpp.internal.codescanner.gen.CSConfig.CSConfigPackage;
cawthron
parents:
diff changeset
    21
cawthron
parents:
diff changeset
    22
import java.util.Map;
cawthron
parents:
diff changeset
    23
cawthron
parents:
diff changeset
    24
import org.eclipse.emf.ecore.EPackage;
cawthron
parents:
diff changeset
    25
cawthron
parents:
diff changeset
    26
import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
cawthron
parents:
diff changeset
    27
cawthron
parents:
diff changeset
    28
import org.eclipse.emf.ecore.resource.Resource;
cawthron
parents:
diff changeset
    29
import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
cawthron
parents:
diff changeset
    30
cawthron
parents:
diff changeset
    31
/**
cawthron
parents:
diff changeset
    32
 * This class contains helper methods to serialize and deserialize XML documents
cawthron
parents:
diff changeset
    33
 * <!-- begin-user-doc -->
cawthron
parents:
diff changeset
    34
 * <!-- end-user-doc -->
cawthron
parents:
diff changeset
    35
 * @generated
cawthron
parents:
diff changeset
    36
 */
cawthron
parents:
diff changeset
    37
public class CSConfigXMLProcessor extends XMLProcessor {
cawthron
parents:
diff changeset
    38
	/**
cawthron
parents:
diff changeset
    39
	 * Public constructor to instantiate the helper.
cawthron
parents:
diff changeset
    40
	 * <!-- begin-user-doc -->
cawthron
parents:
diff changeset
    41
	 * <!-- end-user-doc -->
cawthron
parents:
diff changeset
    42
	 * @generated
cawthron
parents:
diff changeset
    43
	 */
cawthron
parents:
diff changeset
    44
	public CSConfigXMLProcessor() {
cawthron
parents:
diff changeset
    45
		super(new EPackageRegistryImpl(EPackage.Registry.INSTANCE));
cawthron
parents:
diff changeset
    46
		extendedMetaData.putPackage(null, CSConfigPackage.eINSTANCE);
cawthron
parents:
diff changeset
    47
	}
cawthron
parents:
diff changeset
    48
	
cawthron
parents:
diff changeset
    49
	/**
cawthron
parents:
diff changeset
    50
	 * Register for "*" and "xml" file extensions the CSConfigResourceFactoryImpl factory.
cawthron
parents:
diff changeset
    51
	 * <!-- begin-user-doc -->
cawthron
parents:
diff changeset
    52
	 * <!-- end-user-doc -->
cawthron
parents:
diff changeset
    53
	 * @generated
cawthron
parents:
diff changeset
    54
	 */
cawthron
parents:
diff changeset
    55
	@Override
cawthron
parents:
diff changeset
    56
	protected Map<String, Resource.Factory> getRegistrations() {
cawthron
parents:
diff changeset
    57
		if (registrations == null) {
cawthron
parents:
diff changeset
    58
			super.getRegistrations();
cawthron
parents:
diff changeset
    59
			registrations.put(XML_EXTENSION, new CSConfigResourceFactoryImpl());
cawthron
parents:
diff changeset
    60
			registrations.put(STAR_EXTENSION, new CSConfigResourceFactoryImpl());
cawthron
parents:
diff changeset
    61
		}
cawthron
parents:
diff changeset
    62
		return registrations;
cawthron
parents:
diff changeset
    63
	}
cawthron
parents:
diff changeset
    64
cawthron
parents:
diff changeset
    65
} //CSConfigXMLProcessor