Exemple #1
0
def generateMainDesign1(data, language):

    main = headerCV1

    if (data['my0:aboutPerson']):
        item = data['my0:aboutPerson']
        address = item['my0:address']
        country = runQueryCountryMainOntology(address['my0:country'], language)

        # write personal information about the user
        main = main + r'''
      \begin{tabular*}{7in}{l@{\extracolsep{\fill}}r}
      \textbf{\Large ''' + item['my0:firstName'] + space + item[
            'my0:lastName'] + r'''} &
       \textbf{} \\
      ''' + getValueFromLang(
                address['my0:street'], language) + space + address[
                    'my0:postalCode'] + r''' & ''' + item['my0:email'] + r'''\\
      ''' + getValueFromLang(address['my0:city'],
                             language) + comma + country + r''' & ''' + item[
                                 'my0:phoneNumberMobile'] + r'''\\'''

        # write website information about the user
        for website in (item['my0:hasWebsite']):
            if doesURIContainWord(website['my0:websiteType'], 'Linkedin'):
                main = main + \
                    r'''\faLinkedin { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} & \\'''
            elif doesURIContainWord(website['my0:websiteType'], 'Xing'):
                main = main + \
                    r'''\faXing { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} & \\'''
            else:
                main = main + r'''\faGlobe { }  \href{''' + website[
                    'my0:websiteURL'] + r'''}{''' + website[
                        'my0:websiteURL'] + r'''} & \\
        '''
        main = main + r'''
      \end{tabular*}
      \\'''

    if (data['my0:hasWorkHistory']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \resheading{''' + workTitle[language] + r'''}
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \begin{itemize}'''
        works = sorted(data['my0:hasWorkHistory'],
                       key=lambda x: x['my0:startDate'],
                       reverse=True)

        for item in (works):
            endDate = item['my0:endDate']
            address = item['my0:employedIn']['my0:orgAddress']
            countryName = runQueryCountryMainOntology(address['my0:country'],
                                                      language)
            cityName = getValueFromLang(address['my0:city'], language)
            jobTitle = getValueFromLang(item['my0:jobTitle'], language)
            jobType = runQueryMainOntology(item['my0:jobType'], language)
            if item['my0:endDate'] == "":
                endDate = current[language]
            main = main + r'''
        \item \ressubheading{''' + item['my0:employedIn'][
                'my0:orgName'] + r'''}{''' + cityName + r''', ''' + countryName + r'''}{''' + jobTitle + comma + jobType + r'''}{''' + item[
                    'my0:startDate'] + r''' - ''' + endDate + r'''}\\
        \begin{itemize}
        \item[]{''' + getValueFromLang(item['my0:jobDescription'],
                                       language) + r'''}
        \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasEducation']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + educationTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''

        educations = sorted(data['my0:hasEducation'],
                            key=lambda x: x['my0:eduStartDate'],
                            reverse=True)
        for item in (educations):
            endDate = item['my0:eduGradDate']
            address = item['my0:studiedIn']['my0:orgAddress']
            countryName = runQueryCountryMainOntology(address['my0:country'],
                                                      language)
            cityName = getValueFromLang(address['my0:city'], language)
            if item['my0:eduGradDate'] == "":
                endDate = current[language]
            main = main + r'''
		    \item \ressubheading{''' + getValueFromLang(
                item['my0:studiedIn']['my0:orgName'], language
            ) + r'''}{''' + cityName + r''', ''' + countryName + r'''}{''' + runQueryMainOntology(
                item['my0:degree'], language) + comma + getValueFromLang(
                    item['my0:degreeFieldOfStudy'],
                    language) + r'''}{''' + item[
                        'my0:eduStartDate'] + r''' - ''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + getValueFromLang(item['my0:eduDescription'],
                                     language) + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasCourse']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + courseTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        courses = sorted(data['my0:hasCourse'],
                         key=lambda x: x['my0:courseStartDate'],
                         reverse=True)
        for item in (courses):
            endDate = item['my0:courseFinishDate']
            address = item['my0:organizedBy']['my0:orgAddress']
            countryName = runQueryCountryMainOntology(address['my0:country'],
                                                      language)
            cityName = getValueFromLang(address['my0:city'], language)
            if item['my0:courseFinishDate'] == "":
                endDate = current[language]
            main = main + r'''
		    \item \ressubheading{''' + item['my0:organizedBy'][
                'my0:orgName'] + r'''}{''' + cityName + r''', ''' + countryName + r'''}{''' + getValueFromLang(
                    item['my0:courseTitle'], language
                ) + comma + item['my0:courseURL'] + r'''}{''' + item[
                    'my0:courseStartDate'] + r''' - ''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + getValueFromLang(item['my0:courseDescription'],
                                     language) + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasPublication']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + publicationTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        publications = sorted(data['my0:hasPublication'],
                              key=lambda x: x['my0:publicationDate'],
                              reverse=True)
        for item in (publications):
            main = main + r'''
		    \item \ressubheading{''' + getValueFromLang(
                item['my0:publicationTitle'], language) + r'''}{''' + item[
                    'my0:publicationPublisher'] + r'''}{''' + item[
                        'my0:publicationAuthor'] + r'''}{''' + item[
                            'my0:publicationDate'] + r'''}\\
		    \begin{itemize}
		    \item[]{''' + getValueFromLang(item['my0:publicationDescription'],
                                     language) + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasProject']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + projectTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        projects = sorted(data['my0:hasProject'],
                          key=lambda x: x['my0:projectStartDate'],
                          reverse=True)
        for item in (projects):
            endDate = item['my0:projectEndDate']
            if item['my0:projectEndDate'] == "":
                endDate = current[language]
            main = main + r'''
		    \item \ressubheading{''' + getValueFromLang(
                item['my0:projectName'], language
            ) + r'''}{''' + getValueFromLang(
                item['my0:projectCreator'], language
            ) + r'''}{''' + getValueFromLang(
                item['my0:projectRole'], language) + r'''}{''' + item[
                    'my0:projectStartDate'] + r''' - ''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + getValueFromLang(item['my0:projectDescription'],
                                     language) + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasPatent']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + patentTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        patents = sorted(data['my0:hasPatent'],
                         key=lambda x: x['my0:patentIssuedDate'],
                         reverse=True)
        for item in (patents):
            endDate = item['my0:patentIssuedDate']
            if item['my0:patentIssuedDate'] == "":
                endDate = pending[language]
            main = main + r'''
		    \item \ressubheading{''' + item[
                'my0:patentNumber'] + r''' - ''' + getValueFromLang(
                    item['my0:patentTitle'], language
                ) + r'''}{''' + getValueFromLang(
                    item['my0:patentOffice'], language) + r'''}{''' + item[
                        'my0:patentInventor'] + r'''}{''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + getValueFromLang(item['my0:patentDescription'],
                                     language) + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasOtherInfo']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + otherInfoTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        for item in (data['my0:hasOtherInfo']):
            main = main + r'''
		    \item[] \ressubheading{''' + runQueryMainOntology(
                item['my0:otherInfoType'],
                language) + r'''}{}{}{}\\*''' + getValueFromLang(
                    item['my0:otherInfoDescription'], language)

        main = main + r'''\end{itemize}'''
    return main
Exemple #2
0
def generateMainDesign2Enriched(data, language):
    main = headerCV2

    if (data['my0:aboutPerson']):
        item = data['my0:aboutPerson']
        # write personal information about the user
        main = main + r'''\def \fullname {''' + item['my0:firstName'] + space + item['my0:lastName'] + r'''}
      '''

        if item['my0:phoneNumberMobile']:
            main = main + r'''\def \phoneicon {\faPhone}
        \def \phonetext {''' + item['my0:phoneNumberMobile'] + r'''}
        '''

        if item['my0:email']:
            main = main + r'''\def \emailicon {\faEnvelope}
        \def \emaillink {mailto:''' + item['my0:email'] + r'''} \def \emailtext {''' + item['my0:email'] + r'''}
        '''

    main = main + settingsPart2

    if (data['my0:aboutPerson']):
        item = data['my0:aboutPerson']
        # write website information about the user
        for website in (item['my0:hasWebsite']):
            if doesURIContainWord(website['my0:websiteType'], 'Linkedin'):
                main = main + \
                    r'''\faLinkedin { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} \newline'''
            elif doesURIContainWord(website['my0:websiteType'], 'Xing'):
                main = main + \
                    r'''\faXing { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} \newline'''
            else:
                main = main + r'''\faGlobe { }  \href{''' + website['my0:websiteURL'] + r'''}{''' + website['my0:websiteURL'] + r'''} \newline
        '''

    main = main + r'''\newline'''

    if(data['my0:hasEducation']):
        # write educational information about the user
        main = main + r'''
      %-------------------------------------------------- EDUCATION --------------------------------------------------
      \section{\faGraduationCap}{''' + educationTitle[language] + r'''}
      '''
        educations = sorted(
            data['my0:hasEducation'],
            key=lambda x: x['my0:eduStartDate'], reverse=True
        )

        for item in (educations):
            orgName = getValueFromLang(item["my0:studiedIn"]["my0:orgName"], language)
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''

            orgCityName = getValueFromLang(item["my0:studiedIn"]["my0:orgAddress"]["my0:city"], language)
            orgCityURL = runQueryDBPEDIA(orgCityName, language)
            if orgCityURL != "":
                orgCityName = r'''\href{''' + orgCityURL + \
                    r'''}{''' + orgCityName + r'''}'''

            orgCountryName = runQueryCountryMainOntology(item["my0:studiedIn"]["my0:orgAddress"]["my0:country"], language)
            orgCountryURL = runQueryDBPEDIA(orgCountryName, language)
            if orgCountryURL != "":
                orgCountryName = r'''\href{''' + orgCountryURL + \
                    r'''}{''' + orgCountryName + r'''}'''
            degreeName = runQueryMainOntology(item['my0:degree'], language)
                    
            endDate = item['my0:eduGradDate']
            if item['my0:eduGradDate'] == "":
                endDate = current[language]

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + orgName + r'''}{''' + \
                item['my0:eduStartDate'] + r''' -- ''' + \
                endDate + r'''}'''
            main = main + r'''{''' + degreeName + r''' ''' + \
                getValueFromLang(item["my0:degreeFieldOfStudy"], language) + \
                r'''}{''' + orgCityName + r''', ''' + orgCountryName + r'''}'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasCourse']):
        # write courses information about the user
        main = main + r'''
      %-------------------------------------------------- COURSES --------------------------------------------------
      \section{\faGraduationCap}{''' + courseTitle[language] + r'''}
      '''
        courses = sorted(
            data['my0:hasCourse'],
            key=lambda x: x['my0:courseStartDate'], reverse=True
        )
        for item in (courses):
            orgName = item["my0:organizedBy"]["my0:orgName"]
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''

            orgCityName = getValueFromLang(item["my0:organizedBy"]["my0:orgAddress"]["my0:city"], language)
            orgCityURL = runQueryDBPEDIA(orgCityName, language)
            if orgCityURL != "":
                orgCityName = r'''\href{''' + orgCityURL + \
                    r'''}{''' + orgCityName + r'''}'''

            orgCountryName = runQueryMainOntology(item["my0:organizedBy"]["my0:orgAddress"]["my0:country"], language)
            orgCountryURL = runQueryDBPEDIA(orgCountryName, language)
            if orgCountryURL != "":
                orgCountryName = r'''\href{''' + orgCountryURL + \
                    r'''}{''' + orgCountryName + r'''}'''
            
            endDate = item['my0:courseFinishDate']
            if item['my0:courseFinishDate'] == "":
                endDate = current[language]

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + orgName + r'''}{''' + \
                item['my0:courseStartDate'] + r''' -- ''' + \
                endDate + r'''}'''
            main = main + r'''{''' + \
                getValueFromLang(item["my0:courseTitle"], language) + \
                r'''}{''' + orgCityName + r''', ''' + orgCountryName + r'''}'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasWorkHistory']):
        # write experience information about the user
        main = main + r'''
      %-------------------------------------------------- EXPERIENCE --------------------------------------------------
      \section{\faPieChart}{''' + workTitle[language] + r'''}
      '''
        works = sorted(
            data['my0:hasWorkHistory'],
            key=lambda x: x['my0:startDate'], reverse=True
        )
        for item in (works):
            orgName = item["my0:employedIn"]["my0:orgName"]
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''

            orgCityName = getValueFromLang(item["my0:employedIn"]["my0:orgAddress"]["my0:city"], language)
            orgCityURL = runQueryDBPEDIA(orgCityName, language)
            if orgCityURL != "":
                orgCityName = r'''\href{''' + orgCityURL + \
                    r'''}{''' + orgCityName + r'''}'''

            orgCountryName = getnameURI(item["my0:employedIn"]["my0:orgAddress"]["my0:country"])
            orgCountryURL = runQueryDBPEDIA(orgCountryName, language)
            if orgCountryURL != "":
                orgCountryName = r'''\href{''' + orgCountryURL + \
                    r'''}{''' + orgCountryName + r'''}'''
            endDate = item['my0:endDate']
            if item['my0:endDate'] == "":
                endDate = current[language]

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + orgName + r'''}{''' + \
                item['my0:startDate'] + r''' -- ''' + \
                endDate + r'''}'''
            main = main + r'''{''' + getValueFromLang(item['my0:jobTitle'], language) + \
                r'''}{''' + orgCityName + r''', ''' + orgCountryName + r'''}'''
            main = main + r'''\resumeItemListStart
        \resumeItem { ''' + getValueFromLang(item['my0:jobDescription'], language) + r'''}
        \resumeItemListEnd'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasProject']):
        # write project information about the user
        main = main + r'''
      %-------------------------------------------------- PROJECTS --------------------------------------------------
      \section{\faFlask}{''' + projectTitle[language] + r'''}
      '''
        projects = sorted(
            data['my0:hasProject'],
            key=lambda x: x['my0:projectStartDate'], reverse=True
        )
        for item in (projects):

            endDate = item['my0:projectEndDate']
            if item['my0:projectEndDate'] == "":
                endDate = current[language]

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + getValueFromLang(item['my0:projectName'], language) + r'''}{
          ''' + item['my0:projectStartDate'] + r''' - ''' + endDate + r'''
        }{''' + getValueFromLang(item['my0:projectCreator'], language) + r'''}{}'''
            main = main + r'''\resumeItemListStart
        \resumeItem { ''' + getValueFromLang(item['my0:projectDescription'], language) + r'''}
        \resumeItemListEnd'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasPublication']):
        # write project information about the user
        main = main + r'''
      %-------------------------------------------------- PUBLICATIONS --------------------------------------------------
      \section{\faBook}{''' + publicationTitle[language] + r'''}
      '''
        publications = sorted(
            data['my0:hasPublication'],
            key=lambda x: x['my0:publicationDate'], reverse=True
        )
        for item in (publications):

            title = r''' \href{''' + item['my0:publicationURL'] + \
                r'''}{''' + getValueFromLang(item['my0:publicationTitle'], language) + r'''} '''

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + title + r'''}{''' + \
                item['my0:publicationDate'] + r'''}{''' + item['my0:publicationAuthor'] + \
                r'''}{''' + item['my0:publicationPublisher'] + r'''}'''
            main = main + r'''\resumeItemListStart
        \resumeItem { ''' + getValueFromLang(item['my0:publicationDescription'], language) + r'''}
        \resumeItemListEnd'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasPatent']):
        # write project information about the user
        main = main + r'''
      %-------------------------------------------------- PATENTS --------------------------------------------------
      \section{\faCertificate}{''' + patentTitle[language] + r'''}
      '''
        patents = sorted(
            data['my0:hasPatent'],
            key=lambda x: x['my0:patentIssuedDate'], reverse=True
        )
        for item in (patents):

            title = r''' \href{''' + item['my0:patentURL'] + r'''}{''' + \
                getValueFromLang(item['my0:patentTitle'], language) + ''' - ''' + \
                    item['my0:patentNumber'] + r'''} '''
            endDate = item['my0:patentIssuedDate']
            if item['my0:patentIssuedDate'] == "":
                endDate = pending[language]

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + title + r'''}{''' + \
                endDate + \
                r'''}{''' + item['my0:patentInventor'] + \
                r'''}{''' + getValueFromLang(item['my0:patentOffice'], language) + r'''}'''
            main = main + r'''\resumeItemListStart
        \resumeItem { ''' + getValueFromLang(item['my0:patentDescription'], language) + r'''}
        \resumeItemListEnd'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasSkill']):
            # write skill information about the user
        main = main + r'''
      %-------------------------------------------------- SKILLS --------------------------------------------------
      \section{\faGears}{''' + skillTitle[language] + r'''} \resumeEntryStart
      '''
        main = main + r'''\resumeEntryS{''' + \
            languageTitle[language] + r''' }{'''

        firstElementLanguage = False
        firstElementSkill = False

        for items in (data['my0:hasSkill']):
            if(items['@type'] == 'my0:LanguageSkill'):
                if firstElementLanguage:
                    main = main + comma + getValueFromLang(items['my0:skillName'], language)
                else:
                    main = main + getValueFromLang(items['my0:skillName'], language)
                firstElementLanguage = True
        main = main + r'''}
      \resumeEntryS{''' + otherTitle[language] + r''' }
      {'''

        for items in (data['my0:hasSkill']):
            if(items['@type'] == 'my0:Skill'):
                if firstElementSkill:
                    main = main + comma + getValueFromLang(items['my0:skillName'], language)
                else:
                    main = main + getValueFromLang(items['my0:skillName'], language)
                firstElementSkill = True
        main = main + r'''}\resumeEntryEnd
      '''

    return main
Exemple #3
0
def generateMainDesign1Enriched(data, language):
    main = headerCV1

    if (data['my0:aboutPerson']):
        item = data['my0:aboutPerson']
        address = item['my0:address']
        country = runQueryCountryMainOntology(address['my0:country'], language)
        full_address = address['my0:street'] + space + address['my0:city'] + \
            space + address['my0:postalCode'] + space + country

        # write personal information about the user
        main = main + r'''
      \begin{tabular*}{7in}{l@{\extracolsep{\fill}}r}
      \textbf{\Large ''' + item['my0:firstName'] + space + item['my0:lastName'] + r'''} & \textbf{\today} \\
      ''' + address['my0:street'] + space + address['my0:postalCode'] + r''' & ''' + item['my0:email'] + r'''\\''' + address['my0:city'] + comma + country + r'''\href{https://www.openstreetmap.org/search?query=''' + full_address + r'''}{\faMapMarker}  & ''' + item['my0:phoneNumber'] + r'''\\
      '''
        # write website information about the user
        for website in (item['my0:hasWebsite']):
            if doesURIContainWord(website['my0:websiteType'], 'Linkedin'):
                main = main + \
                    r'''\faLinkedin { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} & \\'''
            elif doesURIContainWord(website['my0:websiteType'], 'Xing'):
                main = main + \
                    r'''\faXing { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} & \\'''
            else:
                main = main + r'''\faGlobe { }  \href{''' + website['my0:websiteURL'] + r'''}{''' + website['my0:websiteURL'] + r'''} & \\
        '''
        main = main + r'''
      \end{tabular*}
      \\'''

    if (data['my0:hasWorkHistory']):

        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \resheading{''' + workTitle[language] + r'''}
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \begin{itemize}'''
        for item in (data['my0:hasWorkHistory']):

            address = item['my0:employedIn']['my0:organizationAddress']
            orgName = item['my0:employedIn']['my0:organizationName']
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''
            country = runQueryCountryMainOntology(
                address['my0:country'], language)
            country = r'''\href{''' + country + r'''}{''' + \
                getnameURI(address['my0:country']) + r'''}'''
            city = address['my0:city']
            cityURL = runQueryDBPEDIA(city, language)
            if cityURL != "":
                city = r'''\href{''' + cityURL + r'''}{''' + city + r'''}'''
            jobMode = runQueryMainOntology(item['my0:jobMode'], language)
            endDate = item['my0:endDate']
            if item['my0:endDate'] == "":
                endDate = current[language]

            main = main + r'''
        \item \ressubheading{''' + orgName + r'''}{''' + city + r''', ''' + country + r'''}{''' + item['my0:jobTitle'] + comma + jobMode + r'''}{''' + item['my0:startDate'] + r''' - ''' + endDate + r'''}\\
        \begin{itemize}
        \item[]{''' + item['my0:jobDescription'] + r'''}
        \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasEducation']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + educationTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        for item in (data['my0:hasEducation']):
            address = item['my0:studiedIn']['my0:organizationAddress']
            orgName = item['my0:studiedIn']['my0:organizationName']
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''
            country = runQueryCountryMainOntology(
                address['my0:country'], language)
            country = r'''\href{''' + country + r'''}{''' + \
                getnameURI(address['my0:country']) + r'''}'''
            city = address['my0:city']
            cityURL = runQueryDBPEDIA(city, language)
            if cityURL != "":
                city = r'''\href{''' + cityURL + r'''}{''' + city + r'''}'''
            endDate = item['my0:eduGradDate']
            if item['my0:eduGradDate'] == "":
                endDate = current[language]
            degreeType = runQueryMainOntology(item['my0:degreeType'], language)

            main = main + r'''
        \item \ressubheading{''' + orgName + r'''}{''' + city + r''', ''' + country + r'''}{''' + item['my0:degree'] + comma + degreeType + r'''}{''' + item['my0:eduStartDate'] + r''' - ''' + endDate + r'''}\\
        \begin{itemize}
        \item[]{''' + item['my0:eduDescription'] + r'''}
        \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasCourse']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + courseTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        for item in (data['my0:hasCourse']):
            address = item['my0:organizedBy']['my0:organizationAddress']
            orgName = item['my0:organizedBy']['my0:organizationName']
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''
            country = runQueryCountryMainOntology(
                address['my0:country'], language)
            country = r'''\href{''' + country + r'''}{''' + \
                getnameURI(address['my0:country']) + r'''}'''
            city = address['my0:city']
            cityURL = runQueryDBPEDIA(city, language)
            if cityURL != "":
                city = r'''\href{''' + cityURL + r'''}{''' + city + r'''}'''
            endDate = item['my0:courseFinishDate']
            if item['my0:courseFinishDate'] == "":
                endDate = current[language]
            coursetit = item['my0:courseTitle']
            if item['my0:courseURL']:
                coursetit = r'''\href{''' + item['my0:courseURL'] + \
                    r'''}{''' + item['my0:courseTitle'] + r'''}'''

            main = main + r'''
        \item \ressubheading{''' + orgName + r'''}{''' + city + r''', ''' + country + r'''}{''' + coursetit + r'''}{''' + item['my0:courseStartDate'] + r''' - ''' + endDate + r'''}\\
        \begin{itemize}
        \item[]{''' + item['my0:courseDescription'] + r'''}
        \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasPublication']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + publicationTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        publications = sorted(
            data['my0:hasPublication'],
            key=lambda x: x['my0:publicationDate'], reverse=True
        )
        for item in (publications):
            main = main + r'''
		    \item \ressubheading{''' + item['my0:publicationTitle'] + r'''}{''' + item['my0:publicationPublisher'] + r'''}{''' + item['my0:publicationAuthor'] + r'''}{''' + item['my0:publicationDate'] + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:publicationDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasProject']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + projectTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        projects = sorted(
            data['my0:hasProject'],
            key=lambda x: x['my0:projectStartDate'], reverse=True
        )
        for item in (projects):
            endDate = item['my0:projectEndDate']
            if item['my0:projectEndDate'] == "":
                endDate = current[language]
            main = main + r'''
		    \item \ressubheading{''' + item['my0:projectName'] + r'''}{''' + item['my0:projectCreator'] + r'''}{}{''' + item['my0:projectStartDate'] + r''' - ''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:projectDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasPatent']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + patentTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        patents = sorted(
            data['my0:hasPatent'],
            key=lambda x: x['my0:patentIssuedDate'], reverse=True
        )
        for item in (patents):
            endDate = item['my0:patentIssuedDate']
            if item['my0:patentIssuedDate'] == "":
                endDate = pending[language]
            patentNumber = item['my0:patentNumber']
            main = main + r'''
		    \item \ressubheading{''' + item['my0:patentTitle'] + r''' - ''' + patentNumber + r'''}{''' + item['my0:patentOffice'] + r'''}{''' + item['my0:patentInventor'] + r'''}{''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:patentDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasOtherInfo']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + otherInfoTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        for item in (data['my0:hasOtherInfo']):
            types = runQueryMainOntology(item['my0:otherInfoType'], language)

            main = main + r'''
		    \item[] \ressubheading{''' + types + r'''}{}{}{}\\*''' + item['my0:otherInfoDescription']

        main = main + r'''\end{itemize}'''
    return main