Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
 /// <summary>Writes a representation of this BlankNode to the supplied RdfWriter.</summary>
 /// <remarks></remarks>
 public virtual void Write(RdfWriter writer)
 {
     writer.WriteBlankNode("spiral" + GetHashCode());
 }