Exemplo n.º 1
0
    def __init__(self, source=None):
        """
        Initialize a MediaObject. 
        
        If source is not None, then object is initialized from values of the 
        source object.

        :param source: Object used to initialize the new object
        :type source: MediaObject
        """
        PrimaryObject.__init__(self, source)
        CitationBase.__init__(self, source)
        NoteBase.__init__(self, source)
        DateBase.__init__(self, source)
        AttributeBase.__init__(self, source)
        TagBase.__init__(self)

        if source:
            self.path = source.path
            self.mime = source.mime
            self.desc = source.desc
            self.thumb = source.thumb
        else:
            self.path = ""
            self.mime = ""
            self.desc = ""
            self.thumb = None
Exemplo n.º 2
0
 def __init__(self):
     """Create a new Citation instance."""
     PrimaryObject.__init__(self)
     MediaBase.__init__(self)  #  7
     NoteBase.__init__(self)  #  6
     DateBase.__init__(self)  #  2
     self.source_handle = None  #  5
     self.page = ""  #  3
     self.confidence = Citation.CONF_NORMAL  #  4
     self.datamap = {}  #  8
Exemplo n.º 3
0
 def __init__(self):
     """
     Create a new Repository instance.
     """
     PrimaryObject.__init__(self)
     NoteBase.__init__(self)
     AddressBase.__init__(self)
     UrlBase.__init__(self)
     self.type = RepositoryType()
     self.name = ""
Exemplo n.º 4
0
 def __init__(self):
     """Create a new Source instance."""
     PrimaryObject.__init__(self)
     MediaBase.__init__(self)
     NoteBase.__init__(self)
     self.title = ""
     self.author = ""
     self.pubinfo = ""
     self.datamap = {}
     self.abbrev = ""
     self.reporef_list = []
Exemplo n.º 5
0
 def __init__(self):
     """
     Create a new Family instance. 
     
     After initialization, most data items have empty or null values, 
     including the database handle.
     """
     PrimaryObject.__init__(self)
     CitationBase.__init__(self)
     NoteBase.__init__(self)
     MediaBase.__init__(self)
     AttributeBase.__init__(self)
     LdsOrdBase.__init__(self)
     TagBase.__init__(self)
     self.father_handle = None
     self.mother_handle = None
     self.child_ref_list = []
     self.type = FamilyRelType()
     self.event_ref_list = []
     self.complete = 0
Exemplo n.º 6
0
    def __init__(self, source=None):
        """
        Create a new Event instance, copying from the source if present.

        :param source: An event used to initialize the new event
        :type source: Event
        """

        PrimaryObject.__init__(self, source)
        CitationBase.__init__(self, source)
        NoteBase.__init__(self, source)
        MediaBase.__init__(self, source)
        AttributeBase.__init__(self)
        DateBase.__init__(self, source)
        PlaceBase.__init__(self, source)

        if source:
            self.__description = source.__description
            self.__type = EventType(source.__type)
        else:
            self.__description = ""
            self.__type = EventType()
Exemplo n.º 7
0
    def __init__(self, source=None):
        """
        Create a new Place object, copying from the source if present.

        :param source: A Place object used to initialize the new Place
        :type source: Place
        """
        PrimaryObject.__init__(self, source)
        CitationBase.__init__(self, source)
        NoteBase.__init__(self, source)
        MediaBase.__init__(self, source)
        UrlBase.__init__(self, source)
        if source:
            self.long = source.long
            self.lat = source.lat
            self.title = source.title
            self.main_loc = Location(source.main_loc)
            self.alt_loc = map(Location, source.alt_loc)
        else:
            self.long = ""
            self.lat = ""
            self.title = ""
            self.main_loc = None
            self.alt_loc = []