Class StringToken


  • public class StringToken
    extends LexicalUnit
    Represents a string of characters. This string could have a type and a language.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String language
      The language of the value.
      private boolean multiLines
      Does this string contains at least a new line character?
      private java.lang.String type
      The type of the represented value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getLanguage()  
      java.lang.String getType()  
      boolean isMultiLines()
      Returns true if this string of characters contains at least one newline character.
      void parse()
      Contains the parsing logic of this lexical unit.
      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 setLanguage​(java.lang.String language)  
      void setMultiLines​(boolean multiLines)  
      void setType​(java.lang.String type)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • language

        private java.lang.String language
        The language of the value.
      • multiLines

        private boolean multiLines
        Does this string contains at least a new line character?
      • type

        private java.lang.String type
        The type of the represented value.
    • Constructor Detail

      • StringToken

        public StringToken​(RdfTurtleReader contentHandler,
                           Context context)
                    throws java.io.IOException
        Constructor with arguments.
        Parameters:
        contentHandler - The document's parent handler.
        context - The parsing context.
        Throws:
        java.io.IOException
    • Method Detail

      • getLanguage

        public java.lang.String getLanguage()
      • getType

        public java.lang.String getType()
      • isMultiLines

        public boolean isMultiLines()
        Returns true if this string of characters contains at least one newline character.
        Returns:
      • parse

        public void parse()
                   throws java.io.IOException
        Description copied from class: LexicalUnit
        Contains the parsing logic of this lexical unit.
        Specified by:
        parse in class LexicalUnit
        Throws:
        java.io.IOException
      • resolve

        public java.lang.Object resolve()
        Description copied from class: LexicalUnit
        Resolves the current value as a reference or a literal or a graph of links according to the current context.
        Specified by:
        resolve in class LexicalUnit
        Returns:
        The current value as a reference or a literal or a graph of links according to the current context.
      • setLanguage

        public void setLanguage​(java.lang.String language)
      • setMultiLines

        public void setMultiLines​(boolean multiLines)
      • setType

        public void setType​(java.lang.String type)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object