示例#1
0
    def habitantes_municipio(query, municipio) -> str:
        query = query.replace(Constants.answer0(),
                              Constants.answer0() + " " + Constants.answer1())

        query += (Constants.municipio() + " aragopedia:menPopulation " +
                  Constants.answer0() + " . ")

        query += (Constants.municipio() + " aragopedia:womenPopulation " +
                  Constants.answer1() + " . ")

        query += Constants.municipio() + " rdfs:label " + Constants.etiqueta()

        query += (TemplatesAragon.create_bif_contains(
            municipio, Constants.etiqueta()) + " . ")
        return query
    def info_villa(query, villa) -> str:

        query = query.replace(
            Constants.answer0(),
            Constants.answer0() + " " + Constants.answer1() + " " +
            Constants.answer2() + " " + Constants.answer3(),
        )

        query += (Constants.comarca() + " " + Constants.aux0() +
                  " ei2a:villas_y_tierras . ")

        query += (Constants.comarca() + " ei2a:organizationName " +
                  Constants.etiqueta() + " . ")

        query += (TemplatesAgriculture.create_bif_contains(
            villa, Constants.etiqueta()) + " . ")

        query += (Constants.comarca() +
                  " <http://www.w3.org/2003/01/geo/wgs84_pos#location> " +
                  Constants.location() + " . ")

        query += (Constants.location() +
                  " <http://www.w3.org/2003/01/geo/wgs84_pos#location> " +
                  Constants.aux1() + " . ")

        query += (Constants.aux1() + " ei2a:organizationName " +
                  Constants.answer0() + " . ")

        query += (Constants.comarca() +
                  " <http://opendata.aragon.es/def/ei2a#phone> " +
                  Constants.answer1() + " . ")

        query += (Constants.comarca() + " <http://xmlns.com/foaf/0.1/mbox> " +
                  Constants.answer2() + " . ")

        query += (Constants.comarca() +
                  " <http://opendata.aragon.es/def/ei2a#CIF> " +
                  Constants.answer3() + " . ")
        return query