public bool Add(Statement s) { if (domran == 1 && !(s.Object is Entity)) { return(true); } ResSet rs = (ResSet)table[s.Predicate]; if (rs == null) { return(true); } foreach (Entity e in RDFS.GetClosure(rs, superclasses, true)) { Statement s1 = new Statement( domran == 0 ? s.Subject : (Entity)s.Object, type, e, s.Meta); if (!sink.Add(s1)) { return(false); } } return(true); }
public bool Add(Statement s) { foreach (Entity e in RDFS.GetClosure(new Resource[] { s.Object }, table, true)) { if (!sink.Add(new Statement(s.Subject, s.Predicate, e, s.Meta))) { return(false); } } return(true); }