| package org.eclipse.stem.core; |
| |
| /******************************************************************************* |
| * Copyright (c) 2011 IBM Corporation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * IBM Corporation - initial API and implementation |
| *******************************************************************************/ |
| |
| import org.eclipse.emf.common.util.URI; |
| import org.eclipse.emf.ecore.resource.Resource; |
| import org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl; |
| import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; |
| |
| /** |
| * A binary resource factor used to create compact resources suitable for sending |
| * across networks etc. |
| */ |
| |
| public class STEMBinaryResourceFactoryImpl extends XMIResourceFactoryImpl { |
| |
| public static STEMBinaryResourceFactoryImpl INSTANCE = new STEMBinaryResourceFactoryImpl(); |
| |
| |
| /** |
| * private so only a singleton instance is created |
| * |
| * @see #INSTANCE |
| */ |
| private STEMBinaryResourceFactoryImpl() { |
| super(); |
| } |
| |
| @Override |
| public Resource createResource(URI uri) { |
| Resource newRes = new BinaryResourceImpl(uri); |
| return newRes; |
| } // createResource |
| |
| |
| } // STEMBinaryResourceFactoryImpl |