Interface CyFileFilter

All Known Implementing Classes:
BasicCyFileFilter

public interface CyFileFilter
An interface that captures the metadata description of a file type so that files of the specified type can be handled correctly by the application and the user interface.

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: io-api

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

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

    Modifier and Type
    Method
    Description
    boolean
    accepts(InputStream stream, DataCategory category)
    A method that attempts to determine whether the specified InputStream can be read by the Reader using this filter.
    boolean
    accepts(URI uri, DataCategory category)
    A method that attempts to determine whether the specified URI can be read by the Reader using this filter.
    The MIME content types supported by this filter.
    The DataCategory supported by this filter.
    A short, human readable description of the file extensions suitable for display in FileChoosers.
    Returns a list of file extensions (xml, xgmml, sif) suitable for for use in FileChoosers.
  • Method Details

    • accepts

      boolean accepts(URI uri, DataCategory category)
      A method that attempts to determine whether the specified URI can be read by the Reader using this filter.
      Parameters:
      uri - The URI to be checked.
      category - The data category of URI.
      Returns:
      True if we believe the URI can be read, false otherwise.
    • accepts

      boolean accepts(InputStream stream, DataCategory category)
      A method that attempts to determine whether the specified InputStream can be read by the Reader using this filter.
      Parameters:
      stream - The input steam to be checked.
      category - The data category of the input steam.
      Returns:
      True if we believe the stream can be read, false otherwise.
    • getExtensions

      Set<String> getExtensions()
      Returns a list of file extensions (xml, xgmml, sif) suitable for for use in FileChoosers.
      Returns:
      A list of file extensions (xml, xgmml, sif) suitable for for use in FileChoosers.
    • getContentTypes

      Set<String> getContentTypes()
      The MIME content types supported by this filter.
      Returns:
      A set of strings the describe the different MIME types supported by this filter.
    • getDescription

      String getDescription()
      A short, human readable description of the file extensions suitable for display in FileChoosers.
      Returns:
      A string describing this file type.
    • getDataCategory

      DataCategory getDataCategory()
      The DataCategory supported by this filter.
      Returns:
      The DataCategory supported by this filter.