Package org.apache.clerezza.rdf.core

Examples of org.apache.clerezza.rdf.core.BNode


      return;
    }
    if (getRoleByTitle(title) != null) {
      return;
    }
    BNode role = new BNode();
    LockableMGraph systemGraph = getSystemGraph();
    Lock writeLock = systemGraph.getLock().writeLock();
    writeLock.lock();
    try {
      systemGraph.add(new TripleImpl(role, RDF.type, PERMISSION.Role));
View Full Code Here


    }

    Lock writeLock = systemGraph.getLock().writeLock();
    writeLock.lock();
    try {
      BNode result = new BNode();
      systemGraph.add(new TripleImpl(result,
          PERMISSION.javaPermissionEntry, javaPermEntry));
      return result;
    } finally {
      writeLock.unlock();
View Full Code Here

      String storedName = getNameByEmail(email);
      if (storedName != null && !name.equals(storedName)) {
        throw new EmailAlreadyAssignedException(email, storedName);
      }
    }
    BNode user = new BNode();
    LockableMGraph systemGraph = getSystemGraph();
    Lock writeLock = systemGraph.getLock().writeLock();
    writeLock.lock();
    try {
      systemGraph.add(new TripleImpl(user, RDF.type, FOAF.Agent));
View Full Code Here

          });
      if (user != null) {
        Lock writeLock = contentGraph.getLock().writeLock();
        writeLock.lock();
        try {
          resultNode = new GraphNode(new BNode(), contentGraph);
        resultNode.addProperty(PLATFORM.userName,
            new PlainLiteralImpl(name));
        } finally {
          writeLock.unlock();
        }
View Full Code Here

    @Test
  public void listCreationAndAccess3() {
    TripleCollection tc = new SimpleMGraph();
    List<Resource> list = new RdfList(new UriRef("http://example.org/mytest"), tc);
    assertEquals(0, list.size());
        BNode node0 = new BNode() {};
        BNode node1 = new BNode() {};
        BNode node2 = new BNode() {};
    list.add(0,node2);
        list.add(0,node1);
        list.add(0,node0);
        assertEquals(node0, list.get(0));
        assertEquals(node1, list.get(1));
View Full Code Here

  @Test
  public void findContainingListNodesAndfindContainingListsTest() {
    TripleCollection tc = new SimpleMGraph();
    GraphNode listA = new GraphNode(new UriRef("http:///listA"), tc);
    GraphNode listB = new GraphNode(new UriRef("http:///listB"), tc);
    BNode element1 = new BNode();
    BNode element2 = new BNode();
    BNode element3 = new BNode();
    BNode element4 = new BNode();
    BNode element5 = new BNode();

    RdfList rdfListA = new RdfList(listA);
    rdfListA.add(element1);
    rdfListA.add(element2);
    rdfListA.add(element3);
View Full Code Here

  public GraphNode entry(@Context UriInfo uriInfo)
      throws IOException {
    AccessController.checkPermission(new LoggingManagerAccessPermission());
    TrailingSlash.enforcePresent(uriInfo);
    SimpleMGraph resultMGraph = new SimpleMGraph();
    GraphNode result = new GraphNode(new BNode(), resultMGraph);
    result.addPropertyValue(LOGGING.loggingConfig, getPropertiesAsString());
    result.addProperty(RDF.type, PLATFORM.HeadedPage);
    result.addProperty(RDF.type, LOGGING.LoggingConfigPage);
    return result;
  }
View Full Code Here

  };

  @Test
  public void simple() throws IOException {
    TripleCollection mGraph = new SimpleMGraph();
    NonLiteral resource = new BNode() {
    };
    mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
    GraphNode node = new GraphNode(resource, mGraph);
    DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
View Full Code Here

  }

  @Test
  public void defaultFunction() throws IOException {
    TripleCollection mGraph = new SimpleMGraph();
    NonLiteral resource = new BNode() {
    };
    mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
    GraphNode node = new GraphNode(resource, mGraph);
    DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, new RenderingFunctions() {
View Full Code Here

  }

  @Test
  public void simpleWithNoOp() throws IOException {
    TripleCollection mGraph = new SimpleMGraph();
    NonLiteral resource = new BNode() {
    };
    mGraph.add(new TripleImpl(resource, RDFS.comment, new PlainLiteralImpl("a resource")));
    GraphNode node = new GraphNode(resource, mGraph);
    DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.BNode

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.