Examples of MoleculeDiff


Examples of org.wymiwyg.rdf.molecules.diff.MoleculeDiff

          "N-TRIPLE");
      m2.read(getClass().getResource("test11-2.nt").toString(),
          "N-TRIPLE");
      m1 = LeanDiffPatch.leanify(m1);
      m2 = LeanDiffPatch.leanify(m2);
      MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);

      System.out.println(diff);
      File file = File.createTempFile("test11-serial", ".zip");
      diff.serialize(new FileOutputStream(file));
      MoleculeDiff diffRec = diff;// LeanDiffPatch.deserializeDiff(file);
      System.out.println(diff.getCommonFgNodesInDiffMolecules().size());
      System.out
          .println(diffRec.getCommonFgNodesInDiffMolecules().size());
      Model m2reconstructed = LeanDiffPatch.patch(m1, diff);// diffRec);
      // m2reconstructed.write(System.out);
      System.out.println(LeanDiffPatch.getDiff(m2, m2reconstructed));
      assertTrue("reconstructed is isomorphic", m2
          .isIsomorphicWith(m2reconstructed));
View Full Code Here

Examples of org.wymiwyg.rdf.molecules.diff.MoleculeDiff

          "N-TRIPLE");
      m2.read(getClass().getResource("test12-2.nt").toString(),
          "N-TRIPLE");
      m1 = LeanDiffPatch.leanify(m1);
      m2 = LeanDiffPatch.leanify(m2);
      MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);

      File file = File.createTempFile("test12-serial", ".zip");
      diff.serialize(new FileOutputStream(file));
      MoleculeDiff diffRec = LeanDiffPatch.deserializeDiff(file);
      System.out.println("orig diff");
      System.out.println(diff);
      System.out.println("reconstructed diff");
      System.out.println(diffRec);
      System.out.println(diff.getCommonFgNodesInDiffMolecules().size());
      System.out
          .println(diffRec.getCommonFgNodesInDiffMolecules().size());
      Model m2reconstructed = LeanDiffPatch.patch(m1, diffRec);
      // m2reconstructed.write(System.out);
      System.out.println(LeanDiffPatch.getDiff(m2, m2reconstructed));
      assertTrue("reconstructed is isomorphic", m2
          .isIsomorphicWith(m2reconstructed));
View Full Code Here

Examples of org.wymiwyg.rdf.molecules.diff.MoleculeDiff

    for (int i = 0; i < 1; i++) {
      Model m1 = ModelFactory.createDefaultModel();
      Model m2 = ModelFactory.createDefaultModel();
      m1.read(getClass().getResource("single-natural.nt").toString(),
          "N-TRIPLE");
      MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);

      // diff.serialize(new FileOutputStream("single-natural.zip"));
      MoleculeDiff diffRec = diff;// LeanDiffPatch.deserializeDiff(new
      // File("test7-serial.zip"));
      System.out.println(diff.getCommonFgNodesInDiffMolecules().size());
      System.out
          .println(diffRec.getCommonFgNodesInDiffMolecules().size());
      Model m2reconstructed = LeanDiffPatch.patch(m1, diff);// diffRec);
      System.out.println("m1");
      m1.write(System.out, "N-TRIPLE");
      System.out.println("---");
      System.out.println("diff:");
View Full Code Here

Examples of org.wymiwyg.rdf.molecules.diff.MoleculeDiff

//      }
//     
//    }));
    m1.write(System.out, "N-TRIPLE");
    m2 = LeanDiffPatch.leanify(m2);
    MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);

    File diffFile = File.createTempFile(f1.getName() + "-" + f2.getName(),
        ".zdiff");
    diff.serialize(new FileOutputStream(diffFile));
    MoleculeDiff diffRec = LeanDiffPatch.deserializeDiff(diffFile);
    // System.out.println("orig diff");
    // System.out.println(diff);
    // System.out.println("reconstructed diff");
    // System.out.println(diffRec);
    // System.out.println(diff.getCommonFgNodesInDiffMolecules().size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.