Package org.apache.any23.extractor.rdf
Class RDFParserFactory
- java.lang.Object
-
- org.apache.any23.extractor.rdf.RDFParserFactory
-
public class RDFParserFactory extends Object
This factory provides a common logic for creating and configuring correctly any RDF parser used within the library.- Author:
- Michele Mostarda (mostarda@fbk.eu)
-
-
Constructor Summary
Constructors Constructor Description RDFParserFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.rdf4j.rio.RDFParsergetFunctionalSyntaxParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured FunctionalSyntaxParser.static RDFParserFactorygetInstance()org.eclipse.rdf4j.rio.RDFParsergetJSONLDParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured SesameJSONLDParser.org.eclipse.rdf4j.rio.RDFParsergetManchesterSyntaxParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured ManchesterSyntaxParser.org.eclipse.rdf4j.rio.RDFParsergetNQuadsParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured NQuadsParser.org.eclipse.rdf4j.rio.RDFParsergetNTriplesParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured NTriplesParser.org.eclipse.rdf4j.rio.RDFParsergetRDFa10Parser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured RDFaParser, set to RDFa-1.0 compatibility mode.org.eclipse.rdf4j.rio.RDFParsergetRDFa11Parser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured RDFaParser, set to RDFa-1.1 compatibility mode.org.eclipse.rdf4j.rio.RDFParsergetRDFXMLParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured RDFXMLParser.org.eclipse.rdf4j.rio.RDFParsergetTriXParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured TriXParser.org.eclipse.rdf4j.rio.RDFParsergetTurtleParserInstance(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured TurtleParser.
-
-
-
Method Detail
-
getInstance
public static RDFParserFactory getInstance()
-
getTurtleParserInstance
public org.eclipse.rdf4j.rio.RDFParser getTurtleParserInstance(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured TurtleParser.- Parameters:
verifyDataType- data verification enable iftrue.stopAtFirstError- the parser stops at first error iftrue.extractionContext- the extraction context where the parser is used.extractionResult- the output extraction result.- Returns:
- a new instance of a configured Turtle parser.
-
getRDFa10Parser
public org.eclipse.rdf4j.rio.RDFParser getRDFa10Parser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured RDFaParser, set to RDFa-1.0 compatibility mode.- Parameters:
verifyDataType- data verification enable iftrue.stopAtFirstError- the parser stops at first error iftrue.extractionContext- the extraction context where the parser is used.extractionResult- the output extraction result.- Returns:
- a new instance of a configured RDFXML parser.
-
getRDFa11Parser
public org.eclipse.rdf4j.rio.RDFParser getRDFa11Parser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured RDFaParser, set to RDFa-1.1 compatibility mode.- Parameters:
verifyDataType- data verification enable iftrue.stopAtFirstError- the parser stops at first error iftrue.extractionContext- the extraction context where the parser is used.extractionResult- the output extraction result.- Returns:
- a new instance of a configured RDFXML parser.
-
getRDFXMLParser
public org.eclipse.rdf4j.rio.RDFParser getRDFXMLParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured RDFXMLParser.- Parameters:
verifyDataType- data verification enable iftrue.stopAtFirstError- the parser stops at first error iftrue.extractionContext- the extraction context where the parser is used.extractionResult- the output extraction result.- Returns:
- a new instance of a configured RDFXML parser.
-
getNTriplesParser
public org.eclipse.rdf4j.rio.RDFParser getNTriplesParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured NTriplesParser.- Parameters:
verifyDataType- data verification enable iftrue.stopAtFirstError- the parser stops at first error iftrue.extractionContext- the extraction context where the parser is used.extractionResult- the output extraction result.- Returns:
- a new instance of a configured NTriples parser.
-
getNQuadsParser
public org.eclipse.rdf4j.rio.RDFParser getNQuadsParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured NQuadsParser.- Parameters:
verifyDataType- data verification enable iftrue.stopAtFirstError- the parser stops at first error iftrue.extractionContext- the extraction context where the parser is used.extractionResult- the output extraction result.- Returns:
- a new instance of a configured NQuads parser.
-
getManchesterSyntaxParser
public org.eclipse.rdf4j.rio.RDFParser getManchesterSyntaxParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured ManchesterSyntaxParser.- Parameters:
verifyDataType- data verification enable iftrue.stopAtFirstError- the parser stops at first error iftrue.extractionContext- the extraction context where the parser is used.extractionResult- the output extraction result.- Returns:
- a new instance of a configured Manchester Syntax parser.
-
getFunctionalSyntaxParser
public org.eclipse.rdf4j.rio.RDFParser getFunctionalSyntaxParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured FunctionalSyntaxParser.- Parameters:
verifyDataType- data verification enable iftrue.stopAtFirstError- the parser stops at first error iftrue.extractionContext- the extraction context where the parser is used.extractionResult- the output extraction result.- Returns:
- a new instance of a configured Functional Syntax parser.
-
getTriXParser
public org.eclipse.rdf4j.rio.RDFParser getTriXParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured TriXParser.- Parameters:
verifyDataType- data verification enable iftrue.stopAtFirstError- the parser stops at first error iftrue.extractionContext- the extraction context where the parser is used.extractionResult- the output extraction result.- Returns:
- a new instance of a configured TriX parser.
-
getJSONLDParser
public org.eclipse.rdf4j.rio.RDFParser getJSONLDParser(boolean verifyDataType, boolean stopAtFirstError, ExtractionContext extractionContext, ExtractionResult extractionResult)Returns a new instance of a configured SesameJSONLDParser.- Parameters:
verifyDataType- data verification enable iftrue.stopAtFirstError- the parser stops at first error iftrue.extractionContext- the extraction context where the parser is used.extractionResult- the output extraction result.- Returns:
- a new instance of a configured JSONLDParser parser.
-
-