public void HandleTriple(Triple t) { var key = t.Subject; if (_currentKey == null) { _currentKey = key; _currentCollection = new List <Triple> { t }; } else { if (_currentKey.Equals(key)) { _currentCollection.Add(t); } else { if (_currentCollection.Count > 0) { _tripleCollectionHandler.HandleTripleCollection(_currentCollection); } _currentKey = key; _currentCollection = new List <Triple> { t }; } } }
public void EnumerateObjects(ITripleCollectionHandler handler) { foreach (var o in _triplesByObject.Keys) { handler.HandleTripleCollection(_triplesByObject[o]); } }
public void EnumerateSubjects(ITripleCollectionHandler handler) { foreach (var s in _triplesBySubject.Keys) { handler.HandleTripleCollection(_triplesBySubject[s]); } }
public void Flush() { foreach (var k in _tripleCollections.Keys) { _collectionHandler.HandleTripleCollection(_tripleCollections[k]); } _tripleCollections.Clear(); }