You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by jo...@apache.org on 2004/08/27 02:57:38 UTC

cvs commit: ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl JAXBTypeSG.java

jochen      2004/08/26 17:57:38

  Modified:    .        Tag: Branch_R0_3 status.xml
               src/jaxme/org/apache/ws/jaxme/generator/sg/impl Tag:
                        Branch_R0_3 JAXBTypeSG.java
  Log:
  A property referencing a global element was using an inner class rather than a reference to the element class.
  PR: JAXME-13
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.15.2.10 +4 -0      ws-jaxme/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/status.xml,v
  retrieving revision 1.15.2.9
  retrieving revision 1.15.2.10
  diff -u -r1.15.2.9 -r1.15.2.10
  --- status.xml	27 Aug 2004 00:49:03 -0000	1.15.2.9
  +++ status.xml	27 Aug 2004 00:57:38 -0000	1.15.2.10
  @@ -30,6 +30,10 @@
   
     <changes>
       <release version="0.3.1-dev" date="unreleased">
  +	  <action dev="JW" type="fix" context="generator">
  +	    A property referencing a global element was using an inner class
  +	    rather than a reference to the element class.
  +	  </action>
   	  <action dev="JW" type="fix" context="xs">
   	    An element reference in a group wasn't flagged as global.
   	    See JAXME-13 in Jira.
  
  
  
  No                   revision
  No                   revision
  1.7.2.1   +1 -33     ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBTypeSG.java
  
  Index: JAXBTypeSG.java
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/src/jaxme/org/apache/ws/jaxme/generator/sg/impl/JAXBTypeSG.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- JAXBTypeSG.java	2 Mar 2004 21:15:17 -0000	1.7
  +++ JAXBTypeSG.java	27 Aug 2004 00:57:38 -0000	1.7.2.1
  @@ -256,33 +256,6 @@
       log.finest(mName, "<-");
     }
   
  -  private boolean hasDefaultValue(XSType type) throws SAXException {
  -    if (type.getComplexType().hasSimpleContent()) {
  -      return false;
  -    }
  -    XSParticle particle = type.getComplexType().getParticle();
  -    if (particle == null) {
  -      return false;
  -    }
  -    XSParticle[] particles = particle.getGroup().getParticles();
  -
  -    for (int i = 0; i < particles.length; i++) {
  -      XSElement subElement = particles[i].getElement();
  -      XSType subType = subElement.getType();
  -      if (subType.isSimple()) {
  -        if (subElement.getDefault() != null) {
  -          return true;
  -        }
  -      }
  -      else {
  -        if (hasDefaultValue(subType)) {
  -          return true;
  -        }
  -      }
  -    }
  -    return false;
  -  }
  -
     public JavaField getXMLField(TypeSG pController, JavaSource pSource, 
                                    String pFieldName, String pDefaultValue) throws SAXException {
       if (pSource.isInterface()) {
  @@ -302,12 +275,7 @@
           runtimeType = pController.getRuntimeType();
         } 
         JavaField jf = pSource.newJavaField(pFieldName, runtimeType, JavaSource.PRIVATE);
  -      if (pController.isComplex()) {
  -        if (hasDefaultValue(xsType)) {
  -          jf.addLine("new " + pController.getRuntimeType().getInnerClassName() + "Impl()");
  -        }
  -      }
  -      else {
  +      if (!pController.isComplex()) {
           Object o = pController.getSimpleTypeSG().getInitialValue(pSource);
           if (o == null && pDefaultValue != null) {
             if (runtimeType.equals(StringSG.STRING_TYPE)) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org