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

How to use
getReferenceType
method
in
net.sf.taverna.t2.reference.ExternalReferenceBuilderSPI

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

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

public Class<? extends ExternalReferenceSPI> getTargetType() {
  if (translators.isEmpty() == false) {
    return translators.get(translators.size() - 1)
        .getTargetReferenceType();
  } else if (this.initialBuilder != null) {
    return this.initialBuilder.getReferenceType();
  } else {
    return null;
  }
}
origin: net.sf.taverna.t2.core/reference-impl

public Class<? extends ExternalReferenceSPI> getTargetType() {
  if (translators.isEmpty() == false) {
    return translators.get(translators.size() - 1).getTargetReferenceType();
  } else if (this.initialBuilder != null) {
    return this.initialBuilder.getReferenceType();
  } else {
    return null;
  }
}
origin: net.sf.taverna.t2/reference-impl

public Class<? extends ExternalReferenceSPI> getTargetType() {
  if (translators.isEmpty() == false) {
    return translators.get(translators.size() - 1)
        .getTargetReferenceType();
  } else if (this.initialBuilder != null) {
    return this.initialBuilder.getReferenceType();
  } else {
    return null;
  }
}
origin: net.sf.taverna.t2.core/reference-impl

/**
 * Inject a list containing all known implementations of ExternalReferenceBuilderSPI.
 * 
 * @throws IllegalStateException
 *             if this has already been set, the instance registries should only be set on bean
 *             construction.
 */
public synchronized void setBuilders(List<ExternalReferenceBuilderSPI<?>> builders) {
  if (this.builders == null) {
    this.builders = builders;
    log.debug("* Builders injected :");
    int counter = 0;
    for (ExternalReferenceBuilderSPI<?> builder : builders) {
      log.debug("*   " + (++counter) + ") " + builder.getClass().getSimpleName()
          + ", builds " + builder.getReferenceType().getSimpleName());
    }
    cacheValid = false;
  } else {
    log.error("Builder registry already injected, invalid operation");
    throw new IllegalStateException("Can't inject the external reference builder registry "
        + "multiple times.");
  }
}
origin: net.sf.taverna.t2/reference-impl

/**
 * Inject an instance registry containing all known implementations of
 * ExternalReferenceBuilderSPI *
 * 
 * @throws IllegalStateException
 *             if this has already been set, the instance registries should
 *             only be set on bean construction.
 */
@SuppressWarnings("unchecked")
public synchronized void setBuilderRegistry(
    InstanceRegistry<ExternalReferenceBuilderSPI<?>> theRegistry) {
  if (this.builders == null) {
    this.builders = theRegistry;
    theRegistry.addInstanceRegistryListener(registryListener);
    log.debug("* Builder registry injected :");
    int counter = 0;
    for (ExternalReferenceBuilderSPI<?> builder : theRegistry) {
      log.debug("*   " + (++counter) + ") "
          + builder.getClass().getSimpleName() + ", builds "
          + builder.getReferenceType().getSimpleName());
    }
    cacheValid = false;
  } else {
    log.error("Builder registry already injected, invalid operation");
    throw new IllegalStateException(
        "Can't inject the external reference builder registry "
            + "multiple times.");
  }
}
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

/**
 * Inject an instance registry containing all known implementations of
 * ExternalReferenceBuilderSPI *
 * 
 * @throws IllegalStateException
 *             if this has already been set, the instance registries should
 *             only be set on bean construction.
 */
public synchronized void setBuilderRegistry(
    InstanceRegistry<ExternalReferenceBuilderSPI<?>> theRegistry) {
  if (this.builders == null) {
    this.builders = theRegistry;
    theRegistry.addRegistryListener(registryListener);
    List<ExternalReferenceBuilderSPI<?>> erb = theRegistry
        .getInstances();
    log.debug("* Builder registry injected :");
    int counter = 0;
    for (ExternalReferenceBuilderSPI<?> builder : erb) {
      log.debug("*   " + (++counter) + ") "
          + builder.getClass().getSimpleName() + ", builds "
          + builder.getReferenceType().getSimpleName());
    }
    cacheValid = false;
  } else {
    log.error("Builder registry already injected, invalid operation");
    throw new IllegalStateException(
        "Can't inject the external reference builder registry "
            + "multiple times.");
  }
}
origin: net.sf.taverna.t2/reference-impl

String builderClassName = initialBuilder.getClass()
    .getSimpleName();
String builtType = initialBuilder.getReferenceType()
    .getSimpleName();
sb.append("builder:" + builderClassName + "("
origin: net.sf.taverna.t2/t2reference-impl

String builderClassName = initialBuilder.getClass()
    .getSimpleName();
String builtType = initialBuilder.getReferenceType()
    .getSimpleName();
sb.append("builder:" + builderClassName + "("
origin: net.sf.taverna.t2.core/reference-impl

@SuppressWarnings("unchecked")
protected synchronized final void update() {
  if (builders == null || translators == null || cacheValid) {
    return;
  }
  log.debug("# Refreshing shortest path cache");
  knownReferenceTypes.clear();
  solvers.clear();
  adjacencySets.clear();
  for (ExternalReferenceBuilderSPI erb : builders) {
    knownReferenceTypes.add(erb.getReferenceType());
  }
  for (ExternalReferenceTranslatorSPI ert : translators) {
    knownReferenceTypes.add(ert.getSourceReferenceType());
    knownReferenceTypes.add(ert.getTargetReferenceType());
    getNeighbours(ert.getTargetReferenceType()).add(ert);
  }
  for (Class<ExternalReferenceSPI> type : knownReferenceTypes) {
    try {
      solvers.put(type, new ShortestPathSolver(type));
    } catch (Throwable t) {
      log.error(t);
      if (t instanceof RuntimeException) {
        throw (RuntimeException) t;
      }
    }
  }
  log.debug("# Path cache refresh done");
  cacheValid = true;
}
origin: net.sf.taverna.t2/t2reference-impl

@SuppressWarnings("unchecked")
protected synchronized final void update() {
  if (builders == null || translators == null || cacheValid) {
    return;
  }
  log.debug("# Refreshing shortest path cache");
  knownReferenceTypes.clear();
  solvers.clear();
  adjacencySets.clear();
  for (ExternalReferenceBuilderSPI erb : builders) {
    knownReferenceTypes.add(erb.getReferenceType());
  }
  for (ExternalReferenceTranslatorSPI ert : translators) {
    knownReferenceTypes.add(ert.getSourceReferenceType());
    knownReferenceTypes.add(ert.getTargetReferenceType());
    getNeighbours(ert.getTargetReferenceType()).add(ert);
  }
  for (Class<ExternalReferenceSPI> type : knownReferenceTypes) {
    try {
      solvers.put(type, new ShortestPathSolver(type));
    } catch (Throwable t) {
      t.printStackTrace();
      if (t instanceof RuntimeException) {
        throw (RuntimeException) t;
      }
    }
  }
  log.debug("# Path cache refresh done");
  cacheValid = true;
}
origin: net.sf.taverna.t2/reference-impl

@SuppressWarnings("unchecked")
protected synchronized final void update() {
  if (builders == null || translators == null || cacheValid) {
    return;
  }
  log.debug("# Refreshing shortest path cache");
  knownReferenceTypes.clear();
  solvers.clear();
  adjacencySets.clear();
  for (ExternalReferenceBuilderSPI erb : builders) {
    knownReferenceTypes.add(erb.getReferenceType());
  }
  for (ExternalReferenceTranslatorSPI ert : translators) {
    knownReferenceTypes.add(ert.getSourceReferenceType());
    knownReferenceTypes.add(ert.getTargetReferenceType());
    getNeighbours(ert.getTargetReferenceType()).add(ert);
  }
  for (Class<ExternalReferenceSPI> type : knownReferenceTypes) {
    try {
      solvers.put(type, new ShortestPathSolver(type));
    } catch (Throwable t) {
      t.printStackTrace();
      if (t instanceof RuntimeException) {
        throw (RuntimeException) t;
      }
    }
  }
  log.debug("# Path cache refresh done");
  cacheValid = true;
}
origin: net.sf.taverna.t2/reference-impl

if (erb.getReferenceType().equals(this.getSourceType())) {
origin: net.sf.taverna.t2/t2reference-impl

if (erb.getReferenceType().equals(this.getSourceType())) {
origin: net.sf.taverna.t2.core/reference-impl

if (erb.getReferenceType().equals(this.getSourceType())) {
origin: net.sf.taverna.t2/reference-impl

if (targetReferenceTypes.contains(builder.getReferenceType())) {
origin: net.sf.taverna.t2.core/reference-impl

if (targetReferenceTypes.contains(builder.getReferenceType())) {
origin: net.sf.taverna.t2/t2reference-impl

if (targetReferenceTypes.contains(builder.getReferenceType())) {
net.sf.taverna.t2.referenceExternalReferenceBuilderSPIgetReferenceType

Javadoc

Expose the type of the ExternalReferenceSPI that this builder can construct

Popular methods of ExternalReferenceBuilderSPI

  • createReference
    Given a stream of bytes, build the appropriate target ExternalReferenceSPI implementation which woul
  • getConstructionCost
    Return an approximate complexity cost of the reference construction. In general we can't make any gu

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Runner (org.openjdk.jmh.runner)
  • Github Copilot alternatives
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