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 Aliases

AttributeGroups

using AttributeGroups = std::map < std::string, AbstractAttributeGroup::Ptr >;

Attributes

using Attributes = std::map < std::string, AbstractAttribute::Ptr >;

ElementPtr

using ElementPtr = Element::Ptr;

Elements

using Elements = std::map < std::string, ElementPtr >;

Groups

using Groups = std::map < std::string, Group::Ptr >;

Notations

using Notations = std::map < std::string, Notation::Ptr >;

Ptr

using Ptr = Poco::AutoPtr < Schema >;

Schemas

using Schemas = std::vector < Ptr >;

TypePtr

using TypePtr = Type::Ptr;

Types

using Types = std::map < std::string, TypePtr >;

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

Securely control IoT edge devices from anywhere   Connect a Device