src/PredFinder/elf/ElfDocument.cpp
/**
 * Converts all of the individuals in this document to relations,
 * following the convention that <name> becomes ic:hasName, <desc>
 * becomes rdfs:label, and <type> becomes rdf:type. The relations
 * so generated are added to the document directly, the originating
 * individuals are removed, and where applicable id attributes on
 * args are replaced with the equivalent URI value.
 *
 * Intended for use during R-ELF macro conversion. Operates in-place.
 *
 * @author nward@bbn.com
 * @date 2010.10.26
 **/
Converts all of the individuals in this document to relations,
following the convention that  becomes ic:hasName, 
becomes rdfs:label, and  becomes rdf:type. The relations
so generated are added to the document directly, the originating
individuals are removed, and where applicable id attributes on
args are replaced with the equivalent URI value.

Intended for use during R-ELF macro conversion. Operates in-place.


Converts all of the individuals in this document to relations following the convention that becomes ic : hasName becomes rdfs : label and becomes rdf : type . The relations so generated are added to the document directly the originating individuals are removed and where applicable id attributes on args are replaced with the equivalent URI value . Intended for use during R - ELF macro conversion . Operates in - place .
void ElfDocument::convert_individuals_to_relations(const std::wstring& domain_prefix) {
	ElfIndividualSet individuals = get_individuals_by_type();
	BOOST_FOREACH(ElfIndividual_ptr individual, individuals) {
		std::set<ElfRelation_ptr> individual_relations = ElfRelationFactory::from_elf_individual(domain_prefix, individual);
		_relations.insert(individual_relations.begin(), individual_relations.end());
	}
	_individuals.clear();
}
void ElfDocument :: convert_individuals_to_relations ( const std :: wstring & domain_prefix ) { ElfIndividualSet individuals = get_individuals_by_type ( ) ; BOOST_FOREACH ( ElfIndividual_ptr individual , individuals ) { std :: set < ElfRelation_ptr > individual_relations = ElfRelationFactory :: from_elf_individual ( domain_prefix , individual ) ; _relations . insert ( individual_relations . begin ( ) , individual_relations . end ( ) ) ; } _individuals . clear ( ) ; }
Converts all of the individuals in this document to relations,
 following the convention that <name> becomes ic:hasName, <desc>
 becomes rdfs:label, and <type> becomes rdf:type.
Converts all of the individuals in this document to relations following the convention that <name > becomes ic : hasName <desc > becomes rdfs : label and <type > becomes rdf : type .
// Loop over all of the individuals in this document, converting to relations
 // Convert this individual to its equivalent relations
 // Nuke any individuals we just converted
