Index: /trunk/gli/src/org/greenstone/gatherer/shell/GImportProgressMonitor.java
===================================================================
--- /trunk/gli/src/org/greenstone/gatherer/shell/GImportProgressMonitor.java	(revision 7356)
+++ /trunk/gli/src/org/greenstone/gatherer/shell/GImportProgressMonitor.java	(revision 7357)
@@ -79,4 +79,5 @@
     static final private String BLOCKED_ATTRIBUTE = "blocked";
     static final private String CONSIDERED_ATTRIBUTE = "considered";
+    static final private String FAILED_ATTRIBUTE = "failed";
     static final private String IGNORED_ATTRIBUTE = "ignored";
     static final private String IMPORT_ELEMENT = "Import";
@@ -97,7 +98,14 @@
     static final private String FILE_ELEMENT = "File";
     /** The element name of a file processing message. */
-    static final private String FILEPROCESSING_ELEMENT = "Processing";
+    static final private String PROCESSING_ELEMENT = "Processing";
+    /** The element name of a processing error message. */
+    static final private String PROCESSINGERROR_ELEMENT = "ProcessingError";
     /** The element name of an import complete message. */
     static final private String IMPORTCOMPLETE_ELEMENT = "ImportComplete";
+    /** The element name of a file not processed. */
+    static final private String NONPROCESSEDFILE_ELEMENT = "NonProcessedFile";
+    /** The element name of a file not recognised. */
+    static final private String NONRECOGNISEDFILE_ELEMENT = "NonRecognisedFile";
+    
 
     public GImportProgressMonitor() {
@@ -214,5 +222,5 @@
 	    }
 	    // Or we're being told what plugin is actually processing the file
-	    else if(name.equals(FILEPROCESSING_ELEMENT)) {
+	    else if(name.equals(PROCESSING_ELEMENT)) {
 		///ystem.err.println("#FileProcessing");
 		// If we are at lower mode settings fire a new 'dumbed down' event
@@ -221,10 +229,32 @@
 		    args[0] = element.getAttribute(NAME_ATTRIBUTE);
 		    args[1] = element.getAttribute(PLUGIN_ATTRIBUTE);
-		    if(!args[1].equals("")) {
-			queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.FileProcessing", args), event.getStatus()));
-		    }
-		    else {
-			queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.FileNotProcessed", args), event.getStatus()));
-		    }
+		    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.FileProcessing", args), event.getStatus()));
+		    args = null;
+		}
+	    }
+	    // processing error
+	    else if (name.equals(PROCESSINGERROR_ELEMENT)) {
+		if(Gatherer.config.getMode() <= threshold) {
+		    String args[] = new String[1];
+		    args[0] = element.getAttribute(NAME_ATTRIBUTE);
+		    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.FileProcessingError", args), event.getStatus()));
+		    args = null;
+		}
+	    }
+	    // unrecognised file
+	    else if (name.equals(NONRECOGNISEDFILE_ELEMENT)) {
+		if(Gatherer.config.getMode() <= threshold) {
+		    String args[] = new String[1];
+		    args[0] =element.getAttribute(NAME_ATTRIBUTE);
+		    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.FileNotRecognised", args), event.getStatus()));
+		    args = null;
+		}
+	    }
+	    // unprocessed file
+	    else if (name.equals(NONPROCESSEDFILE_ELEMENT)) {
+		if(Gatherer.config.getMode() <= threshold) {
+		    String args[] = new String[1];
+		    args[0] =element.getAttribute(NAME_ATTRIBUTE);		    
+		    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.FileNotProcessed", args), event.getStatus()));
 		    args = null;
 		}
@@ -237,21 +267,16 @@
 		if(Gatherer.config.getMode() <= threshold) {
 		    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete1"), event.getStatus()));
-		    String args[] = new String[1];
-		    args[0] = element.getAttribute(CONSIDERED_ATTRIBUTE);
-		    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete2", args), event.getStatus()));
+		    String considered_str = element.getAttribute(CONSIDERED_ATTRIBUTE);
+		    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete2", considered_str), event.getStatus()));
+		    considered_str = null;
 		    // The number of documents processed
 		    String processed_str = element.getAttribute(PROCESSED_ATTRIBUTE);
 		    if(!processed_str.equals(StaticStrings.ZERO_CHARACTER)) {
-			args = new String[3];
-			args[0] = element.getAttribute(PROCESSED_ATTRIBUTE);
-			if(args[0].equals(StaticStrings.ONE_CHARACTER)) {
-			    args[1] = Dictionary.get("GShell.Import.Was");
-			    args[2] = Dictionary.get("GShell.Import.Is");
+			if(processed_str.equals(StaticStrings.ONE_CHARACTER)) {
+			    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Processed.1"), event.getStatus()));
 			}
 			else {
-			    args[1] = Dictionary.get("GShell.Import.Were");
-			    args[2] = Dictionary.get("GShell.Import.Are");
-			}
-			queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Processed", args), event.getStatus()));
+			    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Processed", processed_str), event.getStatus()));
+			}
 		    }
 		    // Try to set num docs
@@ -262,40 +287,41 @@
 			num_docs = 0;
 		    }
-
 		    processed_str = null;
+
 		    // The number of documents blocked
 		    String blocked_str = element.getAttribute(BLOCKED_ATTRIBUTE);
 		    if(!blocked_str.equals(StaticStrings.ZERO_CHARACTER)) {
-			args = new String[2];
-			args[0] = element.getAttribute(BLOCKED_ATTRIBUTE);
-			if(args[0].equals(StaticStrings.ONE_CHARACTER)) {
-			    args[1] = Dictionary.get("GShell.Import.Was");
-			}
-			else {
-			    args[1] = Dictionary.get("GShell.Import.Were");
-			}
-			queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Blocked", args), event.getStatus()));
+			if (blocked_str.equals(StaticStrings.ONE_CHARACTER)) {
+			    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Blocked.1"), event.getStatus()));
+			} else {
+			    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Blocked", blocked_str), event.getStatus()));
+			}
 		    }
 		    blocked_str = null;
+		    
 		    // The number of documents ignored
 		    String ignored_str = element.getAttribute(IGNORED_ATTRIBUTE);
 		    if(!ignored_str.equals(StaticStrings.ZERO_CHARACTER)) {
-			args = new String[3];
-			args[0] = element.getAttribute(IGNORED_ATTRIBUTE);
-			if(args[0].equals(StaticStrings.ONE_CHARACTER)) {
-			    args[1] = Dictionary.get("GShell.Import.Was");
-			    args[2] = Dictionary.get("GShell.Import.Is");
-			}
-			else {
-			    args[1] = Dictionary.get("GShell.Import.Were");
-			    args[2] = Dictionary.get("GShell.Import.Are");
-			}
-			queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Ignored", args), event.getStatus()));
+			if(ignored_str.equals(StaticStrings.ONE_CHARACTER)) {
+			    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Ignored.1"), event.getStatus()));
+			} else {
+			    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Ignored", ignored_str), event.getStatus()));
+			}
 		    }
 		    ignored_str = null;
-		    args = null;
+		    
+		    // The number of documents failed
+		    String failed_str = element.getAttribute(FAILED_ATTRIBUTE);
+		    if(!failed_str.equals(StaticStrings.ZERO_CHARACTER)) {
+			if(failed_str.equals(StaticStrings.ONE_CHARACTER)) {
+			    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Failed.1"), event.getStatus()));
+			} else {
+			    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete.Failed", failed_str), event.getStatus()));
+			}
+		    }
+		    failed_str = null;
 		    // Message is finally ready
 		    queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.Import.ImportComplete3"), event.getStatus()));
-		}
+		} // if mode below threshhold
 		else {
 		    // Try to set num docs
@@ -313,5 +339,5 @@
 		event.veto();
 	    }
-	}
+	} // GLI output
 	else if(Gatherer.config.getMode() <= threshold) {
 	    event.veto();
