Class ObjectSetBase
- java.lang.Object
-
- com.inrupt.rdf.wrapping.test.base.ObjectSetBase
-
- Direct Known Subclasses:
CommonsObjectSetBase
public abstract class ObjectSetBase extends Object
This class contains test logic only, while the task of creating instances of that class (and the circumstances required for it) are delegated to derived classes.
-
-
Constructor Summary
Constructors Constructor Description ObjectSetBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract void
addTriple(String subject, String predicate, String object)
Implementation specific derived methods must assert a triple with the given parameters in the per-test context graph contains.protected abstract boolean
containsTriple(String subject, String predicate, String object)
Implementation specific derived methods must check whether the per-test context graph contains a triple with the given parameters.protected abstract Set<String>
createNewSetForTest(String subject, String predicate)
Implementation specific derived methods must create a new PredicateObjectSet over a fresh, per-test context graph.protected abstract Set<String>
createOtherSetOverSameGraph(String subject, String predicate)
Implementation specific derived methods must create a new PredicateObjectSet over the existing, per-test context graph.
-
-
-
Method Detail
-
addTriple
protected abstract void addTriple(String subject, String predicate, String object)
Implementation specific derived methods must assert a triple with the given parameters in the per-test context graph contains.- Parameters:
subject
- the IRI string for the subject IRI node to be addedpredicate
- the IRI string for the predicate IRI node to be addedobject
- the lexical form for the object literal node to be added
-
containsTriple
protected abstract boolean containsTriple(String subject, String predicate, String object)
Implementation specific derived methods must check whether the per-test context graph contains a triple with the given parameters.- Parameters:
subject
- the IRI string for the subject IRI node to be checkedpredicate
- the IRI string for the predicate IRI node to be checkedobject
- the lexical form for the object literal node to be checked
-
createNewSetForTest
protected abstract Set<String> createNewSetForTest(String subject, String predicate)
Implementation specific derived methods must create a new PredicateObjectSet over a fresh, per-test context graph.- Parameters:
subject
- the IRI string for the subject IRI node to be checkedpredicate
- the IRI string for the predicate IRI node to be checked
-
createOtherSetOverSameGraph
protected abstract Set<String> createOtherSetOverSameGraph(String subject, String predicate)
Implementation specific derived methods must create a new PredicateObjectSet over the existing, per-test context graph.- Parameters:
subject
- the IRI string for the subject IRI node to be checkedpredicate
- the IRI string for the predicate IRI node to be checked
-
-