| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Mode |
|
| 0.0;0 |
| 1 | /* | |
| 2 | * Mode.java May 2007 | |
| 3 | * | |
| 4 | * Copyright (C) 2007, Niall Gallagher <niallg@users.sf.net> | |
| 5 | * | |
| 6 | * This library is free software; you can redistribute it and/or | |
| 7 | * modify it under the terms of the GNU Lesser General Public | |
| 8 | * License as published by the Free Software Foundation. | |
| 9 | * | |
| 10 | * This library is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 | * GNU Lesser General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU Lesser General | |
| 16 | * Public License along with this library; if not, write to the | |
| 17 | * Free Software Foundation, Inc., 59 Temple Place, Suite 330, | |
| 18 | * Boston, MA 02111-1307 USA | |
| 19 | */ | |
| 20 | ||
| 21 | package org.simpleframework.xml.stream; | |
| 22 | ||
| 23 | /** | |
| 24 | * The <code>Mode</code> enumeration is used to specify the output | |
| 25 | * mode for XML text. This is used by the <code>OutputNode</code> | |
| 26 | * to describe if element text will be escaped or wrapped in a | |
| 27 | * CDATA block. The mode is a three state object, the third of the | |
| 28 | * states indicates whether an explicit state has been set or not. | |
| 29 | * If a specific state has not been set then the node will inherit | |
| 30 | * its output mode from the last parent to have it set. | |
| 31 | * | |
| 32 | * @author Niall Gallagher | |
| 33 | * | |
| 34 | * @see org.simpleframework.xml.stream.OutputNode | |
| 35 | */ | |
| 36 | 192 | public enum Mode { |
| 37 | ||
| 38 | /** | |
| 39 | * Indicates that data written will be within a CDATA block. | |
| 40 | */ | |
| 41 | 48 | DATA, |
| 42 | ||
| 43 | /** | |
| 44 | * Indicates that data written will be escaped if required. | |
| 45 | */ | |
| 46 | 48 | ESCAPE, |
| 47 | ||
| 48 | /** | |
| 49 | * Indicates that the mode will be inherited from its parent. | |
| 50 | */ | |
| 51 | 48 | INHERIT; |
| 52 | } |