1 /*
2 * Copyright (C) 2002 Carsten Krebs (Team-Konzept GmbH & Co.KG)
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18 package com.teamkonzept.dom4jb.beans.infos;
19
20 import java.beans.IntrospectionException;
21 import java.util.Map;
22
23 import com.teamkonzept.dom4jb.beans.XMLBeanInfo;
24 import com.teamkonzept.dom4jb.schema.DataDescriptor;
25 import com.teamkonzept.dom4jb.schema.ElementDescriptor;
26 import com.teamkonzept.dom4jb.schema.GroupDescriptor;
27 import com.teamkonzept.dom4jb.schema.Groupable;
28 import com.teamkonzept.dom4jb.schema.Sequence;
29
30 public class EntryXMLBeanInfo implements XMLBeanInfo {
31 private static final Sequence CONTENT;
32
33 static {
34 try {
35 CONTENT =
36 new Sequence(
37 new Groupable[] {
38 new ElementDescriptor("key", Map.Entry.class),
39 new ElementDescriptor("value", Map.Entry.class)});
40 } catch (IntrospectionException e) {
41 throw new ExceptionInInitializerError(e);
42 }
43 }
44
45 /*** Creates new EntryXMLBeanInfo */
46 public EntryXMLBeanInfo() {
47 /* NOP */
48 }
49
50 /***
51 * @see com.teamkonzept.dom4jb.beans.XMLBeanInfo#getContentDescriptors()
52 */
53 public GroupDescriptor getContentDescriptors() {
54 return CONTENT;
55 }
56
57 /***
58 * @see com.teamkonzept.dom4jb.beans.XMLBeanInfo#getDataDescriptor()
59 */
60 public DataDescriptor getDataDescriptor() {
61 return null;
62 }
63
64 /***
65 * @see com.teamkonzept.dom4jb.beans.XMLBeanInfo#getAttributeDescriptors()
66 */
67 public GroupDescriptor getAttributeDescriptors() {
68 return null;
69 }
70
71 /***
72 * @see com.teamkonzept.dom4jb.beans.XMLBeanInfo#getItemName()
73 */
74 public String getItemName() {
75 return "entry";
76 }
77 }
This page was automatically generated by Maven