java.lang.Object
org.apache.jena.sparql.resultset.ResultsCompare
Comparison of ResultSets.
Note that reading ResultSets is destructive so consider using
ResultSetRewindable
from ResultSetFactory.makeRewindable(org.apache.jena.rdf.model.Model)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
equal
(Binding bind1, Binding bind2, EqualityTest test) Compare two bindings, use the node equality test providedstatic boolean
equalsByTerm
(List<Binding> list1, List<Binding> list2) Compare two list - unorderedstatic boolean
equalsByTerm
(ResultSet rs1, ResultSet rs2) Compare two result sets for equivalence where nodes are compared by beign the same term..static boolean
equalsByTerm
(RowSet rs1, RowSet rs2) Compare two row sets for equivalence.static boolean
equalsByTermAndOrder
(ResultSet rs1, ResultSet rs2) Compare two result sets for equivalence.static boolean
equalsByTermAndOrder
(RowSet rs1, RowSet rs2) Compare two row sets for equivalence.static boolean
equalsByValue
(ResultSet rs1, ResultSet rs2) Compare two result sets for equivalence where nodes are compared by value.static boolean
equalsByValue
(RowSet rs1, RowSet rs2) static boolean
equalsByValueAndOrder
(ResultSet rs1, ResultSet rs2) Compare two result sets for equivalence.static boolean
equalsByValueAndOrder
(RowSet rs1, RowSet rs2) Compare two result sets for equivalence.static boolean
equalsExact
(List<Binding> list1, List<Binding> list2) Compare two row sets for exact node equality equivalence.static boolean
equalsExact
(ResultSet rs1, ResultSet rs2) Compare two result sets for exact equality equivalence.static boolean
equalsExact
(RowSet rs1, RowSet rs2) Compare two row sets for equivalence where blank nodes must have same labels Destructive - rs1 and rs2 are both read, possibly to exhaustion.static boolean
equalsExactAndOrder
(List<Binding> list1, List<Binding> list2) Compare two row sets for exact node equality equivalence.
-
Constructor Details
-
ResultsCompare
public ResultsCompare()
-
-
Method Details
-
equalsByValue
Compare two result sets for equivalence where nodes are compared by value. 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.- Parameters:
rs1
-rs2
-- Returns:
- true if they are equivalent
-
equalsByValue
-
equalsByTerm
Compare two result sets for equivalence where nodes are compared by beign the same term.. 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.- Parameters:
rs1
-rs2
-- Returns:
- true if they are equivalent
-
equalsByTerm
Compare two row 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, blank node must map to a consistent blank node in the other row set. Term comparisons of nodes. Destructive - rs1 and rs2 are both read, possibly to exhaustion.- Parameters:
rs1
-rs2
-- Returns:
- true if they are equivalent
-
equalsByTerm
Compare two list - unordered -
equalsByValueAndOrder
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. Destructive - rs1 and rs2 are both read, possibly to exhaustion.- Parameters:
rs1
-rs2
-- Returns:
- true if they are equivalent
-
equalsByValueAndOrder
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. Destructive - rs1 and rs2 are both read, possibly to exhaustion.- Parameters:
rs1
-rs2
-- Returns:
- true if they are equivalent
-
equalsByTermAndOrder
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, blank nodes must map to a consistent other blank node. RDF term comparisons of nodes. Destructive - rs1 and rs2 are both read, possibly to exhaustion.- Parameters:
rs1
-rs2
-- Returns:
- true if they are equivalent
-
equalsByTermAndOrder
Compare two row 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, blank nodes must map to a consistent other blank node. RDF term comparisons of nodes. Destructive - rs1 and rs2 are both read, possibly to exhaustion.- Parameters:
rs1
-rs2
-- Returns:
- true if they are equivalent
-
equalsExact
Compare two result sets for exact equality equivalence. Exact equality means: Each row in rs1 matches the same index row in rs2. Rows match if they have the same variables with the same values, Blank nodes must have same labels Destructive - rs1 and rs2 are both read, possibly to exhaustion.- Parameters:
rs1
-rs2
-- Returns:
- true if they are equivalent
-
equalsExact
Compare two row sets for equivalence where blank nodes must have same labels Destructive - rs1 and rs2 are both read, possibly to exhaustion.- Parameters:
rs1
-rs2
-- Returns:
- true if they are equivalent
-
equalsExact
Compare two row sets for exact node equality equivalence. Each row in rs1 matches some other row in rs2. Rows match if they have the same variables with the same terms. Blank nodes must have same labels- Parameters:
list1
-list2
-- Returns:
- true if they are equivalent
-
equalsExactAndOrder
Compare two row sets for exact node equality equivalence. Each row in rs1 matches the same row in rs2. Rows match if they have the same variables with the same values, Blank nodes must have same labels- Parameters:
list1
-list2
-- Returns:
- true if they are equivalent
-
equal
Compare two bindings, use the node equality test provided
-