Class JdbcNodeUtils

java.lang.Object
org.apache.jena.jdbc.utils.JdbcNodeUtils

public class JdbcNodeUtils extends Object
Class with helpful utility methods for Jena JDBC
  • Method Details

    • toBoolean

      public static boolean toBoolean(Node n) throws SQLException
      Tries to convert a node to a boolean
      Parameters:
      n - Node
      Returns:
      Boolean
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toByte

      public static byte toByte(Node n) throws SQLException
      Tries to convert a node to a byte
      Parameters:
      n - Node
      Returns:
      Byte
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toShort

      public static short toShort(Node n) throws SQLException
      Tries to convert a node to a short integer
      Parameters:
      n - Node
      Returns:
      Short Integer
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toInt

      public static int toInt(Node n) throws SQLException
      Tries to convert a node to an integer
      Parameters:
      n - Node
      Returns:
      Integer
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toLong

      public static long toLong(Node n) throws SQLException
      Tries to convert a node to a long integer
      Parameters:
      n - Node
      Returns:
      Long Integer
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toFloat

      public static float toFloat(Node n) throws SQLException
      Tries to convert a node to a float
      Parameters:
      n - Node
      Returns:
      Float
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toDouble

      public static double toDouble(Node n) throws SQLException
      Tries to convert a node to a double
      Parameters:
      n - Node
      Returns:
      Double
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toDecimal

      public static BigDecimal toDecimal(Node n) throws SQLException
      Tries to convert a node to a decimal
      Parameters:
      n - Node
      Returns:
      Decimal
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toDate

      public static Date toDate(Node n) throws SQLException
      Tries to convert a node to a date
      Parameters:
      n - Node
      Returns:
      Date
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toTime

      public static Time toTime(Node n) throws SQLException
      Tries to convert a node to a time
      Parameters:
      n - Node
      Returns:
      Time
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toTimestamp

      public static Timestamp toTimestamp(Node n) throws SQLException
      Tries to convert a node to a timestamp
      Parameters:
      n - Node
      Returns:
      Timestamp
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toString

      public static String toString(Node n) throws SQLException
      Tries to convert a now to a string
      Parameters:
      n - Node
      Returns:
      String
      Throws:
      SQLException - Thrown if the node cannot be converted
    • toURL

      public static URL toURL(Node n) throws SQLException
      Tries to convert a node to a URL
      Parameters:
      n - Node
      Returns:
      URL or null
      Throws:
      SQLException - Thrown if the node cannot be converted