Package com.stardog.stark.io

# Interface RDFParser

All Known Implementing Classes:
  `BinaryRDFParser`, `JSONLDParser`, `N3Parser`, `NQuadsParser`, `NTParser`, `RDFJSONParser`, `RDFXMLParser`, `SPARQLUpdateDataBlockParser`, `TrigParser`, `TrigParserWithRules`, `TurtleParser`

@ThreadSafe public interface RDFParser

An RDF Parser.

Since:
  1.0
Version:
  1.0
Author:
  Michael Grove
See Also:
  - `RDFParsers`
Implementation Requirements:
  Implementations of this interface should include a zero argument constructor so that they can be created by the `ServiceLoader`. They are also expected to be *stateless*. All state should be maintained in a `context` object which won't outlive the `parse(InputStream, RDFHandler)` call.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `RDFFormat`
  `format()`
  The format this parser can parse
  `default void`
  `parse(InputStream theStream, RDFHandler theHandler)`
  Parse the content using the `default options`.
  `void`
  `parse(InputStream theStream, RDFHandler theHandler, Options theOptions)`
  Parse the content

- ## Method Details

  - ### format

    @Nonnull RDFFormat format()
    The format this parser can parse
    Returns:
      the format

  - ### parse

    default void parse(@Nonnull InputStream theStream, @Nonnull RDFHandler theHandler) throws IOException
    Parse the content using the `default options`.
    Parameters:
      `theStream` - the stream to read from
      `theHandler` - the handler to pass parse events to
    Throws:
      `RDFHandlerException` - if there was an error while handling the statement
      `IOException` - if there was an error while reading from the stream

  - ### parse

    void parse(@Nonnull InputStream theStream, @Nonnull RDFHandler theHandler, @Nonnull Options theOptions) throws IOException
    Parse the content
    Parameters:
      `theStream` - the stream to read from
      `theHandler` - the handler to pass parse events to
      `theOptions` - the parsing options
    Throws:
      `RDFHandlerException` - if there was an error while handling the statement
      `IOException` - if there was an error while reading from the stream