public boolean namespacePublishedToMapgraph(final String namespace) throws Exception {
  assertMapgraphRuntimeAvailable();
  final String repositoryUrl=getSparqlEndpointUrlForNamespaceOrDefault(namespace);
  final ConnectOptions opts=newConnectOptions(repositoryUrl,UUID.randomUUID(),null);
  JettyResponseListener response=null;
{
    opts.setAcceptHeader("Accept: text/plain");
    opts.addRequestParam(MAPGRAPH,CHECK_PUBLISHED);
    opts.method="POST";
  }
  try {
    checkResponseCode(response=doConnect(opts));
    final String responseBody=response.getResponseBody();
    return responseBody != null && responseBody.contains("true");
  }
  finally {
    if (response != null)     response.abort();
  }
}

public boolean namespacePublishedToMapgraph ( final String namespace ) throws Exception { assertMapgraphRuntimeAvailable ( ) ; final String repositoryUrl = getSparqlEndpointUrlForNamespaceOrDefault ( namespace ) ; final ConnectOptions opts = newConnectOptions ( repositoryUrl , UUID . randomUUID ( ) , null ) ; JettyResponseListener response = null ; { opts . setAcceptHeader ( "Accept: text/plain" ) ; opts . addRequestParam ( MAPGRAPH , CHECK_PUBLISHED ) ; opts . method = "POST" ; } try { checkResponseCode ( response = doConnect ( opts ) ) ; final String responseBody = response . getResponseBody ( ) ; return responseBody != null && responseBody . contains ( "true" ) ; } finally { if ( response != null ) response . abort ( ) ; } }
checks whether the given namespace has been published . if null is passed in , the method performs a check for the default namespace .
