Package org.apache.xmlbeans.impl.schema
Class SchemaPropertyImpl
java.lang.Object
org.apache.xmlbeans.impl.schema.SchemaPropertyImpl
- All Implemented Interfaces:
SchemaProperty
public class SchemaPropertyImpl extends Object implements SchemaProperty
-
Field Summary
Fields inherited from interface org.apache.xmlbeans.SchemaProperty
CONSISTENTLY, JAVA_BIG_DECIMAL, JAVA_BIG_INTEGER, JAVA_BOOLEAN, JAVA_BYTE, JAVA_BYTE_ARRAY, JAVA_CALENDAR, JAVA_DATE, JAVA_DOUBLE, JAVA_ENUM, JAVA_FIRST_PRIMITIVE, JAVA_FLOAT, JAVA_GDATE, JAVA_GDURATION, JAVA_INT, JAVA_LAST_PRIMITIVE, JAVA_LIST, JAVA_LONG, JAVA_OBJECT, JAVA_QNAME, JAVA_SHORT, JAVA_STRING, JAVA_USER, NEVER, VARIABLE, XML_OBJECT -
Constructor Summary
Constructors Constructor Description SchemaPropertyImpl() -
Method Summary
Modifier and Type Method Description 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.booleanextendsJavaArray()True if there is a Java getter that returns an array.booleanextendsJavaOption()True if there is an Java isSet method that tests for presence.booleanextendsJavaSingleton()True if there is a Java getter that returns a singleton.SchemaTypegetContainerType()The type within which this property appearsStringgetDefaultText()Returns the default or fixed value, if it is consistent.XmlAnySimpleTypegetDefaultValue()Returns the default or fixed value as a strongly-typed value, if it is consistent.StringgetDocumentation()return user specified documentationStringgetJavaPropertyName()The Java name for this property.QNameSetgetJavaSetterDelimiter()Returns the set of element names which should appear strictly after all occurences of the elements described by this property.intgetJavaTypeCode()Returns the natural Java type for this property.BigIntegergetMaxOccurs()Returns a summarized minimum occurrance number.BigIntegergetMinOccurs()Returns a summarized minimum occurrance number.QNamegetName()The name of this element or attributeSchemaTypegetType()The schema type for the property.inthasDefault()ReturnsSchemaProperty.NEVER,SchemaProperty.VARIABLE, orSchemaProperty.CONSISTENTLYdefaulted, depending on the defaults present in the elements in this property.inthasFixed()ReturnsSchemaProperty.NEVER,SchemaProperty.VARIABLE, orSchemaProperty.CONSISTENTLYfixed, depending on the fixed constraints present in the elements in this property.inthasNillable()ReturnsSchemaProperty.NEVER,SchemaProperty.VARIABLE, orSchemaProperty.CONSISTENTLYnillable, depending on the nillability of the elements in this property.booleanisAttribute()True for attributes.booleanisReadOnly()True for read-only properties.SchemaTypejavaBasedOnType()The schema type returned from the Java getter for this property.voidsetAcceptedNames(Set<QName> set)voidsetAcceptedNames(QNameSet set)voidsetAttribute(boolean isAttribute)voidsetContainerTypeRef(SchemaType.Ref typeref)voidsetDefault(int when)voidsetDefaultText(String val)voidsetDefaultValue(XmlValueRef defaultRef)voidsetDocumentation(String documentation)voidsetExtendsJava(SchemaType.Ref javaBasedOnTypeRef, boolean singleton, boolean option, boolean array)voidsetFixed(int when)voidsetImmutable()voidsetJavaPropertyName(String name)voidsetJavaTypeCode(int code)voidsetMaxOccurs(BigInteger max)voidsetMinOccurs(BigInteger min)voidsetName(QName name)voidsetNillable(int when)voidsetTypeRef(SchemaType.Ref typeref)
-
Constructor Details
-
SchemaPropertyImpl
public SchemaPropertyImpl()
-
-
Method Details
-
setImmutable
public void setImmutable() -
getContainerType
Description copied from interface:SchemaPropertyThe type within which this property appears- Specified by:
getContainerTypein interfaceSchemaProperty
-
setContainerTypeRef
-
getName
Description copied from interface:SchemaPropertyThe name of this element or attribute- Specified by:
getNamein interfaceSchemaProperty
-
setName
-
getJavaPropertyName
Description copied from interface:SchemaPropertyThe 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.- Specified by:
getJavaPropertyNamein interfaceSchemaProperty
-
setJavaPropertyName
-
isAttribute
public boolean isAttribute()Description copied from interface:SchemaPropertyTrue for attributes.- Specified by:
isAttributein interfaceSchemaProperty
-
setAttribute
public void setAttribute(boolean isAttribute) -
isReadOnly
public boolean isReadOnly()Description copied from interface:SchemaPropertyTrue for read-only properties.- Specified by:
isReadOnlyin interfaceSchemaProperty
-
getType
Description copied from interface:SchemaPropertyThe schema type for the property.- Specified by:
getTypein interfaceSchemaProperty
-
setTypeRef
-
javaBasedOnType
Description copied from interface:SchemaPropertyThe 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().- Specified by:
javaBasedOnTypein interfaceSchemaProperty
-
extendsJavaSingleton
public boolean extendsJavaSingleton()Description copied from interface:SchemaPropertyTrue if there is a Java getter that returns a singleton.- Specified by:
extendsJavaSingletonin interfaceSchemaProperty
-
extendsJavaArray
public boolean extendsJavaArray()Description copied from interface:SchemaPropertyTrue if there is a Java getter that returns an array.- Specified by:
extendsJavaArrayin interfaceSchemaProperty
-
extendsJavaOption
public boolean extendsJavaOption()Description copied from interface:SchemaPropertyTrue if there is an Java isSet method that tests for presence.- Specified by:
extendsJavaOptionin interfaceSchemaProperty
-
setExtendsJava
public void setExtendsJava(SchemaType.Ref javaBasedOnTypeRef, boolean singleton, boolean option, boolean array) -
getJavaSetterDelimiter
Description copied from interface:SchemaPropertyReturns the set of element names which should appear strictly after all occurences of the elements described by this property. For element properties only.- Specified by:
getJavaSetterDelimiterin interfaceSchemaProperty
-
acceptedNames
Description copied from interface:SchemaPropertyFor 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.- Specified by:
acceptedNamesin interfaceSchemaProperty
-
setAcceptedNames
-
setAcceptedNames
-
getMinOccurs
Description copied from interface:SchemaPropertyReturns a summarized minimum occurrance number. For example, a sequence containing a nonoptional singleton element repeated twice will result in a property getMinOccurs() of 2.- Specified by:
getMinOccursin interfaceSchemaProperty
-
setMinOccurs
-
getMaxOccurs
Description copied from interface:SchemaPropertyReturns a summarized minimum occurrance number. For example, a sequence containing a nonoptional singleton element repeated twice will result in a property getMaxOccurs() of 2.- Specified by:
getMaxOccursin interfaceSchemaProperty
-
setMaxOccurs
-
hasNillable
public int hasNillable()Description copied from interface:SchemaPropertyReturnsSchemaProperty.NEVER,SchemaProperty.VARIABLE, orSchemaProperty.CONSISTENTLYnillable, depending on the nillability of the elements in this property.- Specified by:
hasNillablein interfaceSchemaProperty
-
setNillable
public void setNillable(int when) -
hasDefault
public int hasDefault()Description copied from interface:SchemaPropertyReturnsSchemaProperty.NEVER,SchemaProperty.VARIABLE, orSchemaProperty.CONSISTENTLYdefaulted, depending on the defaults present in the elements in this property.- Specified by:
hasDefaultin interfaceSchemaProperty
-
setDefault
public void setDefault(int when) -
hasFixed
public int hasFixed()Description copied from interface:SchemaPropertyReturnsSchemaProperty.NEVER,SchemaProperty.VARIABLE, orSchemaProperty.CONSISTENTLYfixed, depending on the fixed constraints present in the elements in this property.- Specified by:
hasFixedin interfaceSchemaProperty
-
setFixed
public void setFixed(int when) -
getDefaultText
Description copied from interface:SchemaPropertyReturns the default or fixed value, if it is consistent. If it is not consistent, then returns null. SeeSchemaProperty.hasDefault()andSchemaProperty.hasFixed().- Specified by:
getDefaultTextin interfaceSchemaProperty
-
setDefaultText
-
getDefaultValue
Description copied from interface:SchemaPropertyReturns the default or fixed value as a strongly-typed value, if it is consistent. If it is not consistent, then returns null. SeeSchemaProperty.hasDefault()andSchemaProperty.hasFixed().- Specified by:
getDefaultValuein interfaceSchemaProperty
-
setDefaultValue
-
getJavaTypeCode
public int getJavaTypeCode()Description copied from interface:SchemaPropertyReturns the natural Java type for this property. Returns either XML_OBJECT (for complex types) or one of the JAVA_* constants described in this interface.- Specified by:
getJavaTypeCodein interfaceSchemaProperty
-
setJavaTypeCode
public void setJavaTypeCode(int code) -
getDocumentation
Description copied from interface:SchemaPropertyreturn user specified documentation- Specified by:
getDocumentationin interfaceSchemaProperty
-
setDocumentation
- Specified by:
setDocumentationin interfaceSchemaProperty
-