public class Message
extends net.ssehub.easy.basics.messages.Message
ReasoningResult class, expressing on error/warning of a complete ReasoningResult. Takes
a series of lists, which shall be consistent in size. Complex textual representations are calculated on demand
when requesting the respective information (rather than calculating this without need beforehand in a reasoner).| Modifier and Type | Class and Description |
|---|---|
static class |
Message.SuggestionType
Defines supported suggestion types.
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<net.ssehub.easy.varModel.model.Project> |
conflictingElementProjects |
private java.util.List<net.ssehub.easy.varModel.model.ModelElement> |
conflictingElements |
private java.util.List<Message.SuggestionType> |
conflictingElementSuggestions |
private java.util.List<net.ssehub.easy.varModel.confModel.IDecisionVariable> |
constraintVariables |
private java.util.List<java.lang.Integer> |
errorClassification |
private java.util.List<net.ssehub.easy.varModel.cst.ConstraintSyntaxTree> |
problemConstraintParts |
private java.util.List<net.ssehub.easy.varModel.model.Constraint> |
problemConstraints |
private java.util.List<java.util.Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>> |
problemVariables |
private java.util.List<java.util.Set<net.ssehub.easy.varModel.model.AbstractVariable>> |
variablesInConstraints |
| Constructor and Description |
|---|
Message(java.lang.String explanation,
java.util.List<net.ssehub.easy.varModel.model.ModelElement> conflictingElements,
net.ssehub.easy.basics.messages.Status status)
Sole constructor for multiple conflicting elements.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConflictingElementProjects(java.util.List<net.ssehub.easy.varModel.model.Project> conflictingElementProjects)
Method for adding conflicting element Projects.
|
void |
addConflictingElementSuggestions(java.util.List<Message.SuggestionType> conflictingElementSuggestions)
Method for adding conflicting element Suggestions.
|
void |
addConstraintVariables(java.util.List<java.util.Set<net.ssehub.easy.varModel.model.AbstractVariable>> variables)
Method for adding a list of
AbstractVariables that are involved in each failed constraint. |
void |
addErrorClassification(java.util.List<java.lang.Integer> errorClassification)
Method for adding a list of reasoning error classifiers Null if non.
|
void |
addNamedConstraintVariables(java.util.List<net.ssehub.easy.varModel.confModel.IDecisionVariable> constraintVariables)
Method for adding a list of ConstraintVariables of a failed constraint.
|
void |
addProblemConstraintParts(java.util.List<net.ssehub.easy.varModel.cst.ConstraintSyntaxTree> constraints)
Method for adding a list of partial
ConstraintSyntaxTrees that are involved in each failed constraint. |
void |
addProblemConstraints(java.util.List<net.ssehub.easy.varModel.model.Constraint> constraints)
Method for adding a list of
Constraints that are involved in each failed constraint. |
void |
addProblemVariables(java.util.List<java.util.Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>> variables)
Method for adding a list of
IDecisionVariables that are involved in each failed constraint. |
private java.lang.String |
append(java.lang.String res,
java.lang.String text)
Appends
text and a line end to res. |
static java.util.List<net.ssehub.easy.varModel.model.ModelElement> |
createList(net.ssehub.easy.varModel.model.ModelElement element)
Creates a list with on element.
|
java.util.List<java.lang.String> |
getConflictComments()
Returns the list of conflicting item comments.
|
java.util.List<java.lang.String> |
getConflictLabels()
Returns the list of conflicting item labels.
|
java.util.List<net.ssehub.easy.varModel.model.Project> |
getConflictProjects()
Returns the list of conflicting item Projects.
|
java.util.List<net.ssehub.easy.varModel.model.ModelElement> |
getConflicts()
Returns the list of conflicting items.
|
int |
getConflictsCount()
Returns the number of conflicting elements.
|
java.util.List<java.lang.String> |
getConflictSuggestions()
Returns the list of conflicting item Suggestions.
|
java.util.List<Message.SuggestionType> |
getConflictSuggestionTypes()
Returns the list of conflicting item suggestion types.
|
java.util.List<java.util.Set<net.ssehub.easy.varModel.model.AbstractVariable>> |
getConstraintVariables()
Method for returning a list of
AbstractVariables that are involved in each failed constraint. |
java.util.List<java.lang.Integer> |
getErrorClassification()
Method for returning a list of reasoning error classifiers.
|
java.util.List<net.ssehub.easy.varModel.confModel.IDecisionVariable> |
getNamedConstraintVariables()
Method for returning a list of ConstraintVariables of a failed constraint.
|
java.util.List<net.ssehub.easy.varModel.cst.ConstraintSyntaxTree> |
getProblemConstraintParts()
Method for returning a list of partial
ConstraintSyntaxTrees that are involved in each failed constraint. |
java.util.List<net.ssehub.easy.varModel.model.Constraint> |
getProblemConstraints()
Method for returning a list of full
Constraints that are involved in each failed constraint. |
java.util.List<java.util.Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>> |
getProblemVariables()
Method for returning a list of
IDecisionVariables that are involved in each failed constraint. |
private static int |
min(int v1,
int v2,
int v3)
Returns the minimum of the three given integer values.
|
private static int |
min(int v1,
int v2,
int v3,
int v4)
Returns the minimum of the four given integer values.
|
private static boolean |
noResult(java.lang.String result) |
private java.lang.String |
problemPointsToString(java.util.Set<net.ssehub.easy.varModel.model.AbstractVariable> vars)
Turns given variables into a problem points description.
|
java.lang.String |
toString() |
private java.lang.String |
toString(net.ssehub.easy.varModel.model.Constraint constraint,
net.ssehub.easy.varModel.confModel.IDecisionVariable namedVariable)
Turns a constraint into a string representation.
|
private java.lang.String |
toString(net.ssehub.easy.varModel.model.ModelElement elt,
net.ssehub.easy.varModel.confModel.IDecisionVariable namedVariable)
Turns a model element into a string representation.
|
private java.lang.String |
traceToTop(net.ssehub.easy.varModel.model.ModelElement element)
Method for creating a msg of trace to the top element
of constraint or variable that fail in the reasoning.
|
private java.util.List<net.ssehub.easy.varModel.model.ModelElement> conflictingElements
private java.util.List<java.util.Set<net.ssehub.easy.varModel.model.AbstractVariable>> variablesInConstraints
private java.util.List<java.util.Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>> problemVariables
private java.util.List<net.ssehub.easy.varModel.cst.ConstraintSyntaxTree> problemConstraintParts
private java.util.List<net.ssehub.easy.varModel.model.Constraint> problemConstraints
private java.util.List<net.ssehub.easy.varModel.model.Project> conflictingElementProjects
private java.util.List<Message.SuggestionType> conflictingElementSuggestions
private java.util.List<net.ssehub.easy.varModel.confModel.IDecisionVariable> constraintVariables
private java.util.List<java.lang.Integer> errorClassification
public Message(java.lang.String explanation,
java.util.List<net.ssehub.easy.varModel.model.ModelElement> conflictingElements,
net.ssehub.easy.basics.messages.Status status)
explanation - A textual representation of this messageconflictingElements - A list of model elements which lead to the current message, or nullstatus - The status of this message, e. g. Error or Warningpublic static final java.util.List<net.ssehub.easy.varModel.model.ModelElement> createList(net.ssehub.easy.varModel.model.ModelElement element)
element - the element to put into the listelement as member if null != element, null elsepublic java.util.List<net.ssehub.easy.varModel.model.ModelElement> getConflicts()
public int getConflictsCount()
private static int min(int v1,
int v2,
int v3)
v1 - the first valuev2 - the second valuev3 - the third valueprivate static int min(int v1,
int v2,
int v3,
int v4)
v1 - the first valuev2 - the second valuev3 - the third valuev4 - the fourth valuepublic java.util.List<java.lang.String> getConflictLabels()
public java.util.List<java.lang.String> getConflictComments()
private java.lang.String toString(net.ssehub.easy.varModel.model.Constraint constraint,
net.ssehub.easy.varModel.confModel.IDecisionVariable namedVariable)
constraint - the constraintnamedVariable - the related named variable (may be null)private static boolean noResult(java.lang.String result)
private java.lang.String toString(net.ssehub.easy.varModel.model.ModelElement elt,
net.ssehub.easy.varModel.confModel.IDecisionVariable namedVariable)
DisplayNameProvider and
toString(Constraint, IDecisionVariable).elt - the element to be turned into a string representationnamedVariable - the related named variable (may be null)private java.lang.String traceToTop(net.ssehub.easy.varModel.model.ModelElement element)
element - Constraint of Variable.public void addConflictingElementSuggestions(java.util.List<Message.SuggestionType> conflictingElementSuggestions)
conflictingElementSuggestions - conflicting element Suggestions.public java.util.List<Message.SuggestionType> getConflictSuggestionTypes()
public java.util.List<java.lang.String> getConflictSuggestions()
private java.lang.String problemPointsToString(java.util.Set<net.ssehub.easy.varModel.model.AbstractVariable> vars)
vars - the variablespublic void addConflictingElementProjects(java.util.List<net.ssehub.easy.varModel.model.Project> conflictingElementProjects)
conflictingElementProjects - conflicting element Projects.public java.util.List<net.ssehub.easy.varModel.model.Project> getConflictProjects()
public void addConstraintVariables(java.util.List<java.util.Set<net.ssehub.easy.varModel.model.AbstractVariable>> variables)
AbstractVariables that are involved in each failed constraint.variables - List of variables.public java.util.List<java.util.Set<net.ssehub.easy.varModel.model.AbstractVariable>> getConstraintVariables()
AbstractVariables that are involved in each failed constraint.public void addProblemVariables(java.util.List<java.util.Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>> variables)
IDecisionVariables that are involved in each failed constraint.variables - List of variables.public java.util.List<java.util.Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>> getProblemVariables()
IDecisionVariables that are involved in each failed constraint.public void addProblemConstraintParts(java.util.List<net.ssehub.easy.varModel.cst.ConstraintSyntaxTree> constraints)
ConstraintSyntaxTrees that are involved in each failed constraint.constraints - List of constraint trees (elements may be null). The entries in this
list must correspond to addProblemConstraints(List).public void addProblemConstraints(java.util.List<net.ssehub.easy.varModel.model.Constraint> constraints)
Constraints that are involved in each failed constraint. The entries in this
list must correspond to addProblemConstraintParts(List).constraints - List of constraints.public java.util.List<net.ssehub.easy.varModel.cst.ConstraintSyntaxTree> getProblemConstraintParts()
ConstraintSyntaxTrees that are involved in each failed constraint.
The result must correspond to getProblemConstraints().public java.util.List<net.ssehub.easy.varModel.model.Constraint> getProblemConstraints()
Constraints that are involved in each failed constraint.
The result must correspond to getProblemConstraintParts().public void addNamedConstraintVariables(java.util.List<net.ssehub.easy.varModel.confModel.IDecisionVariable> constraintVariables)
constraintVariables - ConstraintVariable or null.public java.util.List<net.ssehub.easy.varModel.confModel.IDecisionVariable> getNamedConstraintVariables()
public void addErrorClassification(java.util.List<java.lang.Integer> errorClassification)
errorClassification - defined error codes or null.public java.util.List<java.lang.Integer> getErrorClassification()
public java.lang.String toString()
toString in class java.lang.Objectprivate java.lang.String append(java.lang.String res,
java.lang.String text)
text and a line end to res.res - the text to append totext - the text to appendCopyright © 2009 - 2018 SSE. All Rights Reserved.