- From: Rahul Singh <kingtiny@cs.cmu.edu>
- Date: Fri, 08 Aug 2003 17:22:51 -0400
- CC: www-rdf-interest@w3.org
Ok I found what was wrong. The stream was'nt being reset after reading the model in the first file. Resetting the ifstream with clear did the trick. Whoever maintains the NTC (/me looks at Dave Beckett) might want to add the two lines to the code to fix this. The two extra lines are preceeded with silly comments. model m1, m2; ifstream i; i.open(argv[ofs]); m1.read(i); i.close(); //reset the stream so that we may read the second model without confusing poor kingtiny. i.clear(); if (NOISY) { cout << "First model read:" << endl; m1.write(cout); } i.open(argv[ofs+1]); m2.read(i); i.close(); //reset the stream... Well not really required here because we wont be reading from it again. But still. i.clear(); if (NOISY) { cout << "Second model read:" << endl; m2.write(cout); } Cheers, Rahul kingtiny@DriveRDF.org Rahul Singh wrote: > > Hi, > > I am trying to use the NTC utility at > http://www.w3.org/2000/10/rdf-tests/rdfcore/utils/ntc/ to compare .nt > files but it doesn't seem to like me. > > I built it and it keeps saying that the files dont match even when > they do. Maybe I don't understand how its supposed to work. I am just > trying the samples (First.001, Second.002 etc etc) with the utility > and this is what I am getting. > > Any help will be apprecaited before I start wading through the code. > > ntc -d Second.001 First.001 > First model read: > Dump of model. > Static triples: > <foo:bar> <random:p2> "hoho" . > <foo:bar> <random:p1> <o1> . > Anonymous triples: > Done. > Second model read: > Dump of model. > Static triples: > Anonymous triples: > Done. > Comparing models: > Non-anonymous statement sets of different size > They don't match > > It doesn't seem to be reading the second model. > > Cheers, > > Rahul Singh > kingtiny@DriveRDF.org > > >
Received on Friday, 8 August 2003 17:22:52 UTC