+
+void XMLMetadataProvider::index(time_t& validUntil)
+{
+ clearDescriptorIndex();
+ EntitiesDescriptor* group = dynamic_cast<EntitiesDescriptor*>(m_object.get());
+ if (group) {
+ indexGroup(group, validUntil);
+ return;
+ }
+ indexEntity(dynamic_cast<EntityDescriptor*>(m_object.get()), validUntil);
+}
+
+void XMLMetadataProvider::outputStatus(ostream& os) const
+{
+ os << "<MetadataProvider";
+
+ if (getId() && *getId()) {
+ os << " id='"; xml_encode(os, getId()); os << "'";
+ }
+
+ if (!m_source.empty()) {
+ os << " source='"; xml_encode(os, m_source.c_str()); os << "'";
+ }
+
+ if (m_lastUpdate > 0) {
+ DateTime ts(m_lastUpdate);
+ ts.parseDateTime();
+ auto_ptr_char timestamp(ts.getFormattedString());
+ os << " lastUpdate='" << timestamp.get() << "'";
+ }
+
+ if (!m_local && m_reloadInterval > 0) {
+ os << " reloadInterval='" << m_reloadInterval << "'";
+ }
+
+ os << "/>";
+}