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/Reader.h"
35 #include "../../xml/Writer.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");
virtual void writeStartDocument(const std::string &encoding, const std::string &standalone)
const boost::ptr_vector< CI_ResponsibleParty > & getContacts() const
Gets the metadata contacts.
bool isValid() const
It tells if the rectangle is valid or not.
const MD_Distribution * getDistribution() const
Gets the distribution information.
const std::string & getLanguage() const
Returns metadata language.
const std::string & getStandardVersion() const
Returns the version of the metadata standard/profile used.
const boost::ptr_vector< MD_Format > & getFormats() const
Gets the distribution formats.
Information required to identify a dataset.
const std::string & getOrganizationName() const
Returns the individual name.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
const std::string & getURL() const
Gets an online resource.
long getScale() const
Returns the scale information. If equal to 0 the denominator is not valid.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
Contains the identify of person(s), and/or position, and/or organization(s) associated with the resou...
CI_RoleCode getRoleCode() const
Returns the responsible party role.
Information about the distributor of and the options for obtaining the resource.
te::md::MD_SpatialRepresentationTypeCode getSpatialRepTypeCode() const
Returns the spatial representation type.
const double & getLowerLeftX() const
It returns a constant reference to the x coordinate of the lower left corner.
virtual void writeStartElement(const std::string &qName)
virtual void writeAttribute(const std::string &attName, const std::string &value)
virtual void writeEndElement(const std::string &qName)
const std::string & getTitle() const
Returns the citation title.
const std::vector< std::string > & getLanguages() const
Returns the set of languages associated to the dataset.
MD_CharacterSetCode
name of the character coding standard used in the resource
const boost::gregorian::date & getDateStamp() const
Get metadata date stamp.
Provides a standardized method for citing a resource (dataset, feature, source, publication, etc.)
Root entity which defines metadata for a resource or resources.
MD_TopicCategoryCode
high-level geographic data thematic classification to assist in the grouping and search of available ...
const boost::gregorian::date & getDate() const
Returns the citation date.
te::md::MD_CharacterSetCode getCharset() const
Returns metadata charset.
const std::string & getFileId() const
Returns the unique phrase or string which uniquely identifies the metadata file.
virtual void writeValue(const std::string &value)
const std::string & getIndividualName() const
Returns the individual name.
const std::string & getMetadataURI() const
Returns URI to the metadata.
const std::string & getStandardName() const
Returns the name of the metadata standard/profile used.
const boost::ptr_vector< MD_Identification > & getIdentifications() const
Gets the resources identification associated to the metadata.
CI_DateTypeCode getDateType() const
Returns the citation date type.
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
Identification information contains information to uniquely identify the data.
const te::gm::Envelope & getExtent() const
Returns the set of extents for the dataset.
const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
const std::vector< MD_TopicCategoryCode > & getTopicCategories() const
Return the themes associated to the dataset.
An Envelope defines a 2D rectangular region.
const std::string & getPositionName() const
Returns the position name.
const std::string & getLineage() const
Gets the lineage statemente.
int getReferenceSystem() const
Returns the referency system.
const std::vector< MD_CharacterSetCode > & getCharsetCodes() const
Returns a character coding standard in the dataset.
TEMDEXPORT void Save(const te::md::MD_Metadata *md, te::xml::Writer &writer)
This class models a XML writer object.