Clover coverage report - Clover results for XOM 1.2d1
Coverage timestamp: Wed Feb 8 2006 08:31:33 EST
file stats: LOC: 128   Methods: 2
NCLOC: 87   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ISOArabicWriter.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-6, ASCII plus Arabic
 29    * </p>
 30    *
 31    * @author Elliotte Rusty Harold
 32    * @version 1.0
 33    *
 34    */
 35    class ISOArabicWriter extends TextWriter {
 36   
 37  1 ISOArabicWriter(Writer out, String encoding) {
 38  1 super(out, encoding);
 39    }
 40   
 41    /**
 42    * @see nu.xom.TextWriter#needsEscaping(char)
 43    */
 44  255083 boolean needsEscaping(char c) {
 45  191246 if (c <= 0xA0) return false;
 46  63837 switch (c) {
 47  1 case 0x060C: return false; // ARABIC COMMA
 48  1 case 0x060D: return true; // place holder to allow table lookup
 49  1 case 0x060E: return true; // place holder to allow table lookup
 50  1 case 0x060F: return true; // place holder to allow table lookup
 51  1 case 0x0610: return true; // place holder to allow table lookup
 52  1 case 0x0611: return true; // place holder to allow table lookup
 53  1 case 0x0612: return true; // place holder to allow table lookup
 54  1 case 0x0613: return true; // place holder to allow table lookup
 55  1 case 0x0614: return true; // place holder to allow table lookup
 56  1 case 0x0615: return true; // place holder to allow table lookup
 57  1 case 0x0616: return true; // place holder to allow table lookup
 58  1 case 0x0617: return true; // place holder to allow table lookup
 59  1 case 0x0618: return true; // place holder to allow table lookup
 60  1 case 0x0619: return true; // place holder to allow table lookup
 61  1 case 0x061A: return true; // place holder to allow table lookup
 62  1 case 0x061B: return false; // ARABIC SEMICOLON
 63  1 case 0x061C: return true; // place holder to allow table lookup
 64  1 case 0x061D: return true; // place holder to allow table lookup
 65  1 case 0x061E: return true; // place holder to allow table lookup
 66  1 case 0x061F: return false; // ARABIC QUESTION MARK
 67  1 case 0x0620: return true; // place holder to allow table lookup
 68  1 case 0x0621: return false; // ARABIC LETTER HAMZA
 69  1 case 0x0622: return false; // ARABIC LETTER ALEF WITH MADDA ABOVE
 70  1 case 0x0623: return false; // ARABIC LETTER ALEF WITH HAMZA ABOVE
 71  1 case 0x0624: return false; // ARABIC LETTER WAW WITH HAMZA ABOVE
 72  1 case 0x0625: return false; // ARABIC LETTER ALEF WITH HAMZA BELOW
 73  1 case 0x0626: return false; // ARABIC LETTER YEH WITH HAMZA ABOVE
 74  1 case 0x0627: return false; // ARABIC LETTER ALEF
 75  1 case 0x0628: return false; // ARABIC LETTER BEH
 76  1 case 0x0629: return false; // ARABIC LETTER TEH MARBUTA
 77  1 case 0x062A: return false; // ARABIC LETTER TEH
 78  1 case 0x062B: return false; // ARABIC LETTER THEH
 79  1 case 0x062C: return false; // ARABIC LETTER JEEM
 80  1 case 0x062D: return false; // ARABIC LETTER HAH
 81  1 case 0x062E: return false; // ARABIC LETTER KHAH
 82  1 case 0x062F: return false; // ARABIC LETTER DAL
 83  1 case 0x0630: return false; // ARABIC LETTER THAL
 84  1 case 0x0631: return false; // ARABIC LETTER REH
 85  1 case 0x0632: return false; // ARABIC LETTER ZAIN
 86  1 case 0x0633: return false; // ARABIC LETTER SEEN
 87  1 case 0x0634: return false; // ARABIC LETTER SHEEN
 88  1 case 0x0635: return false; // ARABIC LETTER SAD
 89  1 case 0x0636: return false; // ARABIC LETTER DAD
 90  1 case 0x0637: return false; // ARABIC LETTER TAH
 91  1 case 0x0638: return false; // ARABIC LETTER ZAH
 92  1 case 0x0639: return false; // ARABIC LETTER AIN
 93  1 case 0x063A: return false; // ARABIC LETTER GHAIN
 94  1 case 0x063B: return true; // place holder to allow table lookup
 95  1 case 0x063C: return true; // place holder to allow table lookup
 96  1 case 0x063D: return true; // place holder to allow table lookup
 97  1 case 0x063E: return true; // place holder to allow table lookup
 98  1 case 0x063F: return true; // place holder to allow table lookup
 99  1 case 0x0640: return false; // ARABIC TATWEEL
 100  1 case 0x0641: return false; // ARABIC LETTER FEH
 101  1 case 0x0642: return false; // ARABIC LETTER QAF
 102  1 case 0x0643: return false; // ARABIC LETTER KAF
 103  1 case 0x0644: return false; // ARABIC LETTER LAM
 104  1 case 0x0645: return false; // ARABIC LETTER MEEM
 105  1 case 0x0646: return false; // ARABIC LETTER NOON
 106  1 case 0x0647: return false; // ARABIC LETTER HEH
 107  1 case 0x0648: return false; // ARABIC LETTER WAW
 108  1 case 0x0649: return false; // ARABIC LETTER ALEF MAKSURA
 109  1 case 0x064A: return false; // ARABIC LETTER YEH
 110  1 case 0x064B: return false; // ARABIC FATHATAN
 111  1 case 0x064C: return false; // ARABIC DAMMATAN
 112  1 case 0x064D: return false; // ARABIC KASRATAN
 113  1 case 0x064E: return false; // ARABIC FATHA
 114  1 case 0x064F: return false; // ARABIC DAMMA
 115  1 case 0x0650: return false; // ARABIC KASRA
 116  1 case 0x0651: return false; // ARABIC SHADDA
 117  1 case 0x0652: return false; // ARABIC SUKUN
 118    }
 119  63766 switch (c) { // random overlap with Latin-1
 120  1 case 0x00A4: return false; // CURRENCY SIGN
 121  1 case 0x00AD: return false; // SOFT HYPHEN
 122    }
 123   
 124  63764 return true;
 125   
 126    }
 127   
 128    }