All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MetadataExtractor.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2001-2013 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/MetadataExtractor.cpp
22  */
23 
24 // TerraLib
25 #include "../dataaccess/dataset/DataSet.h"
26 #include "../dataaccess/dataset/DataSetType.h"
27 #include "../geometry/Envelope.h"
28 #include "../geometry/GeometryProperty.h"
29 #include "Config.h"
30 #include "iso19115/CI_Citation.h"
31 #include "iso19115/MD_Metadata.h"
32 #include "MetadataExtractor.h"
33 
34 
35 // STL
36 #include <cassert>
37 #include <string>
38 
39 // Boost
40 #include <boost/lexical_cast.hpp>
41 #include <boost/date_time/gregorian/gregorian.hpp>
42 
44 {
45  //assert(d);
46 
47  //te::md::MD_Metadata* md = new te::md::MD_Metadata();
48  //md->setStandardInfo("iso19115", "2003");
49  //md->setDateStamp(boost::gregorian::day_clock::local_day());
50  //
51  //const te::da::DataSetType* dst = d->getType();
52  //md->setFileId(boost::lexical_cast<std::string>(dst->getId()));
53  //
54  //te::md::CI_Citation* ct = new te::md::CI_Citation(dst->getTitle(),boost::gregorian::day_clock::local_day(),te::md::CI_creation);
55  //
56  //te::md::MD_DataIdentification* id = new te::md::MD_DataIdentification(ct,"",te::md::MD_completed, "pt; BR");
57  //
58  //if(dst->hasGeom())
59  //{
60  // te::gm::GeometryProperty* gp = dst->getDefaultGeomProperty();
61  // md->setReferenceSystem(gp->getSRID());
62  // id->addGeographicBBoxExt(const_cast<te::da::DataSet*>(d)->getExtent(gp));
63  //}
64  //return md;
65  return 0;
66 }
67 
68 
TEMDEXPORT MD_Metadata * Extract(const te::da::DataSet *d)
Extract some metadata from a layer.
To support the bibliographic information to reference the resource.
Root entity which defines metadata for a resource or resources.
Definition: MD_Metadata.h:58
Configuration flags for the Metadata support of TerraLib.
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:111