override public void visit(ITriplePath triplePath) { if (RDFUtil.sameTerm(_var, triplePath.getObject()) || RDFUtil.sameTerm(_var, triplePath.getSubject())) { _checker.setResult(); } }
/** * Creates a new TriplePath as a blank node in a given Model. * @param model the Model to create the path in * @param subject the subject (not null) * @param path the path (not null) * @param object the object (not null) * @return a new TriplePath */ public static ITriplePath createTriplePath(SpinProcessor model, INode subject, INode path, INode obj) { ITriplePath triplePath = (ITriplePath)model.CreateResource(SP.ClassTriplePath).As(typeof(TriplePathImpl)); triplePath.AddProperty(SP.PropertySubject, subject); triplePath.AddProperty(SP.PropertyPath, path); triplePath.AddProperty(SP.PropertyObject, obj); return(triplePath); }