Tabnine Logo
T2Reference.getDepth
Code IndexAdd Tabnine to your IDE (free)

How to use
getDepth
method
in
net.sf.taverna.t2.reference.T2Reference

Best Java code snippets using net.sf.taverna.t2.reference.T2Reference.getDepth (Showing top 18 results out of 315)

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

private T2Reference replaceErrors(T2Reference value,
    List<T2Reference> exceptions) {
  return replaceErrors(value, value.getDepth(), exceptions);
}
origin: net.sf.taverna.t2.component/component-activity

private T2Reference considerReference(T2Reference value,
    List<T2Reference> exceptions) {
  if (!value.containsErrors()) {
    return value;
  } else if (!value.getReferenceType().equals(IdentifiedList)) {
    return replaceErrors(value, exceptions);
  } else if (exceptionHandling.failLists()) {
    T2Reference failure = findFirstFailure(value);
    T2Reference replacement = replaceErrors(failure, value.getDepth(),
        exceptions);
    return replacement;
  } else {
    IdentifiedList<T2Reference> originalList = listService
        .getList(value);
    List<T2Reference> replacementList = new ArrayList<T2Reference>();
    for (T2Reference subValue : originalList)
      replacementList.add(considerReference(subValue, exceptions));
    return referenceService.register(replacementList, value.getDepth(),
        true, context);
  }
}
origin: net.sf.taverna.t2.core/provenanceconnector

/**
 * Returns an Element representing the data item, identfied as either input
 * or output. References to data are currently resolved to their actual
 * values
 */
public static Element getDataItemAsXML(DataProvenanceItem provenanceItem) {
  String name;
  if (provenanceItem.getEventType().equals(SharedVocabulary.INPUTDATA_EVENT_TYPE)) {
    name = "inputdata";
  } else {
    name = "outputdata";
  }
  Element result = new Element(name);
  result.setAttribute("identifier", provenanceItem.getIdentifier());
  result.setAttribute("processID", provenanceItem.getProcessId());
  result.setAttribute("parent", provenanceItem.getParentId());
  for (String port : provenanceItem.getDataMap().keySet()) {
    Element portElement = new Element("port");
    portElement.setAttribute("name", port);
    portElement.setAttribute("depth", Integer.toString(provenanceItem.getDataMap()
        .get(port).getDepth()));
    result.addContent(portElement);
    portElement.addContent(resolveToElement(provenanceItem.getDataMap().get(port), provenanceItem.getReferenceService()));
    Element element = new Element("some_stuff");
    portElement.addContent(element);
  }
  return result;
}

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

int depth = items.get(0).getDepth();
T2ReferenceListImpl newList = new T2ReferenceListImpl();
int counter = 0;
for (T2Reference ref : items) {
  if (ref.getDepth() != depth) {
    throw new ListServiceException(
        "Mismatched depths in list registration; reference at index '"
            + counter + "' has depth " + ref.getDepth()
            + " but all preceeding items have depth "
            + depth);
origin: net.sf.taverna.t2.core/reference-impl

int depth = items.get(0).getDepth();
if (depth < 0) {
  throw new ListServiceException("Can't register list of depth less than 1, but first item " + items.get(0) + " has depth " + depth);
int counter = 0;
for (T2Reference ref : items) {
  if (ref.getDepth() != depth) {
    throw new ListServiceException(
        "Mismatched depths in list registration; reference at index '"
            + counter + "' has depth " + ref.getDepth()
            + " but all preceeding items have depth "
            + depth);
origin: net.sf.taverna.t2/reference-impl

int depth = items.get(0).getDepth();
T2ReferenceListImpl newList = new T2ReferenceListImpl();
int counter = 0;
for (T2Reference ref : items) {
  if (ref.getDepth() != depth) {
    throw new ListServiceException(
        "Mismatched depths in list registration; reference at index '"
            + counter + "' has depth " + ref.getDepth()
            + " but all preceeding items have depth "
            + depth);
origin: net.sf.taverna.t2.core/workflowmodel-core-extensions

  return;
if (loopRef.getDepth() != 0) {
  fail("Condition service output " + LOOP_PORT
      + " depth is not 0, but " + loopRef.getDepth());
origin: net.sf.taverna.t2/workflowmodel-impl

  return;
if (loopRef.getDepth() != 0) {
  fail("Conditional activity output " + LOOP_PORT
      + " depth is not 0, but " + loopRef.getDepth());
origin: net.sf.taverna.t2.core/reference-impl

int currentDepth = source.getDepth();
while (currentDepth > desiredDepth) {
  List<ContextualizedT2Reference> newSet = new ArrayList<ContextualizedT2Reference>();
origin: net.sf.taverna.t2/t2reference-impl

/**
 * Construct a deep copy of the given T2Reference
 * 
 * @param source
 *            T2Reference to copy
 */
private T2ReferenceImpl(T2Reference source) {
  super();
  setNamespacePart(source.getNamespacePart());
  setLocalPart(source.getLocalPart());
  setContainsErrors(source.containsErrors());
  setReferenceType(source.getReferenceType());
  setDepth(source.getDepth());
}
origin: net.sf.taverna.t2.core/reference-impl

/**
 * Construct a deep copy of the given T2Reference
 * 
 * @param source
 *            T2Reference to copy
 */
private T2ReferenceImpl(T2Reference source) {
  super();
  setNamespacePart(source.getNamespacePart());
  setLocalPart(source.getLocalPart());
  setContainsErrors(source.containsErrors());
  setReferenceType(source.getReferenceType());
  setDepth(source.getDepth());
}
origin: net.sf.taverna.t2/t2reference-impl

int currentDepth = source.getDepth();
while (currentDepth > desiredDepth) {
  List<ContextualizedT2Reference> newSet = new ArrayList<ContextualizedT2Reference>();
origin: net.sf.taverna.t2/reference-impl

/**
 * Construct a deep copy of the given T2Reference
 * 
 * @param source
 *            T2Reference to copy
 */
private T2ReferenceImpl(T2Reference source) {
  super();
  setNamespacePart(source.getNamespacePart());
  setLocalPart(source.getLocalPart());
  setContainsErrors(source.containsErrors());
  setReferenceType(source.getReferenceType());
  setDepth(source.getDepth());
}
origin: net.sf.taverna.t2/reference-impl

int currentDepth = source.getDepth();
while (currentDepth > desiredDepth) {
  List<ContextualizedT2Reference> newSet = new ArrayList<ContextualizedT2Reference>();
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());
  }
}
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/workflowmodel-impl

      "Input depth filter not configured on input port, failing");
} else {
  int tokenDepth = token.getData().getDepth();
  if (tokenDepth == filterDepth) {
    if (filterDepth == getDepth()) {
origin: net.sf.taverna.t2.core/workflowmodel-impl

      "Input depth filter not configured on input port, failing");
} else {
  int tokenDepth = token.getData().getDepth();
  if (tokenDepth == filterDepth) {
    if (filterDepth == getDepth()) {
net.sf.taverna.t2.referenceT2ReferencegetDepth

Javadoc

All entities identified by a T2Reference have a conceptual depth. In the case of lists the depth is the (uniform) depth of any item in the list plus one, in the case of reference sets the depth is 0. Error documents and empty lists may also have non zero depth; error documents in particular have a depth corresponding to the depth of the list or reference set that would have been created if there was no error.

Popular methods of T2Reference

  • getReferenceType
  • containsErrors
    Error documents always return true, as do any lists where at least one immediate child of the list r
  • getLocalPart
    In addition to the namespace the T2Reference contains a local identifier. This identifier is unique
  • getNamespacePart
    T2Reference instances retain a reference to the reference manager which created them in the form of
  • toUri
    All T2Reference instances can be represented as a URI.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • putExtra (Intent)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Best IntelliJ 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