@@ -0,0 +1,1330 @@
+package org.cytoscape.keggscape.internal.read.kgml;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.net.URI;%0Aimport java.util.Set;%0A%0Aimport org.cytoscape.io.BasicCyFileFilter;%0Aimport org.cytoscape.io.DataCategory;%0Aimport org.cytoscape.io.util.StreamUtil;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class KeggscapeFileFilter extends BasicCyFileFilter %7B%0A%09%0A%09private static final Logger logger = LoggerFactory%0A%09%09%09.getLogger(KeggscapeFileFilter.class);%0A%09%0A%09public KeggscapeFileFilter(Set%3CString%3E extensions, Set%3CString%3E contentTypes,%0A%09%09%09String description, DataCategory category, StreamUtil streamUtil) %7B%0A%09%09super(extensions, contentTypes, description, category, streamUtil);%0A%09%7D%0A%0A%09public KeggscapeFileFilter(String%5B%5D extensions, String%5B%5D contentTypes,%0A%09%09%09String description, DataCategory category, StreamUtil streamUtil) %7B%0A%09%09super(extensions, contentTypes, description, category, streamUtil);%0A%09%7D%0A%09%0A%09@Override%0A%09public boolean accepts(final InputStream stream, final DataCategory category) %7B%0A%09%09return super.accepts(stream, category);%0A%09%7D%0A%09%0A%09@Override%0A%09public boolean accepts(final URI uri, final DataCategory category) %7B%0A%09%09try %7B%0A%09%09%09return accepts(uri.toURL().openStream(), category);%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09logger.error(%22Error while opening stream: %22 + uri, e);%0A%09%09%09return false;%0A%09%09%7D%0A%09%7D%0A%09%0A%7D%0A

add filefilter