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

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


    assertTrue(true); //made it till here
    Subject subject = loginContext.getSubject();
    Subject.doAsPrivileged(subject, new PrivilegedAction<Object>() {

      public Object run() {
        AccessController.checkPermission(new GVSImpersonatePermission(new SourceImpl(userSourceURL)));
        return null;
      }
     
    }, null);
    assertTrue(true); //made it till here
    final boolean[] exceptionCatched = new boolean[1];
    Subject.doAsPrivileged(subject, new PrivilegedAction<Object>() {
      public Object run() {
        try {
          AccessController.checkPermission(new GVSImpersonatePermission(new SourceImpl("http://topsecret/")));
        } catch (AccessControlException e) {
          exceptionCatched[0] = true;
        }
        return null;
      }
View Full Code Here


   */
  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

  }

  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

  }

  public void testUpdate() throws Exception {
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Source source = new SourceImpl("http://example.org/graph-source#");
    Model model0 = ModelFactory.createDefaultModel();
    model0.read(StoreTest.class.getResource("update-test0.rdf").toString());
    FCAGraph graph0 = new FCAGraphImpl(model0);
    clock.setTime(new Date());
    store.updateGraph(source, graph0);
    store = null;
    Thread.sleep(2);
    store = reGetStoreImpl();
    Model model1 = ModelFactory.createDefaultModel();
    model1.read(StoreTest.class.getResource("update-test1.rdf").toString());
    FCAGraph graph1 = new FCAGraphImpl(model1);
    clock.setTime(new Date());
    store.updateGraph(new SourceImpl("http://example.org/graph-source#"),
        graph1);
    FCAGraph graphR = store.getGraphOverTime(
        Collections.singleton((Source) new SourceImpl(
            "http://example.org/graph-source#"))).getGraph(
        new Date());
    assertEquals(graph1, graphR);
    store = reGetStoreImpl();
    graphR = store.getGraphOverTime(
        Collections.singleton((Source) new SourceImpl(
            "http://example.org/graph-source#"))).getGraph(
        new Date());
    assertEquals(graph1, graphR);
  }
View Full Code Here

  }

  public void testSources() {
    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

  }

  public void testTwoSingleSourceVersions() throws Exception {
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Source source = new SourceImpl("http://example.org/graph-source");
    FCAGraph[] graphs = new FCAGraph[2];

    // Model model1 = ModelFactory.createDefaultModel();
    // model1.createResource().addProperty(DC.subject, "test1");
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.