| 453 | | metadata_value = substr(metadata_value.begin() + (classifier_node_metadata_value + "|").size(), metadata_value.end()); |
|---|
| 454 | | } |
|---|
| 455 | | |
|---|
| 456 | | // Is this metadata value hierarchical? |
|---|
| 457 | | text_t::iterator hierarchy_split_position = findchar(metadata_value.begin(), metadata_value.end(), '|'); |
|---|
| 458 | | if (hierarchy_split_position != metadata_value.end()) |
|---|
| 459 | | { |
|---|
| 460 | | // Yes, so use the first part of the hierarchy only |
|---|
| 461 | | metadata_value = substr(metadata_value.begin(), hierarchy_split_position); |
|---|
| 462 | | } |
|---|
| 463 | | |
|---|
| 464 | | // Create a node for this metadata value if we haven't seen it before |
|---|
| 465 | | if (child_classifier_nodes.find(metadata_value) == child_classifier_nodes.end()) |
|---|
| 466 | | { |
|---|
| 467 | | child_classifier_nodes[metadata_value] = 0; |
|---|
| | 454 | child_metadata_value = substr(metadata_value.begin() + (classifier_node_metadata_value + "|").size(), metadata_value.end()); |
|---|
| | 455 | } |
|---|
| | 456 | |
|---|
| | 457 | // Determine the label for the child classifier node from the metadata value |
|---|
| | 458 | text_tarray child_metadata_value_parts; |
|---|
| | 459 | splitchar (child_metadata_value.begin(), child_metadata_value.end(), '|', child_metadata_value_parts); |
|---|
| | 460 | text_t child_classifier_node_label = child_metadata_value_parts.front(); |
|---|
| | 461 | |
|---|
| | 462 | // Create a node for this value if we haven't seen it before |
|---|
| | 463 | if (child_classifier_nodes.find(child_classifier_node_label) == child_classifier_nodes.end()) |
|---|
| | 464 | { |
|---|
| | 465 | child_classifier_nodes[child_classifier_node_label] = 0; |
|---|