Package org.cytoscape.io
Interface CyFileFilter
-
- All Known Implementing Classes:
BasicCyFileFilter
public interface CyFileFilterAn 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.Module:
io-apiTo use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>io-api</artifactId> </dependency>
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaccepts(InputStream stream, DataCategory category)A method that attempts to determine whether the specified InputStream can be read by the Reader using this filter.booleanaccepts(URI uri, DataCategory category)A method that attempts to determine whether the specified URI can be read by the Reader using this filter.Set<String>getContentTypes()The MIME content types supported by this filter.DataCategorygetDataCategory()The DataCategory supported by this filter.StringgetDescription()A short, human readable description of the file extensions suitable for display in FileChoosers.Set<String>getExtensions()Returns a list of file extensions (xml, xgmml, sif) suitable for for use in FileChoosers.
-
-
-
Method Detail
-
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.
-
-