Class QueryParseExceptionUtils

java.lang.Object
org.aksw.jenax.stmt.util.QueryParseExceptionUtils

public class QueryParseExceptionUtils extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Pattern
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int[]
    adjustLineAndCol(int[] in)
    Replace 0 values in line and/or column with 1
    static org.apache.jena.query.QueryParseException
    copyAndAdjust(org.apache.jena.query.QueryParseException e, int line, int column)
    Creates a new QueryParseException from the provided one with line and column set the the given values.
    static int
    doCompare(org.apache.jena.query.QueryParseException a, org.apache.jena.query.QueryParseException b)
     
    static int[]
    lineAndCol(org.apache.jena.query.QueryParseException e)
     
    static int[]
    Parse out the line and column position from a sparql parse error message
    static int[]
    parseLineAndCol(org.apache.jena.query.QueryParseException e)
     
    static int[]
    parseRawLineAndCol(org.apache.jena.query.QueryParseException e)
     

    Methods inherited from class java.lang.Object

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

    • posPattern

      public static final Pattern posPattern
  • Constructor Details

    • QueryParseExceptionUtils

      public QueryParseExceptionUtils()
  • Method Details

    • adjustLineAndCol

      public static int[] adjustLineAndCol(int[] in)
      Replace 0 values in line and/or column with 1
      Parameters:
      in -
      Returns:
    • parseLineAndCol

      public static int[] parseLineAndCol(String str)
      Parse out the line and column position from a sparql parse error message
      Parameters:
      str -
      Returns:
      an array [line, col] or null if the input could not be matched
    • parseLineAndCol

      public static int[] parseLineAndCol(org.apache.jena.query.QueryParseException e)
    • parseRawLineAndCol

      public static int[] parseRawLineAndCol(org.apache.jena.query.QueryParseException e)
    • lineAndCol

      public static int[] lineAndCol(org.apache.jena.query.QueryParseException e)
    • copyAndAdjust

      public static org.apache.jena.query.QueryParseException copyAndAdjust(org.apache.jena.query.QueryParseException e, int line, int column)
      Creates a new QueryParseException from the provided one with line and column set the the given values. Attaches the original exception as a suppressed one - in order for the newly generated exception to appear as a root cause. The returned exception is presently always of type QueryParseException; subtypes may be considered in the future.
    • doCompare

      public static int doCompare(org.apache.jena.query.QueryParseException a, org.apache.jena.query.QueryParseException b)