congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ReferenceServiceException
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: net.sf.taverna.t2/t2reference-impl

/**
 * Check whether the converter registry has been defined, throw a
 * ReferenceServiceException if not
 */
protected final void checkConverterRegistry()
    throws ReferenceServiceException {
  if (converterRegistry == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance registry of ValueToReferenceConvertorSPI "
            + "to enable on the fly mapping of arbitrary objects "
            + "during compound registration");
  }
}
origin: net.sf.taverna.t2.activities/stringconstant-activity

public void run() {
  ReferenceService referenceService = callback.getContext().getReferenceService();
  try {
    T2Reference id = referenceService.register(value, 0, true, callback.getContext());
    Map<String,T2Reference> outputData = new HashMap<String, T2Reference>();
    outputData.put("value", id);
    callback.receiveResult(outputData, new int[0]);
  } catch (ReferenceServiceException e) {
    callback.fail(e.getMessage(),e);
  }
}

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

public void resultTokenProduced(WorkflowDataToken dataToken, String portname) {
  if (dataToken.getIndex().length == 0) {
    T2Reference reference = dataToken.getData();
    System.out.println("Output reference made = " + reference);
    Object value = reference;
    if (reference.containsErrors()) {
      System.out.println("Contains errors!");
      printAllErrors(context.getReferenceService().resolveIdentifier(
          reference, null, context));
    } else {
      try {
        value = context.getReferenceService().renderIdentifier(
            reference, Object.class, context);
      } catch (ReferenceServiceException ex) {
        ex.printStackTrace();
      }
    }
    resultMap.put(portname, value);
    synchronized (this) {
      outputCount--;
    }
  }
}
origin: net.sf.taverna.t2/reference-impl

/**
 * Check whether the converter registry has been defined, throw a
 * ReferenceServiceException if not
 */
protected final void checkConverterRegistry()
    throws ReferenceServiceException {
  if (converterRegistry == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance registry of ValueToReferenceConvertorSPI "
            + "to enable on the fly mapping of arbitrary objects "
            + "during compound registration");
  }
}
origin: net.sf.taverna.t2.core/reference-impl

/**
 * Check whether the converter registry has been defined, throw a
 * ReferenceServiceException if not
 */
protected final void checkConverterRegistry()
    throws ReferenceServiceException {
  if (converters == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance registry of ValueToReferenceConvertorSPI "
            + "to enable on the fly mapping of arbitrary objects "
            + "during compound registration");
  }
}
origin: net.sf.taverna.t2.core/reference-impl

/**
 * Throw a ReferenceServiceException if methods in ReferenceService are
 * called without the necessary sub-services configured.
 */
protected final void checkServices() throws ReferenceServiceException {
  if (errorDocumentService == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance of ErrorDocumentService to function");
  }
  if (referenceSetService == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance of ReferenceSetService to function");
  }
  if (listService == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance of ListService to function");
  }
}
origin: net.sf.taverna.t2/reference-impl

/**
 * Throw a ReferenceServiceException if methods in ReferenceService are
 * called without the necessary sub-services configured.
 */
protected final void checkServices() throws ReferenceServiceException {
  if (errorDocumentService == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance of ErrorDocumentService to function");
  }
  if (referenceSetService == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance of ReferenceSetService to function");
  }
  if (listService == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance of ListService to function");
  }
}
origin: net.sf.taverna.t2/t2reference-impl

/**
 * Throw a ReferenceServiceException if methods in ReferenceService are
 * called without the necessary sub-services configured.
 */
protected final void checkServices() throws ReferenceServiceException {
  if (errorDocumentService == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance of ErrorDocumentService to function");
  }
  if (referenceSetService == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance of ReferenceSetService to function");
  }
  if (listService == null) {
    throw new ReferenceServiceException(
        "Reference service must be configued with an "
            + "instance of ListService to function");
  }
}
origin: net.sf.taverna.t2.core/reference-impl

public void deleteReferencesForWorkflowRun(String workflowRunId)
    throws ReferenceServiceException {
  
  String errorString = "";
  try{
    listService.deleteIdentifiedListsForWorkflowRun(workflowRunId);
  }
  catch(ReferenceServiceException resex){
    errorString += "Failed to delete lists for workflow run: " + workflowRunId + ".";
  }
  try{
    referenceSetService.deleteReferenceSetsForWorkflowRun(workflowRunId);
  }
  catch(ReferenceServiceException resex){
    errorString += "Failed to delete reference sets for workflow run: " + workflowRunId + ".";
  }
  try{
    errorDocumentService.deleteErrorDocumentsForWorkflowRun(workflowRunId);
  }
  catch(ReferenceServiceException resex){
    errorString += "Failed to delete error documents for workflow run: " + workflowRunId +".";
  }
  if (!errorString.equals("")){
    throw new ReferenceServiceException(errorString);
  }
}
origin: net.sf.taverna.t2.core/reference-impl

throw new ReferenceServiceException("Cannot register at depth " + currentDepth + ": " + o);
  throw new ReferenceServiceException("Cannot register list at depth " + currentDepth);
    return newList.getId();
  } catch (ListServiceException lse) {
    throw new ReferenceServiceException(lse);
    return newList.getId();
  } catch (ListServiceException lse) {
    throw new ReferenceServiceException(lse);
    && (o instanceof ExternalReferenceSPI == false)) {
  if (currentDepth != 0) {
    throw new ReferenceServiceException(
        "Cannot register object " + o + " at depth "
            + currentDepth);
  throw new ReferenceServiceException(
      "Failed to register object " + o + ", found a type '"
          + o.getClass().getCanonicalName()
      return doc.getId();
    } catch (ErrorDocumentServiceException edse) {
      throw new ReferenceServiceException(edse);
      throw new ReferenceServiceException("Cannot register external references at depth " + currentDepth);
      return rs.getId();
origin: net.sf.taverna.t2/reference-impl

public Object renderIdentifier(T2Reference id, Class<?> leafClass,
    ReferenceContext context) throws ReferenceServiceException {
  // Check we have the services installed
  checkServices();
  // Insert an empty context if context was null
  context = EmptyReferenceContext.checkContext(context);
  // Reject if the source reference contains errors
  if (id.containsErrors()) {
    throw new ReferenceServiceException(
        "Can't render an identifier which contains errors to a POJO");
  }
  // Attempt to find an appropriate StreamToValueConverterSPI instance to
  // build the specified class
  StreamToValueConverterSPI<?> converter = null;
  if (valueBuilderRegistry != null) {
    for (StreamToValueConverterSPI<?> stvc : valueBuilderRegistry) {
      Class<?> builtClass = stvc.getPojoClass();
      if (leafClass.isAssignableFrom(builtClass)) {
        converter = stvc;
        break;
      }
    }
  }
  if (converter == null) {
    log.warn("No stream->value converters found for type '"
        + leafClass.getCanonicalName() + "'");
  }
  // Render the identifier
  return renderIdentifierInner(id, leafClass, context, converter);
}
origin: net.sf.taverna.t2.core/reference-impl

  IdentifiedList<T2Reference> idList = listService.getList(id);
  if (idList == null) {
    throw new ReferenceServiceException("Could not find IdentifiedList " + id);
  throw new ReferenceServiceException(lse);
  ReferenceSet rs = referenceSetService.getReferenceSet(id);
  if (rs == null) {
    throw new ReferenceServiceException("Could not find ReferenceSet " + id);
    throw new ReferenceServiceException(
        "Can't render an empty reference set to a POJO");
  throw new ReferenceServiceException(e);
throw new ReferenceServiceException(
    "No converter found, and reference set didn't contain"
        + " an appropriate value carrying reference, cannot render to POJO");
throw new ReferenceServiceException("Unsupported ID type : "
    + id.getReferenceType());
origin: net.sf.taverna.t2.core/reference-impl

throw new ReferenceServiceException(
    "Can't render an identifier which contains errors to a POJO");
origin: net.sf.taverna.t2.core/reference-impl

    throw new ReferenceServiceException("Could not find ReferenceSet " + id);
  throw new ReferenceServiceException(rsse);
  ErrorDocument ed = errorDocumentService.getError(id);
  if (ed == null) {
    throw new ReferenceServiceException("Could not find ErrorDocument " + id);
  throw new ReferenceServiceException(edse);
  IdentifiedList<T2Reference> idList = listService.getList(id);
  if (idList == null) {
    throw new ReferenceServiceException("Could not find IdentifiedList " + id);
  return newList;
} catch (ListServiceException lse) {
  throw new ReferenceServiceException(lse);
throw new ReferenceServiceException("Unsupported ID type : "
    + id.getReferenceType());
origin: net.sf.taverna.t2/t2reference-impl

      return newList.getId();
    } catch (ListServiceException lse) {
      throw new ReferenceServiceException(lse);
      return newList.getId();
    } catch (ListServiceException lse) {
      throw new ReferenceServiceException(lse);
    throw new ReferenceServiceException(
        "Failed to register POJO, found a type '"
            + o.getClass().getCanonicalName()
        return doc.getId();
      } catch (ErrorDocumentServiceException edse) {
        throw new ReferenceServiceException(edse);
        return rs.getId();
      } catch (ReferenceSetServiceException rsse) {
        throw new ReferenceServiceException(rsse);
throw new ReferenceServiceException(
    "Should never see this, reference registration"
        + " logic has fallen off the end of the"
origin: net.sf.taverna.t2/t2reference-impl

throw new ReferenceServiceException(
    "Can't render an identifier which contains errors to a POJO");
origin: net.sf.taverna.t2/reference-impl

      return newList.getId();
    } catch (ListServiceException lse) {
      throw new ReferenceServiceException(lse);
      return newList.getId();
    } catch (ListServiceException lse) {
      throw new ReferenceServiceException(lse);
    throw new ReferenceServiceException(
        "Failed to register POJO, found a type '"
            + o.getClass().getCanonicalName()
        return doc.getId();
      } catch (ErrorDocumentServiceException edse) {
        throw new ReferenceServiceException(edse);
        return rs.getId();
      } catch (ReferenceSetServiceException rsse) {
        throw new ReferenceServiceException(rsse);
throw new ReferenceServiceException(
    "Should never see this, reference registration"
        + " logic has fallen off the end of the"
origin: net.sf.taverna.t2/t2reference-impl

  throw new ReferenceServiceException(lse);
    throw new ReferenceServiceException(
        "Can't render an empty reference set to a POJO");
  throw new ReferenceServiceException(e);
throw new ReferenceServiceException(
    "No converter found, and reference set didn't contain"
        + " an appropriate value carrying reference, cannot render to POJO");
throw new ReferenceServiceException("Unsupported ID type : "
    + id.getReferenceType());
origin: net.sf.taverna.t2/reference-impl

  throw new ReferenceServiceException(lse);
    throw new ReferenceServiceException(
        "Can't render an empty reference set to a POJO");
  throw new ReferenceServiceException(e);
throw new ReferenceServiceException(
    "No converter found, and reference set didn't contain"
        + " an appropriate value carrying reference, cannot render to POJO");
throw new ReferenceServiceException("Unsupported ID type : "
    + id.getReferenceType());
origin: net.sf.taverna.t2.core/reference-impl

public boolean delete(T2Reference reference)
    throws ReferenceServiceException {
  boolean result=false;
  switch (reference.getReferenceType()) {
  case IdentifiedList:
    result=listService.delete(reference);
    break;
  case ReferenceSet:
    result=referenceSetService.delete(reference);
    break;
  case ErrorDocument:
    result=errorDocumentService.delete(reference);
    break;
  default:
    throw new ReferenceServiceException(
        "Unknown reference type!");
  }
  return result;
}
net.sf.taverna.t2.referenceReferenceServiceException

Javadoc

Thrown by methods in the ReferenceService, used to wrap any underlying exceptions from lower layers.

Most used methods

  • <init>
  • getMessage
  • printStackTrace

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top Vim plugins
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