Package org.helm.notation2.wsadapter
Class MonomerWSLoader
java.lang.Object
org.helm.notation2.wsadapter.MonomerWSLoader
public class MonomerWSLoader extends Object
MonomerWSLoader loads monomers from the webservice configured in
MonomerStoreConfiguration.- Version:
- $Id$
- Author:
- Marco Lanig
-
Constructor Summary
Constructors Constructor Description MonomerWSLoader(String polymerType)Constructor using polymerType as parameter. -
Method Summary
Modifier and Type Method Description static List<CategorizedMonomer>loadMonomerCategorization()Loads the monomer categories using the URL configured inMonomerStoreConfiguration.Map<String,Monomer>loadMonomerStore(Map<String,Attachment> attachmentDB)Loads the monomer store using the URL configured inMonomerStoreConfigurationand the polymerType that was given to constructor.
-
Constructor Details
-
MonomerWSLoader
Constructor using polymerType as parameter. This will be one of PEPTIDE, RNA, or CHEM.- Parameters:
polymerType- given polymer type- Throws:
IOException- if polymer type is unknown
-
-
Method Details
-
loadMonomerStore
public Map<String,Monomer> loadMonomerStore(Map<String,Attachment> attachmentDB) throws IOException, URISyntaxException, EncoderExceptionLoads the monomer store using the URL configured inMonomerStoreConfigurationand the polymerType that was given to constructor.- Parameters:
attachmentDB- the attachments stored in Toolkit.- Returns:
- Map containing monomers
- Throws:
IOException- IO ErrorURISyntaxException- string could not be parsed as URIEncoderException- monomer store could be not encoded
-
loadMonomerCategorization
public static List<CategorizedMonomer> loadMonomerCategorization() throws IOException, URISyntaxExceptionLoads the monomer categories using the URL configured inMonomerStoreConfiguration.- Returns:
- List containing monomer categories
- Throws:
IOException- IO errorURISyntaxException- url is not valid
-