Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.any23.extractor
Class ExtractorRegistry

    java.lang.Object
      org.apache.any23.extractor.ExtractorRegistry

    public class ExtractorRegistry

extends Object

Singleton class acting as a register for all the various `Extractor`.

Constructor Summary
`ExtractorRegistry()`

Method Summary
`List<String>` | `getAllNames()` Returns the names of all registered extractors, sorted alphabetically.
`ExtractorGroup` | `getExtractorGroup()`
`ExtractorGroup` | `getExtractorGroup(List<String> names)` Returns an `ExtractorGroup` containing the `ExtractorFactory` mathing the names provided as input.
`ExtractorFactory<?>` | `getFactory(String name)` Retrieves a `ExtractorFactory` given its name
`static ExtractorRegistry` | `getInstance()`
`boolean` | `isRegisteredName(String name)`
`void` | `register(ExtractorFactory<?> factory)` Registers an `ExtractorFactory`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExtractorRegistry

    public ExtractorRegistry()

Method Detail

### getInstance

    public static ExtractorRegistry getInstance()

  Returns:
    returns the `ExtractorRegistry` instance.

### register

    public void register(ExtractorFactory<?> factory)

  Registers an `ExtractorFactory`.

  Parameters:
    `factory` -
  Throws:
    `IllegalArgumentException` - if trying to register a `ExtractorFactory` with a that already exists in the registry.

### getFactory

    public ExtractorFactory<?> getFactory(String name)

  Retrieves a `ExtractorFactory` given its name

  Parameters:
    `name` - of the desired factory
  Returns:
    the `ExtractorFactory` associated to the provided name
  Throws:
    `IllegalArgumentException` - if there is not a `ExtractorFactory` associated to the provided name.

### getExtractorGroup

    public ExtractorGroup getExtractorGroup()

  Returns:
    an `ExtractorGroup` with all the registered `Extractor`.

### getExtractorGroup

    public ExtractorGroup getExtractorGroup(List<String> names)

  Returns an `ExtractorGroup` containing the `ExtractorFactory` mathing the names provided as input.

  Parameters:
    `names` - a `List` containing the names of the desired `ExtractorFactory`.
  Returns:
    the extraction group.

### isRegisteredName

    public boolean isRegisteredName(String name)

  Parameters:
    `name` - of the `ExtractorFactory`
  Returns:
    `true` if is there a `ExtractorFactory` associated to the provided name.

### getAllNames

    public List<String> getAllNames()

  Returns the names of all registered extractors, sorted alphabetically.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.