congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ResultSetCompare.convert
Code IndexAdd Tabnine to your IDE (free)

How to use
convert
method
in
org.apache.jena.sparql.resultset.ResultSetCompare

Best Java code snippets using org.apache.jena.sparql.resultset.ResultSetCompare.convert (Showing top 5 results out of 315)

origin: apache/jena

/** compare two result sets for exact equality equivalence.
 * Exact equalitymeans:
 * Each row in rs1 matches the same index row in rs2.
 * Rows match if they have the same variables with the same values, 
 * bNodes must have same labels  
 * 
 * Destructive - rs1 and rs2 are both read, possibly to exhaustion. 
 * @param rs1 
 * @param rs2
 * @return true if they are equivalent
 */
public static boolean equalsExact(ResultSet rs1, ResultSet rs2)
{
  if ( ! compareHeader(rs1, rs2) ) return false ;
  return equivalentByOrder(convert(rs1) , convert(rs2), new EqualityTest(){}) ;
}
origin: apache/jena

/** compare two result sets for equivalence.  Equivalence means:
 * Each row in rs1 matchs the same index row in rs2.
 * Rows match if they have the same variables with the same values, 
 * bNodes must map to a consistent other bNodes.  
 * RDF term comparisons of nodes.   
 * 
 * Destructive - rs1 and rs2 are both read, possibly to exhaustion. 
 * @param rs1 
 * @param rs2
 * @return true if they are equivalent
 */
public static boolean equalsByTermAndOrder(ResultSet rs1, ResultSet rs2) {
  if ( ! compareHeader(rs1, rs2) ) return false ;
  return equivalentByOrder(convert(rs1) , convert(rs2), new BNodeIso(NodeUtils.sameTerm)) ;
}
origin: apache/jena

/** Compare two result sets for equivalence.  Equivalence means:
 * Each row in rs1 matches the same index row in rs2.
 * Rows match if they have the same variables with the same values, 
 * bNodes must map to a consistent other bNodes.  
 * Value comparisons of nodes.   
 * 
 * Destructive - rs1 and rs2 are both read, possibly to exhaustion. 
 * @param rs1 
 * @param rs2
 * @return true if they are equivalent
 */
public static boolean equalsByValueAndOrder(ResultSet rs1, ResultSet rs2) {
  if ( ! compareHeader(rs1, rs2) ) 
    return false ;
  return equivalentByOrder(convert(rs1) , convert(rs2), new BNodeIso(NodeUtils.sameValue)) ;
}
origin: apache/jena

/** Compare two result sets for equivalence.  Equivalence means:
 * A row rs1 has one matching row in rs2, and vice versa.
 * A row is only matched once.
 * Rows match if they have the same variables with the same values. 
 * bNodes must map to a consistent other bNodes.  Value comparisons of nodes.   
 * 
 * Destructive - rs1 and rs2 are both read, possibly to exhaustion. 
 * @param rs1 
 * @param rs2
 * @return true if they are equivalent
 */

public static boolean equalsByValue(ResultSet rs1, ResultSet rs2) {
  if ( ! compareHeader(rs1, rs2) ) return false ;
  
  //return equivalent(convert(rs1), convert(rs2), new BNodeIso(NodeUtils.sameValue)) ;
  
  ResultSetRewindable rs1a = ResultSetFactory.makeRewindable(rs1) ;
  ResultSetRewindable rs2a = ResultSetFactory.makeRewindable(rs2) ;
  
  if ( equivalent(convert(rs1a), convert(rs2a), new BNodeIso(NodeUtils.sameValue)) )
    return true ;
  rs1a.reset() ;    
  rs2a.reset() ;
  return isomorphic(rs1a, rs2a) ;
}

origin: apache/jena

/** compare two result sets for equivalence.  Equivalence means:
 * A row rs1 has one matching row in rs2, and vice versa.
 * A row is only matched once.
 * Rows match if they have the same variables with the same values, 
 * bNodes must map to a consistent other bNodes.  
 * Term comparisons of nodes.   
 * 
 * Destructive - rs1 and rs2 are both read, possibly to exhaustion. 
 * @param rs1 
 * @param rs2
 * @return true if they are equivalent
 */
public static boolean equalsByTerm(ResultSet rs1, ResultSet rs2) {
  if ( ! compareHeader(rs1, rs2) ) return false ;
  //return equivalent(convert(rs1), convert(rs2), new BNodeIso(NodeUtils.sameTerm)) ;
  ResultSetRewindable rs1a = ResultSetFactory.makeRewindable(rs1) ;
  ResultSetRewindable rs2a = ResultSetFactory.makeRewindable(rs2) ;
  
  // Aligned rows
  if ( equivalent(convert(rs1a), convert(rs2a), new BNodeIso(NodeUtils.sameTerm)) )
    return true ;
  rs1a.reset() ;    
  rs2a.reset() ;
  return isomorphic(rs1a, rs2a) ;
}
org.apache.jena.sparql.resultsetResultSetCompareconvert

Popular methods of ResultSetCompare

  • equalsByValue
  • equal
    Compare two bindings, use the node equality test provided
  • equalsByTerm
  • equalsByTest
  • isomorphic
    Compare two result sets for bNode isomorphism equivalence. Only does RDF term comparison.
  • compareHeader
  • containedIn
  • equalsByTermAndOrder
    compare two result sets for equivalence. Equivalence means: Each row in rs1 matchs the same index ro
  • equalsByValueAndOrder
    Compare two result sets for equivalence. Equivalence means: Each row in rs1 matches the same index r
  • equalsExact
    compare two result sets for exact equality equivalence. Exact equalitymeans: Each row in rs1 matches
  • equivalent
  • equivalentByOrder
  • equivalent,
  • equivalentByOrder

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JOptionPane (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now