Package org.wymiwyg.rdf.graphs

Examples of org.wymiwyg.rdf.graphs.Graph


   * @param string
   */
  private void addData(MoleculeStore moleculeStore, String modelName) {
    Model model = ModelFactory.createDefaultModel();
    model.read(StoreTest.class.getResource(modelName).toString());
    Graph graph = JenaUtil.getGraphFromModel(model , true);
    ModelReferencingDecomposition modelReferencingDecomposition = new ModelReferencingDecompositionImpl(graph);
    ReferenceGroundedDecomposition dec = new ReferenceGroundedDecompositionImpl(modelReferencingDecomposition);
    for (FunctionallyGroundedNode fgNode : dec.getFunctionallyGroundedNodes()) {
      moleculeStore.addFunctionallyGroundedNode(fgNode);
    }
View Full Code Here


     *
     */
    public Configuration(Store store, GraphOverTime configGOT,
        NamedNode configuration) {

      Graph configGraph = configGOT.getGraph(new Date());
      Model configModel = JenaUtil.getModelFromGraph(configGraph);
      Resource httpConfigRes = configModel.createResource(configuration
          .getURIRef());
      Statement amConfigStmt = httpConfigRes
          .getProperty(WEBACCOUNTMANAGER.webAccountManagerConfiguration);
View Full Code Here

    }
    return model;
  }

  protected FCAGraph getGraphFromResource(String resName) {
    Graph graph = JenaUtil.getGraphFromModel(getModelFromResource(resName),
        true);
    graph = MoleculeBasedLeanifier.getLeanVersionOf(graph);
    // GraphLeanifier.makeLean(graph);
    return new FCAGraphImpl(graph);
  }
View Full Code Here

        storeView.revokeAll();
       
      }
     
    });
    Graph retrieved = store.getGraphOverTime(Collections.singleton(source)).getGraph(date3);
    assertEquals(0, retrieved.size());
  }
View Full Code Here

        storeView.revokeAll();
        storeView.assertGraph(graph2);
      }
     
    });
    Graph retrieved = store.getGraphOverTime(Collections.singleton(source)).getGraph(date3);
    assertEquals(graph2, retrieved);
  }
View Full Code Here

      public void execute(SourceStoreView storeView) {
        storeView.revokeGraph(graph1);
      }
     
    });
    Graph retrieved = store.getGraphOverTime(Collections.singleton(source)).getGraph(date3);
    assertEquals(graph2, retrieved);
  }
View Full Code Here

      if (fileURLString.endsWith(".n3") || fileURLString.endsWith(".turtle")) {
        lang = "N3";
      }
    }
    model.read(fileURLString, lang);
    Graph graph = JenaUtil.getGraphFromModel(model, true);
    Source identity = arguments.getIdentity();
    store.assertGraph(identity, new FCAGraphImpl(graph))
  }
View Full Code Here

   * Test if a model on fca is isomorphic with model converted using JenaUtil
   *
   */
  public void testComapringWithConverter() {
    Model origModel = ModelCreationUtil.createRandomModel(1000);
    Graph origGraph = JenaUtil.getGraphFromModel(origModel, true);
    Graph leanGraph = MoleculeBasedLeanifier.getLeanVersionOf(origGraph);
    Model leanModel = JenaUtil.getModelFromGraph(leanGraph);
    FCAGraph fcaGraph = new FCAGraphImpl(leanGraph);
    Model modelOnFCA = ModelFactory.createModelForGraph(fcaGraph);
    assertTrue(leanModel.isIsomorphicWith(modelOnFCA));
  }
View Full Code Here

   * @see com.hp.hpl.jena.gvs.tool.GVSToolCommand#execute(com.hp.hpl.jena.gvs.Store, com.hp.hpl.jena.gvs.tool.GVSToolArguments)
   */
  @Override
  protected void execute(Store store, GetCommandArguments arguments) {
    Source[] sources = arguments.getTrustedSources();
    Graph graph = store.getGraphOverTime(new HashSet<Source>(Arrays.asList(sources))).getGraph(new Date());
    Model model = JenaUtil.getModelFromGraph(graph);
    model.write(System.out);
  }
View Full Code Here

   * @param g2
   */
  private void createMimimumFailingG1(Graph g1, Graph g2) {
    SubGraphCreator subGraphCreator = new SubGraphCreator(g1);
    boolean lastOneFailed; //note that we are looking for failing graphs
    Graph lastFailingGraph = g1;
//    int roundCount = 0;
    for (Graph currentGraph = subGraphCreator.getFirstSubgraph(); currentGraph != null; currentGraph = subGraphCreator.getNewSubgraph(lastOneFailed)) {
      lastOneFailed = !diffPathTest(currentGraph, false, g2, true);
      if (lastOneFailed) {
        lastFailingGraph = currentGraph;
View Full Code Here

TOP

Related Classes of org.wymiwyg.rdf.graphs.Graph

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.