00001 package edu.rice.cs.hpc.data.experiment; 00002 00003 import java.io.File; 00004 00005 import edu.rice.cs.hpc.data.experiment.xml.ExperimentFileXML; 00006 import edu.rice.cs.hpc.data.util.IUserData; 00007 00008 public class LocalDatabaseRepresentation implements IDatabaseRepresentation 00009 { 00010 final private File fileExperiment; 00011 final private IUserData<String, String> userData; 00012 final private boolean need_metric; 00013 final private BaseExperiment experiment; 00014 private ExperimentFileXML fileXML; 00015 00016 public LocalDatabaseRepresentation(File fileExperiment, 00017 BaseExperiment experiment, 00018 IUserData<String, String> userData, 00019 boolean need_metric) 00020 { 00021 this.fileExperiment = fileExperiment; 00022 this.userData = userData; 00023 this.need_metric = need_metric; 00024 this.experiment = experiment; 00025 } 00026 00027 @Override 00028 public ExperimentFileXML getXMLFile() { 00029 return fileXML; 00030 } 00031 00032 @Override 00033 public void open() throws Exception 00034 { 00035 if (fileXML == null) { 00036 fileXML = new ExperimentFileXML(); 00037 } 00038 fileXML.parse(fileExperiment, experiment, need_metric, userData); 00039 } 00040 }