jochen 2005/05/19 13:30:33
Modified: src/xs/org/apache/ws/jaxme/xs/junit ParserTest.java
. status.xml
src/xs/org/apache/ws/jaxme/xs/impl XSTypeImpl.java
Log:
The methods XSSimpleContentImpl.isEmpty(), XSSimpleContentImpl.isMixed(),
and XSSimpleContentImpl.isElementOnly() are no longer throwing an exception,
but return false.
Revision Changes Path
1.24 +1 -0
ws-jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTest.java
Index: ParserTest.java
===================================================================
RCS file:
/home/cvs/ws-jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTest.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- ParserTest.java 27 Apr 2005 19:42:55 -0000 1.23
+++ ParserTest.java 19 May 2005 20:30:33 -0000 1.24
@@ -895,6 +895,7 @@
XSAttributable[] aAttributes = aComplexType.getAttributes();
assertEquals(1, aAttributes.length);
XSAttribute aa1 = (XSAttribute) aAttributes[0];
+ assertEquals(new XsQName((String) null, "aa1"), aa1.getName());
XSType b = types[1];
assertEquals(new XsQName((String) null, "b"), b.getName());
1.55 +7 -0 ws-jaxme/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/ws-jaxme/status.xml,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- status.xml 11 May 2005 02:42:36 -0000 1.54
+++ status.xml 19 May 2005 20:30:33 -0000 1.55
@@ -37,6 +37,13 @@
</release>
<release version="0.4" date="Not yet published">
<action dev="JW" type="fix" context="xs">
+ The methods XSSimpleContentImpl.isEmpty(),
+ XSSimpleContentImpl.isMixed(), and
+ XSSimpleContentImpl.isElementOnly() are no longer
+ throwing an exception, but return false.
+ (Daniel Barclay, daniel at fgm.com)
+ </action>
+ <action dev="JW" type="fix" context="xs">
Fixed, that the DTD parser wasn't generating complex
types properly. (Richard Calmbach,
RichardCalmbach at fairisaac.com)
1.18 +10 -7
ws-jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java
Index: XSTypeImpl.java
===================================================================
RCS file:
/home/cvs/ws-jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- XSTypeImpl.java 18 May 2005 22:09:10 -0000 1.17
+++ XSTypeImpl.java 19 May 2005 20:30:33 -0000 1.18
@@ -54,11 +54,6 @@
protected XsTComplexType getXsTComplexType() { return myComplexType; }
protected XSType getOwner() { return owner; }
- public XsComplexContentType getComplexContentType() {
- throw new IllegalStateException("This complex type (" +
this.getClass().getName() +
- ") doesn't have complex content.");
- }
-
public boolean isSequence() { return false; }
public boolean isChoice() { return false; }
public boolean isAll() { return false; }
@@ -97,7 +92,11 @@
private final XSSimpleContentType simpleContentType;
private final XSAttributable[] attributes;
- public XSSimpleContentImpl(XSType pOwner, XsTComplexType pType,
XsESimpleContent pSimpleContent)
+ public boolean isElementOnly() { return false; }
+ public boolean isEmpty() { return false; }
+ public boolean isMixed() { return false; }
+
+ public XSSimpleContentImpl(XSType pOwner, XsTComplexType pType,
XsESimpleContent pSimpleContent)
throws SAXException {
super(pOwner, pType);
simpleContent = pSimpleContent;
@@ -164,6 +163,10 @@
public XSParticle getParticle() {
throw new IllegalStateException("This complex type doesn't have a
model group particle.");
}
+ public XsComplexContentType getComplexContentType() {
+ throw new IllegalStateException("This complex type (" +
this.getClass().getName() +
+ ") doesn't have complex content.");
+ }
}
public class XSComplexContentImpl extends XSComplexTypeImpl {
@@ -350,7 +353,7 @@
public boolean hasComplexContent() { return true; }
public XsComplexContentType getComplexContentType() {
- return complexContentType == null ? super.getComplexContentType() :
complexContentType;
+ return complexContentType;
}
public XSParticle getParticle() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]