Tabnine Logo
ErrorDocument
Code IndexAdd Tabnine to your IDE (free)

How to use
ErrorDocument
in
net.sf.taverna.t2.reference

Best Java code snippets using net.sf.taverna.t2.reference.ErrorDocument (Showing top 20 results out of 315)

origin: net.sf.taverna.t2.integration-testing/integration-testing-common

ErrorDocument errorDoc = (ErrorDocument) identified;
System.err.println("ERROR: " + identified.getId());
System.err.println(" message: " + errorDoc.getMessage());
if (errorDoc.getStackTraceStrings().isEmpty()) {
  System.err.println(" errorMessage: "
      + errorDoc.getExceptionMessage());
} else {
  System.err.println(" stacktrace:");
  System.err.println(errorDoc.getExceptionMessage());
  for (StackTraceElementBean stackTrace : errorDoc
      .getStackTraceStrings()) {
    System.err.println("	at " + stackTrace.getClassName() + "."
        + stackTrace.getMethodName() + "("
if (!errorDoc.getErrorReferences().isEmpty()) {
  System.err.print("Caused by ");
  for (T2Reference errorRef : errorDoc.getErrorReferences()) {
    printAllErrors(context.getReferenceService()
        .resolveIdentifier(errorRef, null, context));
origin: net.sf.taverna.t2.core/reference-impl

public synchronized void store(ErrorDocument theDoc) throws DaoException {
  store.put(theDoc.getId(), theDoc);
}

origin: net.sf.taverna.t2.workbench.views/results

public static void buildErrorDocumentTree(DefaultMutableTreeNode node, ErrorDocument errorDocument, InvocationContext context) {
  DefaultMutableTreeNode child = new DefaultMutableTreeNode(errorDocument);
  String exceptionMessage = errorDocument.getExceptionMessage();
  if (exceptionMessage != null && !exceptionMessage.equals("")) {
    DefaultMutableTreeNode exceptionMessageNode = new DefaultMutableTreeNode(exceptionMessage);
    child.add(exceptionMessageNode);
    List<StackTraceElementBean> stackTrace = errorDocument.getStackTraceStrings();
    if (stackTrace.size() > 0) {
      for (StackTraceElementBean stackTraceElement : stackTrace) {
  Set<T2Reference> errorReferences = errorDocument.getErrorReferences();
  for (T2Reference reference : errorReferences) {
    if (reference.getReferenceType().equals(T2ReferenceType.ErrorDocument)) {
origin: net.sf.taverna.t2.component/component-activity

    String exceptionMessage = errorDoc.getExceptionMessage();
    for (HandleException he : exceptionHandling
        .getHandleExceptions())
        matchingDoc = errorDoc;
    if (!errorDoc.getErrorReferences().isEmpty())
      for (T2Reference subRef : errorDoc.getErrorReferences())
        for (T2Reference newErrorRef : getErrors(subRef)) {
          ErrorDocument subDoc = errorService
String exceptionMessage = matchingDoc.getExceptionMessage();
      exceptionMessage, newException, depth, context).getId();
  exceptions.add(errorService.registerError(exceptionMessage,
      newException, 0, context).getId());
  return replacement;
  matchingDoc.getStackTraceStrings().clear();
T2Reference replacement = errorService.registerError(
    exceptionReplacement.getReplacementMessage(), newException,
    depth, context).getId();
exceptions.add(errorService.registerError(
    exceptionReplacement.getReplacementMessage(), newException, 0,
    context).getId());
return replacement;
origin: net.sf.taverna.t2.ui-components/results-view

  public Component getTreeCellRendererComponent(JTree tree,
      Object value, boolean selected, boolean expanded,
      boolean leaf, int row, boolean hasFocus) {
    Component renderer = null;
    if (value instanceof DefaultMutableTreeNode) {
      DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) value;
      Object userObject = treeNode.getUserObject();
      if (userObject instanceof ErrorDocument) {
        renderer = super.getTreeCellRendererComponent(tree,
            "<html><pre>" + StringEscapeUtils.escapeHtml(((ErrorDocument) userObject).getMessage()) + "</pre></html>", selected, expanded, leaf, row,
            hasFocus);
      }
    }
    if (renderer == null) {
      renderer = super.getTreeCellRendererComponent(tree,
          value, selected, expanded, leaf, row,
          hasFocus);
    }
    if (renderer instanceof JLabel) {
      JLabel label = (JLabel) renderer;
      label.setIcon(null);
    }
    return renderer;
  }
});
origin: net.sf.taverna.t2.core/provenanceconnector

  element.setAttribute("id", reference.toString());
  org.jdom.Element messageElement = new org.jdom.Element("message");
  messageElement.addContent(error.getExceptionMessage());
  element.addContent(messageElement);
} else if (reference.getReferenceType().equals(
origin: net.sf.taverna.t2/results

public static void buildErrorDocumentTree(DefaultMutableTreeNode node,
    ErrorDocument errorDocument, ReferenceService referenceService) {
  DefaultMutableTreeNode child = new DefaultMutableTreeNode(errorDocument);
  String exceptionMessage = errorDocument.getExceptionMessage();
  if (exceptionMessage != null && !exceptionMessage.equals("")) {
    DefaultMutableTreeNode exceptionMessageNode = new DefaultMutableTreeNode(
    child.add(exceptionMessageNode);
    List<StackTraceElementBean> stackTrace = errorDocument
        .getStackTraceStrings();
    if (stackTrace.size() > 0) {
      for (StackTraceElementBean stackTraceElement : stackTrace) {
  Set<T2Reference> errorReferences = errorDocument.getErrorReferences();
  for (T2Reference reference : errorReferences) {
    if (reference.getReferenceType().equals(
origin: net.sf.taverna.t2.workbench.views/results

public Component getTreeCellRendererComponent(JTree tree,
    Object value, boolean selected, boolean expanded,
    boolean leaf, int row, boolean hasFocus) {
  Component renderer = null;
  if (value instanceof DefaultMutableTreeNode) {
    DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) value;
    Object userObject = treeNode.getUserObject();
    if (userObject instanceof ErrorDocument) {
      ErrorDocument errorDocument = (ErrorDocument) userObject;
      renderer = super.getTreeCellRendererComponent(tree,
          errorDocument.getMessage(),
          selected, expanded, leaf, row, hasFocus);
    }
  }
  if (renderer == null) {
    renderer = super.getTreeCellRendererComponent(tree, value,
      selected, expanded, leaf, row, hasFocus);
  }
  if (renderer instanceof JLabel) {
    JLabel label = (JLabel) renderer;
    label.setIcon(null);
  }
  return renderer;
}

origin: net.sf.taverna.t2.lang/results

public static void buildErrorDocumentTree(DefaultMutableTreeNode node,
    ErrorDocument errorDocument, ReferenceService referenceService) {
  DefaultMutableTreeNode child = new DefaultMutableTreeNode(errorDocument);
  String exceptionMessage = errorDocument.getExceptionMessage();
  if (exceptionMessage != null && !exceptionMessage.equals("")) {
    DefaultMutableTreeNode exceptionMessageNode = new DefaultMutableTreeNode(
    child.add(exceptionMessageNode);
    List<StackTraceElementBean> stackTrace = errorDocument
        .getStackTraceStrings();
    if (stackTrace.size() > 0) {
      for (StackTraceElementBean stackTraceElement : stackTrace) {
  Set<T2Reference> errorReferences = errorDocument.getErrorReferences();
  for (T2Reference reference : errorReferences) {
    if (reference.getReferenceType().equals(
origin: net.sf.taverna.t2.lang/results

String message = errDocument.getMessage();
if (message != null && !message.isEmpty()) {
  errDocumentString = message + "\n";
String exceptionMessage = errDocument.getExceptionMessage();
if (exceptionMessage != null && !exceptionMessage.equals("")) {
  errDocumentString += exceptionMessage + "\n";
  List<StackTraceElementBean> stackTrace = errDocument
      .getStackTraceStrings();
  if (stackTrace.size() > 0) {
    for (StackTraceElementBean stackTraceElement : stackTrace) {
Set<T2Reference> errorReferences = errDocument.getErrorReferences();
if (!errorReferences.isEmpty()) {
  errDocumentString += "Set of ErrorDocuments to follow." + "\n";
origin: net.sf.taverna.t2.core/reference-impl

public synchronized boolean delete(ErrorDocument theDoc) throws DaoException {
  return store.remove(theDoc.getId())!=null;
}

origin: net.sf.taverna.t2.ui-components/results-view

public Component getTreeCellRendererComponent(JTree tree,
    Object value, boolean selected, boolean expanded,
    boolean leaf, int row, boolean hasFocus) {
  Component renderer = null;
  if (value instanceof DefaultMutableTreeNode) {
    DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) value;
    Object userObject = treeNode.getUserObject();
    if (userObject instanceof ErrorDocument) {
      renderer = super.getTreeCellRendererComponent(tree,
          "<html><pre>" + StringEscapeUtils.escapeHtml(((ErrorDocument) userObject).getMessage()) + "</pre></html>", selected, expanded, leaf, row,
          hasFocus);
    }
  }
  if (renderer == null) {
    renderer = super.getTreeCellRendererComponent(tree,
        value, selected, expanded, leaf, row, hasFocus);
  }
  if (renderer instanceof JLabel) {
    JLabel label = (JLabel) renderer;
    label.setIcon(null);
  }
  return renderer;
}
origin: net.sf.taverna.t2.workbench.views/results

String exceptionMessage = errDocument.getExceptionMessage();
if (exceptionMessage != null && !exceptionMessage.equals("")) {
  DefaultMutableTreeNode exceptionMessageNode = new DefaultMutableTreeNode(exceptionMessage);
  errDocumentString += exceptionMessageNode + "\n";
  List<StackTraceElementBean> stackTrace = errDocument.getStackTraceStrings();
  if (stackTrace.size() > 0) {
    for (StackTraceElementBean stackTraceElement : stackTrace) {
Set<T2Reference> errorReferences = errDocument.getErrorReferences();
if (!errorReferences.isEmpty()){
  errDocumentString += "Set of ErrorDocumentS to follow." + "\n";
origin: net.sf.taverna.t2/t2reference-impl

public synchronized void store(ErrorDocument theDoc) throws DaoException {
  store.put(theDoc.getId(), theDoc);
}
origin: net.sf.taverna.t2.ui-components/results-view

if (identified instanceof ErrorDocument) {
  ErrorDocument errorDocument = (ErrorDocument) identified;
  return errorDocument.getMessage();
origin: net.sf.taverna.t2/results

String exceptionMessage = errDocument.getExceptionMessage();
if (exceptionMessage != null && !exceptionMessage.equals("")) {
  DefaultMutableTreeNode exceptionMessageNode = new DefaultMutableTreeNode(
  errDocumentString += exceptionMessageNode + "\n";
  List<StackTraceElementBean> stackTrace = errDocument
      .getStackTraceStrings();
  if (stackTrace.size() > 0) {
    for (StackTraceElementBean stackTraceElement : stackTrace) {
Set<T2Reference> errorReferences = errDocument.getErrorReferences();
if (!errorReferences.isEmpty()) {
  errDocumentString += "Set of ErrorDocumentS to follow." + "\n";
origin: net.sf.taverna.t2/reference-impl

public synchronized void store(ErrorDocument theDoc) throws DaoException {
  store.put(theDoc.getId(), theDoc);
}
origin: net.sf.taverna.t2.ui-components/results-view

if (identified instanceof ErrorDocument) {
  ErrorDocument errorDocument = (ErrorDocument) identified;
  return errorDocument.getMessage();
origin: net.sf.taverna.t2/t2reference-impl

  @PutIdentifiedOperation
  public void store(ErrorDocument theDocument) throws DaoException {
    if (theDocument.getId() == null) {
      throw new DaoException(
          "Supplied error document set has a null ID, allocate "
              + "an ID before calling the store method in the dao.");
    } else if (theDocument.getId().getReferenceType().equals(
        T2ReferenceType.ErrorDocument) == false) {
      throw new DaoException("Strangely the list ID doesn't have type "
          + "T2ReferenceType.ErrorDocument, something has probably "
          + "gone badly wrong somewhere earlier!");
    }
    if (theDocument instanceof ErrorDocumentImpl) {
      try {
        sessionFactory.getCurrentSession().save(theDocument);
      } catch (Exception ex) {
        throw new DaoException(ex);
      }
    } else {
      throw new DaoException(
          "Supplied ErrorDocument not an instance of ErrorDocumentImpl");
    }
  }
}
origin: net.sf.taverna.t2.core/reference-impl

@DeleteIdentifiedOperation
public boolean delete(ErrorDocument theDocument) throws DaoException {
  if (theDocument.getId() == null) {
    throw new DaoException(
        "Supplied error document set has a null ID, allocate "
            + "an ID before calling the store method in the dao.");
  } else if (theDocument.getId().getReferenceType().equals(
      T2ReferenceType.ErrorDocument) == false) {
    throw new DaoException("Strangely the list ID doesn't have type "
        + "T2ReferenceType.ErrorDocument, something has probably "
        + "gone badly wrong somewhere earlier!");
  }
  if (theDocument instanceof ErrorDocumentImpl) {
    try {
      sessionFactory.getCurrentSession().delete(theDocument);
    } catch (Exception ex) {
      throw new DaoException(ex);
    }
  } else {
    throw new DaoException(
        "Supplied ErrorDocument not an instance of ErrorDocumentImpl");
  }
  return true;
}

net.sf.taverna.t2.referenceErrorDocument

Javadoc

Contains the definition of an error token within the workflow system.

Most used methods

  • getExceptionMessage
    If the error document is created from a Throwable this contains the message part of the Throwable
  • getId
  • getErrorReferences
    If the error document is created from set of references that contain error documents, this method re
  • getStackTraceStrings
    If the error document is created from a Throwable it will have a stack trace, in this case the stack
  • getMessage
    Error documents can carry an arbitrary string message, this returns it.

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setScale (BigDecimal)
  • getSystemService (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Permission (java.security)
    Legacy security code; do not use.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now