Package org.apache.clerezza.templating.seedsnipe.datastructure

Examples of org.apache.clerezza.templating.seedsnipe.datastructure.DataFieldResolver


      UriRef document = new UriRef("http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf");

      Assert.assertTrue((mGraph.size() > 0));

      GraphNode node = new GraphNode(document, mGraph);
      DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);

      String templateString =
          "FOAF: ${ns:rdfs=http://www.w3.org/2000/01/rdf-schema#}" +
          "${ns:foaf=http://xmlns.com/foaf/0.1/}" +
          "${foaf:maker/foaf:name}" +
View Full Code Here


      UriRef document = new UriRef("http://swordfish.rdfweb.org/people/libby/rdfweb/webwho.xrdf");

      Assert.assertTrue((mGraph.size() > 0));

      GraphNode node = new GraphNode(document, mGraph);
      DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);

      String templateString =
          "FOAF: ${ns:rdfs=http://www.w3.org/2000/01/rdf-schema#}" +
          "${ns:foaf=http://xmlns.com/foaf/0.1/}" +
          "${loop}" +
View Full Code Here

    List<Resource> list = new RdfList(listNode, mGraph);
    list.add(new PlainLiteralImpl("first"));
    list.add(new PlainLiteralImpl("second"));
    list.add(new PlainLiteralImpl("third"));
    GraphNode node = new GraphNode(resource, mGraph);
    DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
    StringReader reader = new StringReader(
        "${ns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#}" +
        "${loop}${loop}${rdf:value/contains}${/loop}${/loop}");
    StringWriter writer = new StringWriter();
View Full Code Here

    List<Resource> list = new RdfList(resource, mGraph);
    list.add(new PlainLiteralImpl("first"));
    list.add(new PlainLiteralImpl("second"));
    list.add(new PlainLiteralImpl("third"));
    GraphNode node = new GraphNode(resource, mGraph);
    DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
    StringReader reader = new StringReader(
        "${loop}${./contains}${/loop}");
    StringWriter writer = new StringWriter();

    new DefaultParser(reader, writer).perform(dataFieldResolver);
View Full Code Here

    List<Resource> list = new RdfList(resource, mGraph);
    list.add(createLabeledRes("first", mGraph));
    list.add(createLabeledRes("second", mGraph));
    list.add(createLabeledRes("third", mGraph));
    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#}" +
        "${loop}${loop}${contains/rdfs:label}${/loop}${/loop}");
    StringWriter writer = new StringWriter();
View Full Code Here

    List<Resource> list = new RdfList(resource, mGraph);
    list.add(createLabeledRes("first", mGraph));
    list.add(createLabeledRes("second", mGraph));
    list.add(createLabeledRes("third", mGraph));
    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#}" +
        "${loop}${if contains/rdfs:label}${contains/rdfs:label}${/if}${/loop}");
    StringWriter writer = new StringWriter();
View Full Code Here

  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#}" +
        "${if getAudio(\"foo/bar\") = \"audio\"}noproblem${/if}");
    StringWriter writer = new StringWriter();
View Full Code Here

    mGraph.add(new TripleImpl(resource, RDF.value, listNode2));
    RdfList.createEmptyList(listNode2, mGraph);

    GraphNode node = new GraphNode(resource, mGraph);

    DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);
    StringReader reader = new StringReader(
        "${ns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#}" +
        "${loop}${loop}${rdf:value/contains}${/loop}${/loop}");
    StringWriter writer = new StringWriter();
View Full Code Here

TOP

Related Classes of org.apache.clerezza.templating.seedsnipe.datastructure.DataFieldResolver

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.