def set_doc_name(self, doc, name):
if not self.doc_name_set:<EOL><INDENT>doc.name = name<EOL>self.doc_name_set = True<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>raise CardinalityError('<STR_LIT>')<EOL><DEDENT>
Sets the document name.
        Raises CardinalityError if already defined.