Class TableUtils


  • public class TableUtils
    extends java.lang.Object
    Several static methods to do various things with Jena Table
    Author:
    nk-fouque
    • Constructor Summary

      Constructors 
      Constructor Description
      TableUtils()  
    • Method Summary

      Modifier and Type Method Description
      static org.apache.jena.sparql.algebra.table.TableN difference​(org.apache.jena.sparql.algebra.Table left, org.apache.jena.sparql.algebra.Table right)
      Algebraic Table difference
      static org.apache.jena.sparql.algebra.Table projection​(org.apache.jena.sparql.algebra.Table table, java.util.Set<org.apache.jena.sparql.core.Var> vars)
      Algebric table projection
      static org.apache.jena.sparql.algebra.table.TableN removeDuplicates​(org.apache.jena.sparql.algebra.Table table)  
      static org.apache.jena.sparql.algebra.table.TableN simpleJoin​(org.apache.jena.sparql.algebra.Table left, org.apache.jena.sparql.algebra.Table right)
      Uses Jena's iterator join to join two tables
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TableUtils

        public TableUtils()
    • Method Detail

      • simpleJoin

        public static org.apache.jena.sparql.algebra.table.TableN simpleJoin​(org.apache.jena.sparql.algebra.Table left,
                                                                             org.apache.jena.sparql.algebra.Table right)
        Uses Jena's iterator join to join two tables
      • projection

        public static org.apache.jena.sparql.algebra.Table projection​(org.apache.jena.sparql.algebra.Table table,
                                                                      java.util.Set<org.apache.jena.sparql.core.Var> vars)
        Algebric table projection
        Parameters:
        table - The table to project
        vars - A list of variables to do the projection on
      • difference

        public static org.apache.jena.sparql.algebra.table.TableN difference​(org.apache.jena.sparql.algebra.Table left,
                                                                             org.apache.jena.sparql.algebra.Table right)
        Algebraic Table difference
        Returns:
        The left table from which all elements appearing in the right table have been removed
      • removeDuplicates

        public static org.apache.jena.sparql.algebra.table.TableN removeDuplicates​(org.apache.jena.sparql.algebra.Table table)
        Parameters:
        table - The Table you want to remove duplicate lines from
        Returns:
        The same Table from which the duplicate lines have been removed