Home » xmlbeans-2.5.0-src » org.apache » xmlbeans » [javadoc | source]
org.apache.xmlbeans
public interface: SchemaProperty [javadoc | source]

All Known Implementing Classes:
    SchemaPropertyImpl

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.

Field Summary
static final  int NEVER    Applies to no elements for this property. See #hasNillable , #hasDefault , #hasFixed  
static final  int VARIABLE    Applies to some, but not other elements for this property. See #hasNillable , #hasDefault , #hasFixed  
static final  int CONSISTENTLY    Applies to all elements for this property. See #hasNillable , #hasDefault , #hasFixed  
static final  int XML_OBJECT    An XML Bean type that inherits from XmlObject . See #getJavaTypeCode
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. 
static final  int JAVA_BOOLEAN    A Java boolean. See #getJavaTypeCode
static final  int JAVA_FLOAT    A Java float. See #getJavaTypeCode
static final  int JAVA_DOUBLE    A Java double. See #getJavaTypeCode
static final  int JAVA_BYTE    A Java byte. See #getJavaTypeCode
static final  int JAVA_SHORT    A Java short. See #getJavaTypeCode
static final  int JAVA_INT    A Java int. See #getJavaTypeCode
static final  int JAVA_LONG    A Java long. See #getJavaTypeCode
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. 
static final  int JAVA_BIG_DECIMAL    A java.math.BigDecimal . See #getJavaTypeCode
static final  int JAVA_BIG_INTEGER    A java.math.BigInteger . See #getJavaTypeCode
static final  int JAVA_STRING    A String . See #getJavaTypeCode
static final  int JAVA_BYTE_ARRAY    A byte[]. See #getJavaTypeCode
static final  int JAVA_GDATE    A GDate . See #getJavaTypeCode
static final  int JAVA_GDURATION    A GDuration . See #getJavaTypeCode
static final  int JAVA_DATE    A java.util.Date . See #getJavaTypeCode
static final  int JAVA_QNAME    A javax.xml.namespace.QName . See #getJavaTypeCode
static final  int JAVA_LIST    A java.util.List . See #getJavaTypeCode
static final  int JAVA_CALENDAR    A java.util.Calendar . See #getJavaTypeCode
static final  int JAVA_ENUM    A generated StringEnumAbstractBase subclass. See #getJavaTypeCode
static final  int JAVA_OBJECT    A java.lang.Object , used for some simple type unions. See #getJavaTypeCode
static final  int JAVA_USER    A user specified type. 
Method from org.apache.xmlbeans.SchemaProperty Summary:
acceptedNames,   extendsJavaArray,   extendsJavaOption,   extendsJavaSingleton,   getContainerType,   getDefaultText,   getDefaultValue,   getJavaPropertyName,   getJavaSetterDelimiter,   getJavaTypeCode,   getMaxOccurs,   getMinOccurs,   getName,   getType,   hasDefault,   hasFixed,   hasNillable,   isAttribute,   isReadOnly,   javaBasedOnType
Method from org.apache.xmlbeans.SchemaProperty Detail:
 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.
 public boolean extendsJavaArray()
    True if there is a Java getter that returns an array.
 public boolean extendsJavaOption()
    True if there is an Java isSet method that tests for presence.
 public boolean extendsJavaSingleton()
    True if there is a Java getter that returns a singleton.
 public SchemaType getContainerType()
    The type within which this property appears
 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 .
 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 .
 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.
 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.
 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.
 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.
 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.
 public QName getName()
    The name of this element or attribute
 public SchemaType getType()
    The schema type for the property.
 public int hasDefault()
 public int hasFixed()
 public int hasNillable()
 public boolean isAttribute()
    True for attributes.
 public boolean isReadOnly()
    True for read-only properties.
 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().