Graph property on INode in dotNetRDF gone in v3?

28 Views Asked by At

I am using the Graph property of INode/IUriNode... in my rdf-projects heavily. Since v3 this property seems to be gone?

How can I get the Graph the Node belongs to in dotNetRDF v3?

Before v3., I was using myUriNode.Graph to get the Graph the node belongs to.

Edit: Example for what I am using the Graph property for (this gives me all types ( rfd:type ?type):

public static IEnumerable<IUriNode> Types(this IUriNode uriNode)
{
  foreach (Triple t in uriNode.Graph.GetTriplesWithSubjectPredicate(uriNode, uriNode.Graph.CreateUriNode("rdf:type")))
    if (t.Object is IUriNode uriNodeType)
      worklist.Add(uriNodeType);
}

I'm actually using this construction (Graph.GetTriples..., Graph.CreateUriNode, ...) quiet often in my projects.

0

There are 0 best solutions below