Package ubic.gemma.core.loader.entrez
Class EntrezXmlUtils
- java.lang.Object
-
- ubic.gemma.core.loader.entrez.EntrezXmlUtils
-
public class EntrezXmlUtils extends Object
Utilities for manipulating Entrez XML responses.- Author:
- poirigui
-
-
Constructor Summary
Constructors Constructor Description EntrezXmlUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Collection<String>extractFetchIds(Document doc)Extract IDs from an EFetch call.static Collection<String>extractLinkIds(Document doc, String dbfrom, String dbto)Extract IDs from an ELink call.static Collection<String>extractSearchIds(Document doc)Extract IDs from an ESearch call.static StringgetCookie(Document document)static intgetCount(Document document)static EntrezQuerygetQuery(Document doc)static StringgetQueryId(Document document)static Documentparse(InputStream is)Parse an XML reply from Entrez.static Documentparse(InputStream is, String encoding)Parse an XML reply with a specific character encoding.
-
-
-
Method Detail
-
parse
public static Document parse(InputStream is) throws IOException
Parse an XML reply from Entrez.This will check if there are any
ERRORtags.- Throws:
IOException
-
parse
public static Document parse(InputStream is, String encoding) throws IOException
Parse an XML reply with a specific character encoding.This is mainly useful for querying old MINiML documents from NCBI FTP server that are declared as UTF-8 but actually use Windows-1252 encoding.
- Throws:
IOException
-
getQuery
public static EntrezQuery getQuery(Document doc)
-
getCount
public static int getCount(Document document)
-
extractSearchIds
public static Collection<String> extractSearchIds(Document doc)
Extract IDs from an ESearch call.
-
extractFetchIds
public static Collection<String> extractFetchIds(Document doc)
Extract IDs from an EFetch call.The
uilistreturn type must be used in the call.
-
extractLinkIds
public static Collection<String> extractLinkIds(Document doc, String dbfrom, String dbto)
Extract IDs from an ELink call.
-
-