Package org.wymiwyg.rdf.molecules.diff

Examples of org.wymiwyg.rdf.molecules.diff.MoleculeDiff.serialize()


          new ReferenceGroundedDecompositionImpl(
              g1),
          new ReferenceGroundedDecompositionImpl(
              g2));
      File file = File.createTempFile("minimum-failing",".zip");
      diff.serialize(new FileOutputStream(file));
      MoleculeDiff diffRec =  LeanDiffPatch.deserializeDiff(file);
      ReferenceGroundedDecomposition dec2rec = diffRec
          .patch(new ReferenceGroundedDecompositionImpl(
              (g1)));
      Graph g2rec = ReferenceGroundedUtil.reconstructGraph(dec2rec);
View Full Code Here


          ".nt")), "N-TRIPLE");
      try {
        MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);
        File zipFile = File.createTempFile("random-model", ".zip");
        OutputStream diffOut = new FileOutputStream(zipFile);
        diff.serialize(diffOut);
        diffOut.close();
        MoleculeDiff diffRec;// =
        // LeanDiffPatch.deserializeDiff(zipFile);
        {
          InputStream in1 = new FileInputStream(zipFile);
View Full Code Here

      diff = new MoleculeDiffImpl(model1, model2, arguments
          .getUseDefaultOntology());
    }
    if (arguments.getDiffPath() != null) {
      try {
        diff.serialize(arguments.getDiffPath());
      } catch (IOException e) {
        log.error("Failed serializing diff", e);
      }
    }
    if (arguments.getOutputDiff()) {
View Full Code Here

      m2.write(new FileOutputStream(File.createTempFile("random-model-1",
          ".nt")), "N-TRIPLE");
      MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);
      File zipFile = File.createTempFile("random-model", ".zip");
      OutputStream diffOut = new FileOutputStream(zipFile);
      diff.serialize(diffOut);
      diffOut.close();
      MoleculeDiff diffRec;// = LeanDiffPatch.deserializeDiff(zipFile);
      {
        InputStream in1 = new FileInputStream(zipFile);
        File tempFile = File.createTempFile(Util.createRandomString(5),
View Full Code Here

              "N-TRIPLE");
      MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      File file = File.createTempFile("test2-serial", ".zip");
      OutputStream diffOut = new FileOutputStream(file);
      diff.serialize(baos);
      try {
        Thread.sleep(100);
      } catch (InterruptedException e) {
        throw new RuntimeException(e);
      }
View Full Code Here

    MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);
    System.out.println(diff);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    File file = File.createTempFile("test4-serial", ".zip");
    OutputStream diffOut = new FileOutputStream(file);
    diff.serialize(baos);
    try {
      Thread.sleep(100);
    } catch (InterruptedException e) {
      throw new RuntimeException(e);
    }
View Full Code Here

    Model m2 = ModelFactory.createDefaultModel();
    m1.read(getClass().getResource("test1-1.nt").toString(), "N-TRIPLE");
    m2.read(getClass().getResource("test1-2.nt").toString(), "N-TRIPLE");
    MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);
    File file = File.createTempFile("test1-serial", ".zip");
    diff.serialize(new FileOutputStream(file));
    System.out.println(diff);
    MoleculeDiff diffRec = LeanDiffPatch.deserializeDiff(file);
    System.out.println(diffRec);
    Model m2reconstructed = LeanDiffPatch.patch(m1, diffRec);
    m2reconstructed.write(System.out);
View Full Code Here

      m2 = LeanDiffPatch.leanify(m2);
      MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);

      //System.out.println(diff);
      File file = File.createTempFile("test6-serial", ".zip");
      diff.serialize(new FileOutputStream(file));
      MoleculeDiff diffRec = LeanDiffPatch.deserializeDiff(file);
      Model m2reconstructed = LeanDiffPatch.patch(m1, diffRec);
      m2reconstructed = LeanDiffPatch.leanify(m2reconstructed);
      //m2.write(System.out);
      //m2reconstructed.write(System.out);
View Full Code Here

      m2 = LeanDiffPatch.leanify(m2);
      MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);

      System.out.println(diff);
      File file = File.createTempFile("test7-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);
View Full Code Here

      m2 = LeanDiffPatch.leanify(m2);
      MoleculeDiff diff = LeanDiffPatch.getDiff(m1, m2);

      System.out.println(diff);
      File file = File.createTempFile("test8-serial", ".zip");
      diff.serialize(new FileOutputStream(file));
      MoleculeDiff diffRec = diff;// LeanDiffPatch.deserializeDiff(new
      // File("test7-serial.zip"));
      System.out.println(diff.getCommonFgNodesInDiffMolecules().size());
      System.out
          .println(diffRec.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.