1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
\r
5 <!-- Generated by javadoc (build 1.6.0_24) on Wed Dec 07 12:08:24 GMT 2011 -->
\r
10 <META NAME="date" CONTENT="2011-12-07">
\r
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
\r
14 <SCRIPT type="text/javascript">
\r
15 function windowTitle()
\r
17 if (location.href.indexOf('is-external=true') == -1) {
\r
18 parent.document.title="Limit";
\r
27 <BODY BGCOLOR="white" onload="windowTitle();">
\r
31 <!-- ========= START OF TOP NAVBAR ======= -->
\r
32 <A NAME="navbar_top"><!-- --></A>
\r
33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
\r
34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
37 <A NAME="navbar_top_firstrow"><!-- --></A>
\r
38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
39 <TR ALIGN="center" VALIGN="top">
\r
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Limit.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
\r
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
58 <A HREF="../../compbio/metadata/JobSubmissionException.html" title="class in compbio.metadata"><B>PREV CLASS</B></A>
\r
59 <A HREF="../../compbio/metadata/LimitExceededException.html" title="class in compbio.metadata"><B>NEXT CLASS</B></A></FONT></TD>
\r
60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
61 <A HREF="../../index.html?compbio/metadata/Limit.html" target="_top"><B>FRAMES</B></A>
\r
62 <A HREF="Limit.html" target="_top"><B>NO FRAMES</B></A>
\r
63 <SCRIPT type="text/javascript">
\r
66 document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
71 <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
\r
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
79 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
81 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
84 <A NAME="skip-navbar_top"></A>
\r
85 <!-- ========= END OF TOP NAVBAR ========= -->
\r
88 <!-- ======== START OF CLASS DATA ======== -->
\r
91 compbio.metadata</FONT>
\r
93 Class Limit<T></H2>
\r
96 <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>compbio.metadata.Limit<T></B>
\r
99 <DT><DT><B>Type Parameters:</B><DD><CODE>T</CODE> - the type of an executable for which this limit is defined.</DL>
\r
102 <DT><PRE>public class <B>Limit<T></B><DT>extends java.lang.Object</DL>
\r
106 A value object containing a maximum number of sequences and a maximum average
107 sequence length for a preset. Also contains static method for determining the
108 number of sequence and their average length in the List<FastaSequence>
\r
113 <DT><B>Version:</B></DT>
\r
114 <DD>1.0 January 2010</DD>
\r
115 <DT><B>Author:</B></DT>
\r
117 <DT><B>See Also:</B><DD><A HREF="../../compbio/metadata/LimitsManager.html" title="class in compbio.metadata"><CODE>LimitsManager</CODE></A></DL>
\r
122 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
\r
124 <A NAME="constructor_summary"><!-- --></A>
\r
125 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
126 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
127 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
\r
128 <B>Constructor Summary</B></FONT></TH>
\r
130 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
131 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#Limit(int, int, java.lang.String)">Limit</A></B>(int seqNumber,
\r
132 int seqLength,
\r
133 java.lang.String preset)</CODE>
\r
136 Instantiate the limit</TD>
\r
138 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
139 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#Limit(int, int, java.lang.String, boolean)">Limit</A></B>(int seqNumber,
\r
140 int seqLength,
\r
141 java.lang.String preset,
\r
142 boolean isDefault)</CODE>
\r
145 </TD>
\r
149 <!-- ========== METHOD SUMMARY =========== -->
\r
151 <A NAME="method_summary"><!-- --></A>
\r
152 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
153 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
154 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
\r
155 <B>Method Summary</B></FONT></TH>
\r
157 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
158 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
159 <CODE> boolean</CODE></FONT></TD>
\r
160 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object obj)</CODE>
\r
163 </TD>
\r
165 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
166 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
167 <CODE> int</CODE></FONT></TD>
\r
168 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#getAvgSeqLength()">getAvgSeqLength</A></B>()</CODE>
\r
171 </TD>
\r
173 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
174 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
175 <CODE>static int</CODE></FONT></TD>
\r
176 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#getAvgSequenceLength(java.util.List)">getAvgSequenceLength</A></B>(java.util.List<<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</CODE>
\r
179 Calculates an average sequence length of the dataset</TD>
\r
181 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
182 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
183 <CODE> java.lang.String</CODE></FONT></TD>
\r
184 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#getPreset()">getPreset</A></B>()</CODE>
\r
187 </TD>
\r
189 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
190 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
191 <CODE> int</CODE></FONT></TD>
\r
192 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#getSeqNumber()">getSeqNumber</A></B>()</CODE>
\r
195 </TD>
\r
197 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
198 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
199 <CODE> int</CODE></FONT></TD>
\r
200 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#hashCode()">hashCode</A></B>()</CODE>
\r
203 </TD>
\r
205 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
206 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
207 <CODE> boolean</CODE></FONT></TD>
\r
208 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#isDefault()">isDefault</A></B>()</CODE>
\r
211 </TD>
\r
213 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
214 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
215 <CODE> boolean</CODE></FONT></TD>
\r
216 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#isExceeded(java.util.List)">isExceeded</A></B>(java.util.List<<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</CODE>
\r
219 Checks if the number of sequences or their average length in the dataset
220 exceeds this limit.</TD>
\r
222 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
223 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
224 <CODE> java.lang.String</CODE></FONT></TD>
\r
225 <TD><CODE><B><A HREF="../../compbio/metadata/Limit.html#toString()">toString</A></B>()</CODE>
\r
228 </TD>
\r
231 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
\r
232 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
233 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
\r
234 <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
\r
236 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
237 <TD><CODE>getClass, notify, notifyAll, wait, wait, wait</CODE></TD>
\r
243 <!-- ========= CONSTRUCTOR DETAIL ======== -->
\r
245 <A NAME="constructor_detail"><!-- --></A>
\r
246 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
247 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
248 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
\r
249 <B>Constructor Detail</B></FONT></TH>
\r
253 <A NAME="Limit(int, int, java.lang.String)"><!-- --></A><H3>
\r
256 public <B>Limit</B>(int seqNumber,
\r
257 int seqLength,
\r
258 java.lang.String preset)</PRE>
\r
260 <DD>Instantiate the limit
\r
263 <DT><B>Parameters:</B><DD><CODE>seqNumber</CODE> - the maximum number of sequences allowed for calculation.
264 Required<DD><CODE>seqLength</CODE> - the average length of the sequence, optional<DD><CODE>preset</CODE> - the name of preset if any, optional
\r
266 <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the seqNumber is not supplied or the seqLength is negative</DL>
\r
270 <A NAME="Limit(int, int, java.lang.String, boolean)"><!-- --></A><H3>
\r
273 public <B>Limit</B>(int seqNumber,
\r
274 int seqLength,
\r
275 java.lang.String preset,
\r
276 boolean isDefault)</PRE>
\r
280 <!-- ============ METHOD DETAIL ========== -->
\r
282 <A NAME="method_detail"><!-- --></A>
\r
283 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
284 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
285 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
\r
286 <B>Method Detail</B></FONT></TH>
\r
290 <A NAME="getPreset()"><!-- --></A><H3>
\r
293 public java.lang.String <B>getPreset</B>()</PRE>
\r
301 <A NAME="getAvgSeqLength()"><!-- --></A><H3>
\r
302 getAvgSeqLength</H3>
\r
304 public int <B>getAvgSeqLength</B>()</PRE>
\r
308 <DT><B>Returns:</B><DD>the allowed average sequence length</DL>
\r
313 <A NAME="getSeqNumber()"><!-- --></A><H3>
\r
316 public int <B>getSeqNumber</B>()</PRE>
\r
320 <DT><B>Returns:</B><DD>the maximum number of sequences allowed</DL>
\r
325 <A NAME="isDefault()"><!-- --></A><H3>
\r
328 public boolean <B>isDefault</B>()</PRE>
\r
332 <DT><B>Returns:</B><DD>true is this is a default limit to be used, false otherwise</DL>
\r
337 <A NAME="hashCode()"><!-- --></A><H3>
\r
340 public int <B>hashCode</B>()</PRE>
\r
343 <DT><B>Overrides:</B><DD><CODE>hashCode</CODE> in class <CODE>java.lang.Object</CODE></DL>
\r
351 <A NAME="equals(java.lang.Object)"><!-- --></A><H3>
\r
354 public boolean <B>equals</B>(java.lang.Object obj)</PRE>
\r
357 <DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></DL>
\r
365 <A NAME="toString()"><!-- --></A><H3>
\r
368 public java.lang.String <B>toString</B>()</PRE>
\r
371 <DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
\r
379 <A NAME="isExceeded(java.util.List)"><!-- --></A><H3>
\r
382 public boolean <B>isExceeded</B>(java.util.List<<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</PRE>
\r
384 <DD>Checks if the number of sequences or their average length in the dataset
385 exceeds this limit.
\r
388 <DT><B>Parameters:</B><DD><CODE>data</CODE> - the dataset to measure
\r
389 <DT><B>Returns:</B><DD>true if a limit is exceeded (what is the dataset is larger then
390 the limit), false otherwise. First check the number of sequences
391 in the dataset and if it exceeds the limit return true
392 irrespective of the average length. If the number of sequences in
393 the dataset is less than the limit and average length is defined,
394 then check whether the total number of letters (number of
395 sequence multiplied by the average sequence length) is greater
396 then the total number of letters in the dataset. Returns true if
397 the total number of letters in the dataset is greater than the
398 limit, false otherwise.</DL>
\r
403 <A NAME="getAvgSequenceLength(java.util.List)"><!-- --></A><H3>
\r
404 getAvgSequenceLength</H3>
\r
406 public static int <B>getAvgSequenceLength</B>(java.util.List<<A HREF="../../compbio/data/sequence/FastaSequence.html" title="class in compbio.data.sequence">FastaSequence</A>> data)</PRE>
\r
408 <DD>Calculates an average sequence length of the dataset
\r
411 <DT><B>Parameters:</B><DD><CODE>data</CODE> -
\r
412 <DT><B>Returns:</B><DD>an average sequence length in the input dataset</DL>
\r
415 <!-- ========= END OF CLASS DATA ========= -->
\r
419 <!-- ======= START OF BOTTOM NAVBAR ====== -->
\r
420 <A NAME="navbar_bottom"><!-- --></A>
\r
421 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
\r
422 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
424 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
425 <A NAME="navbar_bottom_firstrow"><!-- --></A>
\r
426 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
427 <TR ALIGN="center" VALIGN="top">
\r
428 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
429 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
430 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
431 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Limit.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
\r
432 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
433 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
434 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
435 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
439 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
445 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
446 <A HREF="../../compbio/metadata/JobSubmissionException.html" title="class in compbio.metadata"><B>PREV CLASS</B></A>
\r
447 <A HREF="../../compbio/metadata/LimitExceededException.html" title="class in compbio.metadata"><B>NEXT CLASS</B></A></FONT></TD>
\r
448 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
449 <A HREF="../../index.html?compbio/metadata/Limit.html" target="_top"><B>FRAMES</B></A>
\r
450 <A HREF="Limit.html" target="_top"><B>NO FRAMES</B></A>
\r
451 <SCRIPT type="text/javascript">
\r
454 document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
459 <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
\r
466 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
467 SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
468 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
469 DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
472 <A NAME="skip-navbar_bottom"></A>
\r
473 <!-- ======== END OF BOTTOM NAVBAR ======= -->
\r