make test
- runs the testsmake ci
- runs the continuous integration suitemake uberjar
- generates the standalone uberjar file
With the project jar you can run the utilities at the command line.
The diff compares two SAF-T files and outputs its differences. It's meant for comparing different SAF-T generator implementations, and make sure that they are generating the same content.
java -jar saft-utilities.jar -op diff -file1 file1.xml -file2 file2.xml
You can use this lib programatically with Java. It requires Java8. You can use the SaftLoader class to load the SAF-T from a file (or String) into a AuditFile class. This class has all the SAF-T elements.
With two AuditFile
s ready, you
can use SaftDiff
to generate the differences between the SAF-Ts.
AuditFile f1 = SaftLoader.loadFromFile("file1.xml");
AuditFile f2 = SaftLoader.loadFromFile("file2.xml");
SaftDiff diff = new SaftDiff(f1, f2);
Result result = diff.process();
System.out.println(result);