public static ProvenanceContainer Load(string path)
        {
            XmlSerializer       serializer = new XmlSerializer(typeof(ProvenanceContainer));
            Stream              stream     = new FileStream(path, FileMode.Open);
            ProvenanceContainer result     = serializer.Deserialize(stream) as ProvenanceContainer;

            stream.Close();
            return(result);
        }
Пример #2
0
        //=================================================================================================================
        // Export all Provenance information gathered to a XML file
        //=================================================================================================================
        public void Save(string filename)
        {
            Debug.Log(filename);
            ProvenanceContainer provContainer = new ProvenanceContainer(vertexList, edgeList);

            //provContainer.Save(Path.Combine(Application.persistentDataPath, "provenancedata.xml"));
            Debug.Log(Application.dataPath);
            provContainer.Save(Path.Combine(Application.dataPath, filename + ".xml"));
            //provContainer.Save("./Files/" + filename + ".xml");
        }
Пример #3
0
 //=================================================================================================================
 // Load all previous Provenance information gathered from a XML file
 //=================================================================================================================
 public void Load(string filename)
 {
     //ProvenanceContainer provContainer = ProvenanceContainer.Load("./Files/" + filename + ".xml");
     ProvenanceContainer provContainer = ProvenanceContainer.Load(Path.Combine(Application.dataPath, filename + ".xml"));
 }