Library: XSD/Types
Package: XSDTypes
Header: Poco/XSD/Types/TypesManager.h
TypesManager manages all known schemas with types and exported elements.
Member Functions: addDefinitions, addSchema, eraseSchema, findSchema, fixupSchemas, getAttribute, getAttributeGroup, getDefinitions, getElement, getGroup, getSchema, getSchemas, getType, hasDefinitions, hasSchema, hasSchemaLocation, instance
typedef std::map < std::string, Definitions::Ptr > Definitionss;
Maps a namespace to a WSDL file
typedef std::map < std::string, Schema::Ptr > Schemas;
~TypesManager();
Destroys the TypesManager.
void addDefinitions(
Definitions::Ptr pDefinitions
);
Adds a WSDL document.
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.
bool eraseSchema(
const std::string & ns
);
Deletes the schema, Returns true if the schema was found and erased.
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.
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.
void fixupSchemas();
Fixes up all loaded schemas. Must be called after all schemas have been loaded to resolve dependencies.
const AbstractAttribute * getAttribute(
const QName & ref
) const;
Returns an attribute for the given QName or null if not found.
const AbstractAttributeGroup * getAttributeGroup(
const QName & ref
) const;
Returns an attribute group for the given QName or null if not found.
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.
const Definitionss & getDefinitions() const;
Returns all known WSDL definitions.
const Element * getElement(
const QName & ref
) const;
Returns an element for the given QName or null if not found.
const Group * getGroup(
const QName & ref
) const;
Returns an attribute group for the given QName or null if not found.
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.
const Schemas & getSchemas() const;
Returns all known schemas.
const Type * getType(
const QName & ref
) const;
Returns a type for the given QName or null if not found.
bool hasDefinitions(
const std::string & ns
) const;
Checks if a WSDL with the given namespace exists.
bool hasSchema(
const std::string & ns
) const;
Checks if a schema with the given namespace exists.
bool hasSchemaLocation(
const Poco::URI & uri
) const;
Returns true if from the given URI a schema was loaded.
static TypesManager & instance();
Returns the TypesManager singleton.
static const std::string XSD_NAMESPACE;
static const std::string XSD_NAMESPACE1998;
static const std::string XSD_TYPE_ANYSIMPLETYPE;
static const std::string XSD_TYPE_ANYTYPE;
static const std::string XSD_TYPE_ANYURI;
static const std::string XSD_TYPE_BASE64BINARY;
static const std::string XSD_TYPE_BOOLEAN;
static const std::string XSD_TYPE_BYTE;
static const std::string XSD_TYPE_DATE;
static const std::string XSD_TYPE_DATETIME;
static const std::string XSD_TYPE_DECIMAL;
static const std::string XSD_TYPE_DOUBLE;
static const std::string XSD_TYPE_DURATION;
static const std::string XSD_TYPE_ENTITIES;
static const std::string XSD_TYPE_ENTITY;
static const std::string XSD_TYPE_FLOAT;
static const std::string XSD_TYPE_GDAY;
static const std::string XSD_TYPE_GMONTH;
static const std::string XSD_TYPE_GMONTHDAY;
static const std::string XSD_TYPE_GYEAR;
static const std::string XSD_TYPE_GYEARMONTH;
static const std::string XSD_TYPE_HEX_BINARY;
static const std::string XSD_TYPE_ID;
static const std::string XSD_TYPE_IDREF;
static const std::string XSD_TYPE_IDREFS;
static const std::string XSD_TYPE_INT;
static const std::string XSD_TYPE_INTEGER;
static const std::string XSD_TYPE_LANGUAGE;
static const std::string XSD_TYPE_LONG;
static const std::string XSD_TYPE_NAME;
static const std::string XSD_TYPE_NCNAME;
static const std::string XSD_TYPE_NEGATIVEINTEGER;
static const std::string XSD_TYPE_NMTOKEN;
static const std::string XSD_TYPE_NMTOKENS;
static const std::string XSD_TYPE_NONNEGATIVEINTEGER;
static const std::string XSD_TYPE_NONPOSITIVEINTEGER;
static const std::string XSD_TYPE_NORMALIZEDSTRING;
static const std::string XSD_TYPE_NOTATION;
static const std::string XSD_TYPE_POSITIVEINTEGER;
static const std::string XSD_TYPE_QNAME;
static const std::string XSD_TYPE_SHORT;
static const std::string XSD_TYPE_STRING;
static const std::string XSD_TYPE_TIME;
static const std::string XSD_TYPE_TOKEN;
static const std::string XSD_TYPE_UNSIGNEDBYTE;
static const std::string XSD_TYPE_UNSIGNEDINT;
static const std::string XSD_TYPE_UNSIGNEDLONG;
static const std::string XSD_TYPE_UNSIGNEDSHORT;