Provide backward compatibility for predicate methods.
This commit is contained in:
parent
27f87a42f4
commit
15361ad600
|
@ -71,6 +71,10 @@ public class Turtle {
|
|||
public class Complex extends Triple {
|
||||
protected List<Predicate> predicates = new ArrayList<Predicate>();
|
||||
|
||||
public Complex predicate(String predicate, String object) {
|
||||
return predicate(predicate, object, false);
|
||||
}
|
||||
|
||||
public Complex predicate(String predicate, String object, boolean asList) {
|
||||
predicateSet.add(predicate);
|
||||
objectSet.add(object);
|
||||
|
@ -83,6 +87,10 @@ public class Turtle {
|
|||
return linkedPredicate(predicate, new StringType(object), link);
|
||||
}
|
||||
|
||||
public Complex predicate(String predicate, Triple object) {
|
||||
return predicate(predicate, object, false);
|
||||
}
|
||||
|
||||
public Complex predicate(String predicate, Triple object, boolean asList) {
|
||||
Predicate p = getPredicate(predicate);
|
||||
if (p == null) {
|
||||
|
@ -120,6 +128,10 @@ public class Turtle {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Complex predicate(String predicate) {
|
||||
return predicate(predicate, false);
|
||||
}
|
||||
|
||||
public Complex predicate(String predicate, boolean asList) {
|
||||
predicateSet.add(predicate);
|
||||
Complex c = complex();
|
||||
|
|
Loading…
Reference in New Issue