package com.marklogic.client.example.handson.unit04;

public class DeleteDocument {

}

@@ -51,37 +51,1240 @@
 4;%0A%0A
-public class DeleteDocument %7B
+import java.io.IOException;%0A%0Aimport com.marklogic.client.DatabaseClient;%0Aimport com.marklogic.client.DatabaseClientFactory;%0Aimport com.marklogic.client.document.GenericDocumentManager;%0Aimport com.marklogic.client.example.handson.Util;%0Aimport com.marklogic.client.example.handson.Util.ExampleProperties;%0A%0A/**%0A *  DeleteDocument illustrates deleting documents%0A */%0Apublic class DeleteDocument %7B%0A%09public static void main(String%5B%5D args)%0A%09throws IOException %7B%0A%09%09run(Util.loadProperties());%0A%09%7D%0A%0A%09public static void run(ExampleProperties props) throws IOException %7B%0A%09%09System.out.println(%22example: %22+DeleteDocument.class.getName());%0A%0A%09%09// create the client%0A%09%09DatabaseClient client = DatabaseClientFactory.newClient(%0A%09%09%09%09props.host, props.port, props.adminUser, props.adminPassword,%0A%09%09%09%09props.authType);%0A%0A%09%09// delete the documents that the examples wrote%0A%09    deleteDocuments(client);%0A%09%7D%0A%09%0A%09public static void deleteDocuments(DatabaseClient client) %7B%0A%09%09GenericDocumentManager docMgr =  client.newDocumentManager();%0A%0A%09%09String jsonDocId = %22/image/20140721_144421b.jpg.json%22;%0A%09%09String binaryDocId = %22/binary/20140721_144421b.jpg%22;%0A%0A%09%09docMgr.delete(jsonDocId,binaryDocId);%0A%09%09%0A%09%09System.out.println(%22Deleted %22+ jsonDocId + %22 and %22+ binaryDocId);%0A%09%7D
 %0A%0A%7D%0A

delete documents