source: trunk/src/xmlpatterns/schema/qxsdelement.cpp@ 780

Last change on this file since 780 was 561, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.1 sources.

  • Property svn:eol-style set to native
File size: 5.8 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the QtXmlPatterns module of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#include "qxsdelement_p.h"
43
44QT_BEGIN_NAMESPACE
45
46using namespace QPatternist;
47
48void XsdElement::Scope::setVariety(Variety variety)
49{
50 m_variety = variety;
51}
52
53XsdElement::Scope::Variety XsdElement::Scope::variety() const
54{
55 return m_variety;
56}
57
58void XsdElement::Scope::setParent(const NamedSchemaComponent::Ptr &parent)
59{
60 m_parent = parent;
61}
62
63NamedSchemaComponent::Ptr XsdElement::Scope::parent() const
64{
65 return m_parent;
66}
67
68void XsdElement::ValueConstraint::setVariety(Variety variety)
69{
70 m_variety = variety;
71}
72
73XsdElement::ValueConstraint::Variety XsdElement::ValueConstraint::variety() const
74{
75 return m_variety;
76}
77
78void XsdElement::ValueConstraint::setValue(const QString &value)
79{
80 m_value = value;
81}
82
83QString XsdElement::ValueConstraint::value() const
84{
85 return m_value;
86}
87
88void XsdElement::ValueConstraint::setLexicalForm(const QString &form)
89{
90 m_lexicalForm = form;
91}
92
93QString XsdElement::ValueConstraint::lexicalForm() const
94{
95 return m_lexicalForm;
96}
97
98void XsdElement::TypeTable::addAlternative(const XsdAlternative::Ptr &alternative)
99{
100 m_alternatives.append(alternative);
101}
102
103XsdAlternative::List XsdElement::TypeTable::alternatives() const
104{
105 return m_alternatives;
106}
107
108void XsdElement::TypeTable::setDefaultTypeDefinition(const XsdAlternative::Ptr &type)
109{
110 m_defaultTypeDefinition = type;
111}
112
113XsdAlternative::Ptr XsdElement::TypeTable::defaultTypeDefinition() const
114{
115 return m_defaultTypeDefinition;
116}
117
118
119XsdElement::XsdElement()
120 : m_isAbstract(false)
121{
122}
123
124bool XsdElement::isElement() const
125{
126 return true;
127}
128
129void XsdElement::setType(const SchemaType::Ptr &type)
130{
131 m_type = type;
132}
133
134SchemaType::Ptr XsdElement::type() const
135{
136 return m_type;
137}
138
139void XsdElement::setScope(const Scope::Ptr &scope)
140{
141 m_scope = scope;
142}
143
144XsdElement::Scope::Ptr XsdElement::scope() const
145{
146 return m_scope;
147}
148
149void XsdElement::setValueConstraint(const ValueConstraint::Ptr &constraint)
150{
151 m_valueConstraint = constraint;
152}
153
154XsdElement::ValueConstraint::Ptr XsdElement::valueConstraint() const
155{
156 return m_valueConstraint;
157}
158
159void XsdElement::setTypeTable(const TypeTable::Ptr &table)
160{
161 m_typeTable = table;
162}
163
164XsdElement::TypeTable::Ptr XsdElement::typeTable() const
165{
166 return m_typeTable;
167}
168
169void XsdElement::setIsAbstract(bool abstract)
170{
171 m_isAbstract = abstract;
172}
173
174bool XsdElement::isAbstract() const
175{
176 return m_isAbstract;
177}
178
179void XsdElement::setIsNillable(bool nillable)
180{
181 m_isNillable = nillable;
182}
183
184bool XsdElement::isNillable() const
185{
186 return m_isNillable;
187}
188
189void XsdElement::setDisallowedSubstitutions(const BlockingConstraints &substitutions)
190{
191 m_disallowedSubstitutions = substitutions;
192}
193
194XsdElement::BlockingConstraints XsdElement::disallowedSubstitutions() const
195{
196 return m_disallowedSubstitutions;
197}
198
199void XsdElement::setSubstitutionGroupExclusions(const SchemaType::DerivationConstraints &exclusions)
200{
201 m_substitutionGroupExclusions = exclusions;
202}
203
204SchemaType::DerivationConstraints XsdElement::substitutionGroupExclusions() const
205{
206 return m_substitutionGroupExclusions;
207}
208
209void XsdElement::setIdentityConstraints(const XsdIdentityConstraint::List &constraints)
210{
211 m_identityConstraints = constraints;
212}
213
214void XsdElement::addIdentityConstraint(const XsdIdentityConstraint::Ptr &constraint)
215{
216 m_identityConstraints.append(constraint);
217}
218
219XsdIdentityConstraint::List XsdElement::identityConstraints() const
220{
221 return m_identityConstraints;
222}
223
224void XsdElement::setSubstitutionGroupAffiliations(const XsdElement::List &affiliations)
225{
226 m_substitutionGroupAffiliations = affiliations;
227}
228
229XsdElement::List XsdElement::substitutionGroupAffiliations() const
230{
231 return m_substitutionGroupAffiliations;
232}
233
234void XsdElement::addSubstitutionGroup(const XsdElement::Ptr &element)
235{
236 m_substitutionGroups.insert(element);
237}
238
239XsdElement::List XsdElement::substitutionGroups() const
240{
241 return m_substitutionGroups.toList();
242}
243
244QT_END_NAMESPACE
Note: See TracBrowser for help on using the repository browser.