001package org.biojava.bio.program.unigene; 002 003import java.net.URL; 004 005import org.biojava.bio.BioException; 006 007/** 008 * <p>Objects that can be used to produce a <code>UnigeneDB</code> instance 009 * given a URL.</p> 010 * 011 * <p><em>This class is intended for implementers of the Unigene 012 * functionality</em></p> 013 * 014 * <p>The URL is used to locate the unigene data, as well as potentialy deciding 015 * upon the access mechanism. Factory implementations are provided for 016 * <code>file</code> and <code>jdbc</code> URLs. You can add another stoorage 017 * mechanism to the system by writing an implementation of 018 * <code>UnigeneFactory</code> and registering it with UnigeneTools.</p> 019 * 020 * @author Matthew Pocock 021 */ 022public interface UnigeneFactory { 023 public UnigeneDB loadUnigene(URL unigeneURL) 024 throws BioException; 025 026 public UnigeneDB createUnigene(URL unigeneURL) 027 throws BioException; 028 029 public boolean canAccept(URL unigeneURL); 030}