Interface ParserProfile

  • All Known Implementing Classes:
    ParserProfileStd, ParserProfileWrapper

    public interface ParserProfile
    ParserProfile is specific to parsing, providing the operations needed by a parser to create IRIs/Nodes/Triples/Quads at the point in the parsing process when the line and column are available to put in error messages.

    ParserProfile uses a FactoryRDF to create items in the parsing process. A ParserProfile adds handling the position in the parsing stream, and URI processing (prefix mapping and base URI).

    See Also:
    FactoryRDF
    • Method Detail

      • resolveIRI

        java.lang.String resolveIRI​(java.lang.String uriStr,
                                    long line,
                                    long col)
        Resolve a URI, returning a string
      • setBaseIRI

        void setBaseIRI​(java.lang.String baseIRI)
      • createTriple

        Triple createTriple​(Node subject,
                            Node predicate,
                            Node object,
                            long line,
                            long col)
        Create a triple
      • createQuad

        Quad createQuad​(Node graph,
                        Node subject,
                        Node predicate,
                        Node object,
                        long line,
                        long col)
        Create a quad
      • createURI

        Node createURI​(java.lang.String uriStr,
                       long line,
                       long col)
        Create a URI Node
      • createTypedLiteral

        Node createTypedLiteral​(java.lang.String lexical,
                                RDFDatatype datatype,
                                long line,
                                long col)
        Create a literal for a string+datatype
      • createLangLiteral

        Node createLangLiteral​(java.lang.String lexical,
                               java.lang.String langTag,
                               long line,
                               long col)
        Create a literal for a string+language
      • createStringLiteral

        Node createStringLiteral​(java.lang.String lexical,
                                 long line,
                                 long col)
        Create a literal for a string
      • createBlankNode

        Node createBlankNode​(Node scope,
                             java.lang.String label,
                             long line,
                             long col)
        Create a fresh blank node based on scope and label
      • createBlankNode

        Node createBlankNode​(Node scope,
                             long line,
                             long col)
        Create a fresh blank node
      • createTripleNode

        Node createTripleNode​(Node subject,
                              Node predicate,
                              Node object,
                              long line,
                              long col)
        Create a triple node (RDF-star)
      • createTripleNode

        Node createTripleNode​(Triple triple,
                              long line,
                              long col)
        Create a triple node (RDF-star)
      • createGraphNode

        Node createGraphNode​(Graph graph,
                             long line,
                             long col)
        Create a graph node. This is an N3-formula and not named graphs
      • createNodeFromToken

        Node createNodeFromToken​(Node scope,
                                 Token token,
                                 long line,
                                 long col)
        Make a node from a token - called after all else has been tried to handle special cases Return null for "no special node recognized"
      • create

        Node create​(Node currentGraph,
                    Token token)
        Make any node from a token as appropriate
      • isStrictMode

        boolean isStrictMode()
        Is this in strict mode?