public void removeTombstone ( final String path ) throws FedoraException { final HttpDelete delete = httpHelper . createDeleteMethod ( path + "/fcr:tombstone" ) ; try { final HttpResponse response = httpHelper . execute ( delete ) ; final StatusLine status = response . getStatusLine ( ) ; final String uri = delete . getURI ( ) . toString ( ) ; if ( status . getStatusCode ( ) == SC_NO_CONTENT ) { LOGGER . debug ( "triples updated successfully for resource {}" , uri ) ; } else if ( status . getStatusCode ( ) == SC_NOT_FOUND ) { LOGGER . error ( "resource {} does not exist, cannot update" , uri ) ; throw new NotFoundException ( "resource " + uri + " does not exist, cannot update" ) ; } else { LOGGER . error ( "error updating resource {}: {} {}" , uri , status . getStatusCode ( ) , status . getReasonPhrase ( ) ) ; throw new FedoraException ( "error updating resource " + uri + ": " + status . getStatusCode ( ) + " " + status . getReasonPhrase ( ) ) ; } } catch ( final FedoraException e ) { throw e ; } catch ( final Exception e ) { LOGGER . error ( "Error executing request" , e ) ; throw new FedoraException ( e ) ; } finally { delete . releaseConnection ( ) ; } }
Remove tombstone located at given path