Class NTriplesParser

  • All Implemented Interfaces:
    RDFParser
    Direct Known Subclasses:
    NQuadsParser

    public class NTriplesParser
    extends AbstractRDFParser
    RDF parser for N-Triples files. A specification of NTriples can be found in this section of the RDF Test Cases document. This parser is not thread-safe, therefore its public methods are synchronized.
    • Field Detail

      • reader

        protected java.io.BufferedReader reader
      • lineChars

        protected char[] lineChars
      • currentIndex

        protected int currentIndex
      • lineNo

        protected long lineNo
      • predicate

        protected IRI predicate
      • object

        protected Value object
    • Constructor Detail

      • NTriplesParser

        public NTriplesParser()
        Creates a new NTriplesParser that will use a SimpleValueFactory to create object for resources, bNodes and literals.
      • NTriplesParser

        public NTriplesParser​(ValueFactory valueFactory)
        Creates a new NTriplesParser that will use the supplied ValueFactory to create RDF model objects.
        Parameters:
        valueFactory - A ValueFactory.