public HashSet <Triple> HandleTriplesBeforePersisting(HashSet <Triple> triples) { HashSet <Triple> resultTriples = new HashSet <Triple>(triples); foreach (Triple triple in triples) { ISubject subject = triple.Subject; if (subject.IsBlankNode()) { resultTriples.Add( new Triple( subject, ElephantVocabulary.HasInternalLabel, new Literal(subject.AsBlankNode().Identifier))); } } return(resultTriples); }