Loading...
Searching...
No Matches
MD_Metadata.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 terralib/metadata/iso19115/MD_Metadata.h
22
23 \brief
24 */
25
26#ifndef __TERRALIB_METADATA_INTERNAL_ISO19115_MD_METADATA_H
27#define __TERRALIB_METADATA_INTERNAL_ISO19115_MD_METADATA_H
28
29// TerraLib
30#include "../Config.h"
31#include "CodeList.h"
32#include "CI_ResponsibleParty.h"
34
35// STL
36#include <string>
37
38// Boost
39#include <boost/date_time/gregorian/gregorian.hpp>
40#include <boost/ptr_container/ptr_vector.hpp>
41#include <boost/noncopyable.hpp>
42
43namespace te
44{
45 namespace md
46 {
47 class MD_Distribution;
48
49 /*!
50 \class MD_Metadata
51
52 \brief Root entity which defines metadata for a resource or resources.
53
54 \todo Include the members MD_ApplicationSchemaInformation, MD_PortrayalCatalogueReference, MD_ContentInformation MD_MetadataExtensionInformation (NOT IMPLEMENTED YET)
55
56 \sa
57 */
58 class TEMDEXPORT MD_Metadata : public boost::noncopyable
59 {
60 public:
61
62 /*!
63 \brief Constructor.
64 \param contact Pointer to a metadata responsible part or point of contact. Class takes pointer ownership.
65 */
67
68 //! Destructor.
70
71 /*!
72 \brief Sets a unique phrase or string which uniquely identifies the metadata file.
73 \param fileid The file identifier. Do not pass empty string.
74 This should identify the metadata.
75 Best practice: this should be an uuid.
76 */
77 void setFileId(const std::string& fileid);
78
79 //! Returns the unique phrase or string which uniquely identifies the metadata file.
80 const std::string& getFileId() const;
81
82 /*!
83 \brief Sets URI to the metadata .
84 \param mdURI The URI to the metada. Do not pass empty string.
85 This is NOT the place to link to the dataset. This should link to the metadata.
86 */
87 void setMetadataURI(const std::string& mdURI);
88
89 //! Returns URI to the metadata
90 const std::string& getMetadataURI() const;
91
92 /*!
93 \brief Sets the language of the metadata.
94 \param lang Language of the metadata. Do not pass empty string.
95 The language information should be composed of an ISO639-2/T three-letter language code and an ISO3166-1 three-letter country code.
96 */
97 void setLanguage(const std::string& lang);
98
99 //! Returns metadata language.
100 const std::string& getLanguage() const;
101
102 //! Sets the charset code used in the metadata
104
105 //! Returns metadata charset.
107
108 /*!
109 \brief Sets the name of the metadata standard/profile used.
110 \param sname The name of the metadata standard/profile used. Do not pass null.
111 \param sname The version of the metadata standard/profile used. Do not pass empty string.
112 */
113 void setStandardInfo(const std::string& sname, const std::string& sversion);
114
115 //! Returns the name of the metadata standard/profile used.
116 const std::string& getStandardName() const;
117
118 //! Returns the version of the metadata standard/profile used.
119 const std::string& getStandardVersion() const;
120
121 /*!
122 \brief Adds a dataset identification to the metadata.
123 \param mdid Pointer to resource identification. Class takes pointer ownership. Do not pass null.
124 */
126
127 //! Gets the resources identification associated to the metadata.
128 const boost::ptr_vector<MD_Identification>& getIdentifications() const;
129
130 /*!
131 \brief Adds a contact information to the metadata.
132 \param mdid Pointer to resource identification. Class takes pointer ownership. Do not pass null.
133 */
135
136 //! Gets the metadata contacts.
137 const boost::ptr_vector<CI_ResponsibleParty>& getContacts() const;
138
139 //! Sets the referency system.
140 void setReferenceSystem(int srid);
141
142 //! Returns the referency system.
144
145 //! Set metadata date stamp.
146 void setDateStamp(const boost::gregorian::date& date);
147
148 //! Get metadata date stamp.
149 const boost::gregorian::date& getDateStamp() const;
150
151 /*!
152 \brief Sets a distribution information to the metadata.
153 \param d Pointer to a distribution info. Class takes pointer ownership. Do not pass null.
154 */
156
157 //! Gets the distribution information.
159
160 /*!
161 \brief Sets the lineage statement.
162 General explanation of the data producer’s knowledge of the dataset lineage. This is related to
163 data quality.
164 \param stm The lineage statement. Do not pass null.
165 */
166 void setLineage(const std::string& stm);
167
168 //! Gets the lineage statemente.
169 const std::string& getLineage() const;
170
171 private:
172
173 std::string m_fileIdentifier;
174
175 std::string m_metadataURI;
176
177 std::string m_language;
178
180
181 std::string m_standardName;
182 std::string m_standardVersion;
183
184 boost::ptr_vector<CI_ResponsibleParty> m_contact;
185
186 boost::gregorian::date m_dateStamp;
187
188 boost::ptr_vector<MD_Identification> m_identificationInfo;
189
191
193
194 std::string m_lineage;
195
196 };
197 } // end namespace md
198} // end namespace te
199
200#endif // __TERRALIB_METADATA_INTERNAL_ISO19115_MD_METADATA_H
Information required to identify a dataset.
Contains the identify of person(s), and/or position, and/or organization(s) associated with the resou...
Information about the distributor of and the options for obtaining the resource.
Identification information contains information to uniquely identify the data.
Root entity which defines metadata for a resource or resources.
Definition: MD_Metadata.h:59
void addIdentification(MD_Identification *mdid)
Adds a dataset identification to the metadata.
te::md::MD_CharacterSetCode getCharset() const
Returns metadata charset.
const MD_Distribution * getDistribution() const
Gets the distribution information.
void addContact(CI_ResponsibleParty *contact)
Adds a contact information to the metadata.
boost::ptr_vector< CI_ResponsibleParty > m_contact
Definition: MD_Metadata.h:184
boost::gregorian::date m_dateStamp
Definition: MD_Metadata.h:186
~MD_Metadata()
Destructor.
void setDistribution(MD_Distribution *d)
Sets a distribution information to the metadata.
const std::string & getFileId() const
Returns the unique phrase or string which uniquely identifies the metadata file.
void setReferenceSystem(int srid)
Sets the referency system.
const std::string & getLanguage() const
Returns metadata language.
const std::string & getMetadataURI() const
Returns URI to the metadata.
std::string m_standardName
Definition: MD_Metadata.h:181
std::string m_fileIdentifier
Definition: MD_Metadata.h:173
void setMetadataURI(const std::string &mdURI)
Sets URI to the metadata .
const std::string & getStandardName() const
Returns the name of the metadata standard/profile used.
MD_Distribution * m_distribution
Definition: MD_Metadata.h:192
const boost::ptr_vector< CI_ResponsibleParty > & getContacts() const
Gets the metadata contacts.
std::string m_metadataURI
Definition: MD_Metadata.h:175
const boost::gregorian::date & getDateStamp() const
Get metadata date stamp.
int getReferenceSystem() const
Returns the referency system.
void setLanguage(const std::string &lang)
Sets the language of the metadata.
const boost::ptr_vector< MD_Identification > & getIdentifications() const
Gets the resources identification associated to the metadata.
boost::ptr_vector< MD_Identification > m_identificationInfo
Definition: MD_Metadata.h:188
void setCharset(MD_CharacterSetCode chaset)
Sets the charset code used in the metadata.
MD_CharacterSetCode m_characterSet
Definition: MD_Metadata.h:179
std::string m_language
Definition: MD_Metadata.h:177
std::string m_lineage
Definition: MD_Metadata.h:194
const std::string & getLineage() const
Gets the lineage statemente.
MD_Metadata(CI_ResponsibleParty *contact=0)
Constructor.
void setDateStamp(const boost::gregorian::date &date)
Set metadata date stamp.
void setLineage(const std::string &stm)
Sets the lineage statement. General explanation of the data producer’s knowledge of the dataset linea...
std::string m_standardVersion
Definition: MD_Metadata.h:182
void setFileId(const std::string &fileid)
Sets a unique phrase or string which uniquely identifies the metadata file.
void setStandardInfo(const std::string &sname, const std::string &sversion)
Sets the name of the metadata standard/profile used.
const std::string & getStandardVersion() const
Returns the version of the metadata standard/profile used.
MD_CharacterSetCode
name of the character coding standard used in the resource
Definition: CodeList.h:205
TerraLib.
#define TEMDEXPORT
Definition: Config.h:61