class OAIPerson(Parser): schema = 'Person' suffix = tools.ParseName(ctx).suffix family_name = tools.ParseName(ctx).last given_name = tools.ParseName(ctx).first additional_name = tools.ParseName(ctx).middle
class Person(Parser): given_name = tools.ParseName(ctx.name).first family_name = tools.ParseName(ctx.name).last additional_name = tools.ParseName(ctx.name).middle suffix = tools.ParseName(ctx.name).suffix affiliations = tools.Map( tools.Delegate(Affiliation.using(entity=tools.Delegate(Organization))), tools.Maybe(ctx, 'arxiv:affiliation'))
class Person(Parser): given_name = tools.ParseName(ctx.author).first family_name = tools.ParseName(ctx.author).last additional_name = tools.ParseName(ctx.author).middle suffix = tools.ParseName(ctx.author).suffix identifiers = tools.Map( tools.Delegate(AgentIdentifier, tools.Try(ctx.email))) related_agents = tools.Map(tools.Delegate(IsAffiliatedWith), tools.Try(ctx.institution))
class Person(Parser): given_name = tools.ParseName(ctx.author).first family_name = tools.ParseName(ctx.author).last additional_name = tools.ParseName(ctx.author).middle suffix = tools.ParseName(ctx.author).suffix emails = tools.Map(tools.Delegate(PersonEmail), tools.Try(ctx.email)) affiliations = tools.Map( tools.Delegate(Affiliation.using(entity=tools.Delegate(Organization))), tools.Try(ctx.institution))
class Person(Parser): suffix = tools.ParseName( tools.RunPython('combine_first_last_name', ctx) ).suffix family_name = tools.ParseName( tools.RunPython('combine_first_last_name', ctx) ).last given_name = tools.ParseName( tools.RunPython('combine_first_last_name', ctx) ).first additional_name = tools.ParseName( tools.RunPython('combine_first_last_name', ctx) ).middle location = tools.RunPython('get_address', ctx['Contact_Address']) class Extra: role = tools.Maybe(ctx, 'Role') def combine_first_last_name(self, ctx): return ctx['First_Name'] + ' ' + ctx['Last_Name'] def get_address(self, ctx): address = ctx['Address'] if isinstance(address, list): address1 = address[0] address2 = address[1] return format_address( self, address1=address1, address2=address2, city=ctx['City'], state_or_province=ctx['Province_or_State'], postal_code=ctx['Postal_Code'], country=ctx['Country'] ) return format_address( self, address1=ctx['Address'], address2=address2, city=ctx['City'], state_or_province=ctx['Province_or_State'], postal_code=ctx['Postal_Code'], country=ctx['Country'] )
class ContributorPerson(Parser): schema = 'Person' suffix = tools.ParseName(ctx.contributorName).suffix family_name = tools.ParseName(ctx.contributorName).last given_name = tools.ParseName(ctx.contributorName).first additional_name = tools.ParseName(ctx.contributorName).middle identifiers = tools.Map(tools.Delegate(ThroughIdentifiers), tools.Try(ctx.nameIdentifier)) class Extra: name_identifier = tools.Try( tools.RunPython(force_text, ctx.nameIdentifier)) name_identifier_scheme = tools.Try( ctx.nameIdentifier['@nameIdentifierScheme']) name_identifier_scheme_uri = tools.Try( ctx.nameIdentifier['@schemeURI']) contributor_type = tools.Try(ctx.contributorType)
class CreatorPerson(Parser): schema = 'Person' suffix = tools.ParseName(ctx.creatorName).suffix family_name = tools.ParseName(ctx.creatorName).last given_name = tools.ParseName(ctx.creatorName).first additional_name = tools.ParseName(ctx.creatorName).middle affiliations = tools.Map( tools.Delegate( Affiliation.using(entity=tools.Delegate(CreatorOrganization))), tools.Concat(tools.Try(tools.RunPython(force_text, ctx.affiliation)))) identifiers = tools.Map(tools.Delegate(ThroughIdentifiers), tools.Try(ctx.nameIdentifier)) class Extra: name_identifier = tools.Try( tools.RunPython(force_text, ctx.nameIdentifier)) name_identifier_scheme = tools.Try( ctx.nameIdentifier['@nameIdentifierScheme']) name_identifier_scheme_uri = tools.Try( ctx.nameIdentifier['@schemeURI'])
class Person(Parser): given_name = tools.ParseName(ctx).first family_name = tools.ParseName(ctx).last additional_name = tools.ParseName(ctx).middle suffix = tools.ParseName(ctx).suffix