protected virtual void Initialise(IGraph g) { //First ensure all the correct namespace prefixes are set g.NamespaceMap.AddNamespace("rdf", new Uri(NamespaceMapper.RDF)); g.NamespaceMap.AddNamespace("rdfs", new Uri(NamespaceMapper.RDFS)); g.NamespaceMap.AddNamespace("owl", new Uri(NamespaceMapper.OWL)); g.NamespaceMap.AddNamespace("void", new Uri(VoIDNamespace)); g.NamespaceMap.AddNamespace("foaf", new Uri(FoafNamespace)); g.NamespaceMap.AddNamespace("dcterms", new Uri(DublinCoreTermsNamespace)); //Find Datasets foreach (Triple t in g.GetTriplesWithPredicateObject(g.CreateUriNode("rdf:type"), g.CreateUriNode("void:Dataset"))) { VoIDDataset dataset = new VoIDDataset(g, t.Subject); if (this._datasets.ContainsKey(t.Subject)) { throw new NotImplementedException("Merging VoID Datasets is not yet implemented"); } else { this._datasets.Add(t.Subject, dataset); } } //Find Linksets foreach (Triple t in g.GetTriplesWithPredicateObject(g.CreateUriNode("rdf:type"), g.CreateUriNode("void:Linkset"))) { VoIDLinkset linkset = new VoIDLinkset(g, t.Subject); if (this._linksets.ContainsKey(t.Subject)) { throw new NotImplementedException("Merging VoID Linksets is not yet implemented"); } else { this._linksets.Add(t.Subject, linkset); } } }