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

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


  }

  protected void performTestsWithGraphs(FCAGraph[] graphs) {
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Source source = new SourceImpl("http://example.org/graph-source");
    TimedGraphSequence tgs = TimedGraphSequence
        .getSequenceWithRandomDates(graphs);
    for (int i = 0; i < tgs.getSize(); i++) {
      clock.setTime(tgs.getDate(i));
      store.updateGraph(source, tgs.getGraph(i));
View Full Code Here


    while (sourceIter.hasNext()) {
      Resource aggregatedSource = sourceIter.nextResource();
      Date lastAggregation = getLastAggregationDate((Resource) aggregatedSource
          .inModel(logModel));
      if (lastAggregation == null) {
        result.add(new SourceImpl(aggregatedSource.getURI()));
      } else {
        int aggregationInterval = aggregatedSource.getProperty(
            AGGREGATOR.interval).getInt();
        Date aggregationDueDate = new Date(lastAggregation.getTime()
            + aggregationInterval * 1000);
        if (!aggregationDueDate.after(now)) {
          result.add(new SourceImpl(aggregatedSource.getURI()));
        }
      }
    }
    return result;
  }
View Full Code Here

    SliceResponse response = getSlice(remoteService, source, date);
    while (true) {
      date = response.getNextFollowing();
      response = getSlice(remoteService, source, date);
      toyClock.setTime(date);
      store.updateGraph(new SourceImpl(source), response.getGraph());
      if (response.getNextFollowing() == null) {
        return;
      }
    }
View Full Code Here

        return 8686;
      }

    };

    Source identity =new SourceImpl("http://example.org/tests/identity");
    Set<Source> trustedSources  = new HashSet<Source>();
    NamedNode configuration = new NamedNodeImpl("http://example.org/tests/identity");;
    WebServer webServer = GVSServerLauncher.launchGVSServer(store, serverBinding, identity ,
        trustedSources, configuration);
View Full Code Here

    };
    URL sourceURL = new URL("http://"
        + serverBinding.getInetAddress().getHostName() + ":"
        + serverBinding.getPort() + "/danbri");
    Source identity = new SourceImpl("http://example.org/tests/identity");
    Set<Source> trustedSources  = new HashSet<Source>();
    trustedSources.add(identity);
    NamedNode configuration = new NamedNodeImpl("http://example.org/tests/configuration#");
    Model authorizationModel = ModelFactory.createDefaultModel();
    Resource user = authorizationModel.createResource(FOAF.Agent);
View Full Code Here

    };
    URL sourceURL = new URL("http://"
        + serverBinding.getInetAddress().getHostName() + ":"
        + serverBinding.getPort() + "/danbri");
    Source identity = new SourceImpl("http://example.org/tests/identity");
    Set<Source> trustedSources  = new HashSet<Source>();
    trustedSources.add(identity);
    NamedNode configuration = new NamedNodeImpl("http://example.org/tests/configuration#");
    Model authorizationModel = ModelFactory.createDefaultModel();
    Resource user = authorizationModel.createResource(FOAF.Agent);
View Full Code Here

  public boolean performTest(FCAGraph[] graphs) {
    try {
      for (int k = 0; k < 10; k++) {
        ToyClock clock = new ToyClock();
        Store store = new MemoryStoreImpl(clock);
        Source source = new SourceImpl(
            "http://example.org/graph-source");
        for (int i = 0; i < graphs.length; i++) {
          //TODO leanify on dec
          graphs[i] = new FCAGraphImpl(MoleculeBasedLeanifier
              .getLeanVersionOf(graphs[i]));
View Full Code Here

      StmtIterator seeAlsoStmt = currentModel.listStatements(null, RDFS.seeAlso, (Resource)null);
      while(seeAlsoStmt.hasNext()) {
        Statement stmt = seeAlsoStmt.nextStatement();
        RDFNode object = stmt.getObject();
        try {
          Source seeAlsoSource = new SourceImpl(((Resource)object).getURI());
          if (trustedSources.contains(seeAlsoSource)) {
            continue;
          }
          if (!store.getSources().contains(seeAlsoSource)) {
            downloadSource(seeAlsoSource);
View Full Code Here

        log.info("Response code: "+connection.getResponseCode());
        if ((responseCode >= 300) && (responseCode < 400)) {
          String location = connection.getHeaderField(HeaderName.LOCATION.toString());
          if (location != null) {
            connection.disconnect();
            downloadSource(new SourceImpl(location));
          }
        }
       
        return;
      }
View Full Code Here

        model.read(file.toURL().toString());
      } catch (MalformedURLException e) {
        throw new RuntimeException(e);
      }
      FCAGraph graph = new FCAGraphImpl(model);
      assertions.add(new Assertion(new SourceImpl(sourceString), graph,
          date));
    }
    return assertions;
  }
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.