All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Redefine.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file Redefine.cpp
22 
23  \brief It models a XML Schema redefine.
24 */
25 
26 // TerraLib
27 #include "Annotation.h"
28 #include "AttributeGroup.h"
29 #include "Group.h"
30 #include "Redefine.h"
31 #include "Type.h"
32 
33 te::xsd::Redefine::Redefine(const std::string& schemaLocation, std::string* id)
34  : Identifiable(id),
35  m_schemaLocation(schemaLocation)
36 {
37 }
38 
40  : Identifiable(rhs),
41  m_schemaLocation("")
42 {
43 }
44 
46 {
47 }
48 
50 {
51  return *this;
52 }
53 
54 const std::string& te::xsd::Redefine::getSchemaLocation() const
55 {
56  return m_schemaLocation;
57 }
58 
59 const boost::ptr_vector<te::xsd::Annotation>& te::xsd::Redefine::getAnnotations() const
60 {
61  return m_annotationVec;
62 }
63 
64 const boost::ptr_vector<te::xsd::Type>& te::xsd::Redefine::getTypes() const
65 {
66  return m_typeVec;
67 }
68 
69 const boost::ptr_vector<te::xsd::Group>& te::xsd::Redefine::getGroups() const
70 {
71  return m_groupVec;
72 }
73 
74 const boost::ptr_vector<te::xsd::AttributeGroup>& te::xsd::Redefine::getAttributeGroups() const
75 {
76  return m_attributeGroupVec;
77 }
78 
79 void te::xsd::Redefine::setSchemaLocation(const std::string& schemaLocation)
80 {
81  m_schemaLocation = schemaLocation;
82 }
83 
85 {
86  m_annotationVec.push_back(ann);
87 }
88 
90 {
91  m_typeVec.push_back(t);
92 }
93 
95 {
96  m_groupVec.push_back(g);
97 }
98 
100 {
101  m_attributeGroupVec.push_back(ag);
102 }
It models a XML Schema attribute group.
An abstract class for modeling the definition of a new XML Schema Type.
This class models a group element in a XML Schema.
void addAttributeGroup(AttributeGroup *ag)
It inserts an attribute group into the redefine.
Definition: Redefine.cpp:99
const boost::ptr_vector< AttributeGroup > & getAttributeGroups() const
It returns the list of attribute group declarations at redefine element.
Definition: Redefine.cpp:74
const std::string & getSchemaLocation() const
It returns the location of the redefined schema.
Definition: Redefine.cpp:54
It models a XML Schema redefine.
Definition: Redefine.h:52
A class that models a XSD annotation element.
Redefine(const std::string &schemaLocation, std::string *id=0)
Constructor.
Definition: Redefine.cpp:33
void addGroup(Group *g)
It inserts a group into the redefine.
Definition: Redefine.cpp:94
Redefine & operator=(const Redefine &rhs)
Assignment operator.
Definition: Redefine.cpp:49
void addAnnotation(Annotation *ann)
It inserts an annotation into the redefine.
Definition: Redefine.cpp:84
It models a XML Schema redefine.
void setSchemaLocation(const std::string &schemaLocation)
It sets the location of the redefined schema.
Definition: Redefine.cpp:79
A base class for XSD classes that must provide a unique ID property.
Definition: Identifiable.h:46
~Redefine()
Destructor.
Definition: Redefine.cpp:45
void addType(Type *t)
It inserts a type into the redefine.
Definition: Redefine.cpp:89
const boost::ptr_vector< Type > & getTypes() const
It returns the list of simple and complex types at redefine element.
Definition: Redefine.cpp:64
const boost::ptr_vector< Group > & getGroups() const
It returns the list of group declarations at redefine element.
Definition: Redefine.cpp:69
A class that models a XSD annotation element.
Definition: Annotation.h:55
This class models a group element in a XML Schema.
Definition: Group.h:52
An abstract class for modeling the definition of a new XML Schema Type.
Definition: Type.h:65
const boost::ptr_vector< Annotation > & getAnnotations() const
It returns the list of annotations at redefine element.
Definition: Redefine.cpp:59