Package org.apache.clerezza.templating.seedsnipe.graphnodeadapter

Examples of org.apache.clerezza.templating.seedsnipe.graphnodeadapter.GraphNodeDataFieldResolver$ExpandedNode


    try {
      InputStreamReader in = new InputStreamReader(template.openStream(), "UTF-8");
      OutputStreamWriter out = new OutputStreamWriter(os, "UTF-8");

      new DefaultParser(in, out).perform(new GraphNodeDataFieldResolver(res,
          renderingFunctions));

      in.close();
      out.flush();
    } catch (UnsupportedEncodingException ex) {
View Full Code Here


    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#}${rdfs:comment}");
    StringWriter writer = new StringWriter();

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

    TripleCollection mGraph = new SimpleMGraph();
    NonLiteral subject = new UriRef("http://example.org/subject");
    UriRef object = new UriRef("http://example.org/object");
    mGraph.add(new TripleImpl(subject, RDFS.comment, object));
    GraphNode node = new GraphNode(object, mGraph);
    DataFieldResolver dataFieldResolver = new GraphNodeDataFieldResolver(node, simpleFunctions);

    StringReader reader = new StringReader("${ns:rdfs=http://www.w3.org/2000/01/rdf-schema#}${-rdfs:comment}");
    StringWriter writer = new StringWriter();

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

    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() {

      @Override
      public RenderingFunction<Object, String> getDefaultFunction() {
        return new RenderingFunction() {
View Full Code Here

  public void simpleUriRefRoot() throws IOException {
    TripleCollection mGraph = new SimpleMGraph();
    NonLiteral resource = new UriRef("http://example.org/");
    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#}${.}${rdfs:comment}");
    StringWriter writer = new StringWriter();

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

    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#}${noop(rdfs:comment)}");
    StringWriter writer = new StringWriter();

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

    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#}${uppercase(rdfs:comment)}");
    StringWriter writer = new StringWriter();

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

    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("${uppercase(\"a string\")}");
    StringWriter writer = new StringWriter();

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

    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#}${noop(uppercase(noop(rdfs:comment)))}");
    StringWriter writer = new StringWriter();

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

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

    StringReader reader = new StringReader("Multiple\n${ns:rdfs=http://www.w3.org/2000/01/rdf-schema#} ${loop}\t${rdfs:comment}\n${/loop}");
    StringWriter writer = new StringWriter();

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

TOP

Related Classes of org.apache.clerezza.templating.seedsnipe.graphnodeadapter.GraphNodeDataFieldResolver$ExpandedNode

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.