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

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


    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));
View Full Code Here


    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);
    store.assertGraph(source, graph1);
View Full Code Here

    for (int k = 0; k < 2; k++) {
    JenaParameters.disableBNodeUIDGeneration = true;
    try {
      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
View Full Code Here

        }
        Resource userRes = getUserResource(principal.getUserName());
        if (userRes.hasProperty(RDF.type, AUTHORIZATION.ClockMaster));
        StmtIterator impersonateStmt = userRes.listProperties(AUTHORIZATION.mayImpersonate);
        while (impersonateStmt.hasNext()) {
          result.add(new GVSImpersonatePermission(new SourceImpl(impersonateStmt.nextStatement().getResource().toString())));
        }
      }
     
    //}
    return result;
View Full Code Here

  private static void singleRound(int round) {
    System.out.println("round nr: " + round);
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl();
    store.setClock(clock);
    Source source = new SourceImpl("http://example.org/graph-source");
    TimedGraphSequence testData = TimedGraphSequence.getRandomSequence(4,
        315);// + 300);//(round / 5));
    try {
      System.out.println("writing current-case.txt");
      FileOutputStream currentCaseOut = new FileOutputStream(
View Full Code Here

    File directory = new File("testdata");
    String baseURLString = "http://"
        + serverBinding.getInetAddress().getHostName() + ":"
        + serverBinding.getPort() + "/";
    CannedDataReader.readCannedData(store, directory, baseURLString);
    Source source = new SourceImpl("http://example.org/graph-source");
    NamedNode config = new NamedNodeImpl("http://example.org/config#");
    WebServer webServer = GVSServerLauncher.launchGVSServer(store, serverBinding, null, Collections.singleton(source), config);
    URL serverURL = new URL("http://"+serverBinding.getInetAddress().getHostAddress()+":"+serverBinding.getPort()+"/application/test-dir/test-data");
    InputStream remoteStream = serverURL.openStream();
    InputStream resourceStream = ApplicationServerHandler.class.getResourceAsStream("/META-INF/web/application/test-dir/test-data.txt");
View Full Code Here

   */
  private static void action(SortedSet<Assertion> assertions) {
    Store store = new MemoryStoreImpl();
    CannedDataReader.addToStrore(store, assertions);
    GraphOverTime got = store.getGraphOverTime(Collections
        .singleton((Source) new SourceImpl(baseURLString + "danbri")));
    got.getGraph(new Date());
  }
View Full Code Here

      throw new RuntimeException(e);
    } catch (IllegalAccessException e) {
      throw new RuntimeException(e);
    }
    Set<Source> trustedSources = getTrustedSources(serviceResource);
    Source identity = new SourceImpl(serviceResource.getRequiredProperty(SERVICES.identity).getResource().getURI());
    trustedSources.add(identity); //trust yourself
    NamedNode configuration = new NamedNodeImpl(serviceResource.getRequiredProperty(SERVICES.configuration).getResource().getURI());
    final Service service  = serviceFactory.getService(store, identity, trustedSources, configuration);
    new Thread() {
      public void run() {
View Full Code Here

  private Set<Source> getTrustedSources(Resource serviceResource) {
    Set<Source> result = new HashSet<Source>();
    StmtIterator trustProrpertyStmts = serviceResource.listProperties(SERVICES.trustedSource);
    while (trustProrpertyStmts.hasNext()) {
      Statement propertyStmt = trustProrpertyStmts.nextStatement();
      result.add(new SourceImpl(propertyStmt.getResource().getURI()));
    }
    return result;
  }
View Full Code Here

    // resultBuffer.append('#');
    String result = resultBuffer.toString();
    Model creationModel = ModelFactory.createDefaultModel();
    creationModel.createResource(result).addProperty(RDFS.comment,
        "login Link sent at " + new Date());
    store.assertGraph(new SourceImpl(result), new FCAGraphImpl(
        creationModel));
    return result;
  }
View Full Code Here

TOP

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

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.