Class 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 Detail

      • RDFParserFactory

        public RDFParserFactory()
    • Method Detail

      • 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 if true.
        stopAtFirstError - the parser stops at first error if true.
        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 if true.
        stopAtFirstError - the parser stops at first error if true.
        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 if true.
        stopAtFirstError - the parser stops at first error if true.
        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 if true.
        stopAtFirstError - the parser stops at first error if true.
        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 if true.
        stopAtFirstError - the parser stops at first error if true.
        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 if true.
        stopAtFirstError - the parser stops at first error if true.
        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 if true.
        stopAtFirstError - the parser stops at first error if true.
        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 if true.
        stopAtFirstError - the parser stops at first error if true.
        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 if true.
        stopAtFirstError - the parser stops at first error if true.
        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 if true.
        stopAtFirstError - the parser stops at first error if true.
        extractionContext - the extraction context where the parser is used.
        extractionResult - the output extraction result.
        Returns:
        a new instance of a configured JSONLDParser parser.