te::xsd::Schema Class Reference

A class that models a XML schema (XSD). More...

#include <Schema.h>

Inheritance diagram for te::xsd::Schema:
te::xsd::Identifiable

Public Member Functions

void addAnnotation (Annotation *a)
 
void addAttribute (AbstractAttribute *a)
 
void addAttributeGroup (AttributeGroup *ag)
 
void addComplexType (ComplexType *c)
 
void addElement (Element *e)
 
void addGroup (Group *g)
 
void addImport (Import *i)
 
void addInclude (Include *i)
 
void addNamespace (const std::string &ns, const std::string &nsprefix)
 
void addNotation (Notation *n)
 
void addRedefine (Redefine *r)
 
void addSimpleType (SimpleType *s)
 
const boost::ptr_vector< Annotation > & getAnnotations () const
 
Form getAttributeFormDefault () const
 
const boost::ptr_vector< AttributeGroup > & getAttributeGroups () const
 
const boost::ptr_vector< AbstractAttribute > & getAttributes () const
 
int getBlockDefault () const
 
const boost::ptr_vector< ComplexType > & getComplexTypes () const
 
Form getElementFormDefault () const
 
const boost::ptr_vector< Element > & getElements () const
 
int getFinalDefault () const
 
const boost::ptr_vector< Group > & getGroups () const
 
std::string * getId () const
 It returns a pointer (may be NULL) to the object id. More...
 
const boost::ptr_vector< Import > & getImports () const
 
const boost::ptr_vector< Include > & getIncludes () const
 
const boost::bimap< std::string, std::string > & getNamespaces () const
 
boost::bimap< std::string, std::string > & getNamespaces ()
 
const boost::ptr_vector< Notation > & getNotations () const
 
const boost::ptr_vector< Redefine > & getRedefines () const
 
const boost::ptr_vector< SimpleType > & getSimpleTypes () const
 
const std::string & getTargetNamespace () const
 
const std::string & getVersion () const
 
 Schema (std::string *id)
 
void setAttributeFormDefault (Form f)
 
void setBlockDefault (int bdf)
 
void setElementFormDefault (Form f)
 
void setFinalDefault (int fdf)
 
void setId (std::string *id)
 it sets the id. More...
 
void setTargetNamespace (const std::string &tns)
 
void setVersion (const std::string &v)
 
 ~Schema ()
 

Private Attributes

boost::ptr_vector< Annotationm_annotationVec
 The list of annotation declarations at schema root. More...
 
Form m_attributeFormDefault
 Tells if attributes declared in this schema must use the namespace prefix or not. Default: Unqualified. (Optional) More...
 
boost::ptr_vector< AttributeGroupm_attributeGroupVec
 The list of attributes at schema root. More...
 
boost::ptr_vector< AbstractAttributem_attributeVec
 The list of attributes at schema root. More...
 
int m_blockDefault
 
boost::ptr_vector< ComplexTypem_complexTypeVec
 The list of complex type declarations at schema root. More...
 
Form m_elementFormDefault
 Tells if elements declared in this schema must use the namespace prefix or not. Default: Unqualified. (Optional) More...
 
boost::ptr_vector< Elementm_elementVec
 The list of elements declarations at schema root. More...
 
int m_finalDefault
 
boost::ptr_vector< Groupm_groupVec
 The list of group declarations at schema root. More...
 
boost::ptr_vector< Importm_importVec
 The list of import declarations at schema root. More...
 
boost::ptr_vector< Includem_includeVec
 The list of include declarations at schema root. More...
 
boost::ptr_vector< Notationm_notationVec
 The list of notation declarations at schema root. More...
 
boost::ptr_vector< Redefinem_redefineVec
 The list of redefine declarations at schema root. More...
 
boost::ptr_vector< SimpleTypem_simpleTypeVec
 The list of simple type declarations at schema root. More...
 
std::string m_targetNamespace
 The URI namespace of the schema. (Mandatory) More...
 
std::string m_version
 The schema version. (Optional) More...
 
boost::bimap< std::string, std::string > m_xmlns
 A list of one or more namespaces for use in this schema. Mandatory only if attributeFormDefault or elementFormDefault is set to Qualified. More...
 

Detailed Description

A class that models a XML schema (XSD).

See also
Identifiable, Include, Import, Redefine, Annotation, SimpleType, ComplexType, Group, AttributeGroup, Element, Attribute, Notation

Definition at line 63 of file Schema.h.

Constructor & Destructor Documentation

te::xsd::Schema::Schema ( std::string *  id)

Definition at line 32 of file Schema.cpp.

te::xsd::Schema::~Schema ( )

Definition at line 41 of file Schema.cpp.

Member Function Documentation

void te::xsd::Schema::addAnnotation ( Annotation a)

Definition at line 120 of file Schema.cpp.

References m_annotationVec.

void te::xsd::Schema::addAttribute ( AbstractAttribute a)

Definition at line 145 of file Schema.cpp.

References m_attributeVec.

void te::xsd::Schema::addAttributeGroup ( AttributeGroup ag)

Definition at line 140 of file Schema.cpp.

References m_attributeGroupVec.

void te::xsd::Schema::addComplexType ( ComplexType c)

Definition at line 130 of file Schema.cpp.

References m_complexTypeVec.

void te::xsd::Schema::addElement ( Element e)

Definition at line 150 of file Schema.cpp.

References m_elementVec.

void te::xsd::Schema::addGroup ( Group g)

Definition at line 135 of file Schema.cpp.

References m_groupVec.

void te::xsd::Schema::addImport ( Import i)

Definition at line 110 of file Schema.cpp.

References m_importVec.

void te::xsd::Schema::addInclude ( Include i)

Definition at line 105 of file Schema.cpp.

References m_includeVec.

void te::xsd::Schema::addNamespace ( const std::string &  ns,
const std::string &  nsprefix 
)

Definition at line 100 of file Schema.cpp.

References m_xmlns.

void te::xsd::Schema::addNotation ( Notation n)

Definition at line 155 of file Schema.cpp.

References m_notationVec.

void te::xsd::Schema::addRedefine ( Redefine r)

Definition at line 115 of file Schema.cpp.

References m_redefineVec.

void te::xsd::Schema::addSimpleType ( SimpleType s)

Definition at line 125 of file Schema.cpp.

References m_simpleTypeVec.

const boost::ptr_vector< te::xsd::Annotation > & te::xsd::Schema::getAnnotations ( ) const

Definition at line 60 of file Schema.cpp.

References m_annotationVec.

Form te::xsd::Schema::getAttributeFormDefault ( ) const
inline

Definition at line 71 of file Schema.h.

const boost::ptr_vector< te::xsd::AttributeGroup > & te::xsd::Schema::getAttributeGroups ( ) const

Definition at line 80 of file Schema.cpp.

References m_attributeGroupVec.

const boost::ptr_vector< te::xsd::AbstractAttribute > & te::xsd::Schema::getAttributes ( ) const

Definition at line 85 of file Schema.cpp.

References m_attributeVec.

int te::xsd::Schema::getBlockDefault ( ) const
inline

Definition at line 79 of file Schema.h.

const boost::ptr_vector< te::xsd::ComplexType > & te::xsd::Schema::getComplexTypes ( ) const

Definition at line 70 of file Schema.cpp.

References m_complexTypeVec.

Form te::xsd::Schema::getElementFormDefault ( ) const
inline

Definition at line 75 of file Schema.h.

const boost::ptr_vector< te::xsd::Element > & te::xsd::Schema::getElements ( ) const

Definition at line 90 of file Schema.cpp.

References m_elementVec.

int te::xsd::Schema::getFinalDefault ( ) const
inline

Definition at line 83 of file Schema.h.

const boost::ptr_vector< te::xsd::Group > & te::xsd::Schema::getGroups ( ) const

Definition at line 75 of file Schema.cpp.

References m_groupVec.

std::string * te::xsd::Identifiable::getId ( ) const
inherited

It returns a pointer (may be NULL) to the object id.

Definition at line 35 of file Identifiable.cpp.

References te::xsd::Identifiable::m_id.

const boost::ptr_vector< te::xsd::Import > & te::xsd::Schema::getImports ( ) const

Definition at line 50 of file Schema.cpp.

References m_importVec.

const boost::ptr_vector< te::xsd::Include > & te::xsd::Schema::getIncludes ( ) const

Definition at line 45 of file Schema.cpp.

References m_includeVec.

const boost::bimap<std::string, std::string>& te::xsd::Schema::getNamespaces ( ) const
inline

Definition at line 95 of file Schema.h.

boost::bimap<std::string, std::string>& te::xsd::Schema::getNamespaces ( )
inline

Definition at line 97 of file Schema.h.

const boost::ptr_vector< te::xsd::Notation > & te::xsd::Schema::getNotations ( ) const

Definition at line 95 of file Schema.cpp.

References m_notationVec.

const boost::ptr_vector< te::xsd::Redefine > & te::xsd::Schema::getRedefines ( ) const

Definition at line 55 of file Schema.cpp.

References m_redefineVec.

const boost::ptr_vector< te::xsd::SimpleType > & te::xsd::Schema::getSimpleTypes ( ) const

Definition at line 65 of file Schema.cpp.

References m_simpleTypeVec.

const std::string& te::xsd::Schema::getTargetNamespace ( ) const
inline

Definition at line 87 of file Schema.h.

const std::string& te::xsd::Schema::getVersion ( ) const
inline

Definition at line 91 of file Schema.h.

void te::xsd::Schema::setAttributeFormDefault ( Form  f)
inline

Definition at line 73 of file Schema.h.

void te::xsd::Schema::setBlockDefault ( int  bdf)
inline

Definition at line 81 of file Schema.h.

void te::xsd::Schema::setElementFormDefault ( Form  f)
inline

Definition at line 77 of file Schema.h.

void te::xsd::Schema::setFinalDefault ( int  fdf)
inline

Definition at line 85 of file Schema.h.

void te::xsd::Identifiable::setId ( std::string *  id)
inherited

it sets the id.

Parameters
idThe id to be associated to the object. It will take the ownership of the given string.

Definition at line 29 of file Identifiable.cpp.

References te::xsd::Identifiable::m_id.

Referenced by te::xsd::serialize::ReadIdentifiable().

void te::xsd::Schema::setTargetNamespace ( const std::string &  tns)
inline

Definition at line 89 of file Schema.h.

void te::xsd::Schema::setVersion ( const std::string &  v)
inline

Definition at line 93 of file Schema.h.

Member Data Documentation

boost::ptr_vector<Annotation> te::xsd::Schema::m_annotationVec
private

The list of annotation declarations at schema root.

Definition at line 161 of file Schema.h.

Referenced by addAnnotation(), and getAnnotations().

Form te::xsd::Schema::m_attributeFormDefault
private

Tells if attributes declared in this schema must use the namespace prefix or not. Default: Unqualified. (Optional)

Definition at line 147 of file Schema.h.

boost::ptr_vector<AttributeGroup> te::xsd::Schema::m_attributeGroupVec
private

The list of attributes at schema root.

Definition at line 165 of file Schema.h.

Referenced by addAttributeGroup(), and getAttributeGroups().

boost::ptr_vector<AbstractAttribute> te::xsd::Schema::m_attributeVec
private

The list of attributes at schema root.

Definition at line 167 of file Schema.h.

Referenced by addAttribute(), and getAttributes().

int te::xsd::Schema::m_blockDefault
private

Definition at line 150 of file Schema.h.

boost::ptr_vector<ComplexType> te::xsd::Schema::m_complexTypeVec
private

The list of complex type declarations at schema root.

Definition at line 163 of file Schema.h.

Referenced by addComplexType(), and getComplexTypes().

Form te::xsd::Schema::m_elementFormDefault
private

Tells if elements declared in this schema must use the namespace prefix or not. Default: Unqualified. (Optional)

Definition at line 148 of file Schema.h.

boost::ptr_vector<Element> te::xsd::Schema::m_elementVec
private

The list of elements declarations at schema root.

Definition at line 166 of file Schema.h.

Referenced by addElement(), and getElements().

int te::xsd::Schema::m_finalDefault
private

Definition at line 151 of file Schema.h.

boost::ptr_vector<Group> te::xsd::Schema::m_groupVec
private

The list of group declarations at schema root.

Definition at line 164 of file Schema.h.

Referenced by addGroup(), and getGroups().

boost::ptr_vector<Import> te::xsd::Schema::m_importVec
private

The list of import declarations at schema root.

Definition at line 159 of file Schema.h.

Referenced by addImport(), and getImports().

boost::ptr_vector<Include> te::xsd::Schema::m_includeVec
private

The list of include declarations at schema root.

Definition at line 158 of file Schema.h.

Referenced by addInclude(), and getIncludes().

boost::ptr_vector<Notation> te::xsd::Schema::m_notationVec
private

The list of notation declarations at schema root.

Definition at line 168 of file Schema.h.

Referenced by addNotation(), and getNotations().

boost::ptr_vector<Redefine> te::xsd::Schema::m_redefineVec
private

The list of redefine declarations at schema root.

Definition at line 160 of file Schema.h.

Referenced by addRedefine(), and getRedefines().

boost::ptr_vector<SimpleType> te::xsd::Schema::m_simpleTypeVec
private

The list of simple type declarations at schema root.

Definition at line 162 of file Schema.h.

Referenced by addSimpleType(), and getSimpleTypes().

std::string te::xsd::Schema::m_targetNamespace
private

The URI namespace of the schema. (Mandatory)

Definition at line 153 of file Schema.h.

std::string te::xsd::Schema::m_version
private

The schema version. (Optional)

Definition at line 154 of file Schema.h.

boost::bimap<std::string, std::string> te::xsd::Schema::m_xmlns
private

A list of one or more namespaces for use in this schema. Mandatory only if attributeFormDefault or elementFormDefault is set to Qualified.

Definition at line 156 of file Schema.h.

Referenced by addNamespace().


The documentation for this class was generated from the following files: