def set_file_copyright(self, doc, text):
if self.has_package(doc) and self.has_file(doc):<EOL><INDENT>if not self.file_copytext_set:<EOL><INDENT>self.file_copytext_set = True<EOL>if validations.validate_file_cpyright(text):<EOL><INDENT>if isinstance(text, string_types):<EOL><INDENT>self.file(doc).copyright = str_from_text(text)<EOL><DEDENT>else:<EOL><INDENT>self.file(doc).copyright = text  <EOL><DEDENT>return True<EOL><DEDENT>else:<EOL><INDENT>raise SPDXValueError('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise CardinalityError('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise OrderError('<STR_LIT>')<EOL><DEDENT>
Raises OrderError if no package or file defined.
        Raises SPDXValueError if not free form text or NONE or NO_ASSERT.
        Raises CardinalityError if more than one.