users@jaxb.java.net

RE: XSComplexType

From: <HeruMartinus.Salim_at_infineon.com>
Date: Wed, 15 Nov 2006 11:11:29 +0100

Sorry for the mess:
Here are the methods exist on XSContentType:

- apply(XSContentTypeFunction<T> function)
           
- XSContentType asEmpty()
          If this content type represents the empty content, return
this, otherwise null.
- XSParticle asParticle()
          Equivalent of (this instanceof XSParticle)?this:null
- XSSimpleType asSimpleType()
          Equivalent of (this instanceof XSSimpleType)?this:null
- void visit(XSContentTypeVisitor visitor)
            

-----Original Message-----
From: Salim Heru Martinus (IFAG COM BTS MT SD)
Sent: Wednesday, November 15, 2006 11:06 AM
To: users_at_jaxb.dev.java.net
Subject: XSComplexType

Hello,

Any idea how to get the defined attribute (sequence/option) inside the
complexType using class XSComplexType?

<xsd:complexType name="Block">
    <xsd:complexContent>
      <xsd:extension base="essence:SingleSourceNode">
        <xsd:sequence>
          <xsd:element maxOccurs="unbounded" minOccurs="0" name="varDef"
type="essence:VarDef"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
</xsd:complexType>

My "Guess" is to use the method getExplicitContent() which return an
object of interface XSContentType. (At least that's what I get from the
explanation of this method).

But when I go inside Javadoc of XSContentType there are only these
methods exist, inbetween none represent what I'm looking for. (I'm going
to get the types of those sequence/option):
apply
<https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.
html#apply%28com.sun.xml.xsom.visitor.XSContentTypeFunction%29>
(XSContentTypeFunction
<https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/visitor/XSCont
entTypeFunction.html> <T> function)
                    
 XSContentType
<https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.
html> asEmpty
<https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.
html#asEmpty%28%29> ()
          If this content type represents the empty content, return
this, otherwise null.
 XSParticle
<https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSParticle.htm
l> asParticle
<https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.
html#asParticle%28%29> ()
          Equivalent of (this instanceof XSParticle)?this:null
 XSSimpleType
<https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSSimpleType.h
tml> asSimpleType
<https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.
html#asSimpleType%28%29> ()
          Equivalent of (this instanceof XSSimpleType)?this:null

 void visit
<https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/XSContentType.
html#visit%28com.sun.xml.xsom.visitor.XSContentTypeVisitor%29>
(XSContentTypeVisitor
<https://xsom.dev.java.net/nonav/javadoc/com/sun/xml/xsom/visitor/XSCont
entTypeVisitor.html> visitor)
                   
Any guidance?
Thanks
Best regards,
Heru

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net