Import.h
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 Import.h
22 
23  \brief It models a XML Schema import.
24 */
25 
26 #ifndef __TERRALIB_XSD_INTERNAL_IMPORT_H
27 #define __TERRALIB_XSD_INTERNAL_IMPORT_H
28 
29 // TerraLib
30 #include "Annotated.h"
31 #include "Identifiable.h"
32 
33 // STL
34 #include <string>
35 
36 namespace te
37 {
38  namespace xsd
39  {
40  /*!
41  \class Import
42 
43  \brief It models a XML Schema import.
44 
45  \sa Annotated, Identifiable
46  */
47  class TEXSDEXPORT Import : public Identifiable, public Annotated
48  {
49  public:
50 
51  /*!
52  \brief Constructor.
53 
54  \param id It specifies a unique ID for the element. It can be a NULL value.
55  \param ns The URI of the namespace to import.
56  \param schemaLocation The URI to the schema for the imported namespace.
57  */
58  Import(std::string* ns, std::string* schemaLocation, Annotation* ann = 0, std::string* id = 0);
59 
60  /*!
61  \brief Copy constructor.
62 
63  \param rhs Right-hand-side object.
64 
65  \todo Implement!
66  */
67  Import(const Import& rhs);
68 
69  /*! \brief Destructor. */
70  ~Import();
71 
72  /*!
73  \brief Assignment operator.
74 
75  \param rhs Right-hand-side object.
76 
77  \return A reference to this object.
78 
79  \todo Implement!
80  */
81  Import& operator=(const Import& rhs);
82 
83  /*!
84  \brief It returns the namespace URI of the imported schema.
85 
86  \return The namespace URI.
87  */
88  std::string* getNamespace() const;
89 
90  /*!
91  \brief It returns the location of the referenced schema.
92 
93  \return The schema location.
94  */
95  std::string* getSchemaLocation() const;
96 
97  /*!
98  \brief It sets the namespace URI of the imported schema.
99 
100  \param ns A namespace URI value.
101 
102  \note The Import object will take the ownership of the given pointer.
103  */
104  void setNamespace(std::string* ns);
105 
106  /*!
107  \brief It sets the location of the referenced schema.
108 
109  \param schemaLocation A schema location.
110 
111  \note The Import object will take the ownership of the given pointer.
112  */
113  void setSchemaLocation(std::string* schemaLocation);
114 
115  private:
116 
117  std::string* m_namespace; //!< It specifies the URI of the namespace to import. (Optional)
118  std::string* m_schemaLocation; //!< It specifies the URI to the schema for the imported namespace. (Optional)
119  };
120 
121  } // end namespace xsd
122 } // end namespace te
123 
124 #endif // __TERRALIB_XSD_INTERNAL_IMPORT_H
A base class for XSD classes that may allow annotation.
Definition: Annotated.h:49
It models a XML Schema import.
Definition: Import.h:47
A base class for XSD classes that may allow annotation.
std::string * m_namespace
It specifies the URI of the namespace to import. (Optional)
Definition: Import.h:117
A base class for XSD classes that must provide a unique ID property.
Definition: Identifiable.h:46
URI C++ Library.
A base class for XSD classes that must provide a unique ID property.
#define TEXSDEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:57
std::string * m_schemaLocation
It specifies the URI to the schema for the imported namespace. (Optional)
Definition: Import.h:118
A class that models a XSD annotation element.
Definition: Annotation.h:55