public boolean contains ( String id ) { assertNotEmpty ( id , "id" ) ; HttpResponse response = null ; try { response = head ( buildUri ( getDBUri ( ) ) . pathEncoded ( id ) . build ( ) ) ; } catch ( NoDocumentException e ) { return false ; } finally { close ( response ) ; } return true ; }
Checks if a document exist in the database .