示例#1
0
 def serialize(self):
     """
     Converts the object to a serialized tuple of data
     """
     if self.note == None:
         self.note = Note()
     return self.note.serialize()
示例#2
0
    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)
示例#3
0
 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 = []
示例#4
0
    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)
示例#5
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     if data is not None:
         self.note = Note().unserialize(data)
示例#6
0
 def unique_note(self):
     """Creates a unique instance of the current note"""
     self.note = Note(self.note.get())