Library: XSD/Types
Package: XSDTypes
Header: Poco/XSD/Types/Schema.h
Direct Base Classes: AnnotatedObject
All Base Classes: Poco::RefCountedObject, AnnotatedObject, Visitable
Member Functions: accept, addAttribute, addAttributeGroup, addElement, addGroup, addImportedSchema, addNotation, addType, attributeGroups, attributes, blockExtension, blockRestriction, blockSubstitution, elements, finalExtension, finalList, finalRestriction, finalUnion, fixup, getAttribute, getAttributeGroup, getElement, getGroup, getNotation, getType, groups, includeSchema, notations, qualifiedAttributeForm, qualifiedElementForm, targetNamespace, types
Inherited Functions: accept, addAnnotation, duplicate, getAnnotations, id, referenceCount, release
typedef std::map < std::string, AbstractAttributeGroup::Ptr > AttributeGroups;
typedef std::map < std::string, AbstractAttribute::Ptr > Attributes;
typedef Element::Ptr ElementPtr;
typedef std::map < std::string, ElementPtr > Elements;
typedef std::map < std::string, Group::Ptr > Groups;
typedef std::map < std::string, Notation::Ptr > Notations;
typedef Poco::AutoPtr < Schema > Ptr;
typedef std::vector < Ptr > Schemas;
typedef std::map < std::string, TypePtr > Types;
Schema(
const std::string & targetNS,
bool qualifiedAttributeForm,
bool qualifiedElementForm,
bool blockExtension,
bool blockRestriction,
bool blockSubstitution,
bool finalExtension,
bool finalRestriction,
bool finalList,
bool finalUnion,
bool needsFixup = true
);
Creates the Schema.
~Schema();
Destroys the Schema.
void accept(
Visitor & v
) const;
See also: Poco::XSD::Types::Visitable::accept()
void addAttribute(
AbstractAttribute::Ptr pAttr
);
Adds an attribute to the Schema, will fail if the attribute already exists. Note that once an attribute was added to the Schema, it can not be removed!
void addAttributeGroup(
AbstractAttributeGroup::Ptr pAttr
);
Adds an attributegroup to the Schema, will fail if the attributegroup already exists. Note that once an attributegroup was added to the Schema, it can not be removed!
void addElement(
ElementPtr pElem
);
Adds an Element to the Schema, will fail if the element already exists. Note that once an element was added to the Schema, it can not be removed!
void addGroup(
Group::Ptr pAttr
);
Adds a group to the Schema, will fail if the group already exists. Note that once a group was added to the Schema, it can not be removed!
void addImportedSchema(
Ptr pSchema
);
Adds an imported schema.
void addNotation(
Notation::Ptr ptr
);
Adds an Notation to the Schema, will fail if the Notation already exists. Note that once an Notation was added to the Schema, it can not be removed!
void addType(
TypePtr pType
);
Adds a type to the Schema, will fail if the type already exists. Note that once a type was added to the Schema, it can not be removed!
const Schema::AttributeGroups & attributeGroups() const;
Returns all attribute groups exported by the schema
const Schema::Attributes & attributes() const;
Returns all attributes exported by the schema
bool blockExtension() const;
Are extensions forbidden?
bool blockRestriction() const;
Are restrictions forbidden?
bool blockSubstitution() const;
Is substitution forbidden?
const Schema::Elements & elements() const;
Returns all elements exported by the schema
bool finalExtension() const;
Is the default for extension final?
bool finalList() const;
Is the default for list final?
bool finalRestriction() const;
Is the default for restriction final?
bool finalUnion() const;
Is the default for union final?
void fixup();
const AbstractAttribute * getAttribute(
const std::string & name
) const;
Returns a attribute for the given name, returns a null pointer if not found
const AbstractAttributeGroup * getAttributeGroup(
const std::string & name
) const;
Returns an attributegroup for the given name, returns a null pointer if not found
const Element * getElement(
const std::string & name
) const;
Returns an element for the given name, returns a null pointer if not found
const Group * getGroup(
const std::string & name
) const;
Returns a group for the given name, returns a null pointer if not found
const Notation * getNotation(
const std::string & name
) const;
Returns a Notation for the given name, returns a null pointer if not found
const Type * getType(
const std::string & name
) const;
Returns a type for the given name, returns a null pointer if not found
const Schema::Groups & groups() const;
Returns all groups exported by the schema
void includeSchema(
Ptr pSchema
);
Includes the given schema.
const Schema::Notations & notations() const;
Returns all notations of the schema
bool qualifiedAttributeForm() const;
Are attributes qualified?
bool qualifiedElementForm() const;
Are elements qualified?
const std::string & targetNamespace() const;
The namespace of the Schema
const Schema::Types & types() const;
Returns all types of the schema