src/PredFinder/elf/ElfDocument.cpp
/**
 * Convenience method that replaces a URI prefix with the
 * prefix from this document's _source; generally intended
 * for use with generated individual IDs based on a particular
 * domain ontology type.
 *
 * @param uri The URI whose prefix is being replaced.
 * @return The prefix-replaced URI, if _source was defined.
 *
 * @author nward@bbn.com
 * @date 2010.10.19
 **/
Convenience method that replaces a URI prefix with the
prefix from this document's _source; generally intended
for use with generated individual IDs based on a particular
domain ontology type.

@param uri The URI whose prefix is being replaced.
@return The prefix-replaced URI, if _source was defined.


Convenience method that replaces a URI prefix with the prefix from this document ' s _source ; generally intended for use with generated individual IDs based on a particular domain ontology type . @param uri The URI whose prefix is being replaced . @return The prefix - replaced URI if _source was defined .
std::wstring ElfDocument::replace_uri_prefix(const std::wstring & uri) {
	if (_source == L"") {
		return uri;
	} else {
		std::wstring source_prefix = _source.substr(0, _source.find_first_of(' '));
        boost::to_lower(source_prefix);
		std::wstring uri_ret(uri);
		return uri_ret.replace(0, uri_ret.find_first_of(':'), source_prefix);
	}
}
std :: wstring ElfDocument :: replace_uri_prefix ( const std :: wstring & uri ) { if ( _source == L" " ) { return uri ; } else { std :: wstring source_prefix = _source . substr ( 0 , _source . find_first_of ( ' ' ) ) ; boost :: to_lower ( source_prefix ) ; std :: wstring uri_ret ( uri ) ; return uri_ret . replace ( 0 , uri_ret . find_first_of ( ' ' ) , source_prefix ) ; } }
Convenience method that replaces a URI prefix with the
 prefix from this document's _source; generally intended
 for use with generated individual IDs based on a particular
 domain ontology type.
Convenience method that replaces a URI prefix with the prefix from this document ' s _source ; generally intended for use with generated individual IDs based on a particular domain ontology type .
//std::transform(source_prefix.begin(), source_prefix.end(), source_prefix.begin(), std::tolower<wchar_t>);
