Qt 4.8
qxmlschema.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include "qxmlschema.h"
43 #include "qxmlschema_p.h"
44 
45 #include <QtCore/QIODevice>
46 #include <QtCore/QUrl>
47 
49 
85 {
86 }
87 
94  : d(other.d)
95 {
96 }
97 
102 {
103 }
104 
118 bool QXmlSchema::load(const QUrl &source)
119 {
120  d->load(source, QString());
121  return d->isValid();
122 }
123 
147 {
148  d->load(source, documentUri, QString());
149  return d->isValid();
150 }
151 
173 {
174  d->load(data, documentUri, QString());
175  return d->isValid();
176 }
177 
184 {
185  return d->isValid();
186 }
187 
193 {
194  return d->namePool();
195 }
196 
202 {
203  return d->documentUri();
204 }
205 
242 {
243  d->setMessageHandler(handler);
244 }
245 
251 {
252  return d->messageHandler();
253 }
254 
262 {
263  d->setUriResolver(resolver);
264 }
265 
281 {
282  return d->uriResolver();
283 }
284 
292 {
293  d->setNetworkAccessManager(manager);
294 }
295 
302 {
303  return d->networkAccessManager();
304 }
305 
QSharedDataPointer< QXmlSchemaPrivate > d
Definition: qxmlschema.h:90
double d
Definition: qnumeric_p.h:62
QXmlNamePool namePool() const
QUrl documentUri() const
Returns the document URI of the schema or an empty URI if no schema has been set. ...
Definition: qxmlschema.cpp:201
QNetworkAccessManager * networkAccessManager() const
Returns the network manager, or 0 if it has not been set.
Definition: qxmlschema.cpp:301
QAbstractMessageHandler * messageHandler() const
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
const QAbstractUriResolver * uriResolver() const
Returns the schema&#39;s URI resolver.
Definition: qxmlschema.cpp:280
~QXmlSchema()
Destroys this QXmlSchema.
Definition: qxmlschema.cpp:101
QNetworkAccessManager * networkAccessManager() const
The QUrl class provides a convenient interface for working with URLs.
Definition: qurl.h:61
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QXmlSchema class provides loading and validation of a W3C XML Schema.
Definition: qxmlschema.h:62
The QXmlNamePool class is a table of shared strings referenced by instances of QXmlName.
Definition: qxmlnamepool.h:69
QAbstractMessageHandler * messageHandler() const
Returns the message handler that handles compile and validation messages for this QXmlSchema...
Definition: qxmlschema.cpp:250
The QAbstractUriResolver class is a callback interface for resolving Uniform Resource Identifiers...
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
QUrl documentUri() const
static const char * data(const QByteArray &arr)
void setMessageHandler(QAbstractMessageHandler *handler)
Changes the QAbstractMessageHandler{message handler} for this QXmlSchema to handler.
Definition: qxmlschema.cpp:241
The QNetworkAccessManager class allows the application to send network requests and receive replies...
void load(const QUrl &source, const QString &targetNamespace)
void setUriResolver(const QAbstractUriResolver *resolver)
Sets the URI resolver to resolver.
Definition: qxmlschema.cpp:261
QXmlSchema()
Constructs an invalid, empty schema that cannot be used until load() is called.
Definition: qxmlschema.cpp:83
The QAbstractMessageHandler class provides a callback interface for handling messages.
void setNetworkAccessManager(QNetworkAccessManager *networkmanager)
Sets the network manager to manager.
Definition: qxmlschema.cpp:291
bool isValid() const
void setMessageHandler(QAbstractMessageHandler *handler)
void setUriResolver(const QAbstractUriResolver *resolver)
bool isValid() const
Returns true if this schema is valid.
Definition: qxmlschema.cpp:183
QImageIOHandler * handler
bool load(const QUrl &source)
Sets this QXmlSchema to a schema loaded from the source URI.
Definition: qxmlschema.cpp:118
The QIODevice class is the base interface class of all I/O devices in Qt.
Definition: qiodevice.h:66
void setNetworkAccessManager(QNetworkAccessManager *networkmanager)
const QAbstractUriResolver * uriResolver() const
QXmlNamePool namePool() const
Returns the name pool used by this QXmlSchema for constructing QXmlName {names}.
Definition: qxmlschema.cpp:192