src/de/uka/ipd/idaho/goldenGateServer/dio/client/GoldenGateDioClient.java
/**
	 * Delete a documents from the DIO. If a user other than the one this client
	 * is authenticated with holds the lock for the document with the specified
	 * ID, the deletion fails and an IOException will be thrown.
	 * @param documentId the ID of the document to delete
	 * @return an array holding the logging messages collected during the
	 *         deletion process.
	 */
Delete a documents from the DIO. If a user other than the one this client
is authenticated with holds the lock for the document with the specified
ID, the deletion fails and an IOException will be thrown.
@param documentId the ID of the document to delete
@return an array holding the logging messages collected during the
deletion process.
Delete a documents from the DIO . If a user other than the one this client is authenticated with holds the lock for the document with the specified ID the deletion fails and an IOException will be thrown . @param documentId the ID of the document to delete @return an array holding the logging messages collected during the deletion process .
public String[] deleteDocument(String documentId) throws IOException {
		if (!this.authClient.isLoggedIn()) throw new IOException("Not logged in.");
		Connection con = null;
		try {
			con = this.authClient.getConnection();
			BufferedWriter bw = con.getWriter();
			bw.write(DELETE_DOCUMENT);
			bw.newLine();
			bw.write(this.authClient.getSessionID());
			bw.newLine();
			bw.write(documentId);
			bw.newLine();
			bw.flush();
			BufferedReader br = con.getReader();
			String error = br.readLine();
			if (DELETE_DOCUMENT.equals(error)) {
				StringVector log = new StringVector();
				for (String logEntry; (logEntry = br.readLine()) != null;)
					log.addElement(logEntry);
				return log.toStringArray();
			}
			else throw new IOException(error);
		}
		catch (Exception e) {
			throw new IOException(e.getMessage());
		}
		finally {
			if (con != null)
				con.close();
		}
	}
public String [ ] deleteDocument ( String documentId ) throws IOException { if ( ! this . authClient . isLoggedIn ( ) ) throw new IOException ( "Not logged in." ) ; Connection con = null ; try { con = this . authClient . getConnection ( ) ; BufferedWriter bw = con . getWriter ( ) ; bw . write ( DELETE_DOCUMENT ) ; bw . newLine ( ) ; bw . write ( this . authClient . getSessionID ( ) ) ; bw . newLine ( ) ; bw . write ( documentId ) ; bw . newLine ( ) ; bw . flush ( ) ; BufferedReader br = con . getReader ( ) ; String error = br . readLine ( ) ; if ( DELETE_DOCUMENT . equals ( error ) ) { StringVector log = new StringVector ( ) ; for ( String logEntry ; ( logEntry = br . readLine ( ) ) != null ; ) log . addElement ( logEntry ) ; return log . toStringArray ( ) ; } else throw new IOException ( error ) ; } catch ( Exception e ) { throw new IOException ( e . getMessage ( ) ) ; } finally { if ( con != null ) con . close ( ) ; } }
Delete a documents from the DIO.
Delete a documents from the DIO .