Poco::XSD::Types

class TypesManager

File Information

Library: XSD/Types
Package: XSDTypes
Header: Poco/XSD/Types/TypesManager.h

Description

TypesManager manages all known schemas with types and exported elements.

Member Summary

Member Functions: addDefinitions, addSchema, eraseSchema, findSchema, fixupSchemas, getAttribute, getAttributeGroup, getDefinitions, getElement, getGroup, getSchema, getSchemas, getType, hasDefinitions, hasSchema, hasSchemaLocation, instance

Types

Definitionss

typedef std::map < std::string, Definitions::Ptr > Definitionss;

Maps a namespace to a WSDL file

Schemas

typedef std::map < std::string, Schema::Ptr > Schemas;

Maps a namespace to a XML Schema file

Constructors

Destructor

~TypesManager protected

~TypesManager();

Destroys the TypesManager.

Member Functions

addDefinitions

void addDefinitions(
    Definitions::Ptr pDefinitions
);

Adds a WSDL document.

addSchema

void addSchema(
    Schema::Ptr pSchema,
    const Poco::URI & schemaLocation
);

Will fail if a schema with the same namespace exists and conflicts with the new one. Ignores schemas that reference the builtin schemas.

eraseSchema

bool eraseSchema(
    const std::string & ns
);

Deletes the schema, Returns true if the schema was found and erased.

findSchema

Schema::Ptr findSchema(
    const std::string & ns
);

Returns the Schema for the given target namespace or a null pointer if no schema exists for the given target namespace.

findSchema

Schema::Ptr findSchema(
    const Poco::URI & schemaLocation
);

Returns the Schema for the given target namespace or a null pointer if no schema exists for the given target namespace.

fixupSchemas

void fixupSchemas();

Fixes up all loaded schemas. Must be called after all schemas have been loaded to resolve dependencies.

getAttribute

const AbstractAttribute * getAttribute(
    const QName & ref
) const;

Returns an attribute for the given QName or null if not found.

getAttributeGroup

const AbstractAttributeGroup * getAttributeGroup(
    const QName & ref
) const;

Returns an attribute group for the given QName or null if not found.

getDefinitions inline

Definitions & getDefinitions(
    const std::string & ns
);

Returns the WSDL Definitions for the given target namespace. Throws a Poco::NotFoundException if no WSDL has been defined for the given target namespace.

getDefinitions

const Definitionss & getDefinitions() const;

Returns all known WSDL definitions.

getElement

const Element * getElement(
    const QName & ref
) const;

Returns an element for the given QName or null if not found.

getGroup

const Group * getGroup(
    const QName & ref
) const;

Returns an attribute group for the given QName or null if not found.

getSchema

Schema & getSchema(
    const std::string & ns
);

Returns the Schema for the given target namespace. Throws a Poco::NotFoundException if no schema has been defined for the given target namespace.

getSchemas inline

const Schemas & getSchemas() const;

Returns all known schemas.

getType

const Type * getType(
    const QName & ref
) const;

Returns a type for the given QName or null if not found.

hasDefinitions

bool hasDefinitions(
    const std::string & ns
) const;

Checks if a WSDL with the given namespace exists.

hasSchema

bool hasSchema(
    const std::string & ns
) const;

Checks if a schema with the given namespace exists.

hasSchemaLocation inline

bool hasSchemaLocation(
    const Poco::URI & uri
) const;

Returns true if from the given URI a schema was loaded.

instance static

static TypesManager & instance();

Returns the TypesManager singleton.

Variables

XSD_NAMESPACE static

static const std::string XSD_NAMESPACE;

XSD_NAMESPACE1998 static

static const std::string XSD_NAMESPACE1998;

XSD_TYPE_ANYSIMPLETYPE static

static const std::string XSD_TYPE_ANYSIMPLETYPE;

XSD_TYPE_ANYTYPE static

static const std::string XSD_TYPE_ANYTYPE;

XSD_TYPE_ANYURI static

static const std::string XSD_TYPE_ANYURI;

XSD_TYPE_BASE64BINARY static

static const std::string XSD_TYPE_BASE64BINARY;

XSD_TYPE_BOOLEAN static

static const std::string XSD_TYPE_BOOLEAN;

XSD_TYPE_BYTE static

static const std::string XSD_TYPE_BYTE;

XSD_TYPE_DATE static

static const std::string XSD_TYPE_DATE;

XSD_TYPE_DATETIME static

static const std::string XSD_TYPE_DATETIME;

XSD_TYPE_DECIMAL static

static const std::string XSD_TYPE_DECIMAL;

XSD_TYPE_DOUBLE static

static const std::string XSD_TYPE_DOUBLE;

XSD_TYPE_DURATION static

static const std::string XSD_TYPE_DURATION;

XSD_TYPE_ENTITIES static

static const std::string XSD_TYPE_ENTITIES;

XSD_TYPE_ENTITY static

static const std::string XSD_TYPE_ENTITY;

XSD_TYPE_FLOAT static

static const std::string XSD_TYPE_FLOAT;

XSD_TYPE_GDAY static

static const std::string XSD_TYPE_GDAY;

XSD_TYPE_GMONTH static

static const std::string XSD_TYPE_GMONTH;

XSD_TYPE_GMONTHDAY static

static const std::string XSD_TYPE_GMONTHDAY;

XSD_TYPE_GYEAR static

static const std::string XSD_TYPE_GYEAR;

XSD_TYPE_GYEARMONTH static

static const std::string XSD_TYPE_GYEARMONTH;

XSD_TYPE_HEX_BINARY static

static const std::string XSD_TYPE_HEX_BINARY;

XSD_TYPE_ID static

static const std::string XSD_TYPE_ID;

XSD_TYPE_IDREF static

static const std::string XSD_TYPE_IDREF;

XSD_TYPE_IDREFS static

static const std::string XSD_TYPE_IDREFS;

XSD_TYPE_INT static

static const std::string XSD_TYPE_INT;

XSD_TYPE_INTEGER static

static const std::string XSD_TYPE_INTEGER;

XSD_TYPE_LANGUAGE static

static const std::string XSD_TYPE_LANGUAGE;

XSD_TYPE_LONG static

static const std::string XSD_TYPE_LONG;

XSD_TYPE_NAME static

static const std::string XSD_TYPE_NAME;

XSD_TYPE_NCNAME static

static const std::string XSD_TYPE_NCNAME;

XSD_TYPE_NEGATIVEINTEGER static

static const std::string XSD_TYPE_NEGATIVEINTEGER;

XSD_TYPE_NMTOKEN static

static const std::string XSD_TYPE_NMTOKEN;

XSD_TYPE_NMTOKENS static

static const std::string XSD_TYPE_NMTOKENS;

XSD_TYPE_NONNEGATIVEINTEGER static

static const std::string XSD_TYPE_NONNEGATIVEINTEGER;

XSD_TYPE_NONPOSITIVEINTEGER static

static const std::string XSD_TYPE_NONPOSITIVEINTEGER;

XSD_TYPE_NORMALIZEDSTRING static

static const std::string XSD_TYPE_NORMALIZEDSTRING;

XSD_TYPE_NOTATION static

static const std::string XSD_TYPE_NOTATION;

XSD_TYPE_POSITIVEINTEGER static

static const std::string XSD_TYPE_POSITIVEINTEGER;

XSD_TYPE_QNAME static

static const std::string XSD_TYPE_QNAME;

XSD_TYPE_SHORT static

static const std::string XSD_TYPE_SHORT;

XSD_TYPE_STRING static

static const std::string XSD_TYPE_STRING;

XSD_TYPE_TIME static

static const std::string XSD_TYPE_TIME;

XSD_TYPE_TOKEN static

static const std::string XSD_TYPE_TOKEN;

XSD_TYPE_UNSIGNEDBYTE static

static const std::string XSD_TYPE_UNSIGNEDBYTE;

XSD_TYPE_UNSIGNEDINT static

static const std::string XSD_TYPE_UNSIGNEDINT;

XSD_TYPE_UNSIGNEDLONG static

static const std::string XSD_TYPE_UNSIGNEDLONG;

XSD_TYPE_UNSIGNEDSHORT static

static const std::string XSD_TYPE_UNSIGNEDSHORT;