Package org.apache.jena.riot.lang.extra
Class LangParserLib
- java.lang.Object
-
- org.apache.jena.riot.lang.extra.LangParserLib
-
public class LangParserLib extends java.lang.ObjectSupport function for language parsing.
-
-
Constructor Summary
Constructors Constructor Description LangParserLib()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringstripChars(java.lang.String s, int n)Remove the first n characters from the stringstatic java.lang.StringstripQuotes(java.lang.String s)Remove first and last characters (e.g.static java.lang.StringstripQuotes3(java.lang.String s)Remove first 3 and last 3 characters (e.g.static voidthrowParseException(java.lang.String msg)static voidthrowParseException(java.lang.String msg, int line, int column)static java.lang.StringunescapePName(java.lang.String s, int line, int column)Unescape a prefix name (or part of).static java.lang.StringunescapeStr(java.lang.String s, int line, int column)Unescape \t, \n etc.static java.lang.StringunescapeUnicode(java.lang.String s, int line, int column)Unescape \t, \n etc.
-
-
-
Method Detail
-
stripChars
public static java.lang.String stripChars(java.lang.String s, int n)Remove the first n characters from the string
-
stripQuotes
public static java.lang.String stripQuotes(java.lang.String s)
Remove first and last characters (e.g. ' or "") from a string
-
stripQuotes3
public static java.lang.String stripQuotes3(java.lang.String s)
Remove first 3 and last 3 characters (e.g. ''' or """) from a string
-
unescapeStr
public static java.lang.String unescapeStr(java.lang.String s, int line, int column)Unescape \t, \n etc.
-
unescapeUnicode
public static java.lang.String unescapeUnicode(java.lang.String s, int line, int column)Unescape \t, \n etc. and also unicode \ u and \U
-
unescapePName
public static java.lang.String unescapePName(java.lang.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(java.lang.String msg, int line, int column)
-
throwParseException
public static void throwParseException(java.lang.String msg)
-
-