public Response remove ( String id ) { assertNotEmpty ( id , "id" ) ; id = ensureDesignPrefix ( id ) ; String revision = null ; // Get the revision ID from ETag, removing leading and trailing " revision = client . executeRequest ( Http . HEAD ( new DatabaseURIHelper ( db . getDBUri ( ) ) . documentUri ( id ) ) ) . getConnection ( ) . getHeaderField ( "ETag" ) ; if ( revision != null ) { revision = revision . substring ( 1 , revision . length ( ) - 1 ) ; return db . remove ( id , revision ) ; } else { throw new CouchDbException ( "No ETag header found for design document with id " + id ) ; } }
Removes a design document from the database .