public boolean hasStatement(final Resource s,final URI p,final Value o,final boolean includeInferred,final Resource... c) throws Exception {
  if (c == null) {
    throw new IllegalArgumentException();
  }
  final UUID uuid=UUID.randomUUID();
  final ConnectOptions opts=mgr.newQueryConnectOptions(sparqlEndpointURL,uuid,tx);
  opts.addRequestParam("HASSTMT");
  opts.addRequestParam(RemoteRepositoryDecls.INCLUDE_INFERRED,Boolean.toString(includeInferred));
  if (s != null) {
    opts.addRequestParam("s",EncodeDecodeValue.encodeValue(s));
  }
  if (p != null) {
    opts.addRequestParam("p",EncodeDecodeValue.encodeValue(p));
  }
  if (o != null) {
    opts.addRequestParam("o",EncodeDecodeValue.encodeValue(o));
  }
  opts.addRequestParam("c",EncodeDecodeValue.encodeContexts(c));
  JettyResponseListener resp=null;
  try {
    opts.setAcceptHeader(ConnectOptions.MIME_APPLICATION_XML);
    checkResponseCode(resp=doConnect(opts));
    final BooleanResult result=RemoteRepositoryManager.booleanResults(resp);
    return result.result;
  }
  finally {
    if (resp != null)     resp.abort();
  }
}

public boolean hasStatement ( final Resource s , final URI p , final Value o , final boolean includeInferred , final Resource ... c ) throws Exception { if ( c == null ) { throw new IllegalArgumentException ( ) ; } final UUID uuid = UUID . randomUUID ( ) ; final ConnectOptions opts = mgr . newQueryConnectOptions ( sparqlEndpointURL , uuid , tx ) ; opts . addRequestParam ( "HASSTMT" ) ; opts . addRequestParam ( RemoteRepositoryDecls . INCLUDE_INFERRED , Boolean . toString ( includeInferred ) ) ; if ( s != null ) { opts . addRequestParam ( "s" , EncodeDecodeValue . encodeValue ( s ) ) ; } if ( p != null ) { opts . addRequestParam ( "p" , EncodeDecodeValue . encodeValue ( p ) ) ; } if ( o != null ) { opts . addRequestParam ( "o" , EncodeDecodeValue . encodeValue ( o ) ) ; } opts . addRequestParam ( "c" , EncodeDecodeValue . encodeContexts ( c ) ) ; JettyResponseListener resp = null ; try { opts . setAcceptHeader ( ConnectOptions . MIME_APPLICATION_XML ) ; checkResponseCode ( resp = doConnect ( opts ) ) ; final BooleanResult result = RemoteRepositoryManager . booleanResults ( resp ) ; return result . result ; } finally { if ( resp != null ) resp . abort ( ) ; } }
method to line up with the sesame interface .
