ref Class Reference

#include <head.h>

List of all members.

Public Member Functions

void read (ifstream &ins, char ln[])
void clear ()
 ref ()
int read (istream &ins, string &ln)
int dump (ostream &seq, ostream &pap, ostream &aut)
int writeProtein (ostream &seq, ostream &pap, ostream &aut)
string key () const
string title () const
 ref ()
 ref (const ref &r)
refoperator= (const ref &r)
bool next (string &ln, istream &in)
void writeRaw (ostream &os) const
const string * get (const string &code) const
string getKey () const
bool bad ()
vector< string > process_volpp (string &s)
string process_year (const string &s)
string firstAuthor () const

Static Public Member Functions

static void init_field ()
static void dumpkeymap (const string &file)
static void readkeymap (const string &file)

Private Member Functions

void clear ()
void au2list ()
string fullName ()
void rmSubmit ()
void process ()
void constructKey ()

Private Attributes

char key [20]
string auth
string cit
string descrip
string titl
string cont
string note
string acc
char citype [15]
char medid [15]
list< accessionrefacc
string jnl
string med
string pubmed
string rmk
jinfo parsedJ
vector< string > authorList
map< string, string > record
map< string, string > digest
vector< string > editor
string key

Static Private Attributes

static map< string, string > field = map<string,string>()
static string field_str [14] = {"RN", "Reference number", "RP", "Reference position", "RC", "Reference comment(s)", "RX", "Reference cross-reference(s)", "RA", "Reference authors", "RT", "Reference title", "RL", "Reference location"}
static map< string, int > paperkey = map<string,int>()

Friends

void rmAuthorPunc (string &s)
void rmJournalDot (string &s)
ostream & operator<< (ostream &os, const ref &r)


Constructor & Destructor Documentation

ref::ref (  )  [inline]

ref::ref (  )  [inline]

References field, and init_field().

ref::ref ( const ref r  ) 

References digest, editor, key(), and record.


Member Function Documentation

void ref::read ( ifstream &  ins,
char  ln[] 
)

void ref::clear (  ) 

References acc, auth, cit, citype, cont, descrip, key(), medid, note, refacc, and titl.

Referenced by read(), and protein::read().

int ref::read ( istream ins,
string &  ln 
)

int ref::dump ( ostream &  seq,
ostream &  pap,
ostream &  aut 
)

int ref::writeProtein ( ostream &  seq,
ostream &  pap,
ostream &  aut 
)

string ref::key (  )  const

string ref::title (  )  const [inline]

References titl.

Referenced by main().

void ref::clear (  )  [private]

void ref::au2list (  )  [private]

References auth, authorList, isupper(), and rmAuthorPunc.

Referenced by read().

string ref::fullName (  )  [private]

References jnl.

Referenced by dump(), and writeProtein().

void ref::rmSubmit (  )  [private]

References jnl.

Referenced by dump(), and writeProtein().

ref & ref::operator= ( const ref r  ) 

References digest, editor, key(), and record.

bool ref::next ( string &  ln,
istream in 
)

ln should contain the first line of the paper record return true if there are more

References constructKey(), prt::content_idx, digest, editor, field, process(), record, and remove_end_mark().

Referenced by prt::next().

void ref::writeRaw ( ostream &  os  )  const

Making ID from PubMed and Medline only may return an empty string if Medline and PubMed are not presene. for debug purpose of looking at this object

References record.

Referenced by process().

const string * ref::get ( const string &  code  )  const

get the content, if not present return 0

References record.

string ref::getKey (  )  const [inline]

References key().

Referenced by operator<<().

bool ref::bad (  )  [inline]

References key().

Referenced by prt::next().

vector< string > ref::process_volpp ( string &  s  ) 

process the pp.[vol:]ppx-ppy string. add to digest map Volume and Page info, returns a vector containing the three values in order. Volume may be "" if not present s will be modified

References digest.

Referenced by process().

string ref::process_year ( const string &  s  ) 

extract the year 4 digits from blabla (1999) will insert Year to digest

References digest.

Referenced by process().

string ref::firstAuthor (  )  const

References firstWord(), and record.

void ref::init_field (  )  [static]

read from the field_str array and fill field map

References field, and field_str.

Referenced by ref().

void ref::dumpkeymap ( const string &  file  )  [static]

References paperkey.

Referenced by main().

void ref::readkeymap ( const string &  file  )  [static]

References ifstream(), paperkey, and split().

Referenced by main().

void ref::process (  )  [private]

right now is only processing the RX field will try to parse RL field do some formating: removing end markes "; Convert double quotes to single quotes Also try to make a key out of the RL field

References dbtime::aceTime(), digest, erase(), find(), refloc::key(), refloc::loadMap(), book::loadMap(), process_volpp(), process_year(), dbtime::readsw(), record, replace(), replaceInnerQuote(), parsererror::show(), split(), startWith(), startWithIgnoreCase(), and writeRaw().

Referenced by next().

void ref::constructKey (  )  [private]

make a key based on PM or MED if exist otherwise make a key based on a integer counter

References digest, key(), paperkey, and record.

Referenced by next().


Friends And Related Function Documentation

void rmAuthorPunc ( string &  s  )  [friend]

Referenced by au2list().

void rmJournalDot ( string &  s  )  [friend]

Referenced by read().

ostream& operator<< ( ostream &  os,
const ref r 
) [friend]

Out put the paper object in Ace format to the stream os


Member Data Documentation

string ref::key [private]

Referenced by operator=(), and ref().

string ref::auth [private]

Referenced by au2list(), clear(), and read().

string ref::cit [private]

Referenced by clear(), and read().

string ref::descrip [private]

Referenced by clear(), and read().

string ref::titl [private]

Referenced by clear(), dump(), read(), title(), and writeProtein().

string ref::cont [private]

Referenced by clear(), and read().

string ref::note [private]

Referenced by clear(), and read().

string ref::acc [private]

Referenced by clear().

char ref::citype[15] [private]

Referenced by clear(), and read().

char ref::medid[15] [private]

Referenced by clear(), and read().

list<accession> ref::refacc [private]

Referenced by clear(), and read().

string ref::jnl [private]

string ref::med [private]

Referenced by dump(), read(), and writeProtein().

string ref::pubmed [private]

Referenced by dump(), read(), and writeProtein().

string ref::rmk [private]

Referenced by read().

jinfo ref::parsedJ [private]

Referenced by dump(), read(), and writeProtein().

vector<string> ref::authorList [private]

Referenced by au2list(), dump(), and writeProtein().

map<string, string> ref::record [private]

record is the raw data: It is a map of two letter code => text content

Referenced by constructKey(), firstAuthor(), get(), next(), operator<<(), operator=(), process(), ref(), and writeRaw().

map<string,string> ref::digest [private]

vector<string> ref::editor [private]

Referenced by next(), operator<<(), operator=(), and ref().

string ref::key [private]

map< string, string > ref::field = map<string,string>() [static, private]

mapping of two-letter code to Text-definition of all possible fields of paper object

Referenced by init_field(), next(), and ref().

string ref::field_str = {"RN", "Reference number", "RP", "Reference position", "RC", "Reference comment(s)", "RX", "Reference cross-reference(s)", "RA", "Reference authors", "RT", "Reference title", "RL", "Reference location"} [static, private]

Referenced by init_field().

map< string, int > ref::paperkey = map<string,int>() [static, private]

to track all paper objects

Referenced by constructKey(), dumpkeymap(), and readkeymap().


The documentation for this class was generated from the following files:

Generated on Wed Aug 10 11:57:14 2011 for Softwares from Orpara by  doxygen 1.5.6