def createGeorge(self, birthPlace, deathPlace):
        """

        :param PlaceDescription birthPlace: birth place
        :param PlaceDescription deathPlace: death place
        :return:
        """
        person = Person()
        person.gender.type = GenderType.Male
        #person.setGender(GenderType.Male)


        fact = Fact()
        fact.id = u"123"
        fact.type = FactType.Birth

        fact.date.original = u"February 22, 1732"
        fact.date.formal = u"+1732-02-22"

        fact.place.original = birthPlace.names.get().value.lower()
        fact.place.description = u"#" + birthPlace.id

        person.addFact(fact)

        fact = Fact()
        fact.id = u"456"
        fact.type = FactType.Death
        fact.date.original = u"December 14, 1799"
        fact.date.formal = u"+1799-12-14T22:00:00"
        fact.place.original = deathPlace.names.get().value.lower()
        fact.place.description = u"#" + deathPlace.id
        person.addFact(fact)

        name = Name()
        nameForm = NameForm()
        nameForm.fullText = u"George Washington"
        part = NamePart()
        part.type = NamePartType.Given
        part.value = u"George"
        nameForm.parts.append(part)
        part = NamePart()
        part.type = NamePartType.Surname
        part.value = u"Washington"
        nameForm.parts.append(part)

        name.nameForms.append(nameForm)
        name.id = u"789"

        person.names.append(name)
        person.id = u"BBB-BBBB"

        return person
示例#2
0
    def createGeorge(self, birthPlace, deathPlace):
        """

        :param PlaceDescription birthPlace: birth place
        :param PlaceDescription deathPlace: death place
        :return:
        """
        person = Person()
        person.gender.type = GenderType.Male
        #person.setGender(GenderType.Male)

        fact = Fact()
        fact.id = u"123"
        fact.type = FactType.Birth

        fact.date.original = u"February 22, 1732"
        fact.date.formal = u"+1732-02-22"

        fact.place.original = birthPlace.names.get().value.lower()
        fact.place.description = u"#" + birthPlace.id

        person.addFact(fact)

        fact = Fact()
        fact.id = u"456"
        fact.type = FactType.Death
        fact.date.original = u"December 14, 1799"
        fact.date.formal = u"+1799-12-14T22:00:00"
        fact.place.original = deathPlace.names.get().value.lower()
        fact.place.description = u"#" + deathPlace.id
        person.addFact(fact)

        name = Name()
        nameForm = NameForm()
        nameForm.fullText = u"George Washington"
        part = NamePart()
        part.type = NamePartType.Given
        part.value = u"George"
        nameForm.parts.append(part)
        part = NamePart()
        part.type = NamePartType.Surname
        part.value = u"Washington"
        nameForm.parts.append(part)

        name.nameForms.append(nameForm)
        name.id = u"789"

        person.names.append(name)
        person.id = u"BBB-BBBB"

        return person
    def createMartha(self, birthPlace, deathPlace):
        """

        :param PlaceDescription birthPlace: birth place
        :param PlaceDescription deathPlace: death place
        :return:
        """
        person = Person()
        person.gender.type = GenderType.Male
        #person.setGender(GenderType.Male)


        fact = Fact()
        fact.id = u"321"
        fact.type = FactType.Birth

        fact.date.original = u"June 2, 1731"
        fact.date.formal = u"+1731-06-02"
        fact.place.original = birthPlace.names.get().value.lower()
        fact.place.description = u"#" + birthPlace.id

        person.addFact(fact)

        fact = Fact()
        fact.id = u"654"
        fact.type = FactType.Death
        fact.date.original = u"May 22, 1802"
        fact.date.formal = u"+1802-05-22"
        fact.place.original = deathPlace.names.get().value.lower()
        fact.place.description = u"#" + deathPlace.id
        person.addFact(fact)

        name = Name()
        nameForm = NameForm()
        nameForm.fullText = u"Martha Dandridge Custis"
        part = NamePart()
        part.type = NamePartType.Given
        part.value = u"Martha Dandridge"
        nameForm.parts.append(part)
        part = NamePart()
        part.type = NamePartType.Surname
        part.value = u"Custis"
        nameForm.parts.append(part)

        name.nameForms.append(nameForm)
        name.id = u"987"

        person.names.append(name)
        person.id = u"CCC-CCCC"

        return person
示例#4
0
    def createMartha(self, birthPlace, deathPlace):
        """

        :param PlaceDescription birthPlace: birth place
        :param PlaceDescription deathPlace: death place
        :return:
        """
        person = Person()
        person.gender.type = GenderType.Male
        #person.setGender(GenderType.Male)

        fact = Fact()
        fact.id = u"321"
        fact.type = FactType.Birth

        fact.date.original = u"June 2, 1731"
        fact.date.formal = u"+1731-06-02"
        fact.place.original = birthPlace.names.get().value.lower()
        fact.place.description = u"#" + birthPlace.id

        person.addFact(fact)

        fact = Fact()
        fact.id = u"654"
        fact.type = FactType.Death
        fact.date.original = u"May 22, 1802"
        fact.date.formal = u"+1802-05-22"
        fact.place.original = deathPlace.names.get().value.lower()
        fact.place.description = u"#" + deathPlace.id
        person.addFact(fact)

        name = Name()
        nameForm = NameForm()
        nameForm.fullText = u"Martha Dandridge Custis"
        part = NamePart()
        part.type = NamePartType.Given
        part.value = u"Martha Dandridge"
        nameForm.parts.append(part)
        part = NamePart()
        part.type = NamePartType.Surname
        part.value = u"Custis"
        nameForm.parts.append(part)

        name.nameForms.append(nameForm)
        name.id = u"987"

        person.names.append(name)
        person.id = u"CCC-CCCC"

        return person