Class LangParserLib

java.lang.Object
org.apache.jena.riot.lang.extra.LangParserLib

public class LangParserLib extends Object
Support function for language parsing.
  • Constructor Details

    • LangParserLib

      public LangParserLib()
  • Method Details

    • stripChars

      public static String stripChars(String s, int n)
      Remove the first n characters from the string
    • stripQuotes

      public static String stripQuotes(String s)
      Remove first and last characters (e.g. ' or "") from a string
    • stripQuotes3

      public static String stripQuotes3(String s)
      Remove first 3 and last 3 characters (e.g. ''' or """) from a string
    • unescapeStr

      public static String unescapeStr(String s, int line, int column)
      Unescape \t, \n etc.
    • unescapeUnicode

      public static String unescapeUnicode(String s, int line, int column)
      Unescape \t, \n etc. and also unicode \ u and \U
    • unescapePName

      public static String unescapePName(String s, int line, int column)
      Unescape a prefix name (or part of). This applies the Turtle/SPARQL PLX rule
    • throwParseException

      public static void throwParseException(String msg, int line, int column)
    • throwParseException

      public static void throwParseException(String msg)