Package org.apache.clerezza.rdf.jena.storage

Examples of org.apache.clerezza.rdf.jena.storage.JenaGraphAdaptor


            throw new IllegalArgumentException("The parsed Model MUST NOT be NULL");
        }
        this.model = model;
        this.readWrite = readWrite;
        if(!readWrite){ //construct an graph
            jenaAdapter = new JenaGraphAdaptor(model.getGraph()){
                /**
                 * Ensure that no in-memory copies are created for read only
                 * Jena Graphs
                 * @return
                 */
                @Override
                public Graph getGraph() {
                    return new SimpleGraph(this,true);
                }
            };
            graph = new PrivilegedGraphWrapper(jenaAdapter.getGraph());
        } else { //construct an MGraph
            jenaAdapter = new JenaGraphAdaptor(model.getGraph());
            this.graph =  new DatasetLockedMGraph(lock,
                new PrivilegedMGraphWrapper(jenaAdapter));
        }
    }
View Full Code Here


        final com.hp.hpl.jena.graph.Graph jenaGraph = model.getGraph();
        dir2JenaGraphMap.put(tcDir, jenaGraph);
        synchronized(dir2Dataset) {
            dir2Dataset.put(tcDir, dataset);
        }
        return new PrivilegedMGraphWrapper(new JenaGraphAdaptor(jenaGraph));
    }
View Full Code Here

      } catch (QueryExecException e) {
        try {
          return Boolean.valueOf(qexec.execAsk());
        } catch (QueryExecException e2) {
          try {
            return new JenaGraphAdaptor(qexec.execDescribe()
                .getGraph()).getGraph();
          } catch (QueryExecException e3) {
            return new JenaGraphAdaptor(qexec.execConstruct()
                .getGraph()).getGraph();
          }
        }
      }
    } finally {
View Full Code Here

    final com.hp.hpl.jena.graph.Graph jenaGraph = model.getGraph();
    dir2JenaGraphMap.put(tcDir, jenaGraph);
    synchronized(dir2Dataset) {
      dir2Dataset.put(tcDir, dataset);
    }
    return new PrivilegedMGraphWrapper(new JenaGraphAdaptor(jenaGraph));
  }
View Full Code Here

      } catch (QueryExecException e) {
        try {
          return Boolean.valueOf(qexec.execAsk());
        } catch (QueryExecException e2) {
          try {
            return new JenaGraphAdaptor(
                qexec.execDescribe().getGraph()).getGraph();
          } catch (QueryExecException e3) {
            return new JenaGraphAdaptor(
                qexec.execConstruct().getGraph()).getGraph();
          }
        }
      }
    } finally {
View Full Code Here

    try {
      if (query instanceof AskQuery) {
        return Boolean.valueOf(qexec.execAsk());
      } else if (query instanceof DescribeQuery) {
        return new JenaGraphAdaptor(qexec.execDescribe().getGraph())
            .getGraph();
      } else if (query instanceof ConstructQuery) {
        return new JenaGraphAdaptor(qexec.execConstruct().getGraph())
            .getGraph();
      } else {
        return new ResultSetWrapper(qexec.execSelect());
      }
    } finally {
View Full Code Here

      } catch (QueryExecException e) {
        try {
          return Boolean.valueOf(qexec.execAsk());
        } catch (QueryExecException e2) {
          try {
            return new JenaGraphAdaptor(qexec.execDescribe()
                .getGraph()).getGraph();
          } catch (QueryExecException e3) {
            return new JenaGraphAdaptor(qexec.execConstruct()
                .getGraph()).getGraph();
          }
        }
      }
    } finally {
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.jena.storage.JenaGraphAdaptor

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.