Poco::XSD::Types

class Schema

File Information

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

Description

This class represents an entire XML Schema definition.

Inheritance

Direct Base Classes: AnnotatedObject

All Base Classes: Poco::RefCountedObject, AnnotatedObject, Visitable

Member Summary

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

Types

AttributeGroups

typedef std::map < std::string, AbstractAttributeGroup::Ptr > AttributeGroups;

Attributes

typedef std::map < std::string, AbstractAttribute::Ptr > Attributes;

ElementPtr

typedef Element::Ptr ElementPtr;

Elements

typedef std::map < std::string, ElementPtr > Elements;

Groups

typedef std::map < std::string, Group::Ptr > Groups;

Notations

typedef std::map < std::string, Notation::Ptr > Notations;

Ptr

typedef Poco::AutoPtr < Schema > Ptr;

Schemas

typedef std::vector < Ptr > Schemas;

TypePtr

typedef Type::Ptr TypePtr;

Types

typedef std::map < std::string, TypePtr > Types;

Constructors

Schema

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.

Destructor

~Schema virtual

~Schema();

Destroys the Schema.

Member Functions

accept virtual

void accept(
    Visitor & v
) const;

addAttribute

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!

addAttributeGroup

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!

addElement

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!

addGroup

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!

addImportedSchema

void addImportedSchema(
    Ptr pSchema
);

Adds an imported schema.

addNotation

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!

addType

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!

attributeGroups inline

const Schema::AttributeGroups & attributeGroups() const;

Returns all attribute groups exported by the schema

attributes inline

const Schema::Attributes & attributes() const;

Returns all attributes exported by the schema

blockExtension inline

bool blockExtension() const;

Are extensions forbidden?

blockRestriction inline

bool blockRestriction() const;

Are restrictions forbidden?

blockSubstitution inline

bool blockSubstitution() const;

Is substitution forbidden?

elements inline

const Schema::Elements & elements() const;

Returns all elements exported by the schema

finalExtension inline

bool finalExtension() const;

Is the default for extension final?

finalList inline

bool finalList() const;

Is the default for list final?

finalRestriction inline

bool finalRestriction() const;

Is the default for restriction final?

finalUnion inline

bool finalUnion() const;

Is the default for union final?

fixup

void fixup();

getAttribute

const AbstractAttribute * getAttribute(
    const std::string & name
) const;

Returns a attribute for the given name, returns a null pointer if not found

getAttributeGroup

const AbstractAttributeGroup * getAttributeGroup(
    const std::string & name
) const;

Returns an attributegroup for the given name, returns a null pointer if not found

getElement

const Element * getElement(
    const std::string & name
) const;

Returns an element for the given name, returns a null pointer if not found

getGroup

const Group * getGroup(
    const std::string & name
) const;

Returns a group for the given name, returns a null pointer if not found

getNotation

const Notation * getNotation(
    const std::string & name
) const;

Returns a Notation for the given name, returns a null pointer if not found

getType

const Type * getType(
    const std::string & name
) const;

Returns a type for the given name, returns a null pointer if not found

groups inline

const Schema::Groups & groups() const;

Returns all groups exported by the schema

includeSchema

void includeSchema(
    Ptr pSchema
);

Includes the given schema.

notations inline

const Schema::Notations & notations() const;

Returns all notations of the schema

qualifiedAttributeForm inline

bool qualifiedAttributeForm() const;

Are attributes qualified?

qualifiedElementForm inline

bool qualifiedElementForm() const;

Are elements qualified?

targetNamespace inline

const std::string & targetNamespace() const;

The namespace of the Schema

types inline

const Schema::Types & types() const;

Returns all types of the schema