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

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

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

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

List<ContextualizedT2Reference> newSet = new ArrayList<ContextualizedT2Reference>();
for (ContextualizedT2Reference ci : workingSet) {
  T2ReferenceImpl ref = (T2ReferenceImpl) ci.getReference();
  switch (ref.getReferenceType()) {
  case IdentifiedList:
      for (T2Reference child : children) {
        newSet.add(new ContextualizedT2ReferenceImpl(child,
            addIndex(ci.getIndex(), position++)));
  case ErrorDocument:
    newSet.add(new ContextualizedT2ReferenceImpl(ref
        .getDeeperErrorReference(), addIndex(ci.getIndex(),
        0)));
    break;
origin: net.sf.taverna.t2/reference-impl

List<ContextualizedT2Reference> newSet = new ArrayList<ContextualizedT2Reference>();
for (ContextualizedT2Reference ci : workingSet) {
  T2ReferenceImpl ref = (T2ReferenceImpl) ci.getReference();
  switch (ref.getReferenceType()) {
  case IdentifiedList:
      for (T2Reference child : children) {
        newSet.add(new ContextualizedT2ReferenceImpl(child,
            addIndex(ci.getIndex(), position++)));
  case ErrorDocument:
    newSet.add(new ContextualizedT2ReferenceImpl(ref
        .getDeeperErrorReference(), addIndex(ci.getIndex(),
        0)));
    break;
origin: net.sf.taverna.t2/t2reference-impl

List<ContextualizedT2Reference> newSet = new ArrayList<ContextualizedT2Reference>();
for (ContextualizedT2Reference ci : workingSet) {
  T2ReferenceImpl ref = (T2ReferenceImpl) ci.getReference();
  switch (ref.getReferenceType()) {
  case IdentifiedList:
      for (T2Reference child : children) {
        newSet.add(new ContextualizedT2ReferenceImpl(child,
            addIndex(ci.getIndex(), position++)));
  case ErrorDocument:
    newSet.add(new ContextualizedT2ReferenceImpl(ref
        .getDeeperErrorReference(), addIndex(ci.getIndex(),
        0)));
    break;
origin: net.sf.taverna.t2.core/workflowmodel-impl

while (ids.hasNext()) {
  ContextualizedT2Reference ci = ids.next();
  int[] indexArray = ci.getIndex();
  T2Reference childDataRef = ci.getReference();
  receiveData(portName, owningProcess, indexArray,
      childDataRef, e.getContext());
origin: net.sf.taverna.t2/workflowmodel-impl

while (ids.hasNext()) {
  ContextualizedT2Reference ci = ids.next();
  int[] indexArray = ci.getIndex();
  T2Reference childDataRef = ci.getReference();
  receiveData(portName, owningProcess, indexArray,
      childDataRef, e.getContext());
origin: net.sf.taverna.t2/workflowmodel-impl

public void pushToken(WorkflowDataToken dt, String owningProcess,
    int desiredDepth) {
  if (dt.getData().getDepth() == desiredDepth) {
    // System.out.println("** Job : "+dt.getData());
    pushData(getName(), owningProcess, dt.getIndex(), dt.getData(), dt
        .getContext());
  } else {
    ReferenceService rs = dt.getContext().getReferenceService();
    Iterator<ContextualizedT2Reference> children = rs.traverseFrom(dt
        .getData(), dt.getData().getDepth() - 1);
    while (children.hasNext()) {
      ContextualizedT2Reference ci = children.next();
      int[] newIndex = new int[dt.getIndex().length
          + ci.getIndex().length];
      int i = 0;
      for (int indx : dt.getIndex()) {
        newIndex[i++] = indx;
      }
      for (int indx : ci.getIndex()) {
        newIndex[i++] = indx;
      }
      pushToken(new WorkflowDataToken(owningProcess, newIndex, ci
          .getReference(), dt.getContext()), owningProcess,
          desiredDepth);
    }
    // System.out.println("** Completion : "+dt.getData());
    pushCompletion(getName(), owningProcess, dt.getIndex(), dt
        .getContext());
  }
}
origin: net.sf.taverna.t2.core/workflowmodel-impl

public void pushToken(WorkflowDataToken dt, String owningProcess,
    int desiredDepth) {
  if (dt.getData().getDepth() == desiredDepth) {
    pushData(getName(), owningProcess, dt.getIndex(), dt.getData(), dt
        .getContext());
  } else {
    ReferenceService rs = dt.getContext().getReferenceService();
    Iterator<ContextualizedT2Reference> children = rs.traverseFrom(dt
        .getData(), dt.getData().getDepth() - 1);
    while (children.hasNext()) {
      ContextualizedT2Reference ci = children.next();
      int[] newIndex = new int[dt.getIndex().length
          + ci.getIndex().length];
      int i = 0;
      for (int indx : dt.getIndex()) {
        newIndex[i++] = indx;
      }
      for (int indx : ci.getIndex()) {
        newIndex[i++] = indx;
      }
      pushToken(new WorkflowDataToken(owningProcess, newIndex, ci
          .getReference(), dt.getContext()), owningProcess,
          desiredDepth);
    }
    pushCompletion(getName(), owningProcess, dt.getIndex(), dt
        .getContext());
  }
}
net.sf.taverna.t2.referenceContextualizedT2Reference

Javadoc

Used by the ReferenceService#traverseFrom(T2Reference,int) when traversing a collection structure. Each contextualized t2reference contains the T2Reference along with an integer array index representing the position of that reference within the traversal structure. The index [i0,i1,i2 ... in] is interpreted such that the reference is located at parent.get(i0).get(i1).get(i2)....get(in). If the index is empty then the T2Reference is the original reference supplied to the ReferenceService#traverseFrom(T2Reference,int) method.

Most used methods

  • getIndex
  • getReference

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • setScale (BigDecimal)
  • Menu (java.awt)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • 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