def serialize(self): """ Converts the object to a serialized tuple of data """ if self.note == None: self.note = Note() return self.note.serialize()
def set_note(self, text): """ Assigns the specified text to the associated note. @param text: Text of the note @type text: str """ if not self.note: self.note = Note() self.note.set(text)
def __init__(self): """creates a new Source instance""" PrimaryObject.__init__(self) MediaBase.__init__(self) NoteBase.__init__(self) self.title = "" self.author = "" self.pubinfo = "" self.note = Note() self.datamap = {} self.abbrev = "" self.reporef_list = []
def __init__(self, source=None): """ Create a new NoteBase, copying from source if not None @param source: Object used to initialize the new object @type source: NoteBase """ if source and source.note: text = source.note.get() else: text = "" self.note = Note(text)
def unserialize(self, data): """ Converts a serialized tuple of data to an object """ if data is not None: self.note = Note().unserialize(data)
def unique_note(self): """Creates a unique instance of the current note""" self.note = Note(self.note.get())