Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlbeans
Interface SchemaProperty

public interface SchemaProperty

Represents a summary of similar SchemaFields in a complex type.

In a schema type, every element with the same name must have the same type. Therefore, all together, elements with the same name form a coherent collection of similar elements. Similarly, attributes can only be defined once, so each attribute obviously is a coherent group on its own.

A SchemaProperty represents a summary of the the elements with a given name or the attribute with a given name. It represents the summary cardinality of the fields, the summary default and fixed values, and so on. When inferring information about an element or attribute, it is typically easier to consult then SchemaProperty than to hunt for the exact SchemaField in the particle tree or attribute model.

See Also:
  `SchemaType.getProperties()`, `SchemaType.getAttributeProperties()`, `SchemaType.getElementProperties()`, `SchemaType.getAttributeProperty(javax.xml.namespace.QName)`, `SchemaType.getElementProperty(javax.xml.namespace.QName)`

Field Summary
`static int` | `CONSISTENTLY` Applies to all elements for this property.
`static int` | `JAVA_BIG_DECIMAL` A `BigDecimal`.
`static int` | `JAVA_BIG_INTEGER` A `BigInteger`.
`static int` | `JAVA_BOOLEAN` A Java boolean.
`static int` | `JAVA_BYTE` A Java byte.
`static int` | `JAVA_BYTE_ARRAY` A byte[].
`static int` | `JAVA_CALENDAR` A `Calendar`.
`static int` | `JAVA_DATE` A `Date`.
`static int` | `JAVA_DOUBLE` A Java double.
`static int` | `JAVA_ENUM` A generated `StringEnumAbstractBase` subclass.
`static int` | `JAVA_FIRST_PRIMITIVE` Java primitive type codes (for non-nullable Java types) are between JAVA_FIRST_PRIMITIVE and JAVA_LAST_PRIMITIVE, inclusive.
`static int` | `JAVA_FLOAT` A Java float.
`static int` | `JAVA_GDATE` A `GDate`.
`static int` | `JAVA_GDURATION` A `GDuration`.
`static int` | `JAVA_INT` A Java int.
`static int` | `JAVA_LAST_PRIMITIVE` Java primitive type codes (for non-nullable Java types) are between JAVA_FIRST_PRIMITIVE and JAVA_LAST_PRIMITIVE, inclusive.
`static int` | `JAVA_LIST` A `List`.
`static int` | `JAVA_LONG` A Java long.
`static int` | `JAVA_OBJECT` A `Object`, used for some simple type unions.
`static int` | `JAVA_QNAME` A `QName`.
`static int` | `JAVA_SHORT` A Java short.
`static int` | `JAVA_STRING` A `String`.
`static int` | `NEVER` Applies to no elements for this property.
`static int` | `VARIABLE` Applies to some, but not other elements for this property.
`static int` | `XML_OBJECT` An XML Bean type that inherits from `XmlObject`.

Method Summary
`QName[]` | `acceptedNames()` For element properties the set of names that are accepted for this property if this element is the head of a substitution group.
`boolean` | `extendsJavaArray()` True if there is a Java getter that returns an array.
`boolean` | `extendsJavaOption()` True if there is an Java isSet method that tests for presence.
`boolean` | `extendsJavaSingleton()` True if there is a Java getter that returns a singleton.
`SchemaType` | `getContainerType()` The type within which this property appears
`String` | `getDefaultText()` Returns the default or fixed value, if it is consistent.
`XmlAnySimpleType` | `getDefaultValue()` Returns the default or fixed value as a strongly-typed value, if it is consistent.
`String` | `getJavaPropertyName()` The Java name for this property.
`QNameSet` | `getJavaSetterDelimiter()` Returns the set of element names which should appear strictly after all occurences of the elements described by this property.
`int` | `getJavaTypeCode()` Returns the natural Java type for this property.
`BigInteger` | `getMaxOccurs()` Returns a summarized minimum occurrance number.
`BigInteger` | `getMinOccurs()` Returns a summarized minimum occurrance number.
`QName` | `getName()` The name of this element or attribute
`SchemaType` | `getType()` The schema type for the property.
`int` | `hasDefault()` Returns `NEVER`, `VARIABLE`, or `CONSISTENTLY` defaulted, depending on the defaults present in the elements in this property.
`int` | `hasFixed()` Returns `NEVER`, `VARIABLE`, or `CONSISTENTLY` fixed, depending on the fixed constraints present in the elements in this property.
`int` | `hasNillable()` Returns `NEVER`, `VARIABLE`, or `CONSISTENTLY` nillable, depending on the nillability of the elements in this property.
`boolean` | `isAttribute()` True for attributes.
`boolean` | `isReadOnly()` True for read-only properties.
`SchemaType` | `javaBasedOnType()` The schema type returned from the Java getter for this property.

Field Detail

### NEVER

    public static final int NEVER

  Applies to no elements for this property. See `hasNillable()`, `hasDefault()`, `hasFixed()`

  See Also:
    Constant Field Values

### VARIABLE

    public static final int VARIABLE

  Applies to some, but not other elements for this property. See `hasNillable()`, `hasDefault()`, `hasFixed()`

  See Also:
    Constant Field Values

### CONSISTENTLY

    public static final int CONSISTENTLY

  Applies to all elements for this property. See `hasNillable()`, `hasDefault()`, `hasFixed()`

  See Also:
    Constant Field Values

### XML_OBJECT

    public static final int XML_OBJECT

  An XML Bean type that inherits from `XmlObject`. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_FIRST_PRIMITIVE

    public static final int JAVA_FIRST_PRIMITIVE

  Java primitive type codes (for non-nullable Java types) are between JAVA_FIRST_PRIMITIVE and JAVA_LAST_PRIMITIVE, inclusive.

  See Also:
    Constant Field Values

### JAVA_BOOLEAN

    public static final int JAVA_BOOLEAN

  A Java boolean. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_FLOAT

    public static final int JAVA_FLOAT

  A Java float. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_DOUBLE

    public static final int JAVA_DOUBLE

  A Java double. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_BYTE

    public static final int JAVA_BYTE

  A Java byte. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_SHORT

    public static final int JAVA_SHORT

  A Java short. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_INT

    public static final int JAVA_INT

  A Java int. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_LONG

    public static final int JAVA_LONG

  A Java long. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_LAST_PRIMITIVE

    public static final int JAVA_LAST_PRIMITIVE

  Java primitive type codes (for non-nullable Java types) are between JAVA_FIRST_PRIMITIVE and JAVA_LAST_PRIMITIVE, inclusive.

  See Also:
    Constant Field Values

### JAVA_BIG_DECIMAL

    public static final int JAVA_BIG_DECIMAL

  A `BigDecimal`. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_BIG_INTEGER

    public static final int JAVA_BIG_INTEGER

  A `BigInteger`. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_STRING

    public static final int JAVA_STRING

  A `String`. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_BYTE_ARRAY

    public static final int JAVA_BYTE_ARRAY

  A byte[]. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_GDATE

    public static final int JAVA_GDATE

  A `GDate`. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_GDURATION

    public static final int JAVA_GDURATION

  A `GDuration`. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_DATE

    public static final int JAVA_DATE

  A `Date`. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_QNAME

    public static final int JAVA_QNAME

  A `QName`. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_LIST

    public static final int JAVA_LIST

  A `List`. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_CALENDAR

    public static final int JAVA_CALENDAR

  A `Calendar`. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_ENUM

    public static final int JAVA_ENUM

  A generated `StringEnumAbstractBase` subclass. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

### JAVA_OBJECT

    public static final int JAVA_OBJECT

  A `Object`, used for some simple type unions. See `getJavaTypeCode()`.

  See Also:
    Constant Field Values

Method Detail

### getContainerType

    public SchemaType getContainerType()

  The type within which this property appears

### getName

    public QName getName()

  The name of this element or attribute

### acceptedNames

    public QName[] acceptedNames()

  For element properties the set of names that are accepted for this property if this element is the head of a substitution group. This will always have at least one element, ie, the property's name.

### getJavaPropertyName

    public String getJavaPropertyName()

  The Java name for this property. For example, if the method to access this property is called getFirstName, then this method returns the string "FirstName". May be null if the schema type has not been compiled to Java.

### isReadOnly

    public boolean isReadOnly()

  True for read-only properties.

### isAttribute

    public boolean isAttribute()

  True for attributes.

### getType

    public SchemaType getType()

  The schema type for the property.

### javaBasedOnType

    public SchemaType javaBasedOnType()

  The schema type returned from the Java getter for this property. Applies only to types that have been code generated to Java; may be a base type of getType().

### extendsJavaSingleton

    public boolean extendsJavaSingleton()

  True if there is a Java getter that returns a singleton.

### extendsJavaOption

    public boolean extendsJavaOption()

  True if there is an Java isSet method that tests for presence.

### extendsJavaArray

    public boolean extendsJavaArray()

  True if there is a Java getter that returns an array.

### getJavaTypeCode

    public int getJavaTypeCode()

  Returns the natural Java type for this property. Returns either XML_OBJECT (for complex types) or one of the JAVA_* constants described in this interface.

### getJavaSetterDelimiter

    public QNameSet getJavaSetterDelimiter()

  Returns the set of element names which should appear strictly after all occurences of the elements described by this property. For element properties only.

### getMinOccurs

    public BigInteger getMinOccurs()

  Returns a summarized minimum occurrance number. For example, a sequence containing a nonoptional singleton element repeated twice will result in a property getMinOccurs() of 2.

### getMaxOccurs

    public BigInteger getMaxOccurs()

  Returns a summarized minimum occurrance number. For example, a sequence containing a nonoptional singleton element repeated twice will result in a property getMaxOccurs() of 2.

### hasNillable

    public int hasNillable()

  Returns `NEVER`, `VARIABLE`, or `CONSISTENTLY` nillable, depending on the nillability of the elements in this property.

### hasDefault

    public int hasDefault()

  Returns `NEVER`, `VARIABLE`, or `CONSISTENTLY` defaulted, depending on the defaults present in the elements in this property.

### hasFixed

    public int hasFixed()

  Returns `NEVER`, `VARIABLE`, or `CONSISTENTLY` fixed, depending on the fixed constraints present in the elements in this property.

### getDefaultText

    public String getDefaultText()

  Returns the default or fixed value, if it is consistent. If it is not consistent, then returns null. See `hasDefault()` and `hasFixed()`.

### getDefaultValue

    public XmlAnySimpleType getDefaultValue()

  Returns the default or fixed value as a strongly-typed value, if it is consistent. If it is not consistent, then returns null. See `hasDefault()` and `hasFixed()`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD