Interface Transformer<C,​E>

Type Parameters:
C - The context type of the elements this Transformer operates on.
E - The element type this Transformer operates on.
All Known Subinterfaces:
CompositeFilter<C,​E>, ElementTransformer<C,​E>, Filter<C,​E>, HolisticTransformer<C,​E>, SubFilterTransformer<C,​E>, ValidatableTransformer<C,​E>
All Known Implementing Classes:
AbstractTransformer, AbstractValidatableTransformer

public interface Transformer<C,​E>
Transforms a stream of elements from a particular context. The output of a Transformer must be a subset of the elements of its context. However, the output need not be a subset of its input. The input and output mechanisms of Transformers are defined by the subinterfaces HolisticTransformer, ElementTransformer, and Filter.

Cytoscape Backwards Compatibility (SPI Interface): We expect that this interface will be implemented. Therefore to maintain backwards compatibility this interface will only be modified for major version updates.

Module: filter-api

To use this in your app, include the following dependency in your POM:

<dependency>
    <groupId>org.cytoscape</groupId>
    <artifactId>filter-api</artifactId>
</dependency>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Subscribes the given listener to changes in this Transformer's parameters.
    Returns the type of the context object this Transformer is compatible with.
    Returns the type of the elements this Transformer is compatible with.
    Returns the unique id of this type of Transformer.
    Returns the user-friendly display name of this type of Transformer.
    void
    Unsubscribes the given listener from changes in this Transformer's parameters.
  • Method Details

    • getName

      String getName()
      Returns the user-friendly display name of this type of Transformer.
      Returns:
      the user-friendly display name of this type of Transformer.
    • getId

      String getId()
      Returns the unique id of this type of Transformer.
      Returns:
      the unique id of this type of Transformer.
    • getContextType

      Class<C> getContextType()
      Returns the type of the context object this Transformer is compatible with.
      Returns:
      the type of the context object.
    • getElementType

      Class<E> getElementType()
      Returns the type of the elements this Transformer is compatible with.
      Returns:
      the type of the elements.
    • addListener

      void addListener(TransformerListener listener)
      Subscribes the given listener to changes in this Transformer's parameters.
      Parameters:
      listener - the object that should be notified of changes to this Transformer.
    • removeListener

      void removeListener(TransformerListener listener)
      Unsubscribes the given listener from changes in this Transformer's parameters.
      Parameters:
      listener - the object that should no longer be notified of changes to this Transformer.