connectionUtils/src/main/java/com/ge/research/semtk/sparqlX/SparqlEndpointInterface.java
protected BasicHttpContext buildHttpContext(HttpHost targetHost) {
		if (this.isAuth()) {
			DigestScheme digestAuth = new DigestScheme();
			AuthCache authCache = new BasicAuthCache();
			digestAuth.overrideParamter("realm", "SPARQL");
			// Suppose we already know the expected nonce value
			digestAuth.overrideParamter("nonce", "whatever");
			authCache.put(targetHost, digestAuth);
			BasicHttpContext ret = new BasicHttpContext();
			ret.setAttribute(HttpClientContext.AUTH_CACHE, authCache);
			return ret;
		} else {
			return null;
		}
	}
/**
	 * Return a context with digest Auth if there is a userName, otherwise null context
	 * @param targetHost
	 * @return
	 */
Return a context with digest Auth if there is a userName, otherwise null context
@param targetHost
@return
Return a context with digest Auth if there is a userName otherwise null context @param targetHost @return
protected BasicHttpContext buildHttpContext(HttpHost targetHost) {
		if (this.isAuth()) {
			DigestScheme digestAuth = new DigestScheme();
			AuthCache authCache = new BasicAuthCache();
			digestAuth.overrideParamter("realm", "SPARQL");
			digestAuth.overrideParamter("nonce", "whatever");
			authCache.put(targetHost, digestAuth);
			BasicHttpContext ret = new BasicHttpContext();
			ret.setAttribute(HttpClientContext.AUTH_CACHE, authCache);
			return ret;
		} else {
			return null;
		}
	}
protected BasicHttpContext buildHttpContext ( HttpHost targetHost ) { if ( this . isAuth ( ) ) { DigestScheme digestAuth = new DigestScheme ( ) ; AuthCache authCache = new BasicAuthCache ( ) ; digestAuth . overrideParamter ( "realm" , "SPARQL" ) ; digestAuth . overrideParamter ( "nonce" , "whatever" ) ; authCache . put ( targetHost , digestAuth ) ; BasicHttpContext ret = new BasicHttpContext ( ) ; ret . setAttribute ( HttpClientContext . AUTH_CACHE , authCache ) ; return ret ; } else { return null ; } }
Return a context with digest Auth if there is a userName, otherwise null context
 @param targetHost
 @return
Return a context with digest Auth if there is a userName otherwise null context @param targetHost @return
// Suppose we already know the expected nonce value