Clover coverage report - Clover results for XOM 1.2d1
Coverage timestamp: Wed Feb 8 2006 08:31:33 EST
file stats: LOC: 153   Methods: 2
NCLOC: 112   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ISOCyrillicWriter.java 100% 100% 100% 100%
coverage
 1    /* Copyright 2002, 2003 Elliotte Rusty Harold
 2   
 3    This library is free software; you can redistribute it and/or modify
 4    it under the terms of version 2.1 of the GNU Lesser General Public
 5    License as published by the Free Software Foundation.
 6   
 7    This library is distributed in the hope that it will be useful,
 8    but WITHOUT ANY WARRANTY; without even the implied warranty of
 9    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 10    GNU Lesser General Public License for more details.
 11   
 12    You should have received a copy of the GNU Lesser General Public
 13    License along with this library; if not, write to the
 14    Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 15    Boston, MA 02111-1307 USA
 16   
 17    You can contact Elliotte Rusty Harold by sending e-mail to
 18    elharo@metalab.unc.edu. Please include the word "XOM" in the
 19    subject line. The XOM home page is located at http://www.xom.nu/
 20    */
 21   
 22    package nu.xom;
 23   
 24    import java.io.Writer;
 25   
 26    /**
 27    * <p>
 28    * ISO 8859-5, ASCII plus Cyrillic (Russian, Byelorussian, etc.)
 29    * </p>
 30    *
 31    * @author Elliotte Rusty Harold
 32    * @version 1.0
 33    *
 34    */
 35    class ISOCyrillicWriter extends TextWriter {
 36   
 37  4 ISOCyrillicWriter(Writer out, String encoding) {
 38  4 super(out, encoding);
 39    }
 40   
 41    /**
 42    * @see nu.xom.TextWriter#needsEscaping(char)
 43    */
 44  255140 boolean needsEscaping(char c) {
 45  191300 if (c <= 0xA0) return false;
 46  63840 switch (c) {
 47  1 case 0x0401: return false; // CYRILLIC CAPITAL LETTER IO
 48  1 case 0x0402: return false; // CYRILLIC CAPITAL LETTER DJE
 49  1 case 0x0403: return false; // CYRILLIC CAPITAL LETTER GJE
 50  1 case 0x0404: return false; // CYRILLIC CAPITAL LETTER UKRAINIAN IE
 51  1 case 0x0405: return false; // CYRILLIC CAPITAL LETTER DZE
 52  1 case 0x0406: return false; // CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
 53  1 case 0x0407: return false; // CYRILLIC CAPITAL LETTER YI
 54  1 case 0x0408: return false; // CYRILLIC CAPITAL LETTER JE
 55  1 case 0x0409: return false; // CYRILLIC CAPITAL LETTER LJE
 56  1 case 0x040A: return false; // CYRILLIC CAPITAL LETTER NJE
 57  1 case 0x040B: return false; // CYRILLIC CAPITAL LETTER TSHE
 58  1 case 0x040C: return false; // CYRILLIC CAPITAL LETTER KJE
 59  1 case 0x040D: return true; // place holder to enable table lookup
 60  1 case 0x040E: return false; // CYRILLIC CAPITAL LETTER SHORT U
 61  1 case 0x040F: return false; // CYRILLIC CAPITAL LETTER DZHE
 62  1 case 0x0410: return false; // CYRILLIC CAPITAL LETTER A
 63  1 case 0x0411: return false; // CYRILLIC CAPITAL LETTER BE
 64  1 case 0x0412: return false; // CYRILLIC CAPITAL LETTER VE
 65  1 case 0x0413: return false; // CYRILLIC CAPITAL LETTER GHE
 66  1 case 0x0414: return false; // CYRILLIC CAPITAL LETTER DE
 67  1 case 0x0415: return false; // CYRILLIC CAPITAL LETTER IE
 68  1 case 0x0416: return false; // CYRILLIC CAPITAL LETTER ZHE
 69  1 case 0x0417: return false; // CYRILLIC CAPITAL LETTER ZE
 70  1 case 0x0418: return false; // CYRILLIC CAPITAL LETTER I
 71  1 case 0x0419: return false; // CYRILLIC CAPITAL LETTER SHORT I
 72  1 case 0x041A: return false; // CYRILLIC CAPITAL LETTER KA
 73  1 case 0x041B: return false; // CYRILLIC CAPITAL LETTER EL
 74  1 case 0x041C: return false; // CYRILLIC CAPITAL LETTER EM
 75  1 case 0x041D: return false; // CYRILLIC CAPITAL LETTER EN
 76  1 case 0x041E: return false; // CYRILLIC CAPITAL LETTER O
 77  1 case 0x041F: return false; // CYRILLIC CAPITAL LETTER PE
 78  1 case 0x0420: return false; // CYRILLIC CAPITAL LETTER ER
 79  1 case 0x0421: return false; // CYRILLIC CAPITAL LETTER ES
 80  1 case 0x0422: return false; // CYRILLIC CAPITAL LETTER TE
 81  1 case 0x0423: return false; // CYRILLIC CAPITAL LETTER U
 82  1 case 0x0424: return false; // CYRILLIC CAPITAL LETTER EF
 83  1 case 0x0425: return false; // CYRILLIC CAPITAL LETTER HA
 84  1 case 0x0426: return false; // CYRILLIC CAPITAL LETTER TSE
 85  1 case 0x0427: return false; // CYRILLIC CAPITAL LETTER CHE
 86  1 case 0x0428: return false; // CYRILLIC CAPITAL LETTER SHA
 87  1 case 0x0429: return false; // CYRILLIC CAPITAL LETTER SHCHA
 88  1 case 0x042A: return false; // CYRILLIC CAPITAL LETTER HARD SIGN
 89  1 case 0x042B: return false; // CYRILLIC CAPITAL LETTER YERU
 90  1 case 0x042C: return false; // CYRILLIC CAPITAL LETTER SOFT SIGN
 91  1 case 0x042D: return false; // CYRILLIC CAPITAL LETTER E
 92  1 case 0x042E: return false; // CYRILLIC CAPITAL LETTER YU
 93  1 case 0x042F: return false; // CYRILLIC CAPITAL LETTER YA
 94  1 case 0x0430: return false; // CYRILLIC SMALL LETTER A
 95  1 case 0x0431: return false; // CYRILLIC SMALL LETTER BE
 96  1 case 0x0432: return false; // CYRILLIC SMALL LETTER VE
 97  1 case 0x0433: return false; // CYRILLIC SMALL LETTER GHE
 98  1 case 0x0434: return false; // CYRILLIC SMALL LETTER DE
 99  1 case 0x0435: return false; // CYRILLIC SMALL LETTER IE
 100  1 case 0x0436: return false; // CYRILLIC SMALL LETTER ZHE
 101  1 case 0x0437: return false; // CYRILLIC SMALL LETTER ZE
 102  1 case 0x0438: return false; // CYRILLIC SMALL LETTER I
 103  1 case 0x0439: return false; // CYRILLIC SMALL LETTER SHORT I
 104  1 case 0x043A: return false; // CYRILLIC SMALL LETTER KA
 105  1 case 0x043B: return false; // CYRILLIC SMALL LETTER EL
 106  1 case 0x043C: return false; // CYRILLIC SMALL LETTER EM
 107  1 case 0x043D: return false; // CYRILLIC SMALL LETTER EN
 108  1 case 0x043E: return false; // CYRILLIC SMALL LETTER O
 109  1 case 0x043F: return false; // CYRILLIC SMALL LETTER PE
 110  1 case 0x0440: return false; // CYRILLIC SMALL LETTER ER
 111  1 case 0x0441: return false; // CYRILLIC SMALL LETTER ES
 112  1 case 0x0442: return false; // CYRILLIC SMALL LETTER TE
 113  1 case 0x0443: return false; // CYRILLIC SMALL LETTER U
 114  1 case 0x0444: return false; // CYRILLIC SMALL LETTER EF
 115  1 case 0x0445: return false; // CYRILLIC SMALL LETTER HA
 116  1 case 0x0446: return false; // CYRILLIC SMALL LETTER TSE
 117  1 case 0x0447: return false; // CYRILLIC SMALL LETTER CHE
 118  1 case 0x0448: return false; // CYRILLIC SMALL LETTER SHA
 119  1 case 0x0449: return false; // CYRILLIC SMALL LETTER SHCHA
 120  1 case 0x044A: return false; // CYRILLIC SMALL LETTER HARD SIGN
 121  1 case 0x044B: return false; // CYRILLIC SMALL LETTER YERU
 122  1 case 0x044C: return false; // CYRILLIC SMALL LETTER SOFT SIGN
 123  1 case 0x044D: return false; // CYRILLIC SMALL LETTER E
 124  1 case 0x044E: return false; // CYRILLIC SMALL LETTER YU
 125  1 case 0x044F: return false; // CYRILLIC SMALL LETTER YA
 126  1 case 0x0450: return true; // place holder to enable table lookup
 127  1 case 0x0451: return false; // CYRILLIC SMALL LETTER IO
 128  1 case 0x0452: return false; // CYRILLIC SMALL LETTER DJE
 129  1 case 0x0453: return false; // CYRILLIC SMALL LETTER GJE
 130  1 case 0x0454: return false; // CYRILLIC SMALL LETTER UKRAINIAN IE
 131  1 case 0x0455: return false; // CYRILLIC SMALL LETTER DZE
 132  1 case 0x0456: return false; // CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
 133  1 case 0x0457: return false; // CYRILLIC SMALL LETTER YI
 134  1 case 0x0458: return false; // CYRILLIC SMALL LETTER JE
 135  1 case 0x0459: return false; // CYRILLIC SMALL LETTER LJE
 136  1 case 0x045A: return false; // CYRILLIC SMALL LETTER NJE
 137  1 case 0x045B: return false; // CYRILLIC SMALL LETTER TSHE
 138  1 case 0x045C: return false; // CYRILLIC SMALL LETTER KJE
 139  1 case 0x045D: return true; // place holder to enable table lookup
 140  1 case 0x045E: return false; // CYRILLIC SMALL LETTER SHORT U
 141  1 case 0x045F: return false; // CYRILLIC SMALL LETTER DZHE
 142    }
 143   
 144  63745 switch (c) { // assorted leftover characters
 145  1 case 0x00AD: return false; // SOFT HYPHEN
 146  1 case 0x00A7: return false; // SECTION SIGN
 147  1 case 0x2116: return false; // NUMERO SIGN
 148    }
 149   
 150  63742 return true;
 151    }
 152   
 153    }