Package org.apache.any23.extractor.rdf

## Class JSONLDExtractor

- java.lang.Object
- - org.apache.any23.extractor.rdf.BaseRDFExtractor
  - - org.apache.any23.extractor.rdf.JSONLDExtractor

- All Implemented Interfaces:
    `Extractor<InputStream>`, `Extractor.ContentExtractor`

      public class JSONLDExtractor
      extends BaseRDFExtractor

  Concrete implementation of `Extractor.ContentExtractor` handling JSON-LD format.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.any23.extractor.Extractor

      `Extractor.BlindExtractor, Extractor.ContentExtractor, Extractor.TagSoupDOMExtractor`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `JSONLDExtractor()` |
    `JSONLDExtractor​(boolean verifyDataType, boolean stopAtFirstError)` | Deprecated. since 2.4.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ExtractorDescription` | `getDescription()` | Returns a `ExtractorDescription` of this extractor.
    `protected org.eclipse.rdf4j.rio.RDFParser` | `getParser​(ExtractionContext extractionContext, ExtractionResult extractionResult)` | Deprecated. since 2.4.
    `void` | `run​(ExtractionParameters extractionParameters, ExtractionContext extractionContext, InputStream in, ExtractionResult extractionResult)` | Executes the extractor.
    `void` | `setStopAtFirstError​(boolean stopAtFirstError)` | Deprecated. since 2.4.
    `void` | `setVerifyDataType​(boolean verifyDataType)` | Deprecated. since 2.4.

    - ### Methods inherited from class org.apache.any23.extractor.rdf.BaseRDFExtractor

      `isStopAtFirstError, isVerifyDataType`

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

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

- - ### Constructor Detail

    - #### JSONLDExtractor

          @Deprecated
          public JSONLDExtractor​(boolean verifyDataType,
                                 boolean stopAtFirstError)

      Deprecated.
      since 2.4. This extractor has never supported these settings. Use `JSONLDExtractor()` instead.
      Parameters:
        `verifyDataType` - has no effect
        `stopAtFirstError` - has no effect

    - #### JSONLDExtractor

          public JSONLDExtractor()

  - ### Method Detail

    - #### getDescription

          public ExtractorDescription getDescription()

      Description copied from interface: `Extractor`
      Returns a `ExtractorDescription` of this extractor.
      Returns:
        the object representing the extractor description.

    - #### run

          public void run​(ExtractionParameters extractionParameters,
                          ExtractionContext extractionContext,
                          InputStream in,
                          ExtractionResult extractionResult)
                   throws IOException,
                          ExtractionException

      Description copied from interface: `Extractor`
      Executes the extractor. Will be invoked only once, extractors are not reusable.
      Specified by:
        `run` in interface `Extractor<InputStream>`
      Overrides:
        `run` in class `BaseRDFExtractor`
      Parameters:
        `extractionParameters` - the parameters to be applied during the extraction.
        `extractionContext` - The document context.
        `in` - The extractor input data.
        `extractionResult` - the collector for the extracted data.
      Throws:
        `IOException` - On error while reading from the input stream.
        `ExtractionException` - On other error, such as parse errors.

    - #### setStopAtFirstError

          @Deprecated
          public void setStopAtFirstError​(boolean stopAtFirstError)

      Deprecated.
      since 2.4. This extractor has never supported this setting. Do not use.
      Description copied from interface: `Extractor.ContentExtractor`
      If `true`, the extractor will stop at first parsing error, if`false` the extractor will attempt to ignore all parsing errors.
      Specified by:
        `setStopAtFirstError` in interface `Extractor.ContentExtractor`
      Overrides:
        `setStopAtFirstError` in class `BaseRDFExtractor`
      Parameters:
        `stopAtFirstError` - has no effect

    - #### setVerifyDataType

          @Deprecated
          public void setVerifyDataType​(boolean verifyDataType)

      Deprecated.
      since 2.4. This extractor has never supported this setting. Do not use.
      Overrides:
        `setVerifyDataType` in class `BaseRDFExtractor`
      Parameters:
        `verifyDataType` - has no effect

    - #### getParser

          @Deprecated
          protected org.eclipse.rdf4j.rio.RDFParser getParser​(ExtractionContext extractionContext,
                                                              ExtractionResult extractionResult)

      Deprecated.
      since 2.4. This extractor no longer wraps an RDF4J `RDFParser`. Do not use this method.
      Specified by:
        `getParser` in class `BaseRDFExtractor`
      Parameters:
        `extractionContext` - the extraction context
        `extractionResult` - the extraction result
      Returns:
        a `RDFParser`