Example #1
0
 /**
  * @param mGraph
  * @return
  */
 protected static Graph getHiddenTriples(Model m) {
   Graph mGraph = m.getGraph();
   final Reifier r = mGraph.getReifier();
   return new GraphBase() {
     public ExtendedIterator graphBaseFind(TripleMatch m) {
       return r.findEither(m, true);
     }
   };
 }
 /**
  * Answer a version of the model, but with all its reifiying statements added.
  *
  * @param m a model that may have reified statements
  * @return a new model, the union of m and the reification statements of m
  */
 public static Model withHiddenStatements(Model m) {
   Graph mGraph = m.getGraph();
   Graph hiddenTriples = getHiddenTriples(m);
   return new ModelCom(new DisjointUnion(mGraph, hiddenTriples));
 }