Package org.apache.xmlbeans
Interface SchemaProperty
-
- All Known Implementing Classes:
SchemaPropertyImpl
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.
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONSISTENTLY
Applies to all elements for this property.static int
JAVA_BIG_DECIMAL
ABigDecimal
.static int
JAVA_BIG_INTEGER
ABigInteger
.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
ACalendar
.static int
JAVA_DATE
ADate
.static int
JAVA_DOUBLE
A Java double.static int
JAVA_ENUM
A generatedStringEnumAbstractBase
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
AGDate
.static int
JAVA_GDURATION
AGDuration
.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
AList
.static int
JAVA_LONG
A Java long.static int
JAVA_OBJECT
AObject
, used for some simple type unions.static int
JAVA_QNAME
AQName
.static int
JAVA_SHORT
A Java short.static int
JAVA_STRING
AString
.static int
JAVA_USER
A user specified type.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 fromXmlObject
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.xml.namespace.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 appearsjava.lang.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.java.lang.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.java.math.BigInteger
getMaxOccurs()
Returns a summarized minimum occurrance number.java.math.BigInteger
getMinOccurs()
Returns a summarized minimum occurrance number.javax.xml.namespace.QName
getName()
The name of this element or attributeSchemaType
getType()
The schema type for the property.int
hasDefault()
ReturnsNEVER
,VARIABLE
, orCONSISTENTLY
defaulted, depending on the defaults present in the elements in this property.int
hasFixed()
ReturnsNEVER
,VARIABLE
, orCONSISTENTLY
fixed, depending on the fixed constraints present in the elements in this property.int
hasNillable()
ReturnsNEVER
,VARIABLE
, orCONSISTENTLY
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
static final int NEVER
- See Also:
- Constant Field Values
-
VARIABLE
static final int VARIABLE
Applies to some, but not other elements for this property. SeehasNillable()
,hasDefault()
,hasFixed()
- See Also:
- Constant Field Values
-
CONSISTENTLY
static final int CONSISTENTLY
- See Also:
- Constant Field Values
-
XML_OBJECT
static final int XML_OBJECT
An XML Bean type that inherits fromXmlObject
. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_FIRST_PRIMITIVE
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
static final int JAVA_BOOLEAN
A Java boolean. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_FLOAT
static final int JAVA_FLOAT
A Java float. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_DOUBLE
static final int JAVA_DOUBLE
A Java double. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_BYTE
static final int JAVA_BYTE
A Java byte. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_SHORT
static final int JAVA_SHORT
A Java short. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_INT
static final int JAVA_INT
A Java int. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_LONG
static final int JAVA_LONG
A Java long. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_LAST_PRIMITIVE
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
static final int JAVA_BIG_DECIMAL
ABigDecimal
. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_BIG_INTEGER
static final int JAVA_BIG_INTEGER
ABigInteger
. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_STRING
static final int JAVA_STRING
AString
. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_BYTE_ARRAY
static final int JAVA_BYTE_ARRAY
A byte[]. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_GDATE
static final int JAVA_GDATE
AGDate
. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_GDURATION
static final int JAVA_GDURATION
AGDuration
. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_DATE
static final int JAVA_DATE
ADate
. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_QNAME
static final int JAVA_QNAME
AQName
. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_LIST
static final int JAVA_LIST
AList
. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_CALENDAR
static final int JAVA_CALENDAR
ACalendar
. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_ENUM
static final int JAVA_ENUM
A generatedStringEnumAbstractBase
subclass. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_OBJECT
static final int JAVA_OBJECT
AObject
, used for some simple type unions. SeegetJavaTypeCode()
.- See Also:
- Constant Field Values
-
JAVA_USER
static final int JAVA_USER
A user specified type.- See Also:
- Constant Field Values
-
-
Method Detail
-
getContainerType
SchemaType getContainerType()
The type within which this property appears
-
getName
javax.xml.namespace.QName getName()
The name of this element or attribute
-
acceptedNames
javax.xml.namespace.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
java.lang.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
boolean isReadOnly()
True for read-only properties.
-
isAttribute
boolean isAttribute()
True for attributes.
-
getType
SchemaType getType()
The schema type for the property.
-
javaBasedOnType
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
boolean extendsJavaSingleton()
True if there is a Java getter that returns a singleton.
-
extendsJavaOption
boolean extendsJavaOption()
True if there is an Java isSet method that tests for presence.
-
extendsJavaArray
boolean extendsJavaArray()
True if there is a Java getter that returns an array.
-
getJavaTypeCode
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
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
java.math.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
java.math.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
int hasNillable()
ReturnsNEVER
,VARIABLE
, orCONSISTENTLY
nillable, depending on the nillability of the elements in this property.
-
hasDefault
int hasDefault()
ReturnsNEVER
,VARIABLE
, orCONSISTENTLY
defaulted, depending on the defaults present in the elements in this property.
-
hasFixed
int hasFixed()
ReturnsNEVER
,VARIABLE
, orCONSISTENTLY
fixed, depending on the fixed constraints present in the elements in this property.
-
getDefaultText
java.lang.String getDefaultText()
Returns the default or fixed value, if it is consistent. If it is not consistent, then returns null. SeehasDefault()
andhasFixed()
.
-
getDefaultValue
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. SeehasDefault()
andhasFixed()
.
-
-