This class models the element of a XML Schema. More...
#include <Element.h>
Public Member Functions | |
void | addIdentityConstraint (IdentityConstraint *ic) |
It adds an IdentityConstraint to the element. More... | |
Element (unsigned int minOccurs=1, unsigned int maxOccurs=1, Annotation *ann=0, std::string *id=0) | |
Constructor. More... | |
Element (const Element &rhs) | |
Copy constructor. More... | |
Annotation * | getAnnotation () const |
It returns the associated annotation. More... | |
int | getBlock () |
It returns the block value for the element. It prevents an element with a specified type of derivation from being used in place of this element. More... | |
std::string * | getDefaultValue () const |
It returns the default value for the element. More... | |
std::string * | getFixedValue () const |
It returns the fixed value for the element. More... | |
std::string * | getId () const |
It returns a pointer (may be NULL) to the object id. More... | |
const unsigned int | getMaxOccurs () const |
It returns the maxOccurs values. More... | |
const unsigned int | getMinOccurs () const |
It returns the minOccurs values. More... | |
std::string * | getName () const |
It returns the element name or NULL if it doesn't have one. More... | |
QName * | getRef () const |
It returns the reference to a name of another element. More... | |
QName * | getType () const |
It returns the name of a built-in data type, or the name of a simpleType or complexType element. More... | |
bool | isAbstract () |
If the element is "abstract" or not. More... | |
bool | isNillable () |
If the element is "nillable" or not. More... | |
Element & | operator= (const Element &rhs) |
Assignment operator. More... | |
void | setAnnotation (Annotation *ann) |
It sets the associated annotation. More... | |
void | setAsAbstract (bool v) |
It specifies whether the element can be used in an instance document. More... | |
void | setAsNillable (bool v) |
It specifies whether an explicit null value can be assigned to the element. More... | |
void | setBlock (int v) |
It prevents an element with a specified type of derivation from being used in place of this element. More... | |
void | setContentType (Type *t) |
It sets the content type of the element. More... | |
void | setDefaultValue (std::string *v) |
It sets the default value for the element. More... | |
void | setFinal (int v) |
It sets the default value of the final attribute on the element element. More... | |
void | setFixedValue (std::string *v) |
It sets a fixed value for the element. More... | |
void | setId (std::string *id) |
it sets the id. More... | |
void | setMaxOccurs (unsigned int maxOccurs) |
It sets the maxOccurs value. More... | |
void | setMinOccurs (unsigned int minOccurs) |
It sets the minOccurs value. More... | |
void | setName (std::string *name) |
It sets the element name. More... | |
void | setRef (QName *ref) |
It sets a reference to a name of another element. More... | |
void | setSubstitutionGroup (QName *g) |
It sets the substitution group. More... | |
void | setType (QName *t) |
It sets the element type. More... | |
~Element () | |
Destructor. More... | |
Static Public Attributes | |
static const unsigned int | unbounded |
Identifer for "unbounded" max values. More... | |
Protected Attributes | |
unsigned int | m_maxOccurs |
It specifies the maximum number of times the any element can occur in the parent element. The value can be any number >= 0, or if you want to set no limit on the maximum number, use the value "unbounded". Default value is 1. (Optional) More... | |
unsigned int | m_minOccurs |
It specifies the minimum number of times the any element can occur in the parent element. The value can be any number >= 0. Default value is 1. (Optional) More... | |
Private Attributes | |
bool | m_abstract |
It specifies whether the element can be used in an instance document. True indicates that the element cannot appear in the instance document. Instead, another element whose substitutionGroup attribute contains the qualified name (QName) of this element must appear in this element's place. Default is false. More... | |
int | m_block |
It prevents an element with a specified type of derivation from being used in place of this element. (Optional) More... | |
Type * | m_contentType |
A content of this element. A simpleType or complexType element can be present as a child only if both the ref and type attributes are not present. More... | |
std::string * | m_default |
It specifies a default value for the element (can only be used if the element's content is a simple type or text only). More... | |
int | m_final |
It sets the default value of the final attribute on the element element. More... | |
std::string * | m_fixed |
It ensures that the elements are set to particular value. More... | |
Form | m_form |
Here, "unqualified" indicates that this attribute is not required to be qualified with the namespace prefix. "qualified" indicates that this attribute must be qualified with the namespace prefix. The default value is the value of the elementFormDefault attribute of the schema element. (Optional) More... | |
boost::ptr_vector< IdentityConstraint > | m_identityConstraintVec |
The list of elements related to identity constraint - (key | keyref | unique)*. (Optional) More... | |
std::string * | m_name |
It specifies a name for the element. (Optional) More... | |
bool | m_nillable |
It specifies whether an explicit null value can be assigned to the element. True enables an instance of the element to have the null attribute set to true. The null attribute is defined as part of the XML Schema namespace for instances. Default is false. More... | |
QName * | m_ref |
It refers to the name of another element. The ref attribute can include a namespace prefix. More... | |
QName * | m_substitutionGroup |
It specifies the element that can be substituted with this element. More... | |
QName * | m_type |
It specifies either the name of a built-in data type, or the name of a simpleType or complexType element. (Optional) More... | |
This class models the element of a XML Schema.
te::xsd::Element::Element | ( | unsigned int | minOccurs = 1 , |
unsigned int | maxOccurs = 1 , |
||
Annotation * | ann = 0 , |
||
std::string * | id = 0 |
||
) |
Constructor.
id | It specifies a unique ID for the element. It can be a NULL value. |
te::xsd::Element::Element | ( | const Element & | rhs | ) |
Copy constructor.
rhs | Right-hand-side object. |
te::xsd::Element::~Element | ( | ) |
Destructor.
void te::xsd::Element::addIdentityConstraint | ( | IdentityConstraint * | ic | ) |
It adds an IdentityConstraint to the element.
ic | The IdentityConstraint that will be added. |
|
inherited |
It returns the associated annotation.
int te::xsd::Element::getBlock | ( | ) |
It returns the block value for the element. It prevents an element with a specified type of derivation from being used in place of this element.
std::string* te::xsd::Element::getDefaultValue | ( | ) | const |
It returns the default value for the element.
std::string* te::xsd::Element::getFixedValue | ( | ) | const |
It returns the fixed value for the element.
|
inherited |
It returns a pointer (may be NULL) to the object id.
|
inherited |
It returns the maxOccurs values.
|
inherited |
It returns the minOccurs values.
std::string* te::xsd::Element::getName | ( | ) | const |
It returns the element name or NULL if it doesn't have one.
QName* te::xsd::Element::getRef | ( | ) | const |
It returns the reference to a name of another element.
QName* te::xsd::Element::getType | ( | ) | const |
It returns the name of a built-in data type, or the name of a simpleType or complexType element.
bool te::xsd::Element::isAbstract | ( | ) |
If the element is "abstract" or not.
bool te::xsd::Element::isNillable | ( | ) |
If the element is "nillable" or not.
Assignment operator.
rhs | Right-hand-side object. |
|
inherited |
It sets the associated annotation.
ann | The annotation to be associated to the object. The annotated class will take the ownership of the given pointer. |
void te::xsd::Element::setAsAbstract | ( | bool | v | ) |
It specifies whether the element can be used in an instance document.
v | True indicates that the element cannot appear in the instance document. Instead, another element whose substitutionGroup attribute contains the qualified name (QName) of this element must appear in this element's place. |
void te::xsd::Element::setAsNillable | ( | bool | v | ) |
It specifies whether an explicit null value can be assigned to the element.
v | True enables an instance of the element to have the null attribute set to true. |
void te::xsd::Element::setBlock | ( | int | v | ) |
It prevents an element with a specified type of derivation from being used in place of this element.
v | It can be: #all|list of (extension|restriction). |
void te::xsd::Element::setContentType | ( | Type * | t | ) |
It sets the content type of the element.
t | The content type of the element. |
void te::xsd::Element::setDefaultValue | ( | std::string * | v | ) |
It sets the default value for the element.
v | The element default value. |
void te::xsd::Element::setFinal | ( | int | v | ) |
It sets the default value of the final attribute on the element element.
v | It can be: #all|list of (extension|restriction). |
void te::xsd::Element::setFixedValue | ( | std::string * | v | ) |
It sets a fixed value for the element.
v | A fixed value for the element. |
|
inherited |
it sets the id.
id | The id to be associated to the object. It will take the ownership of the given string. |
|
inherited |
It sets the maxOccurs value.
maxOccurs | The maxOccurs value. The value can be any number >= 0. |
|
inherited |
It sets the minOccurs value.
minOccurs | The minOccurs value. The value can be any number >= 0. |
void te::xsd::Element::setName | ( | std::string * | name | ) |
It sets the element name.
name | The element name. |
void te::xsd::Element::setRef | ( | QName * | ref | ) |
It sets a reference to a name of another element.
ref | A reference to a name of another element. |
void te::xsd::Element::setSubstitutionGroup | ( | QName * | g | ) |
It sets the substitution group.
g | The substitution group. |
void te::xsd::Element::setType | ( | QName * | t | ) |
It sets the element type.
t | The element type. |
|
private |
It specifies whether the element can be used in an instance document. True indicates that the element cannot appear in the instance document. Instead, another element whose substitutionGroup attribute contains the qualified name (QName) of this element must appear in this element's place. Default is false.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Here, "unqualified" indicates that this attribute is not required to be qualified with the namespace prefix. "qualified" indicates that this attribute must be qualified with the namespace prefix. The default value is the value of the elementFormDefault attribute of the schema element. (Optional)
|
private |
|
protectedinherited |
|
protectedinherited |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticinherited |