public class UniprotTaxonomyProvider extends Object
Constructor and Description |
---|
UniprotTaxonomyProvider()
Normal constructor, GUI-less mode.
|
UniprotTaxonomyProvider(DefaultTreeModel model)
GUI constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getCachedTaxonomyID(String taxonomyName)
Returns the taxonomyID that was encountered for a taxonomyName.
|
List<String> |
getChildTaxonomies(String taxonomyName)
Returns the child taxonomies.
|
Set<String> |
getLineagesForTaxonomyID(String taxonomyName)
Returns the possible lineages for a given taxonomy.
|
Set<String> |
getLineagesFromFile(File taxonomyFile)
Returns the possible lineages for a given taxonomy
|
DefaultTreeModel |
getModelAfterClick(String taxonomyName)
Returns a model for a known taxonomy name (for example after node click).
|
DefaultTreeModel |
getModelAfterSearch(String taxonomyName)
Returns a model after searching for an unknown taxonomy name (for example
after a search).
|
DefaultTreeModel |
getModelFromFile(File taxonomyTabFile)
Returns a model after searching for an unknown taxonomy name (for example
after a search).
|
String |
queryTaxonomy(String queryTerm,
boolean returnID)
Returns the query taxonomy.
|
public UniprotTaxonomyProvider(DefaultTreeModel model)
model
- the tree model you want to updatepublic UniprotTaxonomyProvider()
public List<String> getChildTaxonomies(String taxonomyName) throws MalformedURLException, IOException
taxonomyName
- the taxonomy nameMalformedURLException
- if a MalformedURLException occursIOException
- if an IOException occurspublic Set<String> getLineagesForTaxonomyID(String taxonomyName) throws MalformedURLException, IOException, IllegalArgumentException, URISyntaxException
taxonomyName
- the taxonomy nameMalformedURLException
- if a MalformedURLException occursIOException
- if an IOException occursURISyntaxException
- if a URISyntaxException occursIllegalArgumentException
public Set<String> getLineagesFromFile(File taxonomyFile) throws MalformedURLException, IOException
taxonomyFile
- taxonomy file from the UniProt web pageMalformedURLException
- if a MalformedURLException occursIOException
- if an IOException occurspublic DefaultTreeModel getModelFromFile(File taxonomyTabFile) throws IOException, InterruptedException
taxonomyTabFile
- taxonomy file from the UniProt web pageIOException
- if an IOException occursInterruptedException
- if an InterruptedException occurspublic DefaultTreeModel getModelAfterSearch(String taxonomyName) throws IllegalArgumentException, IOException, MalformedURLException, URISyntaxException
taxonomyName
- the taxonomy nameMalformedURLException
- if a MalformedURLException occursIOException
- if an IOException occursURISyntaxException
- if a URISyntaxException occursIllegalArgumentException
public DefaultTreeModel getModelAfterClick(String taxonomyName) throws IOException
taxonomyName
- the taxonomy nameIOException
- if an IOException occurspublic String getCachedTaxonomyID(String taxonomyName)
taxonomyName
- the taxonomy namepublic String queryTaxonomy(String queryTerm, boolean returnID) throws MalformedURLException, IOException
queryTerm
- the term you wish to search for (example "human" or
9606)returnID
- boolean indicating whether you want the taxonomyID or the
taxonomy nameMalformedURLException
- if a MalformedURLException occursIOException
- if an IOException occursCopyright © 2016. All rights reserved.