def toNT(self): quoted = '"' + nt_escape(self.value) + '"' if self.language: return quoted + '@' + self.language elif self.datatype: return quoted + '^^' + str(self.datatype) else: return quoted
def toNT(self): quoted = '"' + nt_escape(self.value) + '"' if self.language: return quoted + '@' + self.language elif self.datatype: return quoted + '^^' + self.datatype.toNT() else: return quoted
def toNT(self): return '<' + nt_escape(quote_normalized_iri(self.value)) + '>'