Examples of NamedNodeImpl


Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

    };

    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);

    Model model = ModelFactory.createDefaultModel();
    model.read(new File("testdata/danbri-20060920123618661.rdf").toURL()
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

        + 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);
    user.addProperty(ACCOUNTMANAGER.userName, "beta");
    user.addProperty(ACCOUNTMANAGER.passwordSha1, Util.sha1("tester"));
    user.addProperty(AUTHORIZATION.mayImpersonate, authorizationModel.createResource(sourceURL.toString()));
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

        + 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);
    user.addProperty(ACCOUNTMANAGER.userName, "beta");
    user.addProperty(ACCOUNTMANAGER.passwordSha1, Util.sha1("tester"));
    user.addProperty(AUTHORIZATION.mayImpersonate, authorizationModel.createResource(sourceURL.toString()));
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

    CannedDataReader.readCannedData(store, new File("testdata"),
        baseURLString);
    GraphOverTime got = store.getGraphOverTime(Collections
        .singleton((Source) new SourceImpl(baseURLString + "danbri")));
    //filter by a resource present only in the older version
    got = got.filter(Collections.singleton((GroundedNode)new NamedNodeImpl("mailto:danbri@porklips.org")));
    // one milli after last modification
    Iterator<Date> followingChanges = got.followingChanges(dateFormat
        .parse("19980920123600000"));
    assertFalse(followingChanges.hasNext());
    Iterator<Date> previousChanges = got.previousChanges(dateFormat
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

    EnhancedRequest ehRequest = new EnhancedRequest(request);
    String resourceURIString = ehRequest.getRequestURLWithoutParams()
        .toString();
    response.setDefaultStylesheet("/application/stylesheets/combined");
    Set<GroundedNode> resources = new HashSet<GroundedNode>();
    resources.add(new NamedNodeImpl(resourceURIString));
    FCAGraph completeGraph = trustedGOT.getGraph(moment);
    int lastResourcesCount = 0;
    FCAGraph graph = null;
    while (resources.size() > lastResourcesCount) {
      lastResourcesCount = resources.size();
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

        .createTypedLiteral(formFile.getContent()));
    infoBitResource.addProperty(RDF.type, DISCOBITS.InfoBit);
    store.perform(identity, new StoreTransaction() {

      public void execute(SourceStoreView storeView) {
        NamedNode locationNode = new NamedNodeImpl(locationString);
        FCAGraph origGraph = storeView.getGraph().filter(
            Collections.singleton((GroundedNode) locationNode));
        Model origModel = ModelFactory.createModelForGraph(origGraph);
        editableModel.add(origModel);
        Resource locationResource = editableModel
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

    if (resourceURIStrings != null) {

      final Set<GroundedNode> onlyForGroundedNodes = new HashSet<GroundedNode>(
          resourceURIStrings.length);
      for (String uriString : resourceURIStrings) {
        onlyForGroundedNodes.add(new NamedNodeImpl(uriString));
      }
      // response.setBody(reconstructGraph(filterableDecomposition,
      // onlyForGroundedNodes));
      store.perform(source, new StoreTransaction() {
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

    if (resourceURIStrings != null) {
      FCAGraph fcaGraph = got.getGraph(moment);
      Set<GroundedNode> onlyForGroundedNodes = new HashSet<GroundedNode>(
          resourceURIStrings.length);
      for (String uriString : resourceURIStrings) {
        onlyForGroundedNodes.add(new NamedNodeImpl(uriString));
      }
      response.setBody(fcaGraph.filter(onlyForGroundedNodes));
    } else {
      response.setBody(got.getGraph(moment));
    }
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

  public void testFilter() {
    Model model = ModelFactory.createDefaultModel();
    model.read(getClass().getResource("filter-test.n3").toString(),
        "N3");
    FCAGraph fcaGraph = new FCAGraphImpl(model);
    FCAGraph subGraph = fcaGraph.filter(Collections.singleton((GroundedNode)new NamedNodeImpl("mailto:test@example.org")));
    assertEquals(3, subGraph.size());
    FCAGraph subGraph2 = fcaGraph.filter(Collections.singleton((GroundedNode)new NamedNodeImpl("http://example.org/foo")));
    assertEquals(3, subGraph2.size());
    //ModelFactory.createModelForGraph(subGraph2).write(System.out);
  }
View Full Code Here

Examples of org.wymiwyg.rdf.graphs.impl.NamedNodeImpl

  /**
   * Test method for {@link com.hp.hpl.jena.gvs.impl.SimpleFilterableDecomposition#getContextualMolecules(java.util.Set)}.
   */
  public void testGetContextualMoleculesSetOfGroundedNode() {
    Set<GroundedNode> requiredGroundedNodes = new HashSet<GroundedNode>();
    requiredGroundedNodes.add(new NamedNodeImpl("http://example.org/b"));
    assertEquals(0, simpleFilterableDecomposition.getContextualMolecules(requiredGroundedNodes).size());
    GroundedNode groundedNode = simpleFilterableDecomposition.getFunctionallyGroundedNodes().iterator().next();
    requiredGroundedNodes.add(groundedNode);
    assertEquals(1, simpleFilterableDecomposition.getContextualMolecules(requiredGroundedNodes).size());

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.