Class LexicalUnit

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private RdfTurtleReader contentReader
      The content handler of the current Turtle document.
      private Context context
      The context maintained during the parsing.
      private java.lang.String value
      The parsed value as a simple string of characters.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      RdfTurtleReader getContentReader()
      Returns the document's reader.
      Context getContext()
      Returns the parsing context.
      java.lang.String getValue()
      Returns the current value.
      abstract void parse()
      Contains the parsing logic of this lexical unit.
      abstract java.lang.Object resolve()
      Resolves the current value as a reference or a literal or a graph of links according to the current context.
      void setContext​(Context context)
      Sets the parsing context.
      void setValue​(java.lang.String value)
      Sets the value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • contentReader

        private RdfTurtleReader contentReader
        The content handler of the current Turtle document.
      • context

        private Context context
        The context maintained during the parsing.
      • value

        private java.lang.String value
        The parsed value as a simple string of characters.
    • Constructor Detail

      • LexicalUnit

        public LexicalUnit​(RdfTurtleReader contentReader,
                           Context context)
        Constructor with arguments.
        Parameters:
        contentHandler - The document's parent handler.
        context - The parsing context.
      • LexicalUnit

        public LexicalUnit​(java.lang.String value)
        Constructor with value.
        Parameters:
        value - The value of the current lexical unit.
    • Method Detail

      • getContentReader

        public RdfTurtleReader getContentReader()
        Returns the document's reader.
        Returns:
        The document's reader.
      • getContext

        public Context getContext()
        Returns the parsing context.
        Returns:
        The parsing context.
      • getValue

        public java.lang.String getValue()
        Returns the current value.
        Returns:
        The current value.
      • parse

        public abstract void parse()
                            throws java.io.IOException
        Contains the parsing logic of this lexical unit.
        Throws:
        java.io.IOException
      • resolve

        public abstract java.lang.Object resolve()
        Resolves the current value as a reference or a literal or a graph of links according to the current context.
        Returns:
        The current value as a reference or a literal or a graph of links according to the current context.
      • setContext

        public void setContext​(Context context)
        Sets the parsing context.
        Parameters:
        context - The parsing context.
      • setValue

        public void setValue​(java.lang.String value)
        Sets the value.
        Parameters:
        value - The current value.