Package org.wymiwyg.rdf.graphs.impl

Examples of org.wymiwyg.rdf.graphs.impl.SimpleGraph


    }
    return true;
  }

  public static Graph applyMapping(Graph graph, Map mapping) {
    SimpleGraph result = new SimpleGraph();
    for (Iterator iter = graph.iterator(); iter.hasNext();) {
      Triple triple = (Triple) iter.next();
      Node subject = triple.getSubject();
      PropertyNode predicate = triple.getPredicate();
      Node object = triple.getObject();
      if (!(subject instanceof GroundedNode)) {
        subject = (Node) mapping.get(subject);
      }
      if (!(object instanceof GroundedNode)) {
        object = (Node) mapping.get(object);
      }
      Triple mappedTriple = new TripleImpl(subject, predicate, object);
      result.add(mappedTriple);
    }
    result.markFinalized();
    return result;
  }
View Full Code Here


    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

     * (non-Javadoc)
     *
     * @see java.util.Iterator#next()
     */
    public Graph nextGraph() {
      SimpleGraph result = new SimpleGraph();
      result.addAll(multiSubllistsIter.nextList());
      result.markFinalized();
      return result;
    }
View Full Code Here

TOP

Related Classes of org.wymiwyg.rdf.graphs.impl.SimpleGraph

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.