| /******************************************************************************* |
| * Copyright (c) 2004-2008 Andras Balogh 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 Balogh - initial API and implementation |
| *******************************************************************************/ |
| |
| package org.eclipse.viatra2.imports.vtml;
|
|
|
| import java.io.InputStream; |
| |
| import org.eclipse.viatra2.errors.VPMRuntimeException; |
| import org.eclipse.viatra2.framework.IFramework; |
| import org.eclipse.viatra2.imports.NativeImporter; |
|
|
| /**
|
| * @author babo
|
| *
|
| * TODO To change the template for this generated type comment go to
|
| * Window - Preferences - Java - Code Style - Code Templates
|
| */
|
| public class VTMLImportFactory implements NativeImporter
|
| {
|
| public VTMLLoad getImporterInstance(IFramework f)
|
| throws VPMRuntimeException {
|
|
|
| VTMLLoad vl = new VTMLLoad();
|
| vl.init(f.getTopmodel(),f.getLogger());
|
| return vl;
|
| }
|
|
|
| public void processFile(String f, IFramework fw) throws VPMRuntimeException {
|
| VTMLLoad importer=getImporterInstance(fw);
|
| importer.processFile(f,fw.getTopmodel(),fw,fw.getLogger());
|
| }
|
|
|
| public void process(InputStream f, IFramework fw) throws VPMRuntimeException {
|
| VTMLLoad importer=getImporterInstance(fw);
|
| importer.process(f,fw.getTopmodel(),fw,fw.getLogger());
|
| }
|
|
|
| }
|