sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.util/src/com/nokia/carbide/cpp/internal/pi/util/config/gen/PIConfig/util/PIConfigResourceFactoryImpl.java
changeset 2 b9ab3b238396
child 12 ae255c9aa552
equal deleted inserted replaced
1:1050670c6980 2:b9ab3b238396
       
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the License "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: 
       
    15  *
       
    16  */
       
    17 
       
    18 package com.nokia.carbide.cpp.internal.pi.util.config.gen.PIConfig.util;
       
    19 
       
    20 import org.eclipse.emf.common.util.URI;
       
    21 import org.eclipse.emf.ecore.EPackage;
       
    22 import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
       
    23 import org.eclipse.emf.ecore.resource.Resource;
       
    24 import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
       
    25 import org.eclipse.emf.ecore.util.BasicExtendedMetaData;
       
    26 import org.eclipse.emf.ecore.util.ExtendedMetaData;
       
    27 import org.eclipse.emf.ecore.xmi.XMLResource;
       
    28 
       
    29 import com.nokia.carbide.cpp.internal.pi.util.config.gen.PIConfig.PIConfigPackage;
       
    30 
       
    31 /**
       
    32  * <!-- begin-user-doc -->
       
    33  * The <b>Resource Factory</b> associated with the package.
       
    34  * <!-- end-user-doc -->
       
    35  * @see com.nokia.carbide.cpp.pi.util.config.gen.PIConfig.util.PIConfigResourceImpl
       
    36  * @generated
       
    37  */
       
    38 public class PIConfigResourceFactoryImpl extends ResourceFactoryImpl {
       
    39 	/**
       
    40 	 * <!-- begin-user-doc -->
       
    41 	 * <!-- end-user-doc -->
       
    42 	 * @generated
       
    43 	 */
       
    44 	protected ExtendedMetaData extendedMetaData;
       
    45 
       
    46 	/**
       
    47 	 * Creates an instance of the resource factory.
       
    48 	 * <!-- begin-user-doc -->
       
    49 	 * <!-- end-user-doc -->
       
    50 	 * @generated
       
    51 	 */
       
    52 	public PIConfigResourceFactoryImpl() {
       
    53 		super();
       
    54 		extendedMetaData = new BasicExtendedMetaData(new EPackageRegistryImpl(EPackage.Registry.INSTANCE));
       
    55 		extendedMetaData.putPackage(null, PIConfigPackage.eINSTANCE);
       
    56 	}
       
    57 
       
    58 	/**
       
    59 	 * Creates an instance of the resource.
       
    60 	 * <!-- begin-user-doc -->
       
    61 	 * <!-- end-user-doc -->
       
    62 	 * @generated
       
    63 	 */
       
    64 	@Override
       
    65 	public Resource createResource(URI uri) {
       
    66 		XMLResource result = new PIConfigResourceImpl(uri);
       
    67 		result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
       
    68 		result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
       
    69 
       
    70 		result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
       
    71 
       
    72 		result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
       
    73 		result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
       
    74 
       
    75 		result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
       
    76 		return result;
       
    77 	}
       
    78 
       
    79 } //PIConfigResourceFactoryImpl