src/PredFinder/elf/ElfDocument.cpp
/**
 * Public accessor to get all merged individuals, or individuals
 * having a particular type. Returns merges of the underlying
 * ElfIndividuals, so changing any of the return values doesn't
 * change the contents of the document.
 *
 * @param search_type The optional ontology type to find
 * individuals by; if not specified, all individuals are returned.
 * @return A dictionary of individuals by ID.
 *
 * @author nward@bbn.com
 * @date 2011.08.05
 **/
Public accessor to get all merged individuals, or individuals
having a particular type. Returns merges of the underlying
ElfIndividuals, so changing any of the return values doesn't
change the contents of the document.

@param search_type The optional ontology type to find
individuals by; if not specified, all individuals are returned.
@return A dictionary of individuals by ID.


Public accessor to get all merged individuals or individuals having a particular type . Returns merges of the underlying ElfIndividuals so changing any of the return values doesn ' t change the contents of the document . @param search_type The optional ontology type to find individuals by ; if not specified all individuals are returned . @return A dictionary of individuals by ID .
ElfIndividualSet ElfDocument::get_merged_individuals_by_type(const std::wstring & search_type) const {
	ElfIndividualSet merged_individuals = get_merged_individuals();
	if (search_type == L"")
		return merged_individuals;
	ElfIndividualSet individuals;
	BOOST_FOREACH(ElfIndividual_ptr individual, merged_individuals) {
		if (individual->has_type(search_type))
			individuals.insert(individual);
	}
	return individuals;
}
ElfIndividualSet ElfDocument :: get_merged_individuals_by_type ( const std :: wstring & search_type ) const { ElfIndividualSet merged_individuals = get_merged_individuals ( ) ; if ( search_type == L" " ) return merged_individuals ; ElfIndividualSet individuals ; BOOST_FOREACH ( ElfIndividual_ptr individual , merged_individuals ) { if ( individual -> has_type ( search_type ) ) individuals . insert ( individual ) ; } return individuals ; }
Public accessor to get all merged individuals, or individuals
 having a particular type.
Public accessor to get all merged individuals or individuals having a particular type .
// Selected individuals
 // If no search type, just return the full merge
 // Collect the merged individuals that have at least one instance of the specified type
 // Done
