Use is subject to License Terms. Your use of this web site or any of its contents or software indicates your agreement to be bound by these License Terms.

Copyright © 2007 Sun Microsystems, Inc. All rights reserved.

JSR 172

javax.microedition.xml.rpc
Class Element

java.lang.Object
  extended by javax.microedition.xml.rpc.Type
      extended by javax.microedition.xml.rpc.Element

public class Element
extends Type

The class Element is a special Object used to represent an xsd:element defined in a Web Service's WSDL definition. An element can have the additional properties of being an array, being nillable, and has minOccurs and maxOccurs values.

Version:
0.1
See Also:
Stub, Operation

Field Summary
 Type contentType
          The Type of this Element's content.
 boolean isArray
          True if this element is an array
 boolean isNillable
          True if this element is nillable
 boolean isOptional
          True if this element is optional, that is, its minOccurs is defined as being 0.
 int maxOccurs
          The 'maxOccurs' attribute of this element.
 int minOccurs
          The 'minOccurs' attribute of this element.
 QName name
          The QName of this element
static int UNBOUNDED
          Constant use to indicate that maxOccurrs is unbounded.
 
Fields inherited from class javax.microedition.xml.rpc.Type
BOOLEAN, BYTE, DOUBLE, FLOAT, INT, LONG, SHORT, STRING, value
 
Constructor Summary
Element(QName name, Type type)
          Construct an Element with the given properties.
Element(QName name, Type type, int minOccurs, int maxOccurs, boolean nillable)
          Construct an Element with the given properties.
 
Method Summary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public final QName name
The QName of this element


contentType

public final Type contentType
The Type of this Element's content.


isNillable

public final boolean isNillable
True if this element is nillable


isArray

public final boolean isArray
True if this element is an array


isOptional

public final boolean isOptional
True if this element is optional, that is, its minOccurs is defined as being 0.


minOccurs

public final int minOccurs
The 'minOccurs' attribute of this element. -1 if this element has no 'minOccurs' attribute.


maxOccurs

public final int maxOccurs
The 'maxOccurs' attribute of this element. -1 if this element has no 'maxOccurs' attribute.


UNBOUNDED

public static final int UNBOUNDED
Constant use to indicate that maxOccurrs is unbounded.

See Also:
Constant Field Values
Constructor Detail

Element

public Element(QName name,
               Type type,
               int minOccurs,
               int maxOccurs,
               boolean nillable)
        throws java.lang.IllegalArgumentException
Construct an Element with the given properties. This Type subclass will have an intValue() of 9.

Parameters:
name - the QName of this element
type - the Type of this element's content
minOccurs - indicates the minimum number of times this element can occur. A value of '0' indicates this element is optional.
maxOccurs - indicates the maximum number of times this element can occur. A value > 1, in addition to isArray being true, indicates this element is an array.
Throws:
java.lang.IllegalArgumentException -
  • if minOccurs < 0, or
  • if name or type are null
  • if type is an instance of Element

Element

public Element(QName name,
               Type type)
        throws java.lang.IllegalArgumentException
Construct an Element with the given properties. The defaults for the unspecified properties are: This Type subclass will have an intValue() of 9.

Parameters:
name - the QName of this element
type - the Type of this element's content
Throws:
java.lang.IllegalArgumentException -
  • if name or type are null
  • if type is an instance of Element

JSR 172

Copyright © 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 172 specification.