Qt 4.8
|
Represents a XSD element object. More...
#include <qxsdelement_p.h>
Classes | |
class | Scope |
class | TypeTable |
class | ValueConstraint |
Public Types | |
enum | ConstraintType { NoneConstraint, DefaultConstraint, FixedConstraint } |
typedef QList< XsdElement::Ptr > | List |
typedef QExplicitlySharedDataPointer< XsdElement > | Ptr |
typedef QList< XsdElement * > | WeakList |
Public Types inherited from QPatternist::XsdTerm | |
typedef QExplicitlySharedDataPointer< XsdTerm > | Ptr |
Public Types inherited from QPatternist::NamedSchemaComponent | |
enum | BlockingConstraint { RestrictionConstraint = 1, ExtensionConstraint = 2, SubstitutionConstraint = 4 } |
typedef QExplicitlySharedDataPointer< NamedSchemaComponent > | Ptr |
Properties | |
BlockingConstraints | m_disallowedSubstitutions |
XsdIdentityConstraint::List | m_identityConstraints |
bool | m_isAbstract |
bool | m_isNillable |
Scope::Ptr | m_scope |
XsdElement::List | m_substitutionGroupAffiliations |
SchemaType::DerivationConstraints | m_substitutionGroupExclusions |
QSet< XsdElement * > | m_substitutionGroups |
SchemaType * | m_type |
TypeTable::Ptr | m_typeTable |
ValueConstraint::Ptr | m_valueConstraint |
Additional Inherited Members | |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Protected Functions inherited from QPatternist::XsdTerm | |
XsdTerm () | |
Represents a XSD element object.
This class represents the element object of a XML schema as described here.
It contains information from either a top-level element declaration (as child of a schema object) or a local element declaration (as descendant of an complexType object).
Definition at line 83 of file qxsdelement_p.h.
Definition at line 87 of file qxsdelement_p.h.
Definition at line 86 of file qxsdelement_p.h.
typedef QList<XsdElement *> QPatternist::XsdElement::WeakList |
Definition at line 88 of file qxsdelement_p.h.
Describes the constraint type of the element.
Enumerator | |
---|---|
NoneConstraint | The value of the element has no constraints. |
DefaultConstraint | The element has a default value set. |
FixedConstraint | The element has a fixed value set. |
Definition at line 93 of file qxsdelement_p.h.
XsdElement::XsdElement | ( | ) |
void XsdElement::addIdentityConstraint | ( | const XsdIdentityConstraint::Ptr & | constraint | ) |
Adds a new identity constraint
to the element.
Definition at line 214 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaParser::parseGlobalElement(), and QPatternist::XsdSchemaParser::parseLocalElement().
void XsdElement::addSubstitutionGroup | ( | const XsdElement::Ptr & | elements | ) |
Adds a substitution group to the element.
Definition at line 234 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaResolver::resolveSubstitutionGroups().
XsdElement::BlockingConstraints XsdElement::disallowedSubstitutions | ( | ) | const |
Returns the disallowed substitutions of the element.
Definition at line 194 of file qxsdelement.cpp.
Referenced by derivedTermValid(), QPatternist::XsdSchemaDebugger::dumpElement(), QPatternist::XsdSchemaHelper::substitutionGroupOkTransitive(), and QPatternist::XsdValidatingInstanceReader::validateElement().
XsdIdentityConstraint::List XsdElement::identityConstraints | ( | ) | const |
Returns a list of all identity constraints of the element.
Definition at line 219 of file qxsdelement.cpp.
Referenced by QPatternist::XsdValidatingInstanceReader::validateIdentityConstraint().
bool XsdElement::isAbstract | ( | ) | const |
Returns whether the element is abstract.
Definition at line 174 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaDebugger::dumpElement(), and QPatternist::XsdValidatingInstanceReader::validateElement().
|
virtual |
Always returns true
, used to avoid dynamic casts.
Reimplemented from QPatternist::XsdTerm.
Definition at line 124 of file qxsdelement.cpp.
bool XsdElement::isNillable | ( | ) | const |
Returns whether the element is nillable.
Definition at line 184 of file qxsdelement.cpp.
Referenced by derivedTermValid(), QPatternist::XsdValidatingInstanceReader::validateElement(), and QPatternist::XsdValidatingInstanceReader::validateKeyIdentityConstraint().
XsdElement::Scope::Ptr XsdElement::scope | ( | ) | const |
Returns the scope of the element.
Definition at line 144 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaChecker::checkElementConstraints(), QPatternist::XsdSchemaParser::parseGlobalElement(), QPatternist::XsdSchemaParser::parseLocalElement(), and setScope().
void XsdElement::setDisallowedSubstitutions | ( | const BlockingConstraints & | substitutions | ) |
Sets the disallowed substitutions
of the element.
Only ExtensionConstraint, RestrictionConstraint and SubstitutionConstraint are allowed.
Definition at line 189 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaParser::parseGlobalElement(), and QPatternist::XsdSchemaParser::parseLocalElement().
void XsdElement::setIdentityConstraints | ( | const XsdIdentityConstraint::List & | constraints | ) |
Sets the identity constraints
of the element.
Definition at line 209 of file qxsdelement.cpp.
void XsdElement::setIsAbstract | ( | bool | abstract | ) |
Sets whether the element is abstract
.
Definition at line 169 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaParser::parseGlobalElement(), and QPatternist::XsdValidatingInstanceReader::validate().
void XsdElement::setIsNillable | ( | bool | nillable | ) |
Sets whether the element is nillable
.
Definition at line 179 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaParser::parseGlobalElement(), QPatternist::XsdSchemaParser::parseLocalElement(), and QPatternist::XsdValidatingInstanceReader::validate().
void XsdElement::setScope | ( | const Scope::Ptr & | scope | ) |
Sets the scope
of the element.
Definition at line 139 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaParser::parseGlobalElement(), and QPatternist::XsdSchemaParser::parseLocalElement().
void XsdElement::setSubstitutionGroupAffiliations | ( | const XsdElement::List & | affiliations | ) |
Sets the substitution group affiliations
of the element.
Definition at line 224 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaResolver::resolveSubstitutionGroupAffiliations().
void XsdElement::setSubstitutionGroupExclusions | ( | const SchemaType::DerivationConstraints & | exclusions | ) |
Sets the substitution group exclusions
of the element.
Only SchemaType::ExtensionConstraint and SchemaType::RestrictionConstraint are allowed.
Definition at line 199 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaParser::parseGlobalElement().
void XsdElement::setType | ( | const SchemaType::Ptr & | type | ) |
Sets the type
of the element.
Definition at line 129 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaParser::parseGlobalElement(), QPatternist::XsdSchemaParser::parseLocalElement(), QPatternist::XsdSchemaResolver::resolveElementTypes(), QPatternist::XsdSchemaResolver::resolveSubstitutionGroupAffiliations(), and QPatternist::XsdValidatingInstanceReader::validate().
void XsdElement::setTypeTable | ( | const TypeTable::Ptr & | table | ) |
Sets the type table of the element.
Definition at line 159 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaParser::parseGlobalElement(), and QPatternist::XsdSchemaParser::parseLocalElement().
void XsdElement::setValueConstraint | ( | const ValueConstraint::Ptr & | constraint | ) |
Sets the value constraint
of the element.
Definition at line 149 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaParser::parseGlobalElement(), and QPatternist::XsdSchemaParser::parseLocalElement().
XsdElement::List XsdElement::substitutionGroupAffiliations | ( | ) | const |
Returns the substitution group affiliations of the element.
Definition at line 229 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaChecker::checkElementConstraints(), QPatternist::XsdSchemaHelper::foundSubstitutionGroupTransitive(), hasCircularSubstitutionGroup(), isSubstGroupHeadOf(), and QPatternist::XsdSchemaResolver::resolveSubstitutionGroupAffiliations().
SchemaType::DerivationConstraints XsdElement::substitutionGroupExclusions | ( | ) | const |
Returns the substitution group exclusions of the element.
Definition at line 204 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaChecker::checkElementConstraints().
XsdElement::WeakList XsdElement::substitutionGroups | ( | ) | const |
Returns the substitution groups of the element.
Definition at line 239 of file qxsdelement.cpp.
Referenced by QPatternist::XsdStateMachineBuilder::buildTerm(), and hasDuplicatedElementsInternal().
SchemaType::Ptr XsdElement::type | ( | ) | const |
Returns the type of the element.
Definition at line 134 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaChecker::checkElementConstraints(), QPatternist::XsdSchemaChecker::checkElementDuplicates(), derivedTermValid(), QPatternist::XsdSchemaDebugger::dumpElement(), QPatternist::XsdSchemaParser::parseGlobalElement(), QPatternist::XsdSchemaParser::parseLocalElement(), QPatternist::XsdSchemaChecker::particleEqualsRecursively(), QPatternist::XsdSchemaResolver::resolveAlternativeTypes(), QPatternist::XsdSchemaResolver::resolveSubstitutionGroupAffiliations(), QPatternist::XsdSchemaResolver::resolveTermReference(), QPatternist::XsdElement::TypeTable::setDefaultTypeDefinition(), QPatternist::XsdSchemaHelper::substitutionGroupOkTransitive(), QPatternist::XsdValidatingInstanceReader::validate(), and QPatternist::XsdValidatingInstanceReader::validateElement().
XsdElement::TypeTable::Ptr XsdElement::typeTable | ( | ) | const |
Returns the type table of the element.
Definition at line 164 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaParser::parseGlobalElement(), and QPatternist::XsdSchemaParser::parseLocalElement().
XsdElement::ValueConstraint::Ptr XsdElement::valueConstraint | ( | ) | const |
Returns the value constraint of the element.
Definition at line 154 of file qxsdelement.cpp.
Referenced by QPatternist::XsdSchemaChecker::checkElementConstraints(), derivedTermValid(), QPatternist::XsdSchemaParser::parseGlobalElement(), QPatternist::XsdSchemaParser::parseLocalElement(), QPatternist::XsdValidatingInstanceReader::validateElement(), QPatternist::XsdValidatingInstanceReader::validateElementComplexType(), and QPatternist::XsdValidatingInstanceReader::validateElementSimpleType().
|
private |
Definition at line 391 of file qxsdelement_p.h.
Referenced by disallowedSubstitutions(), and setDisallowedSubstitutions().
|
private |
Definition at line 393 of file qxsdelement_p.h.
Referenced by addIdentityConstraint(), identityConstraints(), and setIdentityConstraints().
|
private |
Definition at line 389 of file qxsdelement_p.h.
Referenced by isAbstract(), and setIsAbstract().
|
private |
Definition at line 390 of file qxsdelement_p.h.
Referenced by isNillable(), and setIsNillable().
|
private |
Definition at line 386 of file qxsdelement_p.h.
Referenced by scope(), and setScope().
|
private |
Definition at line 394 of file qxsdelement_p.h.
Referenced by setSubstitutionGroupAffiliations(), and substitutionGroupAffiliations().
|
private |
Definition at line 392 of file qxsdelement_p.h.
Referenced by setSubstitutionGroupExclusions(), and substitutionGroupExclusions().
|
private |
Definition at line 395 of file qxsdelement_p.h.
Referenced by addSubstitutionGroup(), and substitutionGroups().
|
private |
Definition at line 385 of file qxsdelement_p.h.
|
private |
Definition at line 388 of file qxsdelement_p.h.
Referenced by setTypeTable(), and typeTable().
|
private |
Definition at line 387 of file qxsdelement_p.h.
Referenced by setValueConstraint(), and valueConstraint().