.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::Tools::EUtilities::EUtilDataI 3pm" .TH Bio::Tools::EUtilities::EUtilDataI 3pm "2020-03-13" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Tools::EUtilities::EUtilDataI \- EUtil data object interface. .SH "VERSION" .IX Header "VERSION" version 1.77 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& # say you had some data in a hash ref ($data) and wanted to create hierarchies \& # of object using the same interface, starting with the topmost... \& \& # $object is a Bio::Tools::EUtilities::EUtilDataI instance \& \& $object\->_add_data($data); \& \& # in _add_data()... sort through keys and create subobjects as needed \& \& if ($key eq \*(Aqfoo\*(Aq) { \& my $sub = Bio::Tools::EUtilities::FooData\->new(\-eutil => \*(Aqefoo\*(Aq, \& \-type => \*(Aqfoo\*(Aq); \& $sub\->_add_data($subdata); \& # store into parent object as needed... \& ... \& } \& \& # access stored data \& \& while (my $sub = $parent\->next_Foo) {...} .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a simple interface which allows creation of simple typed object hierarchies. Single layers can be accessed via simple iterators (next_* methods) or retrieved all at once (get_*) methods; nested data can be iterated through nested iterators for each object, or retrieved using get_all_* methods. .PP This interface defines common methods required for all eutil data-holding objects: \fB_add_data()\fR, \fBeutil()\fR, and \fBtype()\fR. It also specifies inheriting interface classes use at least one of three methods: \fBget_ids()\fR, \fBget_term()\fR, or \&\fBget_database()\fR, which are the three types of data that eutils mainly centers on. .PP Generally, \fBeutil()\fR is the Bio::Tools::EUtilities parser used to set the data. Similarly, \fBdatatype()\fR is the specific data type for the class. .PP Implementations which rely on subclasses to store data and have iterators should also define a generalized \fBrewind()\fR method that (by default) rewinds all iterators to the start. Args passed can specify exactly which iterator to rewind and (if possible) recursively rewind nested object iterators. .PP As the method implies, \fB_add_data()\fR is a private method that adds data chunks to the object and sets internal parameters for the various data objects. Methods corresponding to the data type simply return the set data or iterate through the data sets if the values are more complex. Data can alternatively be passed through the object constructor. .SS "eutil" .IX Subsection "eutil" .Vb 6 \& Title : eutil \& Usage : $eutil\->$foo\->eutil \& Function : Get/Set eutil \& Returns : string \& Args : string (eutil) \& Throws : on invalid eutil .Ve .SS "datatype" .IX Subsection "datatype" .Vb 7 \& Title : type \& Usage : $type = $qd\->datatype; \& Function: retrieve simple data type object holds (linkset, docsum, item, etc) \& Returns : string (eutil name) \& Args : none \& Note : this is probably more useful for devs than for users as a way to keep \& track of the various types of modules used .Ve .SS "rewind" .IX Subsection "rewind" .Vb 5 \& Title : rewind \& Usage : $esum\->rewind \& Function : rewinds the requested iterator \& Returns : none \& Args : [OPTIONAL] may include \*(Aqall\*(Aq, \*(Aqrecursive\*(Aq, etc. .Ve .SS "_add_data" .IX Subsection "_add_data" .Vb 5 \& Title : _add_data \& Usage : $foo\->_add_data($data) \& Function : adds data to current object as a chunk \& Returns : none \& Args : hash ref containing relevant data .Ve .SS "to_string" .IX Subsection "to_string" .Vb 6 \& Title : to_string \& Usage : $foo\->to_string() \& Function : converts current object to string \& Returns : none \& Args : (optional) simple data for text formatting \& Note : Used generally for debugging and for the print_* methods .Ve .SS "_text_wrap" .IX Subsection "_text_wrap" .Vb 6 \& Title : _text_wrap \& Usage : $foo\->_text_wrap($string) \& Function : private internal wrapper for Text::Wrap::wrap \& Returns : string \& Args : string \& Note : Internal use only. Simple wrapper method. .Ve .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing lists" .IX Subsection "Mailing lists" User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& https://bioperl.org/Support.html \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: \&\fIbioperl\-l@bioperl.org\fR rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. .SS "Reporting bugs" .IX Subsection "Reporting bugs" Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web: .PP .Vb 1 \& https://github.com/bioperl/bio\-eutilities/issues .Ve .SH "AUTHOR" .IX Header "AUTHOR" Chris Fields .SH "COPYRIGHT" .IX Header "COPYRIGHT" This software is copyright (c) 2006\-2013 by Chris Fields. .PP This software is available under the same terms as the perl 5 programming language system itself.