Class ParserFactory

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static String DEFAULT_MINE_TYPE
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final List<Parser> getParsers(String contentType, String url) Function returns an array of Parsers for a given content type.
      String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ParserFactory

        ParserFactory(List<Parser> availableParsers, ImmutableConfig conf)
      • ParserFactory

        ParserFactory(ParserConfig parserConfig, List<Parser> availableParsers, ImmutableConfig conf)
      • ParserFactory

        ParserFactory(Map<String, List<Parser>> parses, ImmutableConfig conf)
      • ParserFactory

        ParserFactory(ImmutableConfig conf)
    • Method Detail

      • getParsers

         final List<Parser> getParsers(String contentType, String url)

        Function returns an array of Parsers for a given content type.

        The function consults the internal list of parse plugins for the ParserFactory to determine the list of pluginIds, then gets the appropriate extension points to instantiate as Parsers.

        The function is thread safe

        Parameters:
        contentType - The contentType to return the Array of Parser's for.
        url - The url for the content that may allow us to get the type from the file suffix.
        Returns:

        An List of Parsers for the given contentType.