Qt 4.8
Public Types | Public Functions | Properties | List of all members
QPatternist::XsdIdentityConstraint Class Reference

Represents a XSD identity constraint object. More...

#include <qxsdidentityconstraint_p.h>

Inheritance diagram for QPatternist::XsdIdentityConstraint:
QPatternist::NamedSchemaComponent QPatternist::XsdAnnotated QPatternist::SchemaComponent QSharedData

Public Types

enum  Category { Key = 1, KeyReference, Unique }
 
typedef QList< XsdIdentityConstraint::PtrList
 
typedef QExplicitlySharedDataPointer< XsdIdentityConstraintPtr
 
- Public Types inherited from QPatternist::NamedSchemaComponent
enum  BlockingConstraint { RestrictionConstraint = 1, ExtensionConstraint = 2, SubstitutionConstraint = 4 }
 
typedef QExplicitlySharedDataPointer< NamedSchemaComponentPtr
 

Public Functions

void addField (const XsdXPathExpression::Ptr &field)
 
Category category () const
 
XsdXPathExpression::List fields () const
 
XsdIdentityConstraint::Ptr referencedKey () const
 
XsdXPathExpression::Ptr selector () const
 
void setCategory (Category category)
 
void setFields (const XsdXPathExpression::List &fields)
 
void setReferencedKey (const XsdIdentityConstraint::Ptr &key)
 
void setSelector (const XsdXPathExpression::Ptr &selector)
 
- Public Functions inherited from QPatternist::NamedSchemaComponent
virtual QString displayName (const NamePool::Ptr &namePool) const
 
virtual QXmlName name (const NamePool::Ptr &namePool) const
 
 NamedSchemaComponent ()
 
void setName (const QXmlName &name)
 
virtual ~NamedSchemaComponent ()
 
- Public Functions inherited from QPatternist::SchemaComponent
 SchemaComponent ()
 
virtual ~SchemaComponent ()
 
- Public Functions inherited from QSharedData
 QSharedData ()
 Constructs a QSharedData object with a reference count of 0. More...
 
 QSharedData (const QSharedData &)
 Constructs a QSharedData object with reference count 0. More...
 
- Public Functions inherited from QPatternist::XsdAnnotated
void addAnnotation (const XsdAnnotation::Ptr &annotation)
 
void addAnnotations (const XsdAnnotation::List &annotations)
 
XsdAnnotation::List annotations () const
 

Properties

Category m_category
 
XsdXPathExpression::List m_fields
 
XsdIdentityConstraint::Ptr m_referencedKey
 
XsdXPathExpression::Ptr m_selector
 

Additional Inherited Members

- Public Variables inherited from QSharedData
QAtomicInt ref
 

Detailed Description

Represents a XSD identity constraint object.

This class represents the identity constraint object of a XML schema as described here.

It contains information from either a key object, a keyref object or an unique object.

See also
XML Schema API reference
Author
Tobias Koenig tobia.nosp@m.s.ko.nosp@m.enig@.nosp@m.noki.nosp@m.a.com

Definition at line 80 of file qxsdidentityconstraint_p.h.

Typedefs

◆ List

Definition at line 84 of file qxsdidentityconstraint_p.h.

◆ Ptr

Definition at line 83 of file qxsdidentityconstraint_p.h.

Enumerations

◆ Category

Describes the category of the identity constraint.

Enumerator
Key 

The constraint is a key constraint.

KeyReference 

The constraint is a keyref constraint.

Unique 

The constraint is an unique constraint.

Definition at line 89 of file qxsdidentityconstraint_p.h.

90  {
91  Key = 1,
92  KeyReference,
93  Unique
94  };
The constraint is an unique constraint.
The constraint is a key constraint.

Functions

◆ addField()

void XsdIdentityConstraint::addField ( const XsdXPathExpression::Ptr field)

Adds a new field to the identity constraint.

Definition at line 73 of file qxsdidentityconstraint.cpp.

Referenced by QPatternist::XsdSchemaParser::parseField().

74 {
75  m_fields.append(field);
76 }
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507

◆ category()

XsdIdentityConstraint::Category XsdIdentityConstraint::category ( ) const

◆ fields()

XsdXPathExpression::List XsdIdentityConstraint::fields ( ) const

Returns all fields of the identity constraint.

Definition at line 78 of file qxsdidentityconstraint.cpp.

Referenced by QPatternist::XsdSchemaResolver::resolveKeyReferences(), QPatternist::XsdValidatingInstanceReader::selectNodeSets(), and setFields().

79 {
80  return m_fields;
81 }

◆ referencedKey()

XsdIdentityConstraint::Ptr XsdIdentityConstraint::referencedKey ( ) const

Returns the referenced key of the identity constraint or an empty pointer if its type is not KeyReference.

Definition at line 88 of file qxsdidentityconstraint.cpp.

Referenced by setReferencedKey(), and QPatternist::XsdValidatingInstanceReader::validateKeyRefIdentityConstraint().

89 {
90  return m_referencedKey;
91 }
XsdIdentityConstraint::Ptr m_referencedKey

◆ selector()

XsdXPathExpression::Ptr XsdIdentityConstraint::selector ( ) const

Returns the selector of the identity constraint.

Definition at line 63 of file qxsdidentityconstraint.cpp.

Referenced by QPatternist::XsdValidatingInstanceReader::selectNodeSets(), and setSelector().

64 {
65  return m_selector;
66 }

◆ setCategory()

void XsdIdentityConstraint::setCategory ( Category  category)

◆ setFields()

void XsdIdentityConstraint::setFields ( const XsdXPathExpression::List fields)

Sets the fields of the identity constraint.

Each field is a restricted XPath 1.0 expression, that selects a set of nodes.

See also

Definition at line 68 of file qxsdidentityconstraint.cpp.

69 {
70  m_fields = fields;
71 }
XsdXPathExpression::List fields() const

◆ setReferencedKey()

void XsdIdentityConstraint::setReferencedKey ( const XsdIdentityConstraint::Ptr key)

Sets the referenced key of the identity constraint.

The key points to a identity constraint of type Key or Unique.

The identity constraint has only a referenced key if its type is KeyReference.

See also

Definition at line 83 of file qxsdidentityconstraint.cpp.

Referenced by QPatternist::XsdSchemaResolver::resolveKeyReferences().

84 {
86 }
XsdIdentityConstraint::Ptr referencedKey() const
XsdIdentityConstraint::Ptr m_referencedKey

◆ setSelector()

void XsdIdentityConstraint::setSelector ( const XsdXPathExpression::Ptr selector)

Sets the selector of the identity constraint.

The selector is a restricted XPath 1.0 expression, that selects a set of nodes.

See also

Definition at line 58 of file qxsdidentityconstraint.cpp.

Referenced by QPatternist::XsdSchemaParser::parseSelector().

59 {
61 }
XsdXPathExpression::Ptr selector() const

Properties

◆ m_category

Category QPatternist::XsdIdentityConstraint::m_category
private

Definition at line 162 of file qxsdidentityconstraint_p.h.

Referenced by category(), and setCategory().

◆ m_fields

XsdXPathExpression::List QPatternist::XsdIdentityConstraint::m_fields
private

Definition at line 164 of file qxsdidentityconstraint_p.h.

Referenced by addField(), fields(), and setFields().

◆ m_referencedKey

XsdIdentityConstraint::Ptr QPatternist::XsdIdentityConstraint::m_referencedKey
private

Definition at line 165 of file qxsdidentityconstraint_p.h.

Referenced by referencedKey(), and setReferencedKey().

◆ m_selector

XsdXPathExpression::Ptr QPatternist::XsdIdentityConstraint::m_selector
private

Definition at line 163 of file qxsdidentityconstraint_p.h.

Referenced by selector(), and setSelector().


The documentation for this class was generated from the following files: