Esempio n. 1
0
 def setUp(self):
     """Setup creates a thesis ETD object for ingestion of a thesis pdf 
     and MODS xml object into a Fedora repository for specific test
     methods."""
     super(SimpleThesisTest,self).setUp()
     self.thesis_obj = self.repo.get_object(type=ThesisDatasetObject)
     self.thesis_obj.save()
     thesis_path = fixure_path('thesis.pdf')
     thesis_fo = open(thesis_path,'rb')
     thesis_pdf = thesis_fo.read()
     thesis_fo.close()
     self.thesis_obj.thesis.contents = thesis_pdf
     mods_xml = mods.MetadataObjectDescriptionSchema()
     mods_xml.title_info = mods.titleInfo(title='Test Title')
     self.thesis_obj.mods.contents = mods_xml
     self.fedora_fixures_ingested.append(self.thesis_obj.pid)
Esempio n. 2
0
    def setUp(self):
        self.mods = mods.MetadataObjectDescriptionSchema()
        self.abstract_txt = u'''The value and importance of diversity in one's 
portfolio has long been postulated, but it
was Harry M. Markowitz who proposed the first mathematical model that would allow
investors to systematically compute the optimal allocation of assets based on individual
preferences (the investor's utility function), covariance, variance, and expected value of
returns. Adequate diversification can mitigate risk substantially while potentially
enhancing returns. Markowitz provided investors with the tools to optimally diversify
their investments.'''
        self.mods.abstract = mods.abstract(value=self.abstract_txt)
        creator = mods.name(type="personal",
                            display_form="Sargent, Blair M.")
        creator_role = mods.role(role_term=mods.roleTerm(authority='marcrt',
                                                         type='text',
                                                         value='creator'))
        creator.roles.append(creator_role)
        creator.name_parts.append(mods.namePart(type="given",value='Blair'))
        creator.name_parts.append(mods.namePart(type="middle",value="M"))
        creator.name_parts.append(mods.namePart(type="family",value="Sargent"))
        self.mods.names.append(creator)
        advisor = mods.name(type="personal")
        advisor.name_parts.append(mods.namePart(value="de Arauju, Pedro"))
        advisor_role = mods.role(role_term=mods.roleTerm(authority='marcrt',
                                                         type='text',
                                                         value='advisor'))
        advisor.roles.append(advisor_role)
        self.mods.names.append(advisor)
        department = mods.name(type='corporate')
        department.name_parts.append(mods.namePart(value='Department of Economics and Business'))
        department.roles.append(mods.role(role_term=mods.roleTerm(authority='marcrt',
                                                                  type='text',
                                                                  value='sponsor')))
        self.mods.names.append(department)
        institution = mods.name(type='corporate')
        institution.name_parts.append(mods.namePart(value='Colorado College'))
        institution.roles.append(mods.role(role_term=mods.roleTerm(authority='marcrt',
                                                                   type='text',
                                                                   value='degree grantor')))
        self.mods.names.append(institution)
        self.mods.genre = mods.genre(authority='marcgt',
                                     value='thesis')
        pid = mods.identifier(type='pid',
                              value='coccc:3156')
        self.mods.identifiers.append(pid)
        english = mods.languageTerm(type='code',
                                    value='EN')
        eng_language = mods.language(terms=[english,])
        self.mods.languages.append(eng_language)
        self.thesis_note = mods.note(type='thesis',
                                     value='Senior Thesis -- Colorado College')
        self.mods.notes.append(self.thesis_note)
        self.origin_info = mods.originInfo(date_captured='2011',
                                           date_issued='2011',
                                           date_issued_keydate='yes',
                                           place_term='Colorado Springs, Colo.',
                                           place_term_type='text',
                                           publisher='Colorado College')
        self.mods.origin_info = self.origin_info
        self.mods.physical_description = mods.physicalDescription(extent='56 p. ill.',
                                                                  digital_origin='born digital')
        self.mods.type_of_resource  = mods.typeOfResource(value="text")
        self.mods.title_info = mods.titleInfo()
        self.mods.title_info.title = 'Security Return Covariance Forecasting ' +\
                                     'and Applications for Multi-Period ' +\
                                     'Mean-Variance Formulation'