| /******************************************************************************* |
| * Copyright (c) 2005, 2019 IBM Corporation and others. |
| * 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: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| /** |
| * <copyright> |
| * </copyright> |
| * |
| * $Id: UseResourceFactoryImpl.java,v 1.1 2005/01/20 12:03:03 ryman Exp $ |
| */ |
| package org.eclipse.component.use.util; |
| |
| import org.eclipse.emf.common.util.URI; |
| |
| import org.eclipse.emf.ecore.resource.Resource; |
| |
| import org.eclipse.emf.ecore.util.ExtendedMetaData; |
| |
| import org.eclipse.emf.ecore.xmi.XMLResource; |
| |
| import org.eclipse.emf.ecore.xmi.impl.XMLResourceFactoryImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * The <b>Resource Factory</b> associated with the package. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.component.use.util.UseResourceImpl |
| * @generated |
| */ |
| public class UseResourceFactoryImpl extends XMLResourceFactoryImpl |
| { |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ExtendedMetaData extendedMetaData; |
| |
| /** |
| * Creates an instance of the resource factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public UseResourceFactoryImpl() |
| { |
| super(); |
| extendedMetaData = ExtendedMetaData.INSTANCE; |
| } |
| |
| /** |
| * Creates an instance of the resource. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Resource createResource(URI uri) |
| { |
| XMLResource result = new UseResourceImpl(uri); |
| result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData); |
| result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData); |
| |
| result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); |
| result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); |
| |
| result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); |
| return result; |
| } |
| |
| } //UseResourceFactoryImpl |