static public INode PartToRdf(Part part, RdfRules triples) { if (part is Atom) { Atom atom = ((Atom)part); var rdf = atom.AsRDFNode(); if (rdf != null) { return(rdf); } Warn("Atom.AsValuedNode returned NULL" + part); } if (part is Variable) { var definations = triples.def; return(definations.CreateVariableNode(((Variable)part).vname)); } if (part is Term) { return(TermToRdf(part, triples)); } throw ErrorBadOp("ToRDF on " + part); }