+ e = e ? XMLHelper::getFirstChildElement(e, ContactPerson::LOCAL_NAME) : nullptr;
+ while (e) {
+ string id(XMLHelper::getAttrString(e, nullptr, _id));
+ const XMLCh* type = e->getAttributeNS(nullptr, ContactPerson::CONTACTTYPE_ATTRIB_NAME);
+ if (!id.empty() && type && *type) {
+ boost::shared_ptr<AttributeDecoder> decoder(SPConfig::getConfig().AttributeDecoderManager.newPlugin(DOMAttributeDecoderType, e));
+ m_contacts.push_back(contact_tuple_t(id, type, decoder));
+ }
+ e = XMLHelper::getNextSiblingElement(e, ContactPerson::LOCAL_NAME);
+ }
+}
+
+void MetadataExtractor::getAttributeIds(vector<string>& attributes) const
+{
+ if (!m_attributeProfiles.empty())
+ attributes.push_back(m_attributeProfiles);
+ if (!m_errorURL.empty())
+ attributes.push_back(m_errorURL);
+ if (!m_displayName.empty())
+ attributes.push_back(m_displayName);
+ if (!m_description.empty())
+ attributes.push_back(m_description);
+ if (!m_informationURL.empty())
+ attributes.push_back(m_informationURL);
+ if (!m_privacyURL.empty())
+ attributes.push_back(m_privacyURL);
+ if (!m_orgName.empty())
+ attributes.push_back(m_orgName);
+ if (!m_orgDisplayName.empty())
+ attributes.push_back(m_orgDisplayName);
+ if (!m_orgURL.empty())
+ attributes.push_back(m_orgURL);
+ static void (vector<string>::* push_back)(const string&) = &vector<string>::push_back;
+ static const string& (contact_tuple_t::* tget)() const = &contact_tuple_t::get<0>;
+ for_each(m_contacts.begin(), m_contacts.end(), boost::bind(push_back, boost::ref(attributes), boost::bind(tget, _1)));