| /******************************************************************************* |
| * Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro |
| * 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: |
| * Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.viatra2.imports; |
| |
| import java.io.FileInputStream; |
| import java.io.FileNotFoundException; |
| import java.io.InputStream; |
| |
| import org.eclipse.viatra2.core.IModelSpace; |
| import org.eclipse.viatra2.errors.VPMRuntimeException; |
| import org.eclipse.viatra2.framework.properties.VPMProperties; |
| |
| /** |
| * @author Andras Schmidt |
| * |
| */ |
| public class VPMImporterSax implements IVPMImporter { |
| |
| public void process(InputStream is, IModelSpace topmodel, |
| VPMProperties props) throws VPMRuntimeException { |
| VPMImporterSaxImpl imp = new VPMImporterSaxImpl(); |
| // FIXME load properties !
|
| // VPMProperties pr2=new VPMProperties();
|
| imp.process(is, topmodel, props); |
| return; |
| } |
| |
| public void process(String f, IModelSpace ms, VPMProperties props) |
| throws VPMRuntimeException { |
| try { |
| process(new FileInputStream(f), ms, props); |
| return; |
| } catch (FileNotFoundException e) { |
| throw new VPMRuntimeException("File not found (" + f + ")"); |
| } |
| } |
| |
| } |