Package org.apache.stanbol.commons.ldpath.clerezza

Examples of org.apache.stanbol.commons.ldpath.clerezza.ClerezzaBackend


   * @param out where the result is written to
   */
  public void render(GraphNode node, final String templatePath, Writer out) { 
    //A GraphNode backend could be graph unspecific, so the same engine could be
    //reused, possibly being signifantly more performant (caching, etc.)
    RDFBackend<Resource> backend = new ClerezzaBackend(node.getGraph());
    Resource context = node.getNode();
    TemplateEngine<Resource> engine = new TemplateEngine<Resource>(backend);
    engine.setTemplateLoader(templateLoader);
    try {
      engine.processFileTemplate(context, templatePath, null, out);
View Full Code Here


    }
   
    @Before
    public void initBackend(){
        if(backend == null){
            backend = new ClerezzaBackend(graph);
        }
        if(ldpath == null){
            Configuration<Resource> config = new Configuration<Resource>();
            config.addNamespace("dbp-prop", NS_DBP);
            config.addNamespace("dbp-ont", NS_DBO);
View Full Code Here

     * used for the 2nd purpose and does contain no information!
     * <li>
     */
    public static RDFBackend<Resource> getEmptyBackend(){
        if(EMPTY_BACKEND == null){
            EMPTY_BACKEND = new ClerezzaBackend(new SimpleMGraph());
        }
        return EMPTY_BACKEND;
    }
View Full Code Here

            TripleCollection[] tcs = new TripleCollection[included.size()+1];
            tcs[0] = ci.getMetadata();
            System.arraycopy(included.values().toArray(), 0, tcs, 1, included.size());
            graph = new UnionMGraph(tcs);
        }
        backend = new ClerezzaBackend(graph);
        this.ci = ci;
        this.readLock = ci.getLock().readLock();
    }
View Full Code Here

            TripleCollection[] tcs = new TripleCollection[included.size()+1];
            tcs[0] = ci.getMetadata();
            System.arraycopy(tcs, 1, included.values().toArray(), 0, included.size());
            graph = new UnionMGraph(tcs);
        }
        backend = new ClerezzaBackend(graph);
        this.ci = ci;
        this.readLock = ci.getLock().readLock();
    }
View Full Code Here

   * @param out where the result is written to
   */
  public void render(GraphNode node, final String templatePath, Writer out) { 
    //A GraphNode backend could be graph unspecific, so the same engine could be
    //reused, possibly being signifantly more performant (caching, etc.)
    RDFBackend<Resource> backend = new ClerezzaBackend(node.getGraph());
    Resource context = node.getNode();
    TemplateEngine<Resource> engine = new TemplateEngine<Resource>(backend);
    engine.setTemplateLoader(templateLoader);
    try {
      engine.processFileTemplate(context, templatePath, null, out);
View Full Code Here

            TripleCollection[] tcs = new TripleCollection[included.size()+1];
            tcs[0] = ci.getMetadata();
            System.arraycopy(tcs, 1, included.values().toArray(), 0, included.size());
            graph = new UnionMGraph(tcs);
        }
        backend = new ClerezzaBackend(graph);
        this.ci = ci;
        this.readLock = ci.getLock().readLock();
    }
View Full Code Here

            TripleCollection[] tcs = new TripleCollection[included.size()+1];
            tcs[0] = ci.getMetadata();
            System.arraycopy(tcs, 1, included.values().toArray(), 0, included.size());
            graph = new UnionMGraph(tcs);
        }
        backend = new ClerezzaBackend(graph);
        this.ci = ci;
        this.readLock = ci.getLock().readLock();
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.commons.ldpath.clerezza.ClerezzaBackend

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.