예제 #1
0
 public bool retainAll(java.util.Collection c)
 {
     JavaIteratorWrapper<dotSesame.Statement> stmtIter = new JavaIteratorWrapper<org.openrdf.model.Statement>(c.iterator());
     HashSet<Triple> retained = new HashSet<Triple>();
     bool changed = false;
     foreach (dotSesame.Statement stmt in stmtIter)
     {
         retained.Add(SesameConverter.FromSesame(stmt, this._mapping));
     }
     foreach (Triple t in this._g.Triples.ToList())
     {
         if (!retained.Contains(t))
         {
             changed = true;
             this._g.Retract(t);
         }
     }
     return changed;
 }