All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MD_Identification.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 terralib/metadata/iso19115/MD_Identification.cpp
22  */
23 
24 // TerraLib
25 #include "CI_Citation.h"
26 #include "MD_Identification.h"
27 
28 // STL
29 #include <cassert>
30 
32  m_citation(0),
33  m_abstract(abstract),
34  m_status(status)
35 {
36  assert(citation);
37 
38  m_citation = citation;
39 }
40 
42 {
43  if (m_citation)
44  delete m_citation;
45 }
46 
47 const te::md::CI_Citation*
49 {
50  return m_citation;
51 }
52 
53 
54 const std::string&
56 {
57  return m_abstract;
58 }
59 
62 {
63  return m_status;
64 }
65 
66 void
68 {
69  assert(p);
70  m_poc.push_back(p);
71 }
72 
73 //! Returns the resource points of contact.
74 const boost::ptr_vector<te::md::CI_ResponsibleParty>&
76 {
77  return m_poc;
78 }
79 
81 {
82  te::md::CI_Citation* ci = 0;
83  if (m_citation)
84  ci = m_citation->clone();
85 
86  te::md::MD_Identification* id = new MD_Identification(ci, m_abstract, m_status);
87 
88  boost::ptr_vector<te::md::CI_ResponsibleParty>::const_iterator it = m_poc.begin();
89  while (it != m_poc.end())
90  {
91  CI_ResponsibleParty* rp = it->clone();
92  id->addPointOfContact(rp);
93  }
94  return id;
95 }
const std::string & getAbstract() const
Returns the resource abstract.
CI_ResponsibleParty * clone() const
const CI_Citation * getCitation() const
Returns the citation for the metadata.
Identification information contains information to uniquely identify the data.
Provides a standardized method for citing a resource (dataset, feature, source, publication, etc.)
Definition: CI_Citation.h:53
const boost::ptr_vector< CI_ResponsibleParty > & getPointsOfContact() const
Returns the resource points of contact.
void addPointOfContact(CI_ResponsibleParty *p)
Adds a point of contact to the resource.
MD_ProgressCode
status of the dataset or progress of a review
Definition: CodeList.h:459
To support the bibliographic information to reference the resource.
virtual ~MD_Identification()
Destructor.
MD_Identification(CI_Citation *citation, const std::string abstract, MD_ProgressCode status)
Constructor.
Contains the identify of person(s), and/or position, and/or organization(s) associated with the resou...
virtual MD_Identification * clone() const
Gets a copy of this object.
Identification information contains information to uniquely identify the data.
CI_Citation * clone() const
Creates a new copy of this object.
Definition: CI_Citation.cpp:57
te::md::MD_ProgressCode getStatus() const
Returns the resource status code.