Package org.apache.any23.extractor
Interface ExtractorRegistry
-
- All Known Implementing Classes:
ExtractorRegistryImpl
public interface ExtractorRegistry
An interface to the enable a registry for extractors to be implemented by different implementors of this API.- Author:
- Peter Ansell p_ansell@yahoo.com
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>
getAllNames()
Returns the names of all registered extractors, sorted alphabetically.ExtractorGroup
getExtractorGroup()
ExtractorGroup
getExtractorGroup(List<String> names)
Returns anExtractorGroup
containing theExtractorFactory
mathing the names provided as input.ExtractorFactory<?>
getFactory(String name)
Retrieves aExtractorFactory
given its nameboolean
isRegisteredName(String name)
void
register(ExtractorFactory<?> factory)
Registers anExtractorFactory
.void
unregister(String name)
-
-
-
Method Detail
-
register
void register(ExtractorFactory<?> factory)
Registers anExtractorFactory
.- Parameters:
factory
- anExtractorFactory
to register.- Throws:
IllegalArgumentException
- if trying to register aExtractorFactory
that already exists in the registry.
-
getFactory
ExtractorFactory<?> getFactory(String name)
Retrieves aExtractorFactory
given its name- Parameters:
name
- The name of the desired factory- Returns:
- The
ExtractorFactory
associated to the provided name - Throws:
IllegalArgumentException
- If there is not anExtractorFactory
associated to the provided name.
-
getExtractorGroup
ExtractorGroup getExtractorGroup()
- Returns:
- An
ExtractorGroup
with all the registeredExtractor
.
-
getExtractorGroup
ExtractorGroup getExtractorGroup(List<String> names)
Returns anExtractorGroup
containing theExtractorFactory
mathing the names provided as input.- Parameters:
names
- AList
containing the names of the desiredExtractorFactory
.- Returns:
- the extraction group.
-
isRegisteredName
boolean isRegisteredName(String name)
- Parameters:
name
- The name of theExtractorFactory
- Returns:
true
if is there aExtractorFactory
associated to the provided name.
-
getAllNames
List<String> getAllNames()
Returns the names of all registered extractors, sorted alphabetically.- Returns:
- an alphabetically sorted
List
-
unregister
void unregister(String name)
-
-