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

How to use
getResolutionCost
method
in
net.sf.taverna.t2.reference.ExternalReferenceSPI

Best Java code snippets using net.sf.taverna.t2.reference.ExternalReferenceSPI.getResolutionCost (Showing top 15 results out of 315)

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

  public int compare(ExternalReferenceSPI o1,
      ExternalReferenceSPI o2) {
    return (int) (o1.getResolutionCost() - o2
        .getResolutionCost());
  }
});
origin: net.sf.taverna.t2.ui-components/results-view

  public int compare(ExternalReferenceSPI o1,
      ExternalReferenceSPI o2) {
    return (int) (o1.getResolutionCost() - o2
        .getResolutionCost());
  }
});
origin: net.sf.taverna.t2.ui-components/results-view

  public int compare(ExternalReferenceSPI o1,
      ExternalReferenceSPI o2) {
    return (int) (o1.getResolutionCost() - o2
        .getResolutionCost());
  }
});
origin: net.sf.taverna.t2.workbench.views/results

  public int compare(ExternalReferenceSPI o1, ExternalReferenceSPI o2) {
    return (int) (o1.getResolutionCost() - o2.getResolutionCost());
  }
});
origin: net.sf.taverna.t2.ui-components/results-view

  public int compare(ExternalReferenceSPI o1, ExternalReferenceSPI o2) {
    return (int) (o1.getResolutionCost() - o2.getResolutionCost());
  }
});
origin: net.sf.taverna.t2.workbench.views/results

  public int compare(ExternalReferenceSPI o1, ExternalReferenceSPI o2) {
    return (int) (o1.getResolutionCost() - o2.getResolutionCost());
  }
});
origin: net.sf.taverna.t2.core/reference-impl

/**
 * Return a human readable representation of this translation path, used by the logging
 * methods to print trace information.
 */
@SuppressWarnings("unchecked")
@Override
public String toString() {
  StringBuffer sb = new StringBuffer();
  sb.append(getPathCost() + " ");
  if (sourceReference != null && initialBuilder != null) {
    sb.append(sourceReference.toString() + "->bytes("
        + sourceReference.getResolutionCost() + ")->");
    String builderClassName = initialBuilder.getClass().getSimpleName();
    String builtType = initialBuilder.getReferenceType().getSimpleName();
    sb.append("builder:" + builderClassName + "("
        + initialBuilder.getConstructionCost() + "):<" + builtType + ">");
  } else if (translators.isEmpty() == false) {
    sb.append("<" + translators.get(0).getSourceReferenceType().getSimpleName() + ">");
  }
  for (ExternalReferenceTranslatorSPI translator : translators) {
    sb.append("-" + translator.getClass().getSimpleName() + "("
        + translator.getTranslationCost() + ")" + "-");
    sb.append("<" + translator.getTargetReferenceType().getSimpleName() + ">");
  }
  return sb.toString();
}
origin: net.sf.taverna.t2/t2reference-impl

if (sourceReference != null && initialBuilder != null) {
  sb.append(sourceReference.toString() + "->bytes("
      + sourceReference.getResolutionCost() + ")->");
  String builderClassName = initialBuilder.getClass()
      .getSimpleName();
origin: net.sf.taverna.t2/reference-impl

if (sourceReference != null && initialBuilder != null) {
  sb.append(sourceReference.toString() + "->bytes("
      + sourceReference.getResolutionCost() + ")->");
  String builderClassName = initialBuilder.getClass()
      .getSimpleName();
origin: net.sf.taverna.t2/reference-impl

/**
 * Sum of translation costs of all translators in path
 */
public float getPathCost() {
  float cost = 0.0f;
  for (ExternalReferenceTranslatorSPI<?, ?> ert : this) {
    cost += ert.getTranslationCost();
  }
  // If the source reference and initial builder are non-null then
  // we're going to start this translation path by downloading a byte
  // stream from the specified (current) reference and using it to
  // construct the starting point for the translation path via the
  // specified builder.
  if (sourceReference != null) {
    cost += sourceReference.getResolutionCost();
  }
  if (initialBuilder != null) {
    cost += initialBuilder.getConstructionCost();
  }
  return cost;
}
origin: net.sf.taverna.t2/t2reference-impl

/**
 * Sum of translation costs of all translators in path
 */
public float getPathCost() {
  float cost = 0.0f;
  for (ExternalReferenceTranslatorSPI<?, ?> ert : this) {
    cost += ert.getTranslationCost();
  }
  // If the source reference and initial builder are non-null then
  // we're going to start this translation path by downloading a byte
  // stream from the specified (current) reference and using it to
  // construct the starting point for the translation path via the
  // specified builder.
  if (sourceReference != null) {
    cost += sourceReference.getResolutionCost();
  }
  if (initialBuilder != null) {
    cost += initialBuilder.getConstructionCost();
  }
  return cost;
}
origin: net.sf.taverna.t2.core/reference-impl

/**
 * Sum of translation costs of all translators in path
 */
public float getPathCost() {
  float cost = 0.0f;
  for (ExternalReferenceTranslatorSPI<?, ?> ert : this) {
    cost += ert.getTranslationCost();
  }
  // If the source reference and initial builder are non-null then
  // we're going to start this translation path by downloading a byte
  // stream from the specified (current) reference and using it to
  // construct the starting point for the translation path via the
  // specified builder.
  if (sourceReference != null) {
    cost += sourceReference.getResolutionCost();
  }
  if (initialBuilder != null) {
    cost += initialBuilder.getConstructionCost();
  }
  return cost;
}
origin: net.sf.taverna.t2/t2reference-impl

  || ers.getResolutionCost() < cheapestReferenceCost) {
cheapestReference = ers;
cheapestReferenceCost = ers.getResolutionCost();
origin: net.sf.taverna.t2/reference-impl

  || ers.getResolutionCost() < cheapestReferenceCost) {
cheapestReference = ers;
cheapestReferenceCost = ers.getResolutionCost();
origin: net.sf.taverna.t2.core/reference-impl

  || ers.getResolutionCost() < cheapestReferenceCost) {
cheapestReference = ers;
cheapestReferenceCost = ers.getResolutionCost();
net.sf.taverna.t2.referenceExternalReferenceSPIgetResolutionCost

Javadoc

Resolution cost is an informal guide to how costly the process of de-referencing this reference would be. It's used when assessing which out of a set of ExternalReferenceSPI implementations to use to get the value of the reference(s), in particular when rendering to POJOs or when translating throught the de-reference / construct from stream route. As this property is highly complex and potentially expensive in itself to evaluate there's no requirement for it to be absolutely correct, it's just used as a guide that, for example, it is easier to get bytes from a file on the local disk than to get them from a resource held on a grid on the other side of the planet.

Popular methods of ExternalReferenceSPI

  • openStream
    Open and return an InputStream to the data referenced using, if required, any facilities within the
  • getDataNature
    Determine, if possible, whether the data this reference refers to is textual or binary in nature. If
  • getApproximateSizeInBytes
  • getCharset
    For textual data return the character set that should be used to pull data into a java String object

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • 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