diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/resources/impl/DawnResourceFactoryImpl.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/resources/impl/DawnResourceFactoryImpl.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/resources/impl/DawnResourceFactoryImpl.java b/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/resources/impl/DawnResourceFactoryImpl.java new file mode 100644 index 0000000000..467ce7e501 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.dawn/src/org/eclipse/emf/cdo/dawn/resources/impl/DawnResourceFactoryImpl.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2009 - 2010 Martin Fluegge (Berlin, Germany). + * 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: + * Martin Fluegge - initial API and implementation + ******************************************************************************/ +package org.eclipse.emf.cdo.dawn.resources.impl; + +import org.eclipse.emf.cdo.dawn.resources.DawnResourceFactory; +import org.eclipse.emf.cdo.eresource.impl.CDOResourceFactoryImpl; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; + +/** + * @author Martin Fluegge + */ +public class DawnResourceFactoryImpl extends CDOResourceFactoryImpl implements DawnResourceFactory +{ + @Override + public Resource createResource(URI uri) + { + uri = URI.createURI(uri.toString().replace("dawn:", "cdo:")); + // String path = CDOURIUtil.extractResourcePath(uri); + DawnWrapperResourceImpl resource = new DawnWrapperResourceImpl(uri); + // resource.setRoot(CDOURIUtil.SEGMENT_SEPARATOR.equals(path)); + resource.setExisting(isGetResource()); + return resource; + } +} |