Package org.apache.clerezza.rdf.core

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


  }

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


  }

  @Test
  public void fieldTest() 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 fieldTest2() 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);
    /* without the final access to field it does not work,
View Full Code Here

  }

  @Test
  public void rdfListAsPropertyValue() throws IOException {
    TripleCollection mGraph = new SimpleMGraph();
    NonLiteral resource = new BNode() {
    };
    NonLiteral listNode = new BNode() {
    };
    mGraph.add(new TripleImpl(resource, RDF.value, listNode));
    List<Resource> list = new RdfList(listNode, mGraph);
    list.add(new PlainLiteralImpl("first"));
    list.add(new PlainLiteralImpl("second"));
View Full Code Here

  }

  @Test
  public void rdfListAsRoot() throws IOException {
    TripleCollection mGraph = new SimpleMGraph();
    NonLiteral resource = new BNode() {
    };
    List<Resource> list = new RdfList(resource, mGraph);
    list.add(new PlainLiteralImpl("first"));
    list.add(new PlainLiteralImpl("second"));
    list.add(new PlainLiteralImpl("third"));
View Full Code Here

  }

  @Test
  public void rdfListAsRootElementProperties() throws IOException {
    TripleCollection mGraph = new SimpleMGraph();
    NonLiteral resource = new BNode() {
    };
    List<Resource> list = new RdfList(resource, mGraph);
    list.add(createLabeledRes("first", mGraph));
    list.add(createLabeledRes("second", mGraph));
    list.add(createLabeledRes("third", mGraph));
View Full Code Here

  }

  @Test
  public void rdfListAsRootElementPropertiesWithPresenceTest() throws IOException {
    TripleCollection mGraph = new SimpleMGraph();
    NonLiteral resource = new BNode() {
    };
    List<Resource> list = new RdfList(resource, mGraph);
    list.add(createLabeledRes("first", mGraph));
    list.add(createLabeledRes("second", mGraph));
    list.add(createLabeledRes("third", mGraph));
View Full Code Here

  }

  @Test
  public void compareFunctionResultInIf() 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);

    StringReader reader = new StringReader("${ns:rdfs=http://www.w3.org/2000/01/rdf-schema#}" +
View Full Code Here

  }

  @Test
  public void loopWithEmptyList() throws IOException {
    TripleCollection mGraph = new SimpleMGraph();
    NonLiteral resource = new BNode() {
    };

    NonLiteral listNode1 = new BNode() {
    };
    mGraph.add(new TripleImpl(resource, RDF.value, listNode1));
    List<Resource> list1 = new RdfList(listNode1, mGraph);
    list1.add(new PlainLiteralImpl("first"));
    list1.add(new PlainLiteralImpl("second"));
    list1.add(new PlainLiteralImpl("third"));

    NonLiteral listNode2 = new BNode() {
    };
    mGraph.add(new TripleImpl(resource, RDF.value, listNode2));
    RdfList.createEmptyList(listNode2, mGraph);

    GraphNode node = new GraphNode(resource, mGraph);
View Full Code Here

        GLOBALMENU.path, null).next().getObject();
    return ((Literal) path).getLexicalForm();
  }

  private RdfList getChildren(TripleCollection graph, Resource res) {
    NonLiteral children = (NonLiteral) graph.filter((NonLiteral) res,
        GLOBALMENU.children, null).next().getObject();
    return new RdfList(children, graph);
  }
View Full Code Here

TOP

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

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.