Пример #1
0
                                    }
                                }
                                break;
                            case 'Parent_Relationships':
                                break 2;
                        }
                    }
                    break;
                    # ---------------------------
            }
        }
    }
}
// TODO: Fix self-referencing root problem (TGN imports "top of hierarchy" record as having itself as a parent)
print "[Notice] Rebuilding hier indices for hierarchy_id={$vn_tgn_id}...\n";
$t_place->rebuildHierarchicalIndex($vn_tgn_id);
if (true) {
    print "[Notice] ADDING RELATED PLACE LINKS...\n";
    $vn_last_message_length = 0;
    $t_place = new ca_places();
    $t_place->setMode(ACCESS_WRITE);
    $t_link = new ca_places_x_places();
    $t_link->setMode(ACCESS_WRITE);
    $t_rel_type = new ca_relationship_types();
    for ($vn_file_index = 1; $vn_file_index <= 15; $vn_file_index++) {
        $o_xml->open("tgn_xml_12/TGN{$vn_file_index}.xml");
        print "[Notice] READING TERMS FROM TGN{$vn_file_index}.xml...\n";
        $va_subject = array();
        while ($o_xml->read()) {
            switch ($o_xml->name) {
                # ---------------------------