@Override
 public void meet(StatementPattern node) throws RepositoryException {
   Resource subj = (Resource) node.getSubjectVar().getValue();
   IRI pred = (IRI) node.getPredicateVar().getValue();
   Value obj = node.getObjectVar().getValue();
   Resource[] ctx = getContexts(node.getContextVar());
   for (RepositoryConnection member : members) {
     if (member.hasStatement(subj, pred, obj, true, ctx)) {
       return;
     }
   }
   node.replaceWith(new EmptySet());
 }
  @Override
  protected void meetSP(StatementPattern node) throws Exception {
    StatementPattern sp = node.clone();
    final Var predVar = sp.getPredicateVar();

    URI pred = (URI) predVar.getValue();
    String predNamespace = pred.getNamespace();

    final Var objVar = sp.getObjectVar();
    final Var cntxtVar = sp.getContextVar();
    if (objVar != null
        && !RDF.NAMESPACE.equals(predNamespace)
        && !SESAME.NAMESPACE.equals(predNamespace)
        && !RDFS.NAMESPACE.equals(predNamespace)
        && !EXPANDED.equals(cntxtVar)) {

      URI transPropUri = (URI) predVar.getValue();
      if (inferenceEngine.isTransitiveProperty(transPropUri)) {
        node.replaceWith(
            new TransitivePropertySP(
                sp.getSubjectVar(), sp.getPredicateVar(), sp.getObjectVar(), sp.getContextVar()));
      }
    }
  }