Exemplo n.º 1
0
        public override string ToString()
        {
            StringWriter  stringWriter = new StringWriter();
            NTripleWriter writer       = new NTripleWriter(stringWriter);

            Write(writer);
            return(stringWriter.ToString());
        }
Exemplo n.º 2
0
        public override string ToString()
        {
            StringWriter  output = new StringWriter();
            NTripleWriter writer = new NTripleWriter(output);

            Write(writer);
            return(output.ToString());
        }
Exemplo n.º 3
0
            public NTripleEnumerator(SimpleModel model)
            {
                itsIndex    = -1;
                itsNTriples = new ArrayList();

                StringWriter  received = new StringWriter();
                NTripleWriter writer   = new NTripleWriter(received);

                model.Write(writer);
                StringReader receivedReader = new StringReader(received.ToString());
                string       receivedLine   = receivedReader.ReadLine();

                while (receivedLine != null)
                {
                    string trimmed = receivedLine.Trim();
                    if (trimmed.Length > 0 && !trimmed.StartsWith("#"))
                    {
                        itsNTriples.Add(trimmed);
                    }
                    receivedLine = receivedReader.ReadLine();
                }
            }