Package com.hp.hpl.jena.gvs

Examples of com.hp.hpl.jena.gvs.Source


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


    Subject subject = new Subject();
    System.setSecurityManager(new SecurityManager());
    try {
      Subject.doAsPrivileged(subject, new PrivilegedExceptionAction() {
        public Object run() throws Exception {
          Source source = new SourceImpl("http://example.org/graph-source");
          Subject subject2 = new Subject();
          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;
                }
View Full Code Here

    new Thread() {

      @Override
      public void run() {
        Source source = new SourceImpl("http://test-source/"
            + threadNumber);
        for (int i = 0; i < iterations; i++) {
          try {
            Thread.sleep(2);
          } catch (InterruptedException e1) {
View Full Code Here

          break;
        }
      }
      Resource assertionSource = assertion.getProperty(
          METAMODEL.asserter).getResource();
      Source source = new SourceImpl(assertionSource.getURI());
      NamedNode component = new NamedNodeImpl(assertedComponent.getURI());
      componentTypeMap.put(component, type);
      SourceComponent sourceComponent = new SourceComponent(source, component);
      {
        //adding assertion
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

  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

        lang = "N3";
      }
    }
    model.read(fileURLString, lang);
    Graph graph = JenaUtil.getGraphFromModel(model, true);
    Source identity = arguments.getIdentity();
    store.updateGraph(identity, new FCAGraphImpl(graph))
  }
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

  }

  public void testSingleSourceVersions() {
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Source source = new SourceImpl("http://example.org/graph-source");

    // graphs representing the state of a changing graph in chronological
    // order
    TimedGraphSequence testData = TimedGraphSequence.getRandomSequence(12,
        100);
View Full Code Here

  }

  public void testTwoSourcesVersions() {
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Source source0 = new SourceImpl("http://example.org/graph-source0");
    Source source1 = new SourceImpl("http://example.org/graph-source1");
    // graphs representing the state of a changing graph in chronological
    // order
    TimedGraphSequence testData0 = TimedGraphSequence.getRandomSequence(12,
        100);
    for (int i = 0; i < testData0.getSize(); i++) {
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.gvs.Source

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.