org.eclipse.rdf4j.rio.nquads

## Class NQuadsParser

- java.lang.Object
- - org.eclipse.rdf4j.rio.helpers.AbstractRDFParser
  - - org.eclipse.rdf4j.rio.ntriples.NTriplesParser
    - - org.eclipse.rdf4j.rio.nquads.NQuadsParser

- All Implemented Interfaces:
    RDFParser

      public class NQuadsParser
      extends NTriplesParser

  RDF parser implementation for the `N-Quads` RDF format, extending the Rio N-Triples parser. A specification of N-Quads can be found here. This parser is not thread-safe, therefore its public methods are synchronized.
  Author:
    Joshua Shinavier

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.rdf4j.rio.RDFParser

      `RDFParser.DatatypeHandling`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Resource` | `context`

    - ### Fields inherited from class org.eclipse.rdf4j.rio.ntriples.NTriplesParser

      `currentIndex, lineChars, lineNo, object, predicate, reader, subject`

    - ### Fields inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFParser

      `rdfHandler, valueFactory`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NQuadsParser()`
    `NQuadsParser(ValueFactory valueFactory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `RDFFormat` | `getRDFFormat()` Gets the RDF format that this parser can parse.
    `protected void` | `handleStatement(boolean ignoredAnError)`
    `protected void` | `parseContext()`
    `protected void` | `parseStatement()`

    - ### Methods inherited from class org.eclipse.rdf4j.rio.ntriples.NTriplesParser

      `assertLineTerminates, clear, createURI, getSupportedSettings, parse, parse, parseIRI, parseNode, parseObject, parsePredicate, parseSubject, reportError, reportError, reportFatalError, reportFatalError, reportWarning, shouldParseLine, skipWhitespace, throwEOFException`

    - ### Methods inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFParser

      `clearBNodeIDMap, createBNode, createBNode, createLiteral, createLiteral, createNode, createNode, createStatement, createStatement, datatypeHandling, getNamespace, getParseErrorListener, getParseLocationListener, getParserConfig, getRDFHandler, initializeNamespaceTableFromConfiguration, preserveBNodeIDs, reportError, reportError, reportError, reportFatalError, reportFatalError, reportFatalError, reportLocation, reportWarning, resolveURI, set, setBaseURI, setBaseURI, setDatatypeHandling, setNamespace, setParseErrorListener, setParseLocationListener, setParserConfig, setPreserveBNodeIDs, setRDFHandler, setStopAtFirstError, setValueFactory, setVerifyData, stopAtFirstError, verifyData`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.rdf4j.rio.RDFParser

      `parse, parse`

- - ### Field Detail

    - #### context

          protected Resource context

  - ### Constructor Detail

    - #### NQuadsParser

          public NQuadsParser()

    - #### NQuadsParser

          public NQuadsParser(ValueFactory valueFactory)

  - ### Method Detail

    - #### getRDFFormat

          public RDFFormat getRDFFormat()

      Description copied from interface: `RDFParser`
      Gets the RDF format that this parser can parse.
      Specified by:
        `getRDFFormat` in interface `RDFParser`
      Overrides:
        `getRDFFormat` in class `NTriplesParser`

    - #### parseStatement

          protected void parseStatement()
                                 throws RDFParseException,
                                        RDFHandlerException

      Overrides:
        `parseStatement` in class `NTriplesParser`
      Throws:
        `RDFParseException`
        `RDFHandlerException`

    - #### parseContext

          protected void parseContext()

    - #### handleStatement

          protected void handleStatement(boolean ignoredAnError)

      Overrides:
        `handleStatement` in class `NTriplesParser`

Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.