Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

JetWebPlotReaderFactory.java

Go to the documentation of this file.
00001 /*
00002  * JetWebPlotReaderFactory.java
00003  *
00004  * Created on January 25, 2006, 9:31 PM
00005  *
00006  * To change this template, choose Tools | Options and locate the template under
00007  * the Source Creation and Management node. Right-click the template and choose
00008  * Open. You can then make changes to the template in the Source Editor.
00009  */
00010 
00011 package cedar.jetweb.xml;
00012 
00013 import java.io.*;
00014 import java.util.zip.*;
00015 
00016 import org.apache.commons.io.FileUtils;
00017 
00018 import cedar.jetweb.job.JobUtils;
00019 import cedar.jetweb.*;
00020 
00021 import cedar.jetweb.util.JetWebFile;
00022 
00030 public class JetWebPlotReaderFactory {
00031     
00032     static int TYPE_AIDA = 0;
00033     static int TYPE_PLOTML = 1;
00034      
00036     public static JetWebPlotReader getNewPlotReader(String filename) 
00037     throws JetWebException{
00038 
00039     InputStream in = null;
00040     JetWebFile f = new JetWebFile(filename);
00041     if(!f.isAida()){
00042         throw new JetWebException
00043         ("JetWebPlotReaderFactory",
00044          "Error - attempted to create JetWebPlotReader from non-aida file.");
00045     }
00046     
00047     System.out.println
00048         ("JetWebPlotReaderFactory: Attempting to use file "+f);
00049 
00050     f = f.Zip();
00051         
00052     return new JetWebAIDAXMLPlotReader(f.fullPath());
00053     }
00054 }

Generated Wed Jan 17 09:14:27 GMT 2007