Package org.wymiwyg.rdf.graphs.fgnodes.impl

Examples of org.wymiwyg.rdf.graphs.fgnodes.impl.NaturalizedGraph


    }
    return result;
  }

  private void writeGraph(File directory, Graph graph) throws IOException {
    NaturalizedGraph naturalizedGraph = new NaturalizedGraph(graph,
        new Naturalizer() {
          public Node naturalize(FunctionallyGroundedNode fgNode,
              Graph graph) {
            Node anonymousNode = new NodeImpl();
            graph.add(new TripleImpl(anonymousNode,
View Full Code Here


      graph.addAll(terminalMolecule);
    }
    for (ContextualMolecule contextualMolecule : dec.getContextualMolecules()) {
      graph.addAll(contextualMolecule);
    }
    return new NaturalizedGraph(graph, dec.getFunctionallyGroundedNodes());
  }
View Full Code Here

        .iterator(); iter.hasNext();) {
      nonNaturalGraph.addAll(iter.next());
    }

    try {
      SimpleGraph result = new NaturalizedGraph(nonNaturalGraph, leanifiedDec
          .getFunctionallyGroundedNodes());
      result.markFinalized();
      /*System.out.println("DEBUG not anonymized:");
      JenaUtil.getModelFromGraph(result).write(System.out, "N3");*/
      return result;
    } catch (NoReplacementFoundException ex) {
      log.error(ex.toString());
View Full Code Here

         * PropertyNodeImpl(MODELDIFF.functionallyGroundedIn .getURI()),
         * namedNode));
         */

        JenaUtil.getModelFromGraph(
            new NaturalizedGraph(graph, naturalizer)).write(
            zipOut,
            "RDF/XML",
            ReferencingNaturalizer.rootURL
                + moleculePath.toString());
      }
View Full Code Here

      fileName.append(".rdf");

      ZipEntry entry = new ZipEntry(fileName.toString());
      zipOut.putNextEntry(entry);
      JenaUtil.getModelFromGraph(
          new NaturalizedGraph(current, naturalizer)).write(zipOut,
          "RDF/XML",
          ReferencingNaturalizer.rootURL + fileName.toString());
    }
  }
View Full Code Here

    return new JenaModelGraph(model, ontology, useDefaultOntology);
  }

  public static Model getModelFromGraph(Graph graph) {
    Model result = ModelFactory.createDefaultModel();
    addGraphToModel(new NaturalizedGraph(graph), result);
    return result;
  }
View Full Code Here

     */
    // JenaUtil.getModelFromGraph(prob1GraphRec).write(System.out);
    ReferenceGroundedDecomposition recDec = new ReferenceGroundedDecompositionImpl(
        prob1GraphRec);
    // ReferenceGroundedUtil.print(recDec, new PrintWriter(System.out));
    Graph recDecRec2 = new NaturalizedGraph(ReferenceGroundedUtil
        .reconstructGraph(recDec));
    Graph recDecRec = new NaturalizedGraph(new SimpleGraph(), recDec
        .getFunctionallyGroundedNodes());
    // System.out.println(recDecRec2.equals(recDecRec));
    // JenaUtil.getModelFromGraph(recDecRec).write(System.out);
    Graph recDecRecLean = MoleculeBasedLeanifier
        .getLeanVersionOf(recDecRec);
View Full Code Here

TOP

Related Classes of org.wymiwyg.rdf.graphs.fgnodes.impl.NaturalizedGraph

Copyright © 2018 www.massapicom. 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.