src/main/java/org/vivoweb/harvester/operations/DeleteProfile.java
/**
	 * @param newUri The uri for external entity
	 * @return check whether the random number generated already exist in VIVO
	 */
@param newUri The uri for external entity
@return check whether the random number generated already exist in VIVO
@param newUri The uri for external entity @return check whether the random number generated already exist in VIVO
private boolean isNotInVivo(String newUri) {
		boolean inVivo = false;
		String sparqlQuery = "SELECT (count(?s) as ?count) \n" +
			 "WHERE { \n" +
			 "GRAPH <http://vitro.mannlib.cornell.edu/a/graph/wcmcPublications> {\n" +
			 "<" + newUri.trim() + "> ?p ?o . \n" +
			 "}}";
		logger.info(sparqlQuery);
		SDBJenaConnect vivoJena = this.jcf.getConnectionfromPool("dataSet");
		ResultSet rs;
		try {
		rs = vivoJena.executeSelectQuery(sparqlQuery, true);
		int count = Integer.parseInt(rs.nextSolution().get("count").toString().replace("^^http://www.w3.org/2001/XMLSchema#integer", ""));
		if(count == 0) 
		inVivo = false;
		} catch(IOException e) {
		logger.error("Error connecting to Jena Database" , e);
		}
		this.jcf.returnConnectionToPool(vivoJena, "dataSet");
		return inVivo;
	}
private boolean isNotInVivo ( String newUri ) { boolean inVivo = false ; String sparqlQuery = "SELECT (count(?s) as ?count) \n" + "WHERE { \n" + "GRAPH <http://vitro.mannlib.cornell.edu/a/graph/wcmcPublications> {\n" + "<" + newUri . trim ( ) + "> ?p ?o . \n" + "}}" ; logger . info ( sparqlQuery ) ; SDBJenaConnect vivoJena = this . jcf . getConnectionfromPool ( "dataSet" ) ; ResultSet rs ; try { rs = vivoJena . executeSelectQuery ( sparqlQuery , true ) ; int count = Integer . parseInt ( rs . nextSolution ( ) . get ( "count" ) . toString ( ) . replace ( "^^http://www.w3.org/2001/XMLSchema#integer" , "" ) ) ; if ( count == 0 ) inVivo = false ; } catch ( IOException e ) { logger . error ( "Error connecting to Jena Database" , e ) ; } this . jcf . returnConnectionToPool ( vivoJena , "dataSet" ) ; return inVivo ; }
@param newUri The uri for external entity
 @return check whether the random number generated already exist in VIVO
@param newUri The uri for external entity @return check whether the random number generated already exist in VIVO