Statistics
| Revision:

root / trunk / libraries / libGPE / src / org / gvsig / xmlschema / som / IXSComplexTypeDefinition.java @ 12175

History | View | Annotate | Download (3.79 KB)

1
package org.gvsig.xmlschema.som;
2

    
3
import org.gvsig.xmlschema.exceptions.TypeNotFoundException;
4
import org.gvsig.xmlschema.utils.SchemaTags;
5

    
6
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
7
 *
8
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
9
 *
10
 * This program is free software; you can redistribute it and/or
11
 * modify it under the terms of the GNU General Public License
12
 * as published by the Free Software Foundation; either version 2
13
 * of the License, or (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program; if not, write to the Free Software
22
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
23
 *
24
 * For more information, contact:
25
 *
26
 *  Generalitat Valenciana
27
 *   Conselleria d'Infraestructures i Transport
28
 *   Av. Blasco Ib??ez, 50
29
 *   46010 VALENCIA
30
 *   SPAIN
31
 *
32
 *      +34 963862235
33
 *   gvsig@gva.es
34
 *      www.gvsig.gva.es
35
 *
36
 *    or
37
 *
38
 *   IVER T.I. S.A
39
 *   Salamanca 50
40
 *   46005 Valencia
41
 *   Spain
42
 *
43
 *   +34 963163400
44
 *   dac@iver.es
45
 */
46
/* CVS MESSAGES:
47
 *
48
 * $Id: IXSComplexTypeDefinition.java 12175 2007-06-14 16:15:05Z jorpiell $
49
 * $Log$
50
 * Revision 1.1  2007-06-14 16:15:03  jorpiell
51
 * builds to create the jars generated and add the schema code to the libGPEProject
52
 *
53
 * Revision 1.1  2007/06/14 13:50:07  jorpiell
54
 * The schema jar name has been changed
55
 *
56
 * Revision 1.4  2007/06/08 11:35:16  jorpiell
57
 * IXSSchema interface updated
58
 *
59
 * Revision 1.3  2007/06/07 14:54:13  jorpiell
60
 * Add the schema support
61
 *
62
 * Revision 1.2  2007/05/30 12:25:48  jorpiell
63
 * Add the element collection
64
 *
65
 * Revision 1.1  2007/05/25 11:55:00  jorpiell
66
 * First update
67
 *
68
 *
69
 */
70
/**
71
 * This interface represents a XML schema complex type element. 
72
 * Example:
73
 * <p>
74
 * <pre>
75
 * <code>
76
 * &lt;complexType
77
 * abstract = boolean : false
78
 * block = (#all | List of (extension | restriction))
79
 * final = (#all | List of (extension | restriction))
80
 * id = ID
81
 * mixed = boolean : false
82
 * name = NCName
83
 * {any attributes with non-schema namespace . . .}&gt;
84
 * Content: (annotation?, (simpleContent | complexContent | ((group | all | choice | sequence)?, ((attribute | attributeGroup)*, anyAttribute?))))
85
 * &lt;/complexType&gt;
86
 * </code>
87
 * </pre>
88
 * </p> 
89
 * @see http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definition_details
90
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
91
 */
92
public interface IXSComplexTypeDefinition extends IXSTypeDefinition {
93
        public static final String SEQUENCE = SchemaTags.SEQUENCE;
94
        public static final String CHOICE = SchemaTags.CHOICE;
95
        public static final String ALL = SchemaTags.ALL;
96
        public static final String GROUP = SchemaTags.GROUP;                
97
                
98
        /**
99
         * Add a element to the complex type
100
         * @param name
101
         * Element name
102
         * @param typeName
103
         * Element type name
104
         * @param nillable
105
         * If is nillable
106
         * @param minOccurs
107
         * The minimum numebr of elements
108
         * @param maxOccurs
109
         * The maximum numbre of elements
110
         * @return
111
         * The XML schema element
112
         */
113
        public IXSElementDeclaration addElement(String name, String typeName, boolean nillable, int minOccurs, int maxOccurs);
114
        
115
        /**
116
         * Add a element to the complex type
117
         * @param name
118
         * Element name
119
         * @param typeName
120
         * Element type name
121
         * @return
122
         * The XML schema element
123
         */
124
        public IXSElementDeclaration addElement(String name, String typeName);
125
        
126
        /**
127
         * @return the content type (simple or complex)
128
         */
129
        public IXSContentType getContentType() throws TypeNotFoundException;
130
        
131
        /**
132
         @return the group elements. Can be a group, a 
133
         sequence, a choice or a all
134
         */
135
        public IXSGroup getGroup() throws TypeNotFoundException;
136
}