Package org.apache.any23.extractor
Interface ExtractorRegistry
-
- All Known Implementing Classes:
ExtractorRegistryImpl
public interface ExtractorRegistryAn 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.ExtractorGroupgetExtractorGroup()ExtractorGroupgetExtractorGroup(List<String> names)Returns anExtractorGroupcontaining theExtractorFactorymathing the names provided as input.ExtractorFactory<?>getFactory(String name)Retrieves aExtractorFactorygiven its namebooleanisRegisteredName(String name)voidregister(ExtractorFactory<?> factory)Registers anExtractorFactory.voidunregister(String name)
-
-
-
Method Detail
-
register
void register(ExtractorFactory<?> factory)
Registers anExtractorFactory.- Parameters:
factory- anExtractorFactoryto register.- Throws:
IllegalArgumentException- if trying to register aExtractorFactorythat already exists in the registry.
-
getFactory
ExtractorFactory<?> getFactory(String name)
Retrieves aExtractorFactorygiven its name- Parameters:
name- The name of the desired factory- Returns:
- The
ExtractorFactoryassociated to the provided name - Throws:
IllegalArgumentException- If there is not anExtractorFactoryassociated to the provided name.
-
getExtractorGroup
ExtractorGroup getExtractorGroup()
- Returns:
- An
ExtractorGroupwith all the registeredExtractor.
-
getExtractorGroup
ExtractorGroup getExtractorGroup(List<String> names)
Returns anExtractorGroupcontaining theExtractorFactorymathing the names provided as input.- Parameters:
names- AListcontaining the names of the desiredExtractorFactory.- Returns:
- the extraction group.
-
isRegisteredName
boolean isRegisteredName(String name)
- Parameters:
name- The name of theExtractorFactory- Returns:
trueif is there aExtractorFactoryassociated 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)
-
-