Example #1
0
 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);
 }
Example #2
0
        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);
        }