Class ErrorData

java.lang.Object
org.hobbit.core.data.ErrorData

public class ErrorData extends Object
A simple data structure that represents errors that components can report.
Author:
Michael Röder (michael.roeder@uni-paderborn.de)
  • Field Details

    • containerName

      protected String containerName
      ID of the container reporting the error.
    • errorType

      protected String errorType
      IRI of the error type (optional).
    • label

      protected String label
      A string that can be used as short label of an error (optional, the error type label will be used as default)
    • description

      protected String description
      A string that can be used as a short description of an error (optional, the error type description will be used as default).
    • details

      protected String details
      A string that contains details about the error, e.g., a stack trace (optional).
  • Constructor Details

    • ErrorData

      public ErrorData()
  • Method Details

    • getContainerId

      public String getContainerId()
      Returns:
      the containerId
    • setContainerId

      public void setContainerId(String containerId)
      Parameters:
      containerId - the containerId to set
    • getErrorType

      public String getErrorType()
      Returns:
      the errorType
    • setErrorType

      public void setErrorType(String errorType)
      Parameters:
      errorType - the errorType to set
    • getLabel

      public String getLabel()
      Returns:
      the label
    • setLabel

      public void setLabel(String label)
      Parameters:
      label - the label to set
    • getDescription

      public String getDescription()
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - the description to set
    • getDetails

      public String getDetails()
      Returns:
      the details
    • setDetails

      public void setDetails(String details)
      Parameters:
      details - the details to set
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • createFromException

      public static ErrorData createFromException(Exception e, String containerName)
      Creates an instance of a HobbitErrors.UnhandledException error based on the data of the given exception.
      Parameters:
      e - the exception that should be expressed as error
      containerName - the ID of the container that reports the error
      Returns:
      the newly created ErrorData instance or null if the given container name is null.