Documentation.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 Documentation.h
22 
23  \brief A class that models a documentation element used to enter text comments in annotations.
24 */
25 
26 #ifndef __TERRALIB_XSD_INTERNAL_DOCUMENTATION_H
27 #define __TERRALIB_XSD_INTERNAL_DOCUMENTATION_H
28 
29 // TerraLib
30 #include "AnnotationItem.h"
31 
32 // STL
33 #include <string>
34 
35 namespace te
36 {
37  namespace xsd
38  {
39  /*!
40  \class Documentation
41 
42  \brief A class that models a documentation element used to enter text comments in annotations.
43 
44  \sa Annotation, AnnotationItem, AppInfo
45 
46  \note Parent element: Annotation.
47  */
49  {
50  public:
51 
52  /*!
53  \brief Constructor.
54 
55  \param value The descriptive information. (Required)
56  \param source An URI that specifies the source of the information.
57  \param lang The language of the information.
58 
59  \note The Documentation object will take the ownership of the pointers source, lang and value.
60  */
61  Documentation(std::string* value, std::string* source = 0, std::string* lang = 0);
62 
63  /*!
64  \brief Copy constructor.
65 
66  \param rhs Right-hand-side object.
67  */
68  Documentation(const Documentation& rhs);
69 
70  /*! \brief Destructor. */
71  ~Documentation();
72 
73  /*!
74  \brief Assignment operator.
75 
76  \param rhs Right-hand-side object.
77 
78  \return A reference to this object.
79  */
80  Documentation& operator=(const Documentation& rhs);
81 
82  /*!
83  \brief It returns the language used to code the annotation.
84 
85  \return The language used to code the annotation.
86  */
87  std::string* getLang() const;
88 
89  /*!
90  \brief It returns the URI that specifies the source of the application information.
91 
92  \return The URI.
93  */
94  std::string* getSource() const;
95 
96  /*!
97  \brief It returns the information associated to the annotation.
98 
99  \return The information associated to the annotation.
100  */
101  std::string* getValue() const;
102 
103  /*!
104  \brief It sets the information associated to the annotation.
105 
106  \param doc A human readable material. This parameter can not be NULL.
107 
108  \note The Documentation object will take the ownership of the given pointer.
109  */
110  void setValue(std::string* doc);
111 
112  /*!
113  \brief It sets the language of the information.
114 
115  \param lang The language of the information.
116 
117  \note The Documentation object will take the ownership of the given pointer.
118  */
119  void setLang(std::string* lang);
120 
121  /*!
122  \brief It sets the URI reference that specifies the source of the information.
123 
124  \param source The URI.
125 
126  \note The Documentation object will take the ownership of the given pointer.
127  */
128  void setSource(std::string* source);
129 
130  AnnotationItem* clone() const;
131 
132  private:
133 
134  std::string* m_value; //!< A human readable text. (Required)
135  std::string* m_source; //!< An URI reference that specifies the source of the information. (Optional)
136  std::string* m_lang; //!< The language of the information. Example: "en". (Optional)
137  };
138 
139  } // end namespace xsd
140 } // end namespace te
141 
142 #endif // __TERRALIB_XSD_INTERNAL_DOCUMENTATION_H
A base class for XSD annotation elements.
std::string * m_source
An URI reference that specifies the source of the information. (Optional)
std::string * m_value
A human readable text. (Required)
std::string * m_lang
The language of the information. Example: "en". (Optional)
A class that models a documentation element used to enter text comments in annotations.
Definition: Documentation.h:48
URI C++ Library.
#define TEXSDEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:57
A base class for XSD annotation elements.