in progress
[jalview.git] / forester / java / src / org / forester / ws / uniprot / UniProtWsTools.java
index 623f837..8afb9eb 100644 (file)
@@ -5,7 +5,7 @@
 // Copyright (C) 2010 Christian M Zmasek
 // Copyright (C) 2010 Sanford-Burnham Medical Research Institute
 // All rights reserved
-// 
+//
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
@@ -15,7 +15,7 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 // Lesser General Public License for more details.
-// 
+//
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
@@ -213,4 +213,10 @@ public final class UniProtWsTools {
         in.close();
         return result;
     }
+
+    public static SequenceDatabaseEntry obtainUniProtEntry( final String query, final int max_lines_to_return )
+            throws IOException {
+        final List<String> lines = queryUniprot( "uniprot/" + query + ".txt", max_lines_to_return );
+        return UniProtEntry.createInstanceFromPlainText( lines );
+    }
 }