Sidebar

Access to NCBI data

Introduction

This chapter describes access to the NCBI data using the NCBI C++ Toolkit.

Chapter Outline

Object Manager: Generic API for retrieving and manipulating biological sequence data

The information about Object Manager library is here.

E-Utils: Access to Entrez Data

EUtils requests

The base class for all requests is CEUtils_Request. Derived request classes provide Get/Set methods to specify arguments for each request. The returned data can be read in several ways:

  • **Read()** - reads the data returned by the server into a string.

  • **GetStream()** - allows to read plain data returned by the server.

  • **GetObjectIStream()** - returns serial stream for reading data (in most cases it’s an XML stream).

Connection context

CEUtils_ConnContext allows transferring EUtils context from one request to another. It includes user-provided information (tool, email) and history data (WebEnv, query_key). If no context is provided for a request (the ctx argument is NULL), a temporary context will be created while executing the request.

EUtils objects

Most requests return specific data types described in EUtils DTDs. The C++ classes generated from the DTDs can be found in include/objtools/eutils/<util-name>.

Sample application

An example of using EUtils API can be found in sample/app/eutils/eutils_sample.cpp.