27 #include "../../../common/Translator.h"
28 #include "../../../metadata/iso19115/CI_Citation.h"
29 #include "../../../metadata/iso19115/CI_ResponsibleParty.h"
30 #include "../../../metadata/iso19115/MD_Format.h"
31 #include "../../../metadata/iso19115/MD_Metadata.h"
32 #include "../../../metadata/iso19115/MD_Distribution.h"
33 #include "../../../srs/Config.h"
34 #include "../../../xml/AbstractWriter.h"
35 #include "../../../xml/Reader.h"
42 #include <boost/foreach.hpp>
43 #include <boost/format.hpp>
51 writer.
writeAttribute(
"xmlns:gco",
"http://www.isotc211.org/2005/gco");
52 writer.
writeAttribute(
"xmlns:gmd",
"http://www.isotc211.org/2005/gmd");
54 writer.
writeAttribute(
"xmlns:gts",
"http://www.isotc211.org/2005/gts");
55 writer.
writeAttribute(
"xmlns:xsi",
"http://www.w3.org/2001/XMLSchema-instance");
83 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#MD_CharacterSetCode");
97 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode");
110 const boost::ptr_vector<te::md::CI_ResponsibleParty>& mycontacts = md->
getContacts();
111 if (!mycontacts.empty())
113 for (boost::ptr_vector<te::md::CI_ResponsibleParty>::const_iterator it = mycontacts.begin();
114 it != mycontacts.end(); ++it)
172 scode= boost::str(boost::format(
"urn:ogc:def:crs:EPSG::%d") % md->
getReferenceSystem());
187 for (boost::ptr_vector<te::md::MD_Identification>::const_iterator itd = ids.begin();
188 itd != ids.end(); ++itd)
201 const boost::ptr_vector<te::md::MD_Format>& fmts = dist->
getFormats();
205 for (boost::ptr_vector<te::md::MD_Format>::const_iterator itf = fmts.begin(); itf != fmts.end(); ++itf)
211 if (!itf->m_name.empty())
223 if (!itf->m_version.empty())
237 if (!dist->
getURL().empty())
265 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode");
329 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#CI_RoleCode");
356 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#MD_ProgressCode");
363 const boost::ptr_vector<te::md::CI_ResponsibleParty>& ctcs =
id.getPointsOfContact();
367 for (boost::ptr_vector<te::md::CI_ResponsibleParty>::const_iterator it = ctcs.begin();
368 it != ctcs.end(); ++it)
378 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#MD_SpatialRepresentationTypeCode");
387 const std::vector<std::string>& mlang = did->
getLanguages();
390 BOOST_FOREACH(
const std::string& lang, mlang)
393 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#LanguageCode");
405 const std::vector<te::md::MD_CharacterSetCode>& mchars = did->
getCharsetCodes();
411 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#MD_CharacterSetCode");
429 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#MD_TopicCategoryCode");
539 writer.
writeAttribute(
"codeList",
"http://www.isotc211.org/2005/resources/codeList.xml#CI_DateTypeCode");
const std::string & getOrganizationName() const
Returns the individual name.
const boost::gregorian::date & getDate() const
Returns the citation date.
virtual void writeStartElement(const std::string &qName)=0
Information about the distributor of and the options for obtaining the resource.
const std::vector< MD_CharacterSetCode > & getCharsetCodes() const
Returns a character coding standard in the dataset.
virtual void writeValue(const std::string &value)=0
const boost::ptr_vector< MD_Format > & getFormats() const
Gets the distribution formats.
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
const std::vector< std::string > & getLanguages() const
Returns the set of languages associated to the dataset.
const std::vector< MD_TopicCategoryCode > & getTopicCategories() const
Return the themes associated to the dataset.
long getScale() const
Returns the scale information. If equal to 0 the denominator is not valid.
const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
This class models a XML writer object.
Provides a standardized method for citing a resource (dataset, feature, source, publication, etc.)
te::md::MD_SpatialRepresentationTypeCode getSpatialRepTypeCode() const
Returns the spatial representation type.
const std::string & getTitle() const
Returns the citation title.
const std::string & getPositionName() const
Returns the position name.
const std::string & getIndividualName() const
Returns the individual name.
CI_RoleCode getRoleCode() const
Returns the responsible party role.
An Envelope defines a 2D rectangular region.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
Information required to identify a dataset.
const te::gm::Envelope & getExtent() const
Returns the set of extents for the dataset.
TEMDEXPORT void Save(const te::md::MD_Metadata *md, te::xml::AbstractWriter &writer)
virtual void writeAttribute(const std::string &attName, const std::string &value)=0
const double & getLowerLeftX() const
It returns a constant reference to the x coordinate of the lower left corner.
CI_DateTypeCode getDateType() const
Returns the citation date type.
virtual void writeEndElement(const std::string &qName)=0
Contains the identify of person(s), and/or position, and/or organization(s) associated with the resou...
virtual void writeStartDocument(const std::string &encoding, const std::string &standalone)=0
Identification information contains information to uniquely identify the data.
const std::string & getURL() const
Gets an online resource.
MD_CharacterSetCode
name of the character coding standard used in the resource
MD_TopicCategoryCode
high-level geographic data thematic classification to assist in the grouping and search of available ...
bool isValid() const
It tells if the rectangle is valid or not.