Package jadex.bpmn.model.io
Class AbstractErrorReportBuilder
java.lang.Object
jadex.bpmn.model.io.AbstractErrorReportBuilder
Helper class for building error reports.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String[]The element categories.protected jadex.collection.MultiCollection<jadex.common.Tuple,String> The parse errors (tuple(elements) -> {error messages}).The external documents for links in html error reports (id -> html text).protected StringThe file name with path (optional).protected StringThe unqualified (model/file) name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjadex.model.IErrorReportBuild the error based on the given entries (if any).protected voidgenerateDetails(StringBuffer buf, String type, Set<Object> elements) Generate detail HTML code for the given elements.protected StringGenerate an html representation of the report.protected StringGenerate a string representation of the report.protected voidgenerateOverview(StringBuffer buf, String type, Set<Object> elements) Generate overview HTML code for the given elements.protected jadex.common.Tuple[]getElementErrors(Object ancestor) Get all elements which have errors and are contained in the given element.protected jadex.common.Tuple[]Get all invalid elements.protected String[]getMessages(jadex.common.Tuple path) Get the messages for a given element.protected ObjectgetObject(jadex.common.Tuple element) abstract StringgetObjectName(Object obj) Get the name of an object.getOtherErrors(Set<Object> excludes) Get other errors, not in the given tags.getOwnedElementErrors(String category) Get elements of the given owner type, which have errors or contain elements with errors.abstract ObjectgetPathElementObject(Object element) Get the object of a path elementabstract booleanisInCategory(Object obj, String category) Test if an object belongs to a category.
-
Field Details
-
name
The unqualified (model/file) name. -
filename
The file name with path (optional). -
categories
The element categories. -
entries
The parse errors (tuple(elements) -> {error messages}). -
externals
The external documents for links in html error reports (id -> html text).
-
-
Constructor Details
-
AbstractErrorReportBuilder
public AbstractErrorReportBuilder(String name, String filename, String[] categories, jadex.collection.MultiCollection<jadex.common.Tuple, String> entries, Map<String, String> externals) Build the error based on the given entries (if any). Entries represent error messages mapped by the path to the xml element (as a tuple of stack elements).- Parameters:
name- The unqualified (model/file) name.filename- The file name with path (optional).categories- The element categories.entries- The parse errors (tuple(stack elements) -> {error messages}).externals- The external documents for links in html error reports, if any (id -> html text).
-
-
Method Details
-
buildErrorReport
public jadex.model.IErrorReport buildErrorReport()Build the error based on the given entries (if any). Entries represent error messages mapped by the path to the xml element (as a tuple of stack elements).- Returns:
- The error report.
-
getPathElementObject
Get the object of a path element- Parameters:
obj- An item (entry) of a tuple in the multi collection.- Returns:
- The object corresponding to the entry.
-
isInCategory
Test if an object belongs to a category.- Parameters:
obj- An item (entry) of a tuple in the multi collection.category- the category name.- Returns:
- True, when the object belongs to the category.
-
getObjectName
Get the name of an object.- Parameters:
obj- An object having an error.- Returns:
- A human readable name of the object.
-
getElements
protected jadex.common.Tuple[] getElements()Get all invalid elements. -
getMessages
Get the messages for a given element. -
generateErrorText
Generate a string representation of the report. -
generateErrorHTML
Generate an html representation of the report. -
getOwnedElementErrors
Get elements of the given owner type, which have errors or contain elements with errors. -
getOtherErrors
Get other errors, not in the given tags. -
getObject
-
getElementErrors
Get all elements which have errors and are contained in the given element. -
generateOverview
Generate overview HTML code for the given elements. -
generateDetails
Generate detail HTML code for the given elements.
-