Esempio n. 1
0
                          repository)
        self.set_monuments_all_id("id")
        self.set_registrant_url()
        self.set_changed()
        self.set_wlm_source()
        self.set_country()
        self.set_adm_location()
        self.set_directions()
        self.set_location()
        self.set_is()
        self.set_inception()
        self.set_heritage()
        self.set_coords()
        self.set_image()
        self.set_heritage_id()
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item_via_name()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("uy", "es", UyEs)
    dataset.data_files = {
        "departments": "uruguay_departments.json",
        "settlements": "uruguay_settlements.json"
    }
    importer.main(args, dataset)
Esempio n. 2
0
    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing,
                          repository)
        self.set_monuments_all_id("id")
        self.set_changed()
        self.set_wlm_source()
        self.set_heritage()
        self.set_country()
        self.set_adm_location()
        self.set_directions()
        self.set_heritage_id()
        self.set_is()
        self.set_parts()
        self.set_commonscat()
        self.set_coords()
        self.set_image("imagen")
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("cl", "es", ClEs)
    dataset.data_files = {
        "municipalities": "chile_municipalities.json",
        "regions": "chile_regions.json"
    }
    importer.main(args, dataset)
Esempio n. 3
0
        self.add_description("en", english)

    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping,
                          data_files, existing, repository)
        self.set_monuments_all_id("id")
        self.set_changed()
        self.set_wlm_source()
        self.set_commonscat()
        self.set_image()
        self.set_coords()
        self.set_country()
        self.set_heritage()
        self.set_heritage_id()
        self.set_admin_location()
        self.set_location()
        self.set_street_address()
        self.set_is()
        self.update_descriptions()
        self.update_labels()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("tn", "fr", TnFr)
    dataset.data_files = {"admin": "tunisia_admin.json",
                          "settlements": "tunisia_settlements.json"}
    importer.main(args, dataset)
Esempio n. 4
0
def make_dataset(country, language):
    """
    Construct a dataset instance for the provided country and language codes.

    Only kept for backwards-compatibility with older monument classes.
    """
    from Monument import Dataset
    from CzCs import CzCs
    from AtDe import AtDe
    from DkBygningDa import DkBygningDa
    from DkFortidsDa import DkFortidsDa
    from EeEt import EeEt
    from HuHu import HuHu
    from IeEn import IeEn
    from NoNo import NoNo
    from PlPl import PlPl
    from PtPt import PtPt
    from SeArbetslSv import SeArbetslSv
    from SeBbrSv import SeBbrSv
    from SeShipSv import SeShipSv
    from ZaEn import ZaEn
    SPECIFIC_TABLES = {
        "monuments_se-ship_(sv)": {
            "class": SeShipSv,
            "data_files": {
                "functions": "se-ship_(sv)_functions.json"
            }
        },
        "monuments_cz_(cs)": {
            "class": CzCs,
            "data_files": {}
        },
        "monuments_hu_(hu)": {
            "class": HuHu,
            "data_files": {}
        },
        "monuments_pt_(pt)": {
            "class": PtPt,
            "data_files": {}
        },
        "monuments_ie_(en)": {
            "class": IeEn,
            "data_files": {
                "counties": "ireland_counties.json"
            }
        },
        "monuments_za_(en)": {
            "class": ZaEn,
            "data_files": {}
        },
        "monuments_at_(de)": {
            "class": AtDe,
            "data_files": {
                "municipalities": "austria_municipalities.json"
            },
            "lookup_downloads": {
                "types": "at_(de)/types"
            }
        },
        "monuments_dk-bygninger_(da)": {
            "class": DkBygningDa,
            "data_files": {},
            "subclass_downloads": {
                "settlement": "Q486972"
            }
        },
        "monuments_pl_(pl)": {
            "class": PlPl,
            "data_files": {
                "settlements": "poland_settlements.json"
            }
        },
        "monuments_dk-fortidsminder_(da)": {
            "class": DkFortidsDa,
            "data_files": {
                "types": "dk-fortidsminder_(da)_types.json",
                "municipalities": "denmark_municipalities.json"
            }
        },
        "monuments_no_(no)": {
            "class": NoNo,
            "data_files": {}
        },
        "monuments_se-bbr_(sv)": {
            "class": SeBbrSv,
            "data_files": {
                "functions": "se-bbr_(sv)_functions.json",
                "settlements": "sweden_settlements.json"
            }
        },
        "monuments_ee_(et)": {
            "class": EeEt,
            "data_files": {
                "counties": "estonia_counties.json"
            }
        },
        "monuments_se-arbetsl_(sv)": {
            "class": SeArbetslSv,
            "data_files": {
                "municipalities": "sweden_municipalities.json",
                "types": "se-arbetsl_(sv)_types.json",
                "settlements": "sweden_settlements.json"
            }
        }
    }
    specific_table_name = utils.get_specific_table_name(country, language)
    specific_table = None
    if specific_table_name in SPECIFIC_TABLES:
        specific_table = SPECIFIC_TABLES[specific_table_name]
    else:
        print("No class defined for {0}.".format(specific_table_name))
        exit()

    dataset = Dataset(country, language, specific_table["class"])
    dataset.data_files = specific_table.get("data_files")
    dataset.lookup_downloads = specific_table.get("lookup_downloads")
    dataset.subclass_downloads = specific_table.get("subclass_downloads")

    return dataset
Esempio n. 5
0
        Monument.__init__(self, db_row_dict, mapping, data_files, existing,
                          repository)
        self.set_monuments_all_id("id")
        self.set_changed()
        self.set_wlm_source()
        self.set_country()
        self.set_adm_location()
        self.set_location()
        self.set_is()
        self.set_special_is()
        self.set_image()
        self.set_inception()
        self.set_commonscat()
        self.set_coords()
        self.set_heritage()
        self.set_heritage_id()
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("gh", "en", GhEn)
    dataset.data_files = {
        "regions": "ghana_regions.json"  # http://tinyurl.com/y9ye4kfg
    }
    dataset.lookup_downloads = {"is": "gh_(en)/original function"}
    importer.main(args, dataset)
Esempio n. 6
0
    def set_adm_location(self):
        if self.has_non_empty_attribute("freguesia"):
            parish = utils.q_from_first_wikilink("pt", self.freguesia)
            self.add_statement("located_adm", parish)

    def set_no(self):
        code = self.id
        self.add_statement("igespar_id", str(code))

    def __init__(self, db_row_dict, mapping, data_files, existing):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing)
        self.update_labels()
        # self.exists("pt")
        self.update_descriptions()
        self.set_commonscat()
        self.set_image("imagem")
        self.set_coords(("lat", "lon"))
        self.set_adm_location()
        self.set_no()
        # self.set_location()
        self.exists_with_prop(mapping)
        # self.print_wd()


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("pt", "pt", PtPt)
    importer.main(args, dataset)
Esempio n. 7
0
            placename = utils.remove_markup(self.miejscowosc)
            try:
                location = [x["item"] for x in settlements_dict if x[
                    "pl"].strip() == placename][0]
                self.add_statement("location", location)
            except IndexError:
                return

    def __init__(self, db_row_dict, mapping, data_files, existing):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing)
        self.update_labels()
        # self.exists("pl")
        self.set_commonscat()
        self.set_image("zdjecie")
        self.set_coords(("lat", "lon"))
        self.set_adm_location()
        self.set_no()
        self.set_location()
        self.set_address()
        self.exists_with_prop(mapping)


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("pl", "pl", PlPl)
    dataset.data_files = {
        "settlements": "poland_settlements.json"
    }
    importer.main(args, dataset)
Esempio n. 8
0
import importer as importer


class HuHu(Monument):
    def update_labels(self):
        name = utils.remove_markup(self.name)
        self.add_label("hu", name)

    def set_adm_location(self):
        return

    def __init__(self, db_row_dict, mapping, data_files, existing):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing)
        self.update_labels()
        # self.exists("sq")
        self.set_commonscat()
        self.set_image("image")
        self.set_coords(("lat", "lon"))
        self.set_adm_location()
        # self.set_no()
        # self.set_location()
        self.exists_with_prop(mapping)
        self.print_wd()


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("hu", "hu", HuHu)
    importer.main(args, dataset)
Esempio n. 9
0
        self.NATIONAL_IMPORTANCE_STR = "ეროვნული"
        self.NATIONAL_IMPORTANCE_Q = "Q34480057"
        self.set_monuments_all_id("id")
        self.set_changed()
        self.set_wlm_source()
        self.set_heritage_id()
        self.set_heritage()
        self.set_country()
        self.set_coords()
        self.set_adm_location()
        self.set_address()
        self.set_is()
        self.set_image()
        self.set_commonscat()
        self.set_inception()
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("ge", "ka", GeKa)
    dataset.data_files = {
        "admin": "georgia_admin.json",
        "settlements": "georgia_settlements.json"
    }
    dataset.lookup_downloads = {"types": "ge (ka)/types"}
    importer.main(args, dataset)
Esempio n. 10
0
    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing,
                          repository)
        self.set_monuments_all_id("id")
        self.set_changed()
        self.set_wlm_source()
        self.set_adm_location()
        self.set_directions()
        self.set_location()
        self.set_is()
        self.set_country()
        self.set_image()
        self.set_heritage()
        self.set_heritage_id()
        self.set_coords(("lat", "lon"))
        self.set_commonscat()
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("ve", "es", VeEs)
    dataset.data_files = {
        "states": "venezuela_states.json",
        "settlements": "venezuela_settlements.json"
    }
    importer.main(args, dataset)
Esempio n. 11
0
    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping,
                          data_files, existing, repository)
        self.set_monuments_all_id("id")
        self.set_registrant_url()
        self.set_changed()
        self.set_wlm_source()
        self.set_heritage_id()
        self.set_heritage()
        self.set_country()
        self.set_adm_location()
        self.set_image()
        self.set_coords()
        self.set_commonscat()
        self.set_is()
        self.set_directions()
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("am", "hy", AmHy)
    dataset.data_files = {
        "communities": "armenia_communities.json",
        "provinces": "armenia_provinces.json"}
    importer.main(args, dataset)
Esempio n. 12
0
        try:
            county_name = "County " + self.county
            county_item = [
                x["item"] for x in counties if x["en"] == county_name
            ]
            ref = self.create_wlm_source()
            self.add_statement("located_adm", county_item[0], refs=[ref])
        except IndexError:
            return

    def __init__(self, db_row_dict, mapping, data_files, existing):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing)
        self.update_labels()
        # self.exists("en")
        self.set_commonscat()
        self.set_image("image")
        self.set_coords(("lat", "lon"))
        self.set_adm_location()
        # self.set_no()
        # self.set_location()
        # self.exists_with_prop(mapping)
        self.print_wd()


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("ie", "en", IeEn)
    dataset.data_files = {"counties": "ireland_counties.json"}
    importer.main(args, dataset)
Esempio n. 13
0
        Set the administrative location.

        TODO
        Download all
        """
        print(self.municipality)

    def set_no(self):
        code = str(self.id_objektu)
        self.add_statement("czech_monument_id", code)

    def __init__(self, db_row_dict, mapping, data_files, existing):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing)
        self.update_labels()
        # self.exists("sq")
        self.set_commonscat()
        self.set_image("image")
        self.set_coords(("lat", "lon"))
        self.set_adm_location()
        self.set_no()
        # self.set_location()
        self.exists_with_prop(mapping)
        # self.print_wd()


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("cz", "cs", CzCs)
    importer.main(args, dataset)
Esempio n. 14
0
    def exists_with_monument_article(self, language):
        return super().exists_with_monument_article("de", "artikel")

    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping,
                          data_files, existing, repository)
        self.set_monuments_all_id("inventarnummer")
        self.set_registrant_url()
        self.set_changed()
        self.set_wlm_source()
        self.set_country()
        self.set_heritage_id()
        self.set_image("foto")
        self.set_commonscat()
        self.set_coords()
        self.set_is()
        self.set_heritage()
        self.update_labels()
        self.update_descriptions()
        self.set_adm_location()
        self.set_street_address()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("mt", "de", MtDe)
    dataset.data_files = {"councils": "malta_councils.json"}
    importer.main(args, dataset)
Esempio n. 15
0
        self.set_source()
        self.set_registrant_url()
        self.set_heritage_id()
        self.set_heritage()
        self.set_country()
        self.set_image()
        self.set_adm_location()
        self.set_commonscat()
        self.set_architect()
        self.set_style()
        # self.set_is()
        self.set_special_is()
        self.set_coords()
        self.set_building_year()
        self.set_address_and_disambig()
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("be-bru", "nl", BeBruNl)
    dataset.data_files = {"municipalities": "belgium_municipalities.json"}
    dataset.lookup_downloads = {
        "type": "be-bru (nl)/objtype",
        "style": "be-bru (nl)/bouwstijl"
    }
    importer.main(args, dataset)
Esempio n. 16
0
        Monument.__init__(self, db_row_dict, mapping, data_files, existing,
                          repository)
        self.set_monuments_all_id("id")
        self.set_registrant_url()
        self.set_changed()
        self.set_wlm_source()
        self.set_adm_location()
        self.set_country()
        self.set_location()
        self.set_heritage()
        self.set_heritage_id()
        self.set_coords()
        self.set_is()
        self.set_commonscat()
        self.set_directions()
        self.set_image()
        self.update_descriptions()
        self.update_labels()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("pe", "es", PeEs)
    dataset.data_files = {
        "municipalities": "peru_provinces.json",
        "regions": "peru_regions.json"
    }
    importer.main(args, dataset)
Esempio n. 17
0
        Monument.__init__(self, db_row_dict, mapping,
                          data_files, existing, repository)
        self.set_monuments_all_id("id")
        self.set_changed()
        self.set_wlm_source()
        self.set_coords()
        self.set_is()
        self.set_country()
        self.set_coords()
        self.set_heritage()
        self.set_heritage_id()
        self.set_adm_location()
        self.set_directions()
        self.set_image()
        self.set_commonscat()
        self.update_descriptions()
        self.update_labels()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("sv", "es", SvEs)
    dataset.lookup_downloads = {"heritage_type": "sv_(es)/tipo"}
    dataset.data_files = {
        "departments": "salvador_departments.json",
        "municipalities": "salvador_municipalities.json"
    }
    importer.main(args, dataset)
Esempio n. 18
0
        """
        for part in self.navn.split(" "):
            if part.isupper():
                print(part, "----", part.capitalize())

    def set_no(self):
        self.add_statement("norwegian_monument_id", self.id)

    def __init__(self, db_row_dict, mapping, data_files, existing):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing)
        self.update_labels()
        # self.exists("no")
        self.set_commonscat()
        self.set_image("bilde")
        self.set_coords(("lat", "lon"))
        self.set_no()
        # self.set_adm_location()
        # self.set_location()
        # self.set_sagsnr()
        # self.set_address()
        # self.set_inception()
        self.exists_with_prop(mapping)
        self.print_wd()


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("no", "no", NoNo)
    importer.main(args, dataset)
Esempio n. 19
0
                          repository)
        self.set_monuments_all_id("id")
        self.set_registrant_url()
        self.set_changed()
        self.set_wlm_source()
        self.set_country()
        self.set_location()
        self.set_adm_location()
        self.set_address()
        self.set_is()
        self.set_heritage()
        self.set_heritage_id()
        self.update_labels()
        self.update_descriptions()
        self.set_coords()
        self.set_image()
        self.set_commonscat()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("rs", "sr", RsSr)
    dataset.data_files = {
        "admin": "serbia_admin.json",
        "okruzi": "serbia_okruzi.json",
        "settlements": "serbia_settlements.json"
    }
    importer.main(args, dataset)
Esempio n. 20
0
    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing,
                          repository)
        self.set_monuments_all_id("id")
        self.set_changed()
        self.set_wlm_source()
        self.set_heritage_id()
        self.set_heritage()
        self.set_country()
        self.set_coords()
        self.set_adm_location()
        self.set_location()
        self.set_directions()
        self.set_is()
        self.set_image()
        self.set_commonscat()
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("ir", "fa", IrFa)
    dataset.data_files = {
        "provinces": "iran_provinces.json",  # http://tinyurl.com/yd9xed2s
        "cities": "iran_cities.json"  # http://tinyurl.com/ybslxkm9
    }
    importer.main(args, dataset)
Esempio n. 21
0
        return super().exists_with_monument_article("de", "artikel")

    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping,
                          data_files, existing, repository)
        self.set_monuments_all_id()
        self.set_changed()
        self.wlm_source = self.create_wlm_source(self.monuments_all_id)
        self.update_labels()
        self.set_descriptions()
        self.set_is()
        self.set_type()
        self.set_country()
        self.set_image("foto")
        self.set_heritage()
        self.set_heritage_id()
        self.set_adm_location()
        self.set_street_address()
        self.set_coords(("lat", "lon"))
        self.set_commonscat()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("at", "de", AtDe)
    dataset.data_files = {"municipalities": "austria_municipalities.json"}
    dataset.lookup_downloads = {"types": "at_(de)/types"}
    importer.main(args, dataset)
Esempio n. 22
0
        wml_code = self.mapping["table_name"].upper()
        self.add_statement("wlm_id", "{}-{}".format(wml_code, str(self.id)))

    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing,
                          repository)
        self.set_monuments_all_id("id")
        self.set_registrant_url()
        self.set_changed()
        self.set_wlm_source()
        self.set_heritage_id()
        self.set_country()
        self.set_adm_location()
        self.set_location()
        self.set_heritage()
        self.set_commonscat()
        self.set_image()
        self.set_coords()
        self.set_is()
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("cm", "fr", CmFr)
    dataset.data_files = {"regions": "cameroon_regions.json"}
    importer.main(args, dataset)
Esempio n. 23
0
        self.arbetsam_source = self.create_stated_in_source(
            "Q28834837", "2013-11-28")
        self.set_id()
        self.set_country()
        self.set_source()
        self.set_registrant_url()
        self.set_is()
        self.set_labels("sv", self.namn)
        self.set_descriptions()
        self.set_type()
        self.set_adm_location()
        self.set_location()
        self.set_street_address("sv", "adress")
        self.set_image("bild")
        self.set_commonscat()
        self.set_coords(("lat", "lon"))
        self.set_wd_item(self.find_matching_wikidata(mapping))
        # self.print_wd()


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("se-arbetsl", "sv", SeArbetslSv)
    dataset.data_files = {
        "municipalities": "sweden_municipalities.json",
        "types": "se-arbetsl_(sv)_types.json",
        "settlements": "sweden_settlements.json"
    }
    importer.main(args, dataset)
Esempio n. 24
0
        self.set_country()
        self.set_is()
        self.set_heritage()
        self.set_source()
        self.set_registrant_url()
        self.update_labels()
        self.update_descriptions()
        self.set_image("bild")
        self.set_commonscat()
        self.set_coords(("lat", "lon"))
        self.set_inception()
        self.set_no_of_buildings()
        self.set_heritage_bbr()
        self.set_adm_location()
        self.set_architect()
        self.set_location()
        self.set_function()
        self.set_wd_item(self.find_matching_wikidata(mapping))
        self.check_wd_item()


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("se-bbr", "sv", SeBbrSv)
    dataset.data_files = {
        "functions": "se-bbr_(sv)_functions.json",
        "settlements": "sweden_settlements.json"
    }
    importer.main(args, dataset)
Esempio n. 25
0
        Monument.__init__(self, db_row_dict, mapping, data_files, existing,
                          repository)
        self.set_monuments_all_id()
        self.set_changed()
        self.wlm_source = self.create_wlm_source(self.monuments_all_id)
        self.set_heritage()
        self.set_country()
        self.set_source()
        self.set_registrant_url()
        self.set_is()
        self.update_labels()
        self.update_descriptions()
        self.set_commonscat()
        self.set_image("billede")
        self.set_coords(("lat", "lon"))
        self.set_adm_location()
        self.set_type()
        self.set_id()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("dk-fortidsminder", "da", DkFortidsDa)
    dataset.data_files = {
        "types": "dk-fortidsminder_(da)_types.json",
        "municipalities": "denmark_municipalities.json"
    }
    importer.main(args, dataset)
Esempio n. 26
0
            language=language)

    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping,
                          data_files, existing, repository)
        self.set_monuments_all_id("id")
        self.set_changed()
        self.set_wlm_source()
        self.set_heritage()
        self.set_heritage_id()
        self.set_country()
        self.set_registrant_url()
        self.set_is()
        self.set_adm_location()
        self.set_directions()
        self.set_image("imagen")
        self.set_commonscat("monumento_categoria")
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Point of entrance for importer."""
    args = importer.handle_args()
    dataset = Dataset("co", "es", CoEs)
    dataset.data_files = {
        "departments": "colombia_departments.json",
    }
    importer.main(args, dataset)
Esempio n. 27
0
                          repository)
        self.set_changed()
        self.set_monuments_all_id("number")
        self.set_wlm_source()
        self.set_heritage_id()
        self.set_heritage()
        self.set_coords()
        self.set_commonscat()
        self.set_image("pilt")
        self.set_country()
        self.set_adm_location()
        self.update_heritage()
        self.set_is()
        self.set_location()
        self.set_labels("et", self.nimi)
        self.set_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("ee", "et", EeEt)
    dataset.data_files = {
        "municipalities": "estonia_municipalities.json",
        "settlements": "estonia_settlements.json",
        "counties": "estonia_counties.json"
    }
    dataset.lookup_downloads = {"heritage_types": "ee (et)/types"}
    importer.main(args, dataset)
Esempio n. 28
0
        if self.has_non_empty_attribute("address"):
            dirs = utils.package_monolingual(self.address, "en")
            self.add_statement("directions", dirs)

    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping,
                          data_files, existing, repository)
        self.set_monuments_all_id("id")
        self.set_changed()
        self.set_wlm_source()
        self.set_country()
        self.set_coords(("lat", "lon"))
        self.set_adm_location()
        self.set_location()
        self.set_commonscat()
        self.set_is()
        self.set_heritage_id()
        self.set_heritage()
        self.set_heritage_start()
        self.set_directions()
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("ke", "en", KeEn)
    importer.main(args, dataset)
Esempio n. 29
0
    def update_labels(self):
        romanian = utils.remove_markup(self.denumire)
        self.add_label("ro", romanian)

    def __init__(self, db_row_dict, mapping, data_files, existing, repository):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing,
                          repository)
        self.set_monuments_all_id("cod")
        self.set_changed()
        self.set_wlm_source()
        self.set_heritage_id()
        self.set_heritage()
        self.set_country()
        self.set_adm_location()
        self.set_address()
        self.set_location()
        self.set_coords()
        self.set_commonscat()
        self.set_image("imagine")
        self.update_labels()
        self.update_descriptions()
        self.set_wd_item(self.find_matching_wikidata(mapping))


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("ro", "ro", RoRo)
    dataset.data_files = {"counties": "romania_counties.json"}
    importer.main(args, dataset)
Esempio n. 30
0

class ZaEn(Monument):
    def update_labels(self):
        name = utils.remove_markup(self.site_name)
        self.add_label("en", name)

    def set_adm_location(self):
        # print(self.magisterial_district)
        return

    def __init__(self, db_row_dict, mapping, data_files, existing):
        Monument.__init__(self, db_row_dict, mapping, data_files, existing)
        self.update_labels()
        # self.exists("sq")
        self.set_commonscat()
        self.set_image("image")
        self.set_coords(("lat", "lon"))
        self.set_adm_location()
        # self.set_no()
        # self.set_location()
        self.exists_with_prop(mapping)
        # self.print_wd()


if __name__ == "__main__":
    """Command line entry point for importer."""
    args = importer.handle_args()
    dataset = Dataset("za", "en", ZaEn)
    importer.main(args, dataset)