org.eaglei.search.provider.ncbi
Class NCBIEUtils
java.lang.Object
org.eaglei.search.provider.ncbi.NCBIEUtils
public final class NCBIEUtils
- extends java.lang.Object
Contains logic for using NCBI EUtils.
- Author:
- rfrost
|
Field Summary |
static java.lang.String |
ID
|
static java.lang.String |
IDLIST
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IDLIST
public static final java.lang.String IDLIST
- See Also:
- Constant Field Values
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
NCBIEUtils
public NCBIEUtils()
executeNCBIRequest
public static org.w3c.dom.Document executeNCBIRequest(java.lang.String url)
throws java.io.IOException
- Executes an NCBI request at the specified eUtils URL and returns the XML response as a DOM Document
- Parameters:
url - eUtils URL with all params.
- Returns:
- Response as DOM Document.
- Throws:
java.io.IOException - Thrown if there is an error.
serializeDocument
public static java.lang.String serializeDocument(org.w3c.dom.Document doc)
buildSearchURL
public static java.lang.String buildSearchURL(java.lang.String query,
java.lang.String db,
java.lang.String tool,
int start,
int max)
buildSummaryURL
public static java.lang.String buildSummaryURL(NCBIEUtils.ESearchResult result,
java.lang.String db,
java.lang.String tool)
parseESearchResult
public static NCBIEUtils.ESearchResult parseESearchResult(org.w3c.dom.Document doc)
throws java.io.IOException
- Parses an eSearch XML result and returns the IDs.
- Parameters:
doc - XML Document.
- Returns:
- List of IDs
- Throws:
java.io.IOException
parseESummaryResult
public static java.util.List<NCBIEUtils.DocSummary> parseESummaryResult(org.w3c.dom.Document doc)
throws java.io.IOException
- Parses an eSummary XML result and returns the IDs.
- Parameters:
doc - XML Document.
- Returns:
- List of IDs
- Throws:
java.io.IOException
parse
public static org.w3c.dom.Document parse(java.io.InputStream stream)
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2009-2010 Eagle-I. All Rights Reserved.