public void roundTripWriteSingleBUBTripleWithSameNodeId() { RdfXmlWriterTestHarness harness = new RdfXmlWriterTestHarness(); harness.expect("_:genid1 <http://example.com/pred> _:genid1 ."); RdfWriter rdfWriter = harness.getRdfWriter(); rdfWriter.StartOutput(); rdfWriter.StartSubject(); rdfWriter.WriteBlankNode("foo"); rdfWriter.StartPredicate(); rdfWriter.WriteUriRef("http://example.com/pred"); rdfWriter.StartObject(); rdfWriter.WriteBlankNode("foo"); rdfWriter.EndObject(); rdfWriter.EndPredicate(); rdfWriter.EndSubject(); rdfWriter.EndOutput(); Assert.IsTrue(harness.verify()); }
public void writeSingleUUBTriple(RdfWriter rdfWriter) { rdfWriter.StartOutput(); rdfWriter.StartSubject(); rdfWriter.WriteUriRef("http://example.com/subj"); rdfWriter.StartPredicate(); rdfWriter.WriteUriRef("http://example.com/pred"); rdfWriter.StartObject(); rdfWriter.WriteBlankNode("jazz"); rdfWriter.EndObject(); rdfWriter.EndPredicate(); rdfWriter.EndSubject(); rdfWriter.EndOutput(); }
/// <summary>Writes a representation of this BlankNode to the supplied RdfWriter.</summary> /// <remarks></remarks> public virtual void Write(RdfWriter writer) { writer.WriteBlankNode("spiral" + GetHashCode()); }