public abstract class Formatter extends Object
Constructor and Description |
---|
Formatter() |
Modifier and Type | Method and Description |
---|---|
String |
format(Document document,
List<ValidationError> errors)
Format the errors for a given document
|
String |
format(Map<Document,List<ValidationError>> docErrorsMap)
Format errors for a set of documents as a String
|
void |
format(OutputStream outputStream,
Map<Document,List<ValidationError>> docErrorsMap)
Format and print the errors for a set of documents
|
abstract void |
format(PrintWriter printWriter,
Map<Document,List<ValidationError>> docErrorsMap)
Format and print the errors for a set of documents
|
abstract String |
formatError(Document document,
ValidationError error)
Format a single error as a string
|
public abstract void format(PrintWriter printWriter, Map<Document,List<ValidationError>> docErrorsMap) throws RedPenException, IOException
printWriter
- The printwriter destination for the errorsdocErrorsMap
- a map of documents to the corresponding list of errorsRedPenException
IOException
public abstract String formatError(Document document, ValidationError error) throws RedPenException
document
- the document the error is forerror
- the error to formatRedPenException
public void format(OutputStream outputStream, Map<Document,List<ValidationError>> docErrorsMap) throws RedPenException, IOException
outputStream
- the output stream destination for the errorsdocErrorsMap
- a map of documents to the corresponding list of errorsRedPenException
IOException
public String format(Map<Document,List<ValidationError>> docErrorsMap)
docErrorsMap
- a map of documents to the corresponding list of errorspublic String format(Document document, List<ValidationError> errors)
document
- the documenterrors
- the list of errors for the documentCopyright © 2015. All rights reserved.