コード例 #1
0
    def create_graphnodes(self):
        print('开始创建实体类型节点\n')

        seat_material, main_seat_adjustment, sub_seat_adjustment, main_sub_electric_adjustment, rear_seat_electric_adjustment, rear_seat_down, rels_motorcycle_seat_material, rels_motorcycle_main_seat_adjustment, rels_motorcycle_sub_seat_adjustment, rels_motorcycle_main_sub_electric_adjustment, rels_motorcycle_rear_seat_electric_adjustment, rels_motorcycle_rear_seat_down = self.read_nodes(
        )

        neo = Neo4jOp()

        neo.create_node(' Seat_material', seat_material)
        print(' seat_material nodes have ' + str(len(seat_material)) + '\n')

        neo.create_node('Main_seat_adjustment', main_seat_adjustment)
        print('Main_seat_adjustment nodes have ' +
              str(len(main_seat_adjustment)) + '\n')

        neo.create_node('Sub_seat_adjustment', sub_seat_adjustment)
        print('Sub_seat_adjustment nodes have ' +
              str(len(sub_seat_adjustment)) + '\n')

        neo.create_node('Main_sub_electric_adjustment',
                        main_sub_electric_adjustment)
        print('Main_sub_electric_adjustment nodes have ' +
              str(len(main_sub_electric_adjustment)) + '\n')

        neo.create_node('Rear_seat_electric_adjustment',
                        rear_seat_electric_adjustment)
        print('Rear_seat_electric_adjustment nodes have ' +
              str(len(rear_seat_electric_adjustment)) + '\n')

        neo.create_node('Rear_seat_down', rear_seat_down)
        print('Rear_seat_down nodes have ' + str(len(rear_seat_down)) + '\n')

        print('节点类型创建完毕')
        return
コード例 #2
0
 def create_graphnodes(self):
     print('开始创建实体类型节点\n')
     engine_cato, engine, output_vol, intake_form, cylinder_num, cylinder_form, admission_gear, \
     oil_supply_mode, envir_standard, args, rels_motorcycle_engine_cato, rels_motorcycle_engine, \
     rels_engine_type, rels_engine_output, rels_engine_intake_form, rels_engine_cylinder_num, \
     rels_engine_cylinder_form, rels_engine_admission_gear, rels_engine_energy, rels_engine_oil_supply_mode, \
     rels_engine_envir_standard = self.read_nodes()
     neo = Neo4jOp()
     neo.create_node('Engine_cato', engine_cato)
     print('Engine_cato nodes have ' + str(len(engine_cato)) + '\n')
     neo.create_node('Engine', engine, args)
     print('Engine nodes have ' + str(len(engine)) + '\n')
     neo.create_node('Output_vol', output_vol)
     print('Output_vol nodes have ' + str(len(output_vol)) + '\n')
     neo.create_node('Intake_form', intake_form)
     print('Intake_form nodes have ' + str(len(intake_form)) + '\n')
     neo.create_node('Cylinder_num', cylinder_num)
     print('Cylinder_num nodes have ' + str(len(cylinder_num)) + '\n')
     neo.create_node('Cylinder_form', cylinder_form)
     print('Cylinder_form nodes have ' + str(len(cylinder_form)) + '\n')
     neo.create_node('Admission_gear', admission_gear)
     print('Admission_gear nodes have ' + str(len(admission_gear)) + '\n')
     neo.create_node('Oil_supply_mode', oil_supply_mode)
     print('Oil_supply_mode nodes have ' + str(len(oil_supply_mode)) + '\n')
     neo.create_node('Envir_standard', envir_standard)
     print('Envir_standard nodes have ' + str(len(envir_standard)) + '\n')
     print('节点类型创建完毕')
     return
コード例 #3
0
 def create_graphrels(self):
     print('开始创建关系')
     brands, brand_websites, firms, series, car_levels, motorcycles, energy, sale_level, car_infos, rels_brd_website\
         , rels_brd_firm, rels_brd_series, rels_firm_series, rels_series_salelevel, rels_series_carlevel, \
     rels_firm_motortype, rels_series_motortype, rels_motortype_energy, rels_motortype_salelevel, \
     rels_motortype_carlevel = self.read_nodes()
     neo = Neo4jOp()
     neo.create_relationship('Brand', 'Brand_website', rels_brd_website,
                             'website_is', '品牌官网是')
     neo.create_relationship('Brand', 'Firm', rels_brd_firm, 'belongs_to',
                             '隶属于')
     neo.create_relationship('Brand', 'Series', rels_brd_series,
                             'include_series', '包含车系')
     neo.create_relationship('Firm', 'Series', rels_firm_series,
                             'produce_series', '生产车系')
     neo.create_relationship('Series', 'Sale_level', rels_series_salelevel,
                             'series_sale_level', '销售级别')
     neo.create_relationship('Series', 'Car_level', rels_series_carlevel,
                             'series_level_is', '车系级别')
     neo.create_relationship('Firm', 'Motorcycle', rels_firm_motortype,
                             'sales', '出售')
     neo.create_relationship('Series', 'Motorcycle', rels_series_motortype,
                             'include_motor', '包含车型')
     neo.create_relationship('Motorcycle', 'Energy', rels_motortype_energy,
                             'energy_type_is', '能源类型是')
     neo.create_relationship('Motorcycle', 'Sale_level',
                             rels_motortype_salelevel, 'car_sale_level',
                             '销售级别')
     neo.create_relationship('Motorcycle', 'Car_level',
                             rels_motortype_carlevel, 'car_level_is',
                             '车型级别是')
     print('关系创建完毕')
コード例 #4
0
 def create_graphnodes(self):
     print('开始创建实体类型节点\n')
     brands, brand_websites, firms, series, car_levels, motorcycles, energy, sale_level, car_infos, rels_brd_website\
         , rels_brd_firm, rels_brd_series, rels_firm_series, rels_series_salelevel, rels_series_carlevel, \
     rels_firm_motortype, rels_series_motortype, rels_motortype_energy, rels_motortype_salelevel, \
     rels_motortype_carlevel = self.read_nodes()
     neo = Neo4jOp()
     print('开始创建车型节点\n')
     neo.create_motorcycle_nodes(car_infos)
     print('车型节点创建完毕\n')
     neo.create_node('Brand', brands)
     print('Brand nodes have ' + str(len(brands)) + '\n')
     neo.create_node('Brand_website', brand_websites)
     print('Brand_website nodes have ' + str(len(brand_websites)) + '\n')
     neo.create_node('Firm', firms)
     print('Firm nodes have ' + str(len(firms)) + '\n')
     neo.create_node('Series', series)
     print('Series nodes have ' + str(len(series)) + '\n')
     neo.create_node('Car_level', car_levels)
     print('Car_level nodes have ' + str(len(car_levels)) + '\n')
     neo.create_node('Energy', energy)
     print('Energy nodes have ' + str(len(energy)) + '\n')
     neo.create_node('Sale_level', sale_level)
     print('Sale_level nodes have ' + str(len(sale_level)) + '\n')
     print('节点类型创建完毕')
     return
コード例 #5
0
    def create_graphrels(self):
        print('开始创建')

        seat_material, main_seat_adjustment, sub_seat_adjustment, main_sub_electric_adjustment, rear_seat_electric_adjustment, rear_seat_down, rels_motorcycle_seat_material, rels_motorcycle_main_seat_adjustment, rels_motorcycle_sub_seat_adjustment, rels_motorcycle_main_sub_electric_adjustment, rels_motorcycle_rear_seat_electric_adjustment, rels_motorcycle_rear_seat_down = self.read_nodes(
        )

        neo = Neo4jOp()
        neo.create_relationship('Motorcycle', 'seat_material',
                                rels_motorcycle_seat_material,
                                'Seat_material_is', '座椅材质是')

        neo.create_relationship('Motorcycle', 'main_seat_adjustment',
                                rels_motorcycle_main_seat_adjustment,
                                'Main_seat_adjustment_is', '主座椅调节方式是')

        neo.create_relationship('Motorcycle', 'sub_seat_adjustment',
                                rels_motorcycle_sub_seat_adjustment,
                                'sub_seat_adjustment_is', '副座椅调节方式是')

        neo.create_relationship('Motorcycle', 'main_sub_electric_adjustment',
                                rels_motorcycle_main_sub_electric_adjustment,
                                'Main_sub_electric_adjustment_is',
                                '主/副驾驶座电动调节方式是')

        neo.create_relationship('Motorcycle', 'rear_seat_electric_adjustment',
                                rels_motorcycle_rear_seat_electric_adjustment,
                                'Rear_seat_electric_adjustment_is',
                                '后排座椅电动调节方式是')

        neo.create_relationship('Motorcycle', 'rear_seat_down',
                                rels_motorcycle_rear_seat_down,
                                'rear_seat_down_is', '后排座椅放倒形式是')

        print('关系创建完毕')
        return
コード例 #6
0
    def create_graphrels(self):
        print('开始创建')

        child_seat, anti_lock, brake_power, brake_assist, traction_control, body_stability_control, rels_motorcycle_child_seat, rels_motorcycle_anti_lock, rels_motorcycle_brake_power, rels_motorcycle_brake_assist, rels_motorcycle_traction_control, rels_motorcycle_body_stability_control = self.read_nodes(
        )
        neo = Neo4jOp()
        neo.create_relationship('Motorcycle', 'child_seat',
                                rels_motorcycle_child_seat, 'child_seat_is',
                                'ISOFIX儿童座椅接口是')
        neo.create_relationship('Motorcycle', 'anti_lock',
                                rels_motorcycle_anti_lock, 'anti_lock_is',
                                'ABS防抱死是)')
        neo.create_relationship('Motorcycle', 'brake_power',
                                rels_motorcycle_brake_power, 'brake_power_is',
                                '制动力分配(EBD/CBC等)是')
        neo.create_relationship('Motorcycle', 'brake_assist',
                                rels_motorcycle_brake_assist,
                                'brake_assist_is', '刹车辅助(EBA/BAS/BA等)是')
        neo.create_relationship('Motorcycle', 'traction_control',
                                rels_motorcycle_traction_control,
                                'traction_control_is', '牵引力控制(ASR/TCS/TRC等)是')
        neo.create_relationship('Motorcycle', 'body_stability_control',
                                rels_motorcycle_body_stability_control,
                                'body_stability_control_is',
                                '车身稳定控制(ESC/ESP/DSC等)是')

        print('关系创建完毕')
        return
コード例 #7
0
 def create_graphrels(self):
     print('开始创建')
     car_body_structures, rels_motorcycle_structure = self.read_nodes()
     neo = Neo4jOp()
     neo.create_relationship('Motorcycle', 'Car_Body_Structure', rels_motorcycle_structure, 'car_structure_is',
                             '车身结构是')
     print('关系创建完毕')
     return
コード例 #8
0
 def create_graphnodes(self):
     print('开始创建实体类型节点\n')
     gear_box, rels_motorcycle_gear_box, args = self.read_nodes()
     neo = Neo4jOp()
     neo.create_node('Gear_box', gear_box, args)
     print('Gear_box nodes have ' + str(len(gear_box)) + '\n')
     print('节点类型创建完毕')
     return
コード例 #9
0
 def create_graphnodes(self):
     print('开始创建实体类型节点\n')
     chassis_trans, rels_motorcycle_chassis, args = self.read_nodes()
     neo = Neo4jOp()
     neo.create_node('Chassis_trans', chassis_trans, args)
     print('Chassis_trans nodes have ' + str(len(chassis_trans)) + '\n')
     print('节点类型创建完毕')
     return
コード例 #10
0
 def create_graphnodes(self):
     print('开始创建实体类型节点\n')
     car_body_structures, rels_motorcycle_structure = self.read_nodes()
     neo = Neo4jOp()
     neo.create_node('Car_Body_Structure', car_body_structures)
     print('Car_Body_Structure nodes have ' + str(len(car_body_structures)) + '\n')
     print('节点类型创建完毕')
     return
コード例 #11
0
 def create_graphnodes(self):
     print('开始创建实体类型节点\n')
     quality_assurance, rels_motorcycle_assurance = self.read_nodes()
     neo = Neo4jOp()
     neo.create_node('Quality_assurance', quality_assurance)
     print('Quality_assurance nodes have ' + str(len(quality_assurance)) +
           '\n')
     print('节点类型创建完毕')
     return
コード例 #12
0
    def create_graph_carbody_cato_nodes(self):
        print('开始创建实体类型节点\n')
        carbody_cato, args, rels_motorcycle_carbody_cato = self.read_nodes()
        neo = Neo4jOp()
        neo.create_node('Carbody_cato', carbody_cato)
        print('Carbody_cato nodes have ' + str(len(carbody_cato)) + '\n')

        print('节点类型创建完毕')
        return
コード例 #13
0
    def create_graphrels(self):
        print('开始创建')
        year, rels_motorcycle_year = self.read_nodes()
        neo = Neo4jOp()
        neo.create_relationship('Motorcycle', 'Year', rels_motorcycle_year,
                                'onlyyear_is', '年份是')

        print('关系创建完毕')
        return
コード例 #14
0
    def create_graphnodes(self):
        print('开始创建实体类型节点\n')
        year, rels_motorcycle_year = self.read_nodes()
        neo = Neo4jOp()
        neo.create_node('Year', year)
        print('Year nodes have ' + str(len(year)) + '\n')

        print('节点类型创建完毕')
        return
コード例 #15
0
 def create_graphrels(self):
     print('开始创建')
     chassis_trans, rels_motorcycle_chassis, args = self.read_nodes()
     neo = Neo4jOp()
     neo.create_relationship('Motorcycle', 'Chassis_trans',
                             rels_motorcycle_chassis, 'ChassisTrans_is',
                             '驱动方式是')
     print('关系创建完毕')
     return
コード例 #16
0
 def create_graphrels(self):
     print('开始创建')
     quality_assurance, rels_motorcycle_assurance = self.read_nodes()
     neo = Neo4jOp()
     neo.create_relationship('Motorcycle', 'Quality_assurance',
                             rels_motorcycle_assurance, 'assurance_is',
                             '整车质保是')
     print('关系创建完毕')
     return
コード例 #17
0
 def create_graphrels(self):
     print('开始创建')
     gear_box, rels_motorcycle_gear_box, args = self.read_nodes()
     neo = Neo4jOp()
     neo.create_relationship('Motorcycle', 'Gear_box',
                             rels_motorcycle_gear_box, 'gear_box_is',
                             '变速箱是')
     print('关系创建完毕')
     return
コード例 #18
0
    def create_graph_carbody_cato_rels(self):
        print('开始创建')
        carbody_cato, args, rels_motorcycle_carbody_cato = self.read_nodes()
        neo = Neo4jOp()
        neo.create_relationship('Motorcycle', 'Carbody_cato',
                                rels_motorcycle_carbody_cato, 'car_body_is',
                                '车身分类是')

        print('关系创建完毕')
        return
コード例 #19
0
 def create_graphrels(self):
     print('开始创建')
     door_num, seat_num, rels_motorcycle_door, rels_motorcycle_seat = self.read_nodes(
     )
     neo = Neo4jOp()
     neo.create_relationship('Motorcycle', 'door_num', rels_motorcycle_door,
                             'door_num_is', '车门个数是')
     neo.create_relationship('Motorcycle', 'seat_num', rels_motorcycle_seat,
                             'seat_num_is', '座位个数是')
     print('关系创建完毕')
     return
コード例 #20
0
 def create_graphnodes(self):
     print('开始创建实体类型节点\n')
     door_num, seat_num, rels_motorcycle_door, rels_motorcycle_seat = self.read_nodes(
     )
     neo = Neo4jOp()
     neo.create_node('door_num', door_num)
     print('door_num nodes have ' + str(len(door_num)) + '\n')
     neo.create_node('seat_num', door_num)
     print('seat_num nodes have ' + str(len(seat_num)) + '\n')
     print('节点类型创建完毕')
     return
コード例 #21
0
    def create_graphnodes(self):
        print('开始创建实体类型节点\n')

        brake_power_distribution, rels_motorcycle_brake_power_distribution = self.read_nodes()

        neo = Neo4jOp()

        neo.create_node('Brake_power_distribution', brake_power_distribution)
        print('Brake_power_distribution nodes have ' + str(len(brake_power_distribution)) + '\n')

        print('节点类型创建完毕')
        return
コード例 #22
0
    def create_graphrels(self):
        print('开始创建')

        steering_wheel_material, rels_motorcycle_steering_wheel_material = self.read_nodes(
        )
        neo = Neo4jOp()
        neo.create_relationship('Motorcycle', 'Steering_wheel_material',
                                rels_motorcycle_steering_wheel_material,
                                'steering_wheel_material_is', '方向盘材质是')

        print('关系创建完毕')
        return
コード例 #23
0
    def create_graphrels(self):
        print('开始创建')

        air_temperature_control, rels_motorcycle_temperature_control = self.read_nodes(
        )
        neo = Neo4jOp()
        neo.create_relationship('Motorcycle', 'Air_temperature_control',
                                rels_motorcycle_temperature_control,
                                'Air_temperature_control_is', '空调温度控制方式是')

        print('关系创建完毕')
        return
コード例 #24
0
    def create_graphnodes(self):
        print('开始创建实体类型节点\n')

        sunroof_type, roof_rack, rels_motorcycle_sunroof_type, rels_motorcycle_roof_rack = self.read_nodes()

        neo = Neo4jOp()
        neo.create_node('Sunroof_type', sunroof_type)
        print('Sunroof_type nodes have ' + str(len(sunroof_type)) + '\n')
        neo.create_node('Roof_rack',roof_rack)
        print('Roof_rack nodes have ' + str(len(roof_rack)) + '\n')

        print('节点类型创建完毕')
        return
コード例 #25
0
    def create_graphrels(self):
        print('开始创建')

        sunroof_type, roof_rack, rels_motorcycle_sunroof_type, rels_motorcycle_roof_rack = self.read_nodes()
        neo = Neo4jOp()
        neo.create_relationship('Motorcycle', 'Sunroof_type', rels_motorcycle_sunroof_type, 'sunroof_type_is',
                                '天窗类型是')
        neo.create_relationship('Motorcycle', 'Roof_rack', rels_motorcycle_roof_rack, 'roof_rack_is',
                                '车顶行李架是')


        print('关系创建完毕')
        return
コード例 #26
0
    def create_graphnodes(self):
        print('开始创建实体类型节点\n')

        air_temperature_control, rels_motorcycle_temperature_control = self.read_nodes(
        )

        neo = Neo4jOp()
        neo.create_node('Air_temperature_control', air_temperature_control)
        print('Air_temperature_control nodes have ' +
              str(len(air_temperature_control)) + '\n')

        print('节点类型创建完毕')
        return
コード例 #27
0
    def create_graphnodes(self):
        print('开始创建实体类型节点\n')

        steering_wheel_material, rels_motorcycle_steering_wheel_material = self.read_nodes(
        )

        neo = Neo4jOp()
        neo.create_node('Steering_wheel_material', steering_wheel_material)
        print('Steering_wheel_material nodes have ' +
              str(len(steering_wheel_material)) + '\n')

        print('节点类型创建完毕')
        return
コード例 #28
0
    def create_graphrels(self):
        print('开始创建')

        brake_power_distribution, rels_motorcycle_brake_power_distribution = self.read_nodes()

        neo = Neo4jOp()

        neo.create_relationship('Motorcycle', 'brake_power_distribution', rels_motorcycle_brake_power_distribution,
                                'brake_power_distribution_is',
                                '制动力分配是')


        print('关系创建完毕')
        return
コード例 #29
0
    def create_graphnodes(self):
        print('开始创建实体类型节点\n')

        front_rear_parking_radar, driving_assistance_image, driving_mode, rels_motorcycle_parking_radar, rels_motorcycle_driving_assistance, rels_motorcycle_driving_mode = self.read_nodes()

        neo = Neo4jOp()
        neo.create_node('Front_rear_parking_radar', front_rear_parking_radar)
        print('Front_rear_parking_radar nodes have ' + str(len(front_rear_parking_radar)) + '\n')
        neo.create_node('Driving_assistance_image',driving_assistance_image)
        print('Driving_assistance_image nodes have ' + str(len(driving_assistance_image)) + '\n')
        neo.create_node('Driving_mode', driving_mode)
        print('Driving_mode nodes have ' + str(len(driving_mode)) + '\n')

        print('节点类型创建完毕')
        return
コード例 #30
0
    def create_graphrels(self):
        print('开始创建')

        central_control_screen_size, bluetooth_car_phone, rels_motorcycle_central_control, rels_motorcycle_bluetooth_phone = self.read_nodes(
        )

        neo = Neo4jOp()
        neo.create_relationship('Motorcycle', 'Central_control_screen_size',
                                rels_motorcycle_central_control,
                                'Central_control_screen_size_is', '中控液晶屏尺寸是')
        neo.create_relationship('Motorcycle', 'Bluetooth_car_phone',
                                rels_motorcycle_bluetooth_phone,
                                'Bluetooth_car_phone_is', '蓝牙/车载电话是')

        print('关系创建完毕')
        return