Search in sources :

Example 1 with XMLUpdateShredder

use of org.sirix.service.xml.shredder.XMLUpdateShredder in project sirix by sirixdb.

the class DiffTestHelper method initializeData.

private static void initializeData(final Holder holder, final Path... files) throws SirixException, IOException, XMLStreamException {
    int i = 0;
    for (final Path file : files) {
        if (i == 0) {
            final XMLShredder init = new XMLShredder.Builder(holder.getWriter(), XMLShredder.createFileReader(file), Insert.ASFIRSTCHILD).commitAfterwards().build();
            init.call();
        } else {
            final XMLUpdateShredder init = new XMLUpdateShredder(holder.getWriter(), XMLShredder.createFileReader(file), Insert.ASFIRSTCHILD, file, ShredderCommit.COMMIT);
            init.call();
        }
        i++;
    }
}
Also used : Path(java.nio.file.Path) XMLUpdateShredder(org.sirix.service.xml.shredder.XMLUpdateShredder) XMLShredder(org.sirix.service.xml.shredder.XMLShredder)

Aggregations

Path (java.nio.file.Path)1 XMLShredder (org.sirix.service.xml.shredder.XMLShredder)1 XMLUpdateShredder (org.sirix.service.xml.shredder.XMLUpdateShredder)1