src/PredFinder/elf/ElfIndividual.cpp
/**
 * Converts this entity to an XML <individual> element using the
 * Xerces-C++ library.
 *
 * XMLPlatformUtils::Initialize() must be called before this method.
 *
 * @param doc An already-instantiated Xerces DOMDocument that
 * provides namespace context for the created element (since
 * Xerces doesn't support easy anonymous element import).
 * @return The constructed <individual> DOMElement
 * @param docid The unique ID for the document containing this
 * individual, used to guarantee that the serialized ID for this
 * individual is globally unique.
 *
 * @author nward@bbn.com
 * @date 2010.06.23
 **/
Converts this entity to an XML  element using the
Xerces-C++ library.

:Initialize() must be called before this method.

@param doc An already-instantiated Xerces DOMDocument that
provides namespace context for the created element (since
Xerces doesn't support easy anonymous element import).
@return The constructed  DOMElement
@param docid The unique ID for the document containing this
individual, used to guarantee that the serialized ID for this
individual is globally unique.


Converts this entity to an XML element using the Xerces - C ++ library . : Initialize () must be called before this method . @param doc An already - instantiated Xerces DOMDocument that provides namespace context for the created element ( since Xerces doesn ' t support easy anonymous element import ) . @return The constructed DOMElement @param docid The unique ID for the document containing this individual used to guarantee that the serialized ID for this individual is globally unique .
DOMElement* ElfIndividual::to_xml(DOMDocument* doc, const std::wstring & docid) const {
    DOMElement* individual = SXMLUtil::createElement(doc, "individual");
	if (_show_id) {
        SXMLUtil::setAttributeFromStdWString(individual, "id", get_best_uri(docid));
	}
	if (_name_or_desc.get() != NULL && _name_or_desc->get_value() != L"")
		individual->appendChild(_name_or_desc->to_xml(doc));
	BOOST_FOREACH(ElfType_ptr type, _types) {
		individual->appendChild(type->to_xml(doc));
	}
	return individual;
}
DOMElement * ElfIndividual :: to_xml ( DOMDocument * doc , const std :: wstring & docid ) const { DOMElement * individual = SXMLUtil :: createElement ( doc , " " ) ; if ( _show_id ) { SXMLUtil :: setAttributeFromStdWString ( individual , " " , get_best_uri ( docid ) ) ; } if ( _name_or_desc . get ( ) != NULL && _name_or_desc -> get_value ( ) != L" " ) individual -> appendChild ( _name_or_desc -> to_xml ( doc ) ) ; BOOST_FOREACH ( ElfType_ptr type , _types ) { individual -> appendChild ( type -> to_xml ( doc ) ) ; } return individual ; }
Converts this entity to an XML <individual> element using the
 Xerces-C++ library.
Converts this entity to an XML <individual > element using the Xerces - C ++ library .
// Create a new individual element
 // Determine the best URI to use for this <individual>
 // Note that we are currently not printing _mention_confidence here
 // Add this individual's name or description (subclassing takes care of the element distinction)
 // Loop over all possible types of this entity
 // Done
