Package com.hp.hpl.jena.gvs.impl

Examples of com.hp.hpl.jena.gvs.impl.FCAGraphImpl


  public void testBorderTime() throws Exception {
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Source source = new SourceImpl("http://example.org/graph-source");
    FCAGraph[] graphs = new FCAGraph[2];
    graphs[0] = new FCAGraphImpl(
        modelWithStatements("_a dc:subject _b"));
    graphs[1] = new FCAGraphImpl(
        modelWithStatements("http://example.org/ dc:author 'foo'"));
    clock.setTime(new W3CDateFormat()
    .parse("2006-05-01T16:30:00Z"));
    store.updateGraph(source, graphs[0]);
    Date date2 = new W3CDateFormat().parse("2006-05-01T16:32:00Z");
View Full Code Here


  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

  public void testWithEmptyGraphs() throws Exception {
    FCAGraph[] graphs = new FCAGraph[4];
    for (int i = 0; i < graphs.length; i++) {
      SimpleGraph simpleGraph = new SimpleGraph();
      simpleGraph.markFinalized();
      graphs[i] = new FCAGraphImpl(simpleGraph);
    }
    performTestsWithGraphs(graphs);
  }
View Full Code Here

    // "N-TRIPLE");
    // m2.read(MinimumFailingGraphDetector.class.getResource("test14-2.nt").toString(),
    // "N-TRIPLE");
    m0 = LeanDiffPatch.leanify(m0);
    m1 = LeanDiffPatch.leanify(m1);
    FCAGraph g1 = new FCAGraphImpl(new JenaModelGraph(m0, true));
    // FCAGraph g2 = new JenaModelGraph(m1, true);
    FCAGraph[] graphs = new FCAGraph[2];
    graphs[0] = getGraphFromResource("test4-m0.rdf");
    graphs[1] = getGraphFromResource("test4-m1.rdf");
    // GraphLeanifier.makeLean(graphs[0]);
View Full Code Here

      System.out.println("testing round " + i);
      Model model = ModelFactory.createDefaultModel();
      model.read(StoreTest.class.getResource("TestLeanError.rdf")
          .toString());

      FCAGraph unleanifiedGraph = new FCAGraphImpl(model);

      FCAGraph graph = new FCAGraphImpl(MoleculeBasedLeanifier
          .getLeanVersionOf(unleanifiedGraph));

      // FCAGraph graph = getGraphFromResource("test4-m0.rdf");
      if (previousGraph != null) {
        if (!graph.equals(previousGraph)) {
          System.out.println("Here we are!");
          System.out
              .println("Unleanified equals: "
                  + unleanifiedGraph
                      .equals(previousUnleanifiedGraph));
          System.out.println("current:" + graph.size());
          JenaUtil.getModelFromGraph(graph).write(System.out);
          System.out.println("previous:" + previousGraph.size());
          JenaUtil.getModelFromGraph(previousGraph).write(System.out);
          /*
           * PrintWriter pout = new PrintWriter(System.out); new
View Full Code Here

    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Model model = modelWithStatements("_a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/mbox 'm'; _a http://xmlns.com/foaf/0.1/mbox 'n'");
    Date date1 = dateFormat.parse("20050607");
    Date date2 = dateFormat.parse("20060912");
    FCAGraph graph = new FCAGraphImpl(model);
    Source source = new SourceImpl("http://example.org/graph-source");
    clock.setTime(date1);
    store.updateGraph(source, graph);
    clock.setTime(date2);
    store.updateGraph(source, graph);;
View Full Code Here

    Model model1 = modelWithStatements("_a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/mbox_sha1sum '49f9f8e38c3144e19e09c3e5fa10170242d1360f'");
    Model model2 = modelWithStatements("_a dc:subject 'hullo'; _a http://xmlns.com/foaf/0.1/mbox_sha1sum '49f9f8e38c3144e19e09c3e5fa10170242d1360f'");

    Date date1 = dateFormat.parse("20050607");
    Date date2 = dateFormat.parse("20060912");
    FCAGraph graph1 = new FCAGraphImpl(model1);
    FCAGraph graph2 = new FCAGraphImpl(model2);
    Source source = new SourceImpl("http://example.org/graph-source");
    clock.setTime(date1);
    store.updateGraph(source, graph1);
    store = reGetStoreImpl();
    source = new SourceImpl("http://example.org/graph-source");
View Full Code Here

    Model model1 = modelWithStatements("_a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/mbox \"foo\"; _a http://xmlns.com/foaf/0.1/mbox_sha1sum '49f9f8e38c3144e19e09c3e5fa10170242d1360f'");
    Model model2 = modelWithStatements("_a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/mbox_sha1sum '49f9f8e38c3144e19e09c3e5fa10170242d1360f'");

    Date date1 = dateFormat.parse("20050607");
    Date date2 = dateFormat.parse("20060912");
    FCAGraph graph1 = new FCAGraphImpl(model1);
    FCAGraph graph2 = new FCAGraphImpl(model2);
    Source source = new SourceImpl("http://example.org/graph-source");
    clock.setTime(date1);
    store.updateGraph(source, graph1);
    store = reGetStoreImpl();
    clock.setTime(date2);
View Full Code Here

    Model model2 = modelWithStatements("_a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/mbox_sha1sum '49f9f8e38c3144e19e09c3e5fa10170242d1360f'");

    Date date1 = dateFormat.parse("20050607");
    Date date1b = dateFormat.parse("20050608");
    Date date2 = dateFormat.parse("20060912");
    FCAGraph graph1 = new FCAGraphImpl(model1);
    FCAGraph graph1b = new FCAGraphImpl(model1b);
    FCAGraph graph2 = new FCAGraphImpl(model2);
    Source source = new SourceImpl("http://example.org/graph-source");
    clock.setTime(date1);
    store.updateGraph(source, graph1);
    clock.setTime(date1b);
    store.assertGraph(source, graph1b);
View Full Code Here

        public Date getTime() {
          return cannedVersionDate;
        }
       
      });
      store.updateGraph(defaultConfigSource, new FCAGraphImpl(
          cannedDefaultConfigModel));
      store.setClock(origClock);
    }

  }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.gvs.impl.FCAGraphImpl

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.