| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ConversionConstants |
|
| 0.0;0 |
| 1 | // Copyright 2008-2014 severally by the contributors | |
| 2 | // | |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 | // you may not use this file except in compliance with the License. | |
| 5 | // You may obtain a copy of the License at | |
| 6 | // | |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 | // | |
| 9 | // Unless required by applicable law or agreed to in writing, software | |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 | // See the License for the specific language governing permissions and | |
| 13 | // limitations under the License. | |
| 14 | ||
| 15 | package net.sf.practicalxml.converter; | |
| 16 | ||
| 17 | ||
| 18 | /** | |
| 19 | * Contains constants for various string values used by the conversion | |
| 20 | * routines. The goal is to have all converters use the same strings | |
| 21 | * (without typos) in the same location. | |
| 22 | */ | |
| 23 | 0 | public class ConversionConstants |
| 24 | { | |
| 25 | /** | |
| 26 | * Namespace for attributes defined by the converter. | |
| 27 | */ | |
| 28 | public final static String NS_CONVERSION = "http://practicalxml.sourceforge.net/Converter"; | |
| 29 | ||
| 30 | ||
| 31 | /** | |
| 32 | * Name of root element, where not specified by caller. | |
| 33 | */ | |
| 34 | public final static String EL_DEFAULT_ROOT = "data"; | |
| 35 | ||
| 36 | ||
| 37 | /** | |
| 38 | * Element name used to hold unnamed items from collections and arrays. | |
| 39 | */ | |
| 40 | public final static String EL_COLLECTION_ITEM = "data"; | |
| 41 | ||
| 42 | ||
| 43 | /** | |
| 44 | * Element name used to hold date from Calendar conversion. | |
| 45 | */ | |
| 46 | public final static String EL_CALENDAR_DATE = "date"; | |
| 47 | ||
| 48 | ||
| 49 | /** | |
| 50 | * Element name used to hold milliseconds from Calendar conversion. | |
| 51 | */ | |
| 52 | public final static String EL_CALENDAR_MILLIS = "millis"; | |
| 53 | ||
| 54 | ||
| 55 | /** | |
| 56 | * Element name used to hold timezone from Calendar conversion. | |
| 57 | */ | |
| 58 | public final static String EL_CALENDAR_TIMEZONE = "timezone"; | |
| 59 | ||
| 60 | ||
| 61 | /** | |
| 62 | * Element name used to hold first day of week from Calendar conversion. | |
| 63 | */ | |
| 64 | public final static String EL_CALENDAR_FIRST_DAY = "firstDayOfWeek"; | |
| 65 | ||
| 66 | ||
| 67 | /** | |
| 68 | * Element name used to hold minimum days in first week from Calendar conversion. | |
| 69 | */ | |
| 70 | public final static String EL_CALENDAR_MIN_DAYS = "minimumDaysInFirstWeek"; | |
| 71 | ||
| 72 | ||
| 73 | /** | |
| 74 | * A dummy attribute used to declare the conversion namespace at the root. | |
| 75 | */ | |
| 76 | public final static String AT_DUMMY = "ix"; | |
| 77 | ||
| 78 | ||
| 79 | /** | |
| 80 | * Attribute used to hold the type of an element. Belongs to the | |
| 81 | * {@link #NS_CONVERSION} namespace. | |
| 82 | */ | |
| 83 | public final static String AT_TYPE = "type"; | |
| 84 | ||
| 85 | ||
| 86 | /** | |
| 87 | * Attribute used to hold the element index number for collections and | |
| 88 | * arrays. Belongs to the {@link #NS_CONVERSION} namespace. | |
| 89 | */ | |
| 90 | public final static String AT_ARRAY_INDEX = "index"; | |
| 91 | ||
| 92 | ||
| 93 | /** | |
| 94 | * Attribute used to hold the item key value for maps. Belongs to the | |
| 95 | * {@link #NS_CONVERSION} namespace. | |
| 96 | */ | |
| 97 | public final static String AT_MAP_KEY = "key"; | |
| 98 | ||
| 99 | ||
| 100 | /** | |
| 101 | * Attribute used to hold the name for enum instances. Belongs to the | |
| 102 | * {@link #NS_CONVERSION} namespace. | |
| 103 | */ | |
| 104 | public final static String AT_ENUM_NAME = "name"; | |
| 105 | } |