/usr/share/doc/libantelope-java/manual/bk03ch05s02.html is in libantelope-java-doc 3.5.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>More Conditions</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="Antelope Users Guide"><link rel="up" href="bk03ch05.html" title="Chapter 5. If Task"><link rel="prev" href="bk03ch05.html" title="Chapter 5. If Task"><link rel="next" href="bk03ch06.html" title="Chapter 6. SwitchTask"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">More Conditions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk03ch05.html">Prev</a> </td><th width="60%" align="center">Chapter 5. If Task</th><td width="20%" align="right"> <a accesskey="n" href="bk03ch06.html">Next</a></td></tr></table><hr></div><div class="section" title="More Conditions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="conditionals"></a>More Conditions</h2></div></div></div><p>
These conditions are suitable for use in the <bool> element. Unfortunately, they cannot be used in the <condition> task, although all conditions for the <condition> task can be used with the bool and the bool can be used anywhere that <condition> can be used.
</p><h4><a name="id2515564"></a>IfPropertyTrue</h4><p>
Given a property name, tests whether the value for that property equals "true" (or "yes" or "on").
</p><p>
</p><div class="table"><a name="id2515577"></a><p class="title"><b>Table 5.2. IfPropertyTrue Attributes</b></p><div class="table-contents"><table summary="IfPropertyTrue Attributes" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Attribute</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>property</td><td>The name of a property to test the value of.</td><td>Yes</td></tr></tbody></table></div></div><p><br class="table-break">
</p><p>
</p><pre class="programlisting">
<ispropertytrue property="myprop"/>
<ispropertytrue property="${someprop}"/>
</pre><p>
</p><h4><a name="id2515634"></a>IfPropertyFalse</h4><p>
Given a property name, tests whether the value for that property equals "false" (or "no" or "off").
</p><p>
</p><div class="table"><a name="id2515647"></a><p class="title"><b>Table 5.3. IfPropertyFalse Attributes</b></p><div class="table-contents"><table summary="IfPropertyFalse Attributes" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Attribute</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>property</td><td>The name of a property to test the value of.</td><td>Yes</td></tr></tbody></table></div></div><p><br class="table-break">
</p><p>
</p><pre class="programlisting">
<ispropertyfalse property="myprop"/>
<ispropertyfalse property="${someprop}"/>
</pre><p>
</p><h4><a name="id2515706"></a>StartsWith</h4><p>
Given a property name, tests whether the value for that property starts with a specified string.
</p><p>
</p><div class="table"><a name="id2515718"></a><p class="title"><b>Table 5.4. StartsWith Attributes</b></p><div class="table-contents"><table summary="StartsWith Attributes" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Attribute</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>string</td><td>The string to test.</td><td>Yes</td></tr><tr><td>with</td><td>Check if 'string' starts with this value.</td><td>Yes</td></tr></tbody></table></div></div><p><br class="table-break">
</p><p>
</p><pre class="programlisting">
<startswith string="abcdefg" with="abc"/>
<startswith string="${myprop}" with="foo"/>
</pre><p>
</p><h4><a name="id2515791"></a>EndsWith</h4><p>
Given a property name, tests whether the value for that ends with with a specified string.
</p><p>
</p><div class="table"><a name="id2515803"></a><p class="title"><b>Table 5.5. EndsWith Attributes</b></p><div class="table-contents"><table summary="EndsWith Attributes" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Attribute</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>string</td><td>The string to test.</td><td>Yes</td></tr><tr><td>with</td><td>Check if 'string' ends with this value.</td><td>Yes</td></tr></tbody></table></div></div><p><br class="table-break">
</p><p>
</p><pre class="programlisting">
<endswith string="abcdefg" with="efg"/>
<endswith string="${myprop}" with="bar"/>
</pre><p>
</p><h4><a name="id2515875"></a>IsGreaterThan</h4><p>
Tests whether the first argument is greater than the second argument. Will
automatically treat the arguments as numbers if both arguments consists of only the characters 0 through 9 and optionally a decimal point. Otherwise, a String
comparison is used.
</p><p>
</p><div class="table"><a name="id2515890"></a><p class="title"><b>Table 5.6. IsGreaterThan Attributes</b></p><div class="table-contents"><table summary="IsGreaterThan Attributes" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Attribute</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>arg1</td><td>The first argument.</td><td>Yes</td></tr><tr><td>arg2</td><td>The second argument.</td><td>Yes</td></tr></tbody></table></div></div><p><br class="table-break">
</p><p>
</p><pre class="programlisting">
<!-- evaluates to true -->
<isgreaterthan arg1="6.02" arg2="4"/>
<!-- evaluates to false -->
<isgreaterthan arg1="bar" arg2="foo"/>
</pre><p>
</p><h4><a name="id2515959"></a>IsLessThan</h4><p>
Tests whether the first argument is less than the second argument. Will
automatically treat the arguments as numbers if both arguments consists of only the characters 0 through 9 and optionally a decimal point. Otherwise, a String
comparison is used.
</p><p>
</p><div class="table"><a name="id2515979"></a><p class="title"><b>Table 5.7. IsLessThan Attributes</b></p><div class="table-contents"><table summary="IsLessThan Attributes" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Attribute</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>arg1</td><td>The first argument.</td><td>Yes</td></tr><tr><td>arg2</td><td>The second argument.</td><td>Yes</td></tr></tbody></table></div></div><p><br class="table-break">
</p><p>
</p><pre class="programlisting">
<!-- evaluates to false -->
<islessthan arg1="6.02" arg2="4"/>
<!-- evaluates to true -->
<islessthan arg1="bar" arg2="foo"/>
</pre><p>
</p><h4><a name="id2516048"></a>DateBefore, TimeBefore </h4><p>
Tests whether the first date/time is before the second date/time.
</p><p>
</p><div class="table"><a name="id2516065"></a><p class="title"><b>Table 5.8. DateBefore, TimeBefore</b></p><div class="table-contents"><table summary="DateBefore, TimeBefore" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Attribute</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>datetime1</td><td>The first date/time.</td><td>Yes</td></tr><tr><td>datetime2</td><td>The second date/time.</td><td>Yes</td></tr><tr><td>format</td><td>The format of the date/time stamps.</td><td>Yes</td></tr><tr><td>lenient</td><td>Whether the datetime parser should use lenient parsing, defaults to true.</td><td>No</td></tr></tbody></table></div></div><p><br class="table-break">
</p><p>
</p><pre class="programlisting">
<target name="test1">
<a:assert>
<bool>
<not>
<datebefore datetime1="2005-09-09 14:58:36" datetime2="2005-07-11 14:58:36" format="yyyy-MM-dd HH:mm:ss"/>
</not>
</bool>
</a:assert>
</target>
<target name="test2">
<a:assert>
<bool>
<not>
<timebefore datetime1="22:58:36" datetime2="10:58:36" format="HH:mm:ss"/>
</not>
</bool>
</a:assert>
</target>
<target name="test3">
<a:assert>
<bool>
<timebefore datetime1="2005" datetime2="2030" format="yyyy"/>
</bool>
</a:assert>
</target>
<target name="test4">
<a:assert>
<bool>
<timebefore datetime1="01:00:00" datetime2="03:00:00" format="hh:mm:ss"/>
</bool>
</a:assert>
</target>
</pre><p>
</p><h4><a name="id2516162"></a>DateDifference, TimeDifference </h4><p>
Tests that the difference between two dates or times is a certain value.
</p><p>
</p><div class="table"><a name="id2516174"></a><p class="title"><b>Table 5.9. DateDifference, TimeDifference</b></p><div class="table-contents"><table summary="DateDifference, TimeDifference" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Attribute</th><th>Description</th><th>Required</th></tr></thead><tbody><tr><td>datetime1</td><td>The first date/time.</td><td>Yes</td></tr><tr><td>datetime2</td><td>The second date/time.</td><td>Yes</td></tr><tr><td>format</td><td>The format of the date/time stamps.</td><td>Yes</td></tr><tr><td>lenient</td><td>Whether the datetime parser should use lenient parsing, defaults to true.</td><td>No</td></tr><tr><td>value</td><td>The expected difference between the 2 datetimes.</td><td>No, default is 0</td></tr><tr><td>unit</td><td>Sets the unit for the difference between the 2 datetimes. For example,
if value is 12 and unit is "hours", then this
condition checks that the difference between the 2 datetimes is 12 hours.
Valid values are "millisecond", "second", "minute", "hour", "day", "week", "month", "year".</td><td>Yes</td></tr></tbody></table></div></div><p><br class="table-break">
</p><p>
</p><pre class="programlisting">
<target name="test1">
<a:assert message="Difference between dates is not 60 days.">
<bool>
<datedifference datetime1="2005-09-09 14:58:36" datetime2="2005-07-11 14:58:36" format="yyyy-MM-dd HH:mm:ss" value="60" unit="day"/>
</bool>
</a:assert>
</target>
<target name="test2">
<a:assert message="Difference between hours is not 12.">
<bool>
<timedifference datetime1="22:58:36" datetime2="10:58:36" format="HH:mm:ss" value="12" unit="hour"/>
</bool>
</a:assert>
</target>
<target name="test3">
<a:assert message="Difference between years is not 25.">
<bool>
<timedifference datetime1="2005" datetime2="2030" format="yyyy" value="25" unit="year"/>
</bool>
</a:assert>
</target>
<target name="test4">
<a:assert message="Difference between minutes is not 120.">
<bool>
<timedifference datetime1="01:00:00" datetime2="03:00:00" format="hh:mm:ss" value="120" unit="minute"/>
</bool>
</a:assert>
</target>
<target name="test5">
<a:assert message="Difference between seconds is not 7200.">
<bool>
<timedifference datetime1="01:00:00" datetime2="03:00:00" format="hh:mm:ss" value="7200" unit="second"/>
</bool>
</a:assert>
</target>
</pre><p>
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk03ch05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk03ch05.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk03ch06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 5. If Task </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. SwitchTask</td></tr></table></div></body></html>
|