Package org.apache.any23.extractor

## Interface ExtractorFactory<T extends Extractor<?>>

- Type Parameters:
    `T` - the type of the `Extractor` to be created by this factory.
  All Superinterfaces:
    `ExtractorDescription`
  All Known Implementing Classes:
    `AdrExtractorFactory`, `CSVExtractorFactory`, `EmbeddedJSONLDExtractorFactory`, `FunctionalSyntaxExtractorFactory`, `GeoExtractorFactory`, `HAdrExtractorFactory`, `HCalendarExtractorFactory`, `HCardExtractorFactory`, `HCardExtractorFactory`, `HeadLinkExtractorFactory`, `HEntryExtractorFactory`, `HEventExtractorFactory`, `HGeoExtractorFactory`, `HItemExtractorFactory`, `HListingExtractorFactory`, `HProductExtractorFactory`, `HRecipeExtractorFactory`, `HRecipeExtractorFactory`, `HResumeExtractorFactory`, `HResumeExtractorFactory`, `HReviewAggregateExtractorFactory`, `HReviewExtractorFactory`, `HTMLMetaExtractorFactory`, `ICalExtractorFactory`, `ICBMExtractorFactory`, `JCalExtractorFactory`, `JSONLDExtractorFactory`, `LicenseExtractorFactory`, `ManchesterSyntaxExtractorFactory`, `MicrodataExtractorFactory`, `NQuadsExtractorFactory`, `NTriplesExtractorFactory`, `RDFa11ExtractorFactory`, `RDFaExtractorFactory`, `RDFXMLExtractorFactory`, `SimpleExtractorFactory`, `SpeciesExtractorFactory`, `TitleExtractorFactory`, `TriXExtractorFactory`, `TurtleExtractorFactory`, `TurtleHTMLExtractorFactory`, `XCalExtractorFactory`, `XFNExtractorFactory`, `XPathExtractorFactory`, `YAMLExtractorFactory`

      public interface ExtractorFactory<T extends Extractor<?>>
      extends ExtractorDescription

  Interface defining a factory for `Extractor`.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `T` | `createExtractor()` | Creates an extractor instance.
    `String` | `getExampleInput()` | An example input file for the extractor, to be used in auto-generated documentation.
    `Collection<MIMEType>` | `getSupportedMIMETypes()` | Supports wildcards, e.g.

    - ### Methods inherited from interface org.apache.any23.extractor.ExtractorDescription

      `getExtractorLabel, getExtractorName, getPrefixes`

- - ### Method Detail

    - #### createExtractor

          T createExtractor()

      Creates an extractor instance.
      Returns:
        an instance of the extractor associated to this factory.

    - #### getSupportedMIMETypes

          Collection<MIMEType> getSupportedMIMETypes()

      Supports wildcards, e.g. `"*/*"` for blind extractors that merely call a web service.
      Returns:
        a `Collection` of supported mimetypes.

    - #### getExampleInput

          String getExampleInput()

      An example input file for the extractor, to be used in auto-generated documentation. For the `Extractor.BlindExtractor`, this is an arbitrary IRI. For extractors that require content, it is the name of a file, relative to the factory's class file's location, it will be opened using factory.getClass().getResourceAsStream(filename). The example should be a short file that produces characteristic output if sent through the extractor. The file will be read as UTF-8, so it should either use that encoding or avoid characters outside of the US-ASCII range.
      Returns:
        a string representing sample input for a particular extractor.