Revision 12418 trunk/libraries/libGPE/src/org/gvsig/xmlschema/utils/DOMObjectsFactory.java
DOMObjectsFactory.java | ||
---|---|---|
1 | 1 |
package org.gvsig.xmlschema.utils; |
2 | 2 |
|
3 | 3 |
import org.gvsig.xmlschema.som.IXSContentType; |
4 |
import org.gvsig.xmlschema.som.IXSElementDeclaration; |
|
4 | 5 |
import org.gvsig.xmlschema.som.IXSSchema; |
5 | 6 |
import org.w3c.dom.Element; |
6 | 7 |
|
... | ... | |
48 | 49 |
* |
49 | 50 |
* $Id$ |
50 | 51 |
* $Log$ |
51 |
* Revision 1.1 2007-06-14 16:15:03 jorpiell |
|
52 |
* Revision 1.2 2007-06-29 12:19:14 jorpiell |
|
53 |
* The schema validation is made independently of the concrete writer |
|
54 |
* |
|
55 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell |
|
52 | 56 |
* builds to create the jars generated and add the schema code to the libGPEProject |
53 | 57 |
* |
54 | 58 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell |
... | ... | |
128 | 132 |
element.setAttribute(SchemaTags.TYPE, type); |
129 | 133 |
} |
130 | 134 |
element.setAttribute(SchemaTags.NILLABLE, String.valueOf(nillable)); |
131 |
element.setAttribute(SchemaTags.MIN_OCCURS, String.valueOf(minOccurs)); |
|
132 |
element.setAttribute(SchemaTags.MAX_OCCURS, String.valueOf(maxOccurs)); |
|
135 |
String sMinOccurs = null; |
|
136 |
if (minOccurs == IXSElementDeclaration.MIN_OCCURS_UNBOUNDED){ |
|
137 |
sMinOccurs = SchemaTags.UNBOUNDED; |
|
138 |
}else{ |
|
139 |
sMinOccurs = String.valueOf(minOccurs); |
|
140 |
} |
|
141 |
element.setAttribute(SchemaTags.MIN_OCCURS, sMinOccurs); |
|
142 |
String sMaxOccurs = null; |
|
143 |
if (maxOccurs == IXSElementDeclaration.MAX_OCCURS_UNBOUNDED){ |
|
144 |
sMaxOccurs = SchemaTags.UNBOUNDED; |
|
145 |
}else{ |
|
146 |
sMaxOccurs = String.valueOf(maxOccurs); |
|
147 |
} |
|
148 |
element.setAttribute(SchemaTags.MAX_OCCURS, sMaxOccurs); |
|
133 | 149 |
return element; |
134 | 150 |
} |
135 | 151 |
|
Also available in: Unified diff