/** * Constructor - builds a pattern from three nodes, * use Node_RuleVariables as variables, use a variable * with an empty name as a wildcard, can also use null * as a wildcard. */ public TriplePattern(Node subject, Node predicate, Node object) { this.subject = normalize(subject); this.predicate = normalize(predicate); this.object = normalize(object); }
/** * Constructor - builds a dgenerate pattern from a simple triple. * This would be much easier if we merged Triples and TriplePatterns! */ public TriplePattern(Triple match) { this.subject = normalize(match.getSubject()); this.predicate = normalize(match.getPredicate()); this.object = normalize(match.getObject()); }
/** * Constructor - builds a pattern from a standard triple match. * Node that any filter part of the triple match will not be * represented within the pattern and will need to be checked * for separately. */ public TriplePattern(TripleMatch match) { this.subject = normalize(match.getMatchSubject()); this.predicate = normalize(match.getMatchPredicate()); this.object = normalize(match.getMatchObject()); }