bool SelectableSource.Contains(Statement template) { foreach (IStatement statement in Graph.Select(Mapper.toKE(template.Subject), Mapper.toKE(template.Predicate), Mapper.toKE(template.Object))) { return(true); } return(false); }
public ICollection <IStatement> Import(Store store) { cleanupBNodes(store); KEMapper mapper = new KEMapper(this); ICollection <IStatement> statements = new List <IStatement>(); foreach (SemWeb.Statement statement in store.Select(SemWeb.SelectFilter.All)) { statements.Add(mapper.toKE(statement)); } Graph.BeginUpdate(); Graph.Add(statements); Graph.EndUpdate(); return(statements); }