Package | Description |
---|---|
cc.redpen |
contains
RedPen Main class and some important classes used thought
the project. |
cc.redpen.formatter |
Formatter and the implementations are provided.
|
cc.redpen.validator |
Validators and the factory classes are provided.
|
Modifier and Type | Method and Description |
---|---|
List<ValidationError> |
RedPen.validate(Document document)
validate the input document collection.
|
Map<Document,List<ValidationError>> |
RedPen.validate(List<Document> documents)
validate the input document collection.
|
Modifier and Type | Field and Description |
---|---|
static Comparator<ValidationError> |
JSONBySentenceFormatter.BY_SENTENCE_COMPARATOR
Reusable comparator to compare errors by their position in the document, starting with the line number, followed by the offset within the line, and finally the sentence content
|
Modifier and Type | Method and Description |
---|---|
protected org.json.JSONObject |
JSONFormatter.asJSON(ValidationError error)
Render a single redpen error as JSON
|
protected org.json.JSONObject |
JSONBySentenceFormatter.asJSON(ValidationError error)
Render a single redpen error as JSON
|
String |
XMLFormatter.formatError(Document document,
ValidationError error) |
String |
PlainFormatter.formatError(Document document,
ValidationError error) |
String |
PlainBySentenceFormatter.formatError(Document document,
ValidationError error) |
String |
JSONFormatter.formatError(Document document,
ValidationError error) |
abstract String |
Formatter.formatError(Document document,
ValidationError error)
Format a single error as a string
|
Modifier and Type | Method and Description |
---|---|
protected org.json.JSONObject |
JSONFormatter.asJSON(Document document,
List<ValidationError> errors)
Render as a JSON object a list of errors for a given document
|
protected org.json.JSONObject |
JSONBySentenceFormatter.asJSON(Document document,
List<ValidationError> errors)
Render as a JSON object a list of errors for a given document
|
String |
JSONFormatter.format(Document document,
List<ValidationError> errors) |
String |
Formatter.format(Document document,
List<ValidationError> errors)
Format the errors for a given document
|
String |
Formatter.format(Map<Document,List<ValidationError>> docErrorsMap)
Format errors for a set of documents as a String
|
void |
Formatter.format(OutputStream outputStream,
Map<Document,List<ValidationError>> docErrorsMap)
Format and print the errors for a set of documents
|
void |
XMLFormatter.format(PrintWriter pw,
Map<Document,List<ValidationError>> docErrorsMap) |
void |
PlainFormatter.format(PrintWriter pw,
Map<Document,List<ValidationError>> docErrorsMap) |
void |
PlainBySentenceFormatter.format(PrintWriter pw,
Map<Document,List<ValidationError>> docErrorsMap) |
void |
JSONFormatter.format(PrintWriter pw,
Map<Document,List<ValidationError>> docErrorsMap) |
abstract void |
Formatter.format(PrintWriter printWriter,
Map<Document,List<ValidationError>> docErrorsMap)
Format and print the errors for a set of documents
|
Modifier and Type | Method and Description |
---|---|
void |
Validator.setErrorList(List<ValidationError> errors) |
Copyright © 2015. All rights reserved.