Package org.apache.any23.extractor
Class SimpleExtractorFactory<T extends Extractor<?>>
- java.lang.Object
-
- org.apache.any23.extractor.SimpleExtractorFactory<T>
-
- Type Parameters:
T- the type of theExtractorserved by this factory.
- All Implemented Interfaces:
ExtractorDescription,ExtractorFactory<T>
- Direct Known Subclasses:
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,SpeciesExtractorFactory,TitleExtractorFactory,TriXExtractorFactory,TurtleExtractorFactory,TurtleHTMLExtractorFactory,XCalExtractorFactory,XFNExtractorFactory,XPathExtractorFactory,YAMLExtractorFactory
public abstract class SimpleExtractorFactory<T extends Extractor<?>> extends Object implements ExtractorFactory<T>
This class is a simple and default-like implementation ofExtractorFactory.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSimpleExtractorFactory(String name, Prefixes prefixes)protectedSimpleExtractorFactory(String name, Prefixes prefixes, Collection<String> supportedMIMETypes, String exampleInput)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetExampleInput()An example input file for the extractor, to be used in auto-generated documentation.StringgetExtractorLabel()Returns the label for extractors created from this factory.StringgetExtractorName()Returns the name of the extractor.PrefixesgetPrefixes()An instance defining the prefixes supported by this extractor.Collection<MIMEType>getSupportedMIMETypes()Supports wildcards, e.g.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.any23.extractor.ExtractorFactory
createExtractor
-
-
-
-
Method Detail
-
getExtractorName
public String getExtractorName()
Description copied from interface:ExtractorDescriptionReturns the name of the extractor.- Specified by:
getExtractorNamein interfaceExtractorDescription- Returns:
- the name of the
Extractor
-
getExtractorLabel
public String getExtractorLabel()
Description copied from interface:ExtractorDescriptionReturns the label for extractors created from this factory.- Specified by:
getExtractorLabelin interfaceExtractorDescription- Returns:
- the label of the
Extractor
-
getPrefixes
public Prefixes getPrefixes()
Description copied from interface:ExtractorDescriptionAn instance defining the prefixes supported by this extractor.- Specified by:
getPrefixesin interfaceExtractorDescription- Returns:
- the handled
Prefixes
-
getSupportedMIMETypes
public Collection<MIMEType> getSupportedMIMETypes()
Description copied from interface:ExtractorFactorySupports wildcards, e.g."*/*"for blind extractors that merely call a web service.- Specified by:
getSupportedMIMETypesin interfaceExtractorFactory<T extends Extractor<?>>- Returns:
- the supported
MIMEType
-
getExampleInput
public String getExampleInput()
Description copied from interface:ExtractorFactoryAn example input file for the extractor, to be used in auto-generated documentation. For theExtractor.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.- Specified by:
getExampleInputin interfaceExtractorFactory<T extends Extractor<?>>- Returns:
- an input example
-
-