Package org.apache.any23.extractor.rdf
Class JSONLDExtractor
- java.lang.Object
-
- org.apache.any23.extractor.rdf.BaseRDFExtractor
-
- org.apache.any23.extractor.rdf.JSONLDExtractor
-
- All Implemented Interfaces:
Extractor<InputStream>
,Extractor.ContentExtractor
public class JSONLDExtractor extends BaseRDFExtractor
Concrete implementation ofExtractor.ContentExtractor
handling JSON-LD format.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.any23.extractor.Extractor
Extractor.BlindExtractor, Extractor.ContentExtractor, Extractor.TagSoupDOMExtractor
-
-
Constructor Summary
Constructors Constructor Description JSONLDExtractor()
JSONLDExtractor(boolean verifyDataType, boolean stopAtFirstError)
Deprecated.since 2.4.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ExtractorDescription
getDescription()
Returns aExtractorDescription
of this extractor.protected org.eclipse.rdf4j.rio.RDFParser
getParser(ExtractionContext extractionContext, ExtractionResult extractionResult)
Deprecated.since 2.4.void
run(ExtractionParameters extractionParameters, ExtractionContext extractionContext, InputStream in, ExtractionResult extractionResult)
Executes the extractor.void
setStopAtFirstError(boolean stopAtFirstError)
Deprecated.since 2.4.void
setVerifyDataType(boolean verifyDataType)
Deprecated.since 2.4.-
Methods inherited from class org.apache.any23.extractor.rdf.BaseRDFExtractor
isStopAtFirstError, isVerifyDataType
-
-
-
-
Constructor Detail
-
JSONLDExtractor
@Deprecated public JSONLDExtractor(boolean verifyDataType, boolean stopAtFirstError)
Deprecated.since 2.4. This extractor has never supported these settings. UseJSONLDExtractor()
instead.- Parameters:
verifyDataType
- has no effectstopAtFirstError
- has no effect
-
JSONLDExtractor
public JSONLDExtractor()
-
-
Method Detail
-
getDescription
public ExtractorDescription getDescription()
Description copied from interface:Extractor
Returns aExtractorDescription
of this extractor.- Returns:
- the object representing the extractor description.
-
run
public void run(ExtractionParameters extractionParameters, ExtractionContext extractionContext, InputStream in, ExtractionResult extractionResult) throws IOException, ExtractionException
Description copied from interface:Extractor
Executes the extractor. Will be invoked only once, extractors are not reusable.- Specified by:
run
in interfaceExtractor<InputStream>
- Overrides:
run
in classBaseRDFExtractor
- Parameters:
extractionParameters
- the parameters to be applied during the extraction.extractionContext
- The document context.in
- The extractor input data.extractionResult
- the collector for the extracted data.- Throws:
IOException
- On error while reading from the input stream.ExtractionException
- On other error, such as parse errors.
-
setStopAtFirstError
@Deprecated public void setStopAtFirstError(boolean stopAtFirstError)
Deprecated.since 2.4. This extractor has never supported this setting. Do not use.Description copied from interface:Extractor.ContentExtractor
Iftrue
, the extractor will stop at first parsing error, iffalse
the extractor will attempt to ignore all parsing errors.- Specified by:
setStopAtFirstError
in interfaceExtractor.ContentExtractor
- Overrides:
setStopAtFirstError
in classBaseRDFExtractor
- Parameters:
stopAtFirstError
- has no effect
-
setVerifyDataType
@Deprecated public void setVerifyDataType(boolean verifyDataType)
Deprecated.since 2.4. This extractor has never supported this setting. Do not use.- Overrides:
setVerifyDataType
in classBaseRDFExtractor
- Parameters:
verifyDataType
- has no effect
-
getParser
@Deprecated protected org.eclipse.rdf4j.rio.RDFParser getParser(ExtractionContext extractionContext, ExtractionResult extractionResult)
Deprecated.since 2.4. This extractor no longer wraps an RDF4JRDFParser
. Do not use this method.- Specified by:
getParser
in classBaseRDFExtractor
- Parameters:
extractionContext
- the extraction contextextractionResult
- the extraction result- Returns:
- a
RDFParser
-
-