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

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

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

origin: net.sf.taverna.t2.component/component-activity

private Set<T2Reference> getErrors(T2Reference ref) {
  Set<T2Reference> result = new HashSet<T2Reference>();
  if (ref.getReferenceType().equals(ReferenceSet)) {
    // nothing
  } else if (ref.getReferenceType().equals(IdentifiedList)) {
    IdentifiedList<T2Reference> originalList = listService.getList(ref);
    for (T2Reference subValue : originalList)
      if (subValue.containsErrors())
        result.addAll(getErrors(subValue));
  } else {
    result.add(ref);
  }
  return result;
}
origin: net.sf.taverna.t2.core/reference-impl

try {
  IdentifiedList<T2Reference> newList = listService
      .registerEmptyList(currentDepth, context);
  return newList.getId();
} catch (ListServiceException lse) {
      .registerList(references, context);
  return newList.getId();
} catch (ListServiceException lse) {
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;
}
origin: net.sf.taverna.t2.core/workflowmodel-impl

List<T2Reference> idlist = listItems.get(outputName);
newDataMap.put(outputName, context.getReferenceService()
    .getListService().registerList(idlist, context).getId());
origin: net.sf.taverna.t2/workflowmodel-impl

@Override
/**
 * Used to construct a Job of empty lists at the appropriate depth in the
 * event of a completion hitting the crystalizer before it sees a child
 * node, i.e. the result of iterating over an empty collection structure of
 * some kind.
 */
public Job getEmptyJob(String owningProcess, int[] index,
    InvocationContext context) {
  int wrappingDepth = parent.resultWrappingDepth;
  if (wrappingDepth < 0)
    throw new RuntimeException(
        "Processor ["+owningProcess+"] hasn't been configured, cannot emit empty job");
  // The wrapping depth is the length of index array that would be used if
  // a single item of the output port type were returned. We can examine
  // the index array for the node we're trying to create and use this to
  // work out how much we need to add to the output port depth to create
  // empty lists of the right type given the index array.
  int depth = wrappingDepth - index.length;
  // TODO - why was this incrementing?
  // depth++;
  ReferenceService rs = context.getReferenceService();
  Map<String, T2Reference> emptyJobMap = new HashMap<String, T2Reference>();
  for (OutputPort op : parent.getOutputPorts()) {
    emptyJobMap.put(op.getName(), rs.getListService()
        .registerEmptyList(depth + op.getDepth()).getId());
  }
  return new Job(owningProcess, index, emptyJobMap, context);
}
origin: net.sf.taverna.t2/workflowmodel-impl

List<T2Reference> idlist = listItems.get(outputName);
newDataMap.put(outputName, context.getReferenceService()
    .getListService().registerList(idlist).getId());
origin: net.sf.taverna.t2.core/workflowmodel-impl

@Override
/**
 * Used to construct a Job of empty lists at the appropriate depth in the
 * event of a completion hitting the crystalizer before it sees a child
 * node, i.e. the result of iterating over an empty collection structure of
 * some kind.
 */
public Job getEmptyJob(String owningProcess, int[] index,
    InvocationContext context) {
  int wrappingDepth = parent.resultWrappingDepth;
  if (wrappingDepth < 0)
    throw new RuntimeException(
        "Processor ["+owningProcess+"] hasn't been configured, cannot emit empty job");
  // The wrapping depth is the length of index array that would be used if
  // a single item of the output port type were returned. We can examine
  // the index array for the node we're trying to create and use this to
  // work out how much we need to add to the output port depth to create
  // empty lists of the right type given the index array.
  int depth = wrappingDepth - index.length;
  // TODO - why was this incrementing?
  // depth++;
  ReferenceService rs = context.getReferenceService();
  Map<String, T2Reference> emptyJobMap = new HashMap<String, T2Reference>();
  for (OutputPort op : parent.getOutputPorts()) {
    emptyJobMap.put(op.getName(), rs.getListService()
        .registerEmptyList(depth + op.getDepth(), context).getId());
  }
  return new Job(owningProcess, index, emptyJobMap, context);
}
origin: net.sf.taverna.t2.ui-components/results-view

targetDir.mkdir();
int count = 0;
List<T2Reference> elements = referenceService.getListService().getList(ref);
for (T2Reference subRef : elements) {
  writeDataObject(targetDir, "" + count++, subRef,
origin: net.sf.taverna.t2/t2reference-impl

try {
  IdentifiedList<T2Reference> newList = listService
      .registerEmptyList(currentDepth);
  return newList.getId();
} catch (ListServiceException lse) {
      .registerList(references);
  return newList.getId();
} catch (ListServiceException lse) {
origin: net.sf.taverna.t2.core/workflowmodel-impl

    .getListService();
IdentifiedList<T2Reference> registeredList = listService
    .registerList(outputList, context);
WorkflowDataToken workflowDataToken = new WorkflowDataToken(
    owningProcess, new int[0], registeredList.getId(),
origin: net.sf.taverna.t2/workflowmodel-impl

int portDepth = op.getDepth();
emptyListMap.put(portName, refService.getListService()
    .registerEmptyList(portDepth).getId());
origin: net.sf.taverna.t2.lang/results

public static List<ErrorDocument> getErrorDocuments(T2Reference reference,
    ReferenceService referenceService) {
  List<ErrorDocument> errorDocuments = new ArrayList<ErrorDocument>();
  if (reference.getReferenceType().equals(T2ReferenceType.ErrorDocument)) {
    ErrorDocumentService errorDocumentService = referenceService
        .getErrorDocumentService();
    errorDocuments.add(errorDocumentService.getError(reference));
  } else if (reference.getReferenceType().equals(
      T2ReferenceType.IdentifiedList)) {
    ListService listService = referenceService.getListService();
    IdentifiedList<T2Reference> list = listService.getList(reference);
    for (T2Reference listReference : list) {
      errorDocuments
          .addAll(getErrorDocuments(listReference, referenceService));
    }
  }
  return errorDocuments;
}
origin: net.sf.taverna.t2/reference-impl

try {
  IdentifiedList<T2Reference> newList = listService
      .registerEmptyList(currentDepth, context);
  return newList.getId();
} catch (ListServiceException lse) {
      .registerList(references, context);
  return newList.getId();
} catch (ListServiceException lse) {
origin: net.sf.taverna.t2/workflowmodel-impl

    .getListService();
IdentifiedList<T2Reference> registeredList = listService
    .registerList(outputList);
WorkflowDataToken workflowDataToken = new WorkflowDataToken(
    owningProcess, new int[0], registeredList.getId(),
origin: net.sf.taverna.t2.core/workflowmodel-core-extensions

int portDepth = op.getDepth();
emptyListMap.put(portName, refService.getListService()
    .registerEmptyList(portDepth, jobEvent.getContext()).getId());
origin: net.sf.taverna.t2/results

public static List<ErrorDocument> getErrorDocuments(T2Reference reference,
    ReferenceService referenceService) {
  List<ErrorDocument> errorDocuments = new ArrayList<ErrorDocument>();
  if (reference.getReferenceType().equals(T2ReferenceType.ErrorDocument)) {
    ErrorDocumentService errorDocumentService = referenceService
        .getErrorDocumentService();
    errorDocuments.add(errorDocumentService.getError(reference));
  } else if (reference.getReferenceType().equals(
      T2ReferenceType.IdentifiedList)) {
    ListService listService = referenceService.getListService();
    IdentifiedList<T2Reference> list = listService.getList(reference);
    for (T2Reference listReference : list) {
      errorDocuments
          .addAll(getErrorDocuments(listReference, referenceService));
    }
  }
  return errorDocuments;
}
origin: net.sf.taverna.t2/workflowmodel-impl

ref = rs.getListService().registerList(newList).getId();
currentDepth++;
origin: net.sf.taverna.t2.workbench.views/results

public static List<ErrorDocument> getErrorDocuments(T2Reference reference, InvocationContext context) {
  List<ErrorDocument> errorDocuments = new ArrayList<ErrorDocument>();
  if (reference.getReferenceType().equals(T2ReferenceType.ErrorDocument)) {
    ErrorDocumentService errorDocumentService = context.getReferenceService().getErrorDocumentService();
    errorDocuments.add(errorDocumentService.getError(reference));            
  } else if (reference.getReferenceType().equals(T2ReferenceType.IdentifiedList)) {
    ListService listService = context.getReferenceService().getListService();
    IdentifiedList<T2Reference> list = listService.getList(reference);
    for (T2Reference listReference : list) {
      errorDocuments.addAll(getErrorDocuments(listReference, context));
    }
  }
  return errorDocuments;
}

origin: net.sf.taverna.t2.core/workflowmodel-impl

ref = rs.getListService().registerList(newList, token.getContext()).getId();
currentDepth++;
origin: net.sf.taverna.t2.component/component-activity

private T2Reference findFirstFailure(T2Reference value) {
  IdentifiedList<T2Reference> originalList = listService.getList(value);
  for (T2Reference subValue : originalList) {
    if (subValue.getReferenceType().equals(ErrorDocument))
      return subValue;
    if (subValue.getReferenceType().equals(IdentifiedList))
      if (subValue.containsErrors())
        return findFirstFailure(subValue);
    // No need to consider value
  }
  return null;
}
net.sf.taverna.t2.referenceListService

Javadoc

Provides facilities to register list of T2References, register empty lists at any given depth and to resolve appropriate T2Reference instances back to these lists. Registration operations assign names and lock the list contents as a result. This service operates strictly on T2References, it neither tries to nor is capable of any form of reference resolution, so aspects such as collection traversal are not handled here (these are performed by the top level reference service)

Most used methods

  • getList
    Retrieve a previously named and registered list of T2Reference instances identified by the specified
  • registerEmptyList
    Register a new empty list with the specified depth. This is needed because in the case of empty list
  • registerList
    Register a new list of T2References. The depth of the list will be calculated based on the depth of
  • delete
  • deleteIdentifiedListsForWorkflowRun

Popular in Java

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • getContentResolver (Context)
  • putExtra (Intent)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Top PhpStorm 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