Class ReasonerHelper
- java.lang.Object
-
- net.ssehub.easy.reasoning.core.impl.ReasonerHelper
-
public class ReasonerHelper extends java.lang.ObjectSome helpful methods for reasoners.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description ReasonerHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.util.List<java.lang.String>appendMessage(java.util.List<java.lang.String> messages, java.lang.String message)Appends a messagetextto the list of messages.private static java.util.List<java.lang.String>appendMessage(java.util.List<java.lang.String> messages, java.lang.Throwable th)Appends the message ofthto the list of messages.static ValueCreationResultcreateValue(Configuration cfg, AbstractVariable var, IDatatype type, ReasonerConfiguration reasonerConfiguration, ProgressObserver observer)Creates the value for a certain IVML type/variable.
-
-
-
Method Detail
-
createValue
public static ValueCreationResult createValue(Configuration cfg, AbstractVariable var, IDatatype type, ReasonerConfiguration reasonerConfiguration, ProgressObserver observer)
Creates the value for a certain IVML type/variable. This method is intended as a generic fallback. It just uses thevalue factoryand does not do any reasoning.- Parameters:
cfg- the configuration to operate on (will not be modified)var- the variable to create the value for (may be null iftypeis given, may imply additional constraints, takes precedence overtype)type- the type to create the value for (may be null ifvaris given)reasonerConfiguration- the reasoner configuration to be used for reasoning (e.g. taken from the UI, may be null)observer- an optional progress observer, shall beProgressObserver.NO_OBSERVERif unused- Returns:
- the value creation result
-
appendMessage
private static java.util.List<java.lang.String> appendMessage(java.util.List<java.lang.String> messages, java.lang.Throwable th)Appends the message ofthto the list of messages.- Parameters:
messages- the messages (may be null)th- the throwable to take the message from- Returns:
messagesor a new list
-
appendMessage
private static java.util.List<java.lang.String> appendMessage(java.util.List<java.lang.String> messages, java.lang.String message)Appends a messagetextto the list of messages.- Parameters:
messages- the messages (may be null)message- the message to append- Returns:
messagesor a new list
-
-