Esempio n. 1
0
        public bool Remove(IEntityQuad entityTriple)
        {
            var entity = GetEntityId(entityTriple.EntityId);

            EntityQuads(entityTriple.EntityId).Remove(entityTriple.GetHashCode());
            EntityQuads(entity).Remove(entityTriple.GetHashCode());
            SubjectQuads(entityTriple.Subject).Remove(entityTriple.GetHashCode());
            SubjectPredicateQuads(entityTriple.Subject, entityTriple.Predicate).Remove(entityTriple);
            return(_quads.Remove(entityTriple.GetHashCode()));
        }
Esempio n. 2
0
        public void Add(IEntityQuad quad)
        {
            var entity = GetEntityId(quad.EntityId);

            _quads[quad.GetHashCode()] = quad;
            EntityQuads(entity)[quad.GetHashCode()]                   = quad;
            EntityQuads(quad.EntityId)[quad.GetHashCode()]            = quad;
            SubjectQuads(quad.Subject)[quad.GetHashCode()]            = quad;
            SubjectPredicateQuads(quad.Subject, quad.Predicate)[quad] = quad;
            ObjectIndex(quad.Object)[quad.EntityId.GetHashCode()]     = quad.EntityId;
        }
Esempio n. 3
0
 public bool Contains(IEntityQuad item)
 {
     return(_quads.ContainsKey(item.GetHashCode()));
 }