core/com.nokia.carbide.cpp.codescanner/src/com/nokia/carbide/cpp/internal/codescanner/gen/CSConfig/util/CSConfigResourceFactoryImpl.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 org.eclipse.emf.common.util.URI;
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
cawthron
parents:
diff changeset
    30
import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
cawthron
parents:
diff changeset
    31
cawthron
parents:
diff changeset
    32
import org.eclipse.emf.ecore.util.BasicExtendedMetaData;
cawthron
parents:
diff changeset
    33
import org.eclipse.emf.ecore.util.ExtendedMetaData;
cawthron
parents:
diff changeset
    34
cawthron
parents:
diff changeset
    35
import org.eclipse.emf.ecore.xmi.XMLResource;
cawthron
parents:
diff changeset
    36
cawthron
parents:
diff changeset
    37
/**
cawthron
parents:
diff changeset
    38
 * <!-- begin-user-doc -->
cawthron
parents:
diff changeset
    39
 * The <b>Resource Factory</b> associated with the package.
cawthron
parents:
diff changeset
    40
 * <!-- end-user-doc -->
cawthron
parents:
diff changeset
    41
 * @see com.nokia.carbide.cpp.internal.codescanner.gen.CSConfig.util.CSConfigResourceImpl
cawthron
parents:
diff changeset
    42
 * @generated
cawthron
parents:
diff changeset
    43
 */
cawthron
parents:
diff changeset
    44
public class CSConfigResourceFactoryImpl extends ResourceFactoryImpl {
cawthron
parents:
diff changeset
    45
	/**
cawthron
parents:
diff changeset
    46
	 * <!-- begin-user-doc -->
cawthron
parents:
diff changeset
    47
	 * <!-- end-user-doc -->
cawthron
parents:
diff changeset
    48
	 * @generated
cawthron
parents:
diff changeset
    49
	 */
cawthron
parents:
diff changeset
    50
	protected ExtendedMetaData extendedMetaData;
cawthron
parents:
diff changeset
    51
cawthron
parents:
diff changeset
    52
	/**
cawthron
parents:
diff changeset
    53
	 * Creates an instance of the resource factory.
cawthron
parents:
diff changeset
    54
	 * <!-- begin-user-doc -->
cawthron
parents:
diff changeset
    55
	 * <!-- end-user-doc -->
cawthron
parents:
diff changeset
    56
	 * @generated
cawthron
parents:
diff changeset
    57
	 */
cawthron
parents:
diff changeset
    58
	public CSConfigResourceFactoryImpl() {
cawthron
parents:
diff changeset
    59
		super();
cawthron
parents:
diff changeset
    60
		extendedMetaData = new BasicExtendedMetaData(new EPackageRegistryImpl(EPackage.Registry.INSTANCE));
cawthron
parents:
diff changeset
    61
		extendedMetaData.putPackage(null, CSConfigPackage.eINSTANCE);
cawthron
parents:
diff changeset
    62
	}
cawthron
parents:
diff changeset
    63
cawthron
parents:
diff changeset
    64
	/**
cawthron
parents:
diff changeset
    65
	 * Creates an instance of the resource.
cawthron
parents:
diff changeset
    66
	 * <!-- begin-user-doc -->
cawthron
parents:
diff changeset
    67
	 * <!-- end-user-doc -->
cawthron
parents:
diff changeset
    68
	 * @generated
cawthron
parents:
diff changeset
    69
	 */
cawthron
parents:
diff changeset
    70
	@Override
cawthron
parents:
diff changeset
    71
	public Resource createResource(URI uri) {
cawthron
parents:
diff changeset
    72
		XMLResource result = new CSConfigResourceImpl(uri);
cawthron
parents:
diff changeset
    73
		result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
cawthron
parents:
diff changeset
    74
		result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
cawthron
parents:
diff changeset
    75
cawthron
parents:
diff changeset
    76
		result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
cawthron
parents:
diff changeset
    77
cawthron
parents:
diff changeset
    78
		result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
cawthron
parents:
diff changeset
    79
		result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
cawthron
parents:
diff changeset
    80
cawthron
parents:
diff changeset
    81
		result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
cawthron
parents:
diff changeset
    82
		return result;
cawthron
parents:
diff changeset
    83
	}
cawthron
parents:
diff changeset
    84
cawthron
parents:
diff changeset
    85
} //CSConfigResourceFactoryImpl