Hello Guilhelm. Thank you so much for your help. I will download the new jar. :)KeithOn Wed, Jun 27, 2012 at 5:29 AM, guilhelm savin <guilhelm.savin AT gmail.com> wrote:
Hi again,I think that the handling of CR and CR+LF have beenincluded in the 1.1.1 but I just check and ... it isnot. Sorry, my mistake.
You can get lastest jar here :||In this version, LF, CR, and CR+LF are handle by thedgs parser.We will publish soon a 1.1.2 that will fix a lot of bugs.
Tell me if it works with this version.Regards.Guilhelm2012/6/27 guilhelm savin <guilhelm.savin AT gmail.com>
Can you send me a DGS file with the \r for tests ?I will try to fix the parser.
Thanks.Guilhelm2012/6/27 Keith Thompson <kthomps6 AT binghamton.edu>
Thank you so much for your help. I understand now after your explanation. Everything worked as expected. I still get the \r but that was the only thing.Regards,KeithOn Tue, Jun 26, 2012 at 6:44 PM, guilhelm savin <guilhelm.savin AT gmail.com> wrote:I think that the problem come from your use ofthe sink. In your example, you create a firstdgs file between fs.begin() and fs.end(). Thisfile is closed by calling fs.end().graph.write(fs, "..") creates a new file thatis a snapshot of the graph (the file will containonly the current state of the graph) so stepswill not appear here.You should try to do this :|| Graph g = ... ;| FileSinkDGS fs = ... ;|| g.addSink(fs);|| // Start to write| fs.begin("/path/to/output/dgs");|| // Start reading| g.stepBegins(0);| // read the first week| g.stepBegins(1);| // read the second week| // ...|| // Close the sink| fs.end();|By calling "g.addSink(fs)" you connect the graph tothe output, so every change on the graph will bereflected in the dgs.Tell me if it works. If not I will try to help youmore.Regards.2012/6/27 Keith Thompson <kthomps6 AT binghamton.edu>
Hello Guilhelm,Yes, I am using the gs-core-1.1.1, but still getting the \r error.I tried adding the begin( ) method and then calling end( ) before calling write(new FileSinkDGS( ),"path/to/output"). The dgs file is created and shows all the events, but there are no steps listed. Here is what I have in sequence:FileSinkDGS fs = new FileSinkDGS();fs.begin( );fs.stepBegins( );//read one week of data into graphfs.stepBegins( );//read another week of data into graphetc ...fs.end( );graph.write(fs, "/path/to/output/dgs");Here are a few lines of output:DGS004null 0 0an "8576"cn "8576" "ui.label":"8576"cn "8576" "ui.class":"U"an "10571"cn "10571" "ui.label":"10571"cn "10571" "ui.class":"U"I'm still just not getting the steps to write out. For instance, I would like to see:DGS004null 0 0st 0an "8576"cn "8576" "ui.label":"8576"cn "8576" "ui.class":"U"st 1an "10571"cn "10571" "ui.label":"10571"cn "10571" "ui.class":"U"Regards,Keith--On Tue, Jun 26, 2012 at 5:08 PM, guilhelm savin <guilhelm.savin AT gmail.com> wrote:Hi Keith,What is your GraphStream version ?This bug (\r) should be corrected with the gs-core-1.1.1About your use of stepBegins(), it should work. Have youcalled the begin() method first ?Regards.Guilhelm--
2012/6/26 Keith Thompson <kthomps6 AT binghamton.edu>Dear Graphstream users,I have noticed a possible issue in writing/reading dgs files. The writer in graphstream puts \r\n at the end of lines; however, the dgs parser in graphstream throws an exception if the \r is there. Thus, I have been using search/replace to manually remove \r after using graph.write(new FileSinkDGS( ), "path/to/output") so that I can read the file back in with nextEvents( ).Here is my actual question though. I am trying to write a dgs file with steps to denote sequences of events. I am able to use FileSinkDGS to write the dgs file with no problems, but I get an error when I try to use steps. I am placing fs.stepBegins(graphId, timeId, step) at each location where I want a new step to begin (fs is the name of my FileSinkDGS object). For example, I might have something like fs.stepBegins("myGraph", 0, 0). Is this correct usage? The reason I ask is that I get a NullPointerException every time I call stepBegins.Regards,--
Keith Thompson
Guilhelm Savin
PhD Student of Computer ScienceLITIS, University of Le Havre
\/\/\/\/\/\/
Keith Thompson
Graduate Research Associate, Xerox Corporation
SUNY Research Foundation
Dept. of Systems Science and Industrial Engineering
Binghamton UniversityBinghamton, NY 13902
--
Guilhelm Savin
PhD Student of Computer ScienceLITIS, University of Le Havre
\/\/\/\/\/\/
--
Keith Thompson
Graduate Research Associate, Xerox Corporation
SUNY Research Foundation
Dept. of Systems Science and Industrial Engineering
Binghamton UniversityBinghamton, NY 13902
--
Guilhelm Savin
PhD Student of Computer ScienceLITIS, University of Le Havre
\/\/\/\/\/\/
--
Guilhelm Savin
PhD Student of Computer ScienceLITIS, University of Le Havre
\/\/\/\/\/\/
--
Keith Thompson
Graduate Research Associate, Xerox Corporation
SUNY Research Foundation
Dept. of Systems Science and Industrial Engineering
Binghamton UniversityBinghamton, NY 13902
Archives gérées par MHonArc 2.6.16.