Examples of FCAGraphImpl


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

      // TODO at this level a graph should probably ignore ontology
      Graph currentGraph = JenaUtil.getGraphFromModel(ModelCreationUtil
          .createRandomModel(modelSize), true);
      currentGraph = MoleculeBasedLeanifier
          .getLeanVersionOf(currentGraph);
      graphs[i] = new FCAGraphImpl(currentGraph);
      dates[i] = date;
      date = new Date((long) (date.getTime() + (Math.random() * 100000)));

    }
    return new TimedGraphSequence(graphs, dates);
View Full Code Here

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

  private void initControl() {
    Model authenticationModel = createAuthenticationModel();
   
    Store store = new MemoryStoreImpl();
    Source authenticationSource = new SourceImpl("http://localhost/authentication-master#");
    store.assertGraph(authenticationSource, new FCAGraphImpl(authenticationModel));
   
    Model authorizationModel = createAuthorizationModel();
    Source authorizationSource = new SourceImpl("http://localhost/authorization-master#");
    store.assertGraph(authorizationSource, new FCAGraphImpl(authorizationModel));
   
    Set<Source> sources = new HashSet<Source>();
    sources.add(authenticationSource);
    sources.add(authorizationSource);
    GraphOverTime configGOT = store.getGraphOverTime(sources );
View Full Code Here

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

          try {
            Subject.doAsPrivileged(null, new PrivilegedExceptionAction() {
              public Object run() throws Exception {
                Source source = new SourceImpl("http://example.org/graph-source");
                try {
                  store.assertGraph(source, new FCAGraphImpl(new SimpleGraph()));
                } catch (AccessControlException ex) {
                  exceptionCatched[0] = true;
                }
                return null;
              }
View Full Code Here

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

                  ModelCreationUtil
                      .createRandomModel((int) (modelSize * 2 * Math
                          .random())), true);

          currentGraph = MoleculeBasedLeanifier.getLeanVersionOf(currentGraph);
          store.updateGraph(source, new FCAGraphImpl(currentGraph));
          if (Math.random() > 0.3) {
            try {
              Thread.sleep(10);
            } catch (InterruptedException e) {
              throw new RuntimeException(e);
View Full Code Here

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

    Source source = new SourceImpl("http://example.org/graph-source");
    Date date1 = dateFormat.parse("20050607");
    Date date2 = dateFormat.parse("20050608");
    Date date3 = dateFormat.parse("20060912");
    clock.setTime(date1);
    store.assertGraph(source, new FCAGraphImpl(model));
    clock.setTime(date2);
    store.perform(source, new StoreTransaction() {

      public void execute(SourceStoreView storeView) {
        storeView.revokeAll();
View Full Code Here

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

    DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Model model1 = modelWithStatements("_a dc:subject 'sub1'; _a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/knows http://example.org/");
    Model model2 = modelWithStatements("_b dc:subject 'sub2'; _b dc:subject 'hello'; _b http://xmlns.com/foaf/0.1/knows http://example.org/");
    final FCAGraph graph2 = new FCAGraphImpl(model2);
    Source source = new SourceImpl("http://example.org/graph-source");
    Date date1 = dateFormat.parse("20050607");
    Date date2 = dateFormat.parse("20050608");
    Date date3 = dateFormat.parse("20060912");
    clock.setTime(date1);
    store.assertGraph(source, new FCAGraphImpl(model1));
    store.assertGraph(source, graph2);
    clock.setTime(date2);
    store.perform(source, new StoreTransaction() {

      public void execute(SourceStoreView storeView) {
View Full Code Here

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

  public void testTransactions3() throws Exception {
    DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Model model1 = modelWithStatements("_a dc:subject 'sub1'; _a dc:subject 'hello'; _a http://xmlns.com/foaf/0.1/knows http://example.org/; _c dc:subject 'foo'");
    final FCAGraph graph1 = new FCAGraphImpl(model1);
    Model model2 = modelWithStatements("_b dc:subject 'sub2'; _b dc:subject 'hello'; _b http://xmlns.com/foaf/0.1/knows http://example.org/");
    final FCAGraph graph2 = new FCAGraphImpl(model2);
    Source source = new SourceImpl("http://example.org/graph-source");
    Date date1 = dateFormat.parse("20050607");
    Date date2 = dateFormat.parse("20050608");
    Date date3 = dateFormat.parse("20060912");
    clock.setTime(date1);
View Full Code Here

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

      ToyClock clock = new ToyClock();
      Store store = getStoreImpl(clock);
      Source source = new SourceImpl("http://example.org/graph-source");
      for (int i = 0; i < graphs.length; i++) {
        //TODO leanify based on dec
        graphs[i] = new FCAGraphImpl(MoleculeBasedLeanifier.getLeanVersionOf(graphs[i]));
      }
      TimedGraphSequence tgs = TimedGraphSequence
          .getSequenceWithRandomDates(graphs);
      for (int i = 0; i < tgs.getSize(); i++) {
        clock.setTime(tgs.getDate(i));
View Full Code Here

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

      }
    }
    model.read(fileURLString, lang);
    Graph graph = JenaUtil.getGraphFromModel(model, true);
    Source identity = arguments.getIdentity();
    store.updateGraph(identity, new FCAGraphImpl(graph))
  }
View Full Code Here

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

    boolean lastOneFailed; // note that we are looking for failing graphs
    Graph lastFailingGraph = graphs[position];
    // int roundCount = 0;
    for (Graph currentGraph = subGraphCreator.getFirstSubgraph(); currentGraph != null; currentGraph = subGraphCreator
        .getNewSubgraph(lastOneFailed)) {
      graphs[position] = new FCAGraphImpl(currentGraph);
      lastOneFailed = !getTestResult(graphs);
      if (lastOneFailed) {
        lastFailingGraph = currentGraph;
        System.out.println("Graph " + position + " reduced to "
            + lastFailingGraph.size());
        // if (roundCount++ % 100 ==0){
        // try {
        // JenaUtil.getModelFromGraph(currentGraph).write(new
        // FileWriter("g1-"+roundCount),"N-TRIPLES");
        // } catch (IOException e) {
        // throw new RuntimeException(e);
        // }
        // }
      }
    }
    graphs[position] = new FCAGraphImpl(lastFailingGraph);
  }
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.