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;
19
20 import com.teamkonzept.dom4jb.schema.DataDescriptor;
21 import com.teamkonzept.dom4jb.schema.GroupDescriptor;
22
23 /***
24 * A bean implementor who wishes to provide explicit information about their
25 * bean may provide a XMLBeanInfo class that implements this XMLBeanInfo
26 * interface and provides explicit information about the mapping between
27 * the properties of the <em>bean</em> and the XML schema.
28 *
29 * @author <a href="mailto:carsten.krebs@team-konzept.de">Carsten Krebs</a>
30 * @version $Revision: 1.2 $
31 * @see Introspector
32 */
33 public interface XMLBeanInfo {
34
35 /***
36 * the default item name, used if getItemName() returns null.
37 * @see #getItemName()
38 */
39 String DEFAULT_ITEM_NAME = "item";
40
41 /***
42 * Gets the group of content descriptors. Every content descriptor
43 * defines the mapping of the <em>bean</em> properties to the content
44 * of an XML element.
45 *
46 * @return Content descriptor defining the properties which describes
47 * element content.
48 * <p>
49 * May return null if the <em>bean</em> has no properties representing
50 * element content.
51 *
52 * @see com.teamkonzept.dom4jb.schema.ContentDescriptor
53 */
54 GroupDescriptor getContentDescriptors();
55
56 /***
57 * Gets the group of attribute descriptors. Every attribute descriptor
58 * defines the mapping of the <em>bean</em> properties to a collection
59 * of element attributes.
60 *
61 * @return Attribute descriptor defining the properties which describes
62 * element attributes.
63 * <p>
64 * May return null if the <em>bean</em> has no properties representing
65 * element attributes.
66 *
67 * @see com.teamkonzept.dom4jb.schema.AttributeDescriptor
68 */
69 GroupDescriptor getAttributeDescriptors();
70
71 /***
72 * Gets the data descriptor. That is a descriptor which defines how the
73 * <em>bean</em> will be transformed into character data. Every time the
74 * <em>bean</em> is used as attribute value this data descriptor is used.
75 *
76 * @return Data descriptor defining the character data representation of
77 * the <em>bean</em>.
78 * <p>
79 * May return null if the <em>bean</em> has no character data
80 * representation
81 *
82 * @see com.teamkonzept.dom4jb.schema.DataDescriptor
83 */
84 DataDescriptor getDataDescriptor();
85
86 /***
87 * Gets the item name of the <em>bean</em>. If the <em>bean</em> has to
88 * be expanded as part of a collection, this name is used as the
89 * surrounding element name.
90 *
91 * @return Item name
92 * <p>
93 * May return null if the default item name should be used
94 *
95 * @see com.teamkonzept.dom4jb.schema.CollectionAdapter
96 */
97 String getItemName();
98 }
This page was automatically generated by Maven