Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Flat Persona vocabulary"

(Birth-related)
(Address)
Line 88: Line 88:
 
*fp:buildingName : buildingName () - extract from street-address and extended-address
 
*fp:buildingName : buildingName () - extract from street-address and extended-address
 
*fp:houseNumber : houseNumber () - extract from street-address and extended-address
 
*fp:houseNumber : houseNumber () - extract from street-address and extended-address
 +
*fp:buildingNameOrNumber : buildingNameOrNumber () - extract from street-address and extended-address
 
*fp:locality : pathLiteral (''v:adr, v:locality'')
 
*fp:locality : pathLiteral (''v:adr, v:locality'')
 
*fp:district : district () - extract from locality
 
*fp:district : district () - extract from locality

Revision as of 14:52, 11 November 2010

{{#eclipseproject:technology.higgins|eclipse_custom_style.css}}
Higgins logo 76Wx100H.jpg

A vocabulary that flattens (hides) some of the deep structure of Persona vocabulary. It imports Persona vocabulary.

Files

Introduction

Getting the whole world to commit to a single, rich ontology will never happen. So the next best thing is to define a rich, fine-grained internal ontology (as we have done in Persona Data Model 2.0 (PDM)) and then define mapping rules between it an vocabularies that exist in the wild.

We define mapping functions that get values of attributes in PDM object graphs. The inverse of these functions can set these values (although not all functions have inverses). One of the sub-parts of PDM is an ontology to describe these mapping functions. It is called mapping.owl and is described briefly on the main PDM page.

The purpose of the Flat Persona vocabulary is to shield developers from having to understand the deeper structure of the PDM. For example, the developer simply chooses from this vocabulary which attribute they would like to get and then calls one of the "getAttribute" APIs passing this attribute. The getAttribute method, notices that the attribute is in the flat persona namespace, looks up the associated rule and uses this rule to traverse the PDM structure to retrieve the desired attribute value

Since completely flattening out the attribute namespace would result in an explosion of attribute names, we parameterize the getAttribute APIs using a role[] parameter than can contain one or more role strings of of the two types described below.

A single natural person is represented in PDM as multiple p:Person nodes. We use the role parameters to bias the selection of which p:Person node will be used to answer a getAttribute() query.

NOTE: if multiple attributes are requested simultaneously, the same source p:Person node will be used as the source for all attribute values.

Internal roles

  • Recipient - often called "shipping" (e.g. a "shipping address")
  • Home - attributes about the user's home life, (e.g. house where they live, or home telephone number)
  • Recipient, Home - a combination of the above
  • Work - information about the person's work life
  • Buyer - information about a person in their role as a buyer (e.g. a "billing" address)
  • DayTime - information about a person that is relevant during the day time (e.g. a daytime phone number)

External roles

The get attribute APIs can also be passed external role values to add sensitivity to the interaction context.

Depending on the interaction context a different "source" p:Person node might be more appropriate. For example if the context was a virtual world like Second Life, the person's given name is almost always not their "real world" given name. Person nodes may carry one or more "role" tags that indicate appropriateness/use in one of these overall contexts. (We're using the word context generically here, we are not referring to Higgins Contexts).

External role values include:

  • Ecommerce - an interaction within an eCommerce context
  • Gaming - an interaction with a gaming context
  • SocialNetworking - an interaction within a social networking or chat context
  • ..other instances of class "External" (a subclass of "Role") within the Persona vocabulary

An Example: Given Name

In the flat persona vocabulary we define the attribute:

  • fp:givenName

The flat persona vocabulary associates this attribute with the following mapping rule:

  • pathLiteral (v:n, v:given-name)

If the developer wanted to retrieve the value of the user's given name as that user would use in interactions with gaming websites they would call one of the getAttribute APIs passing the value of fp:givenName for the attribute desired parameter and passing a role[] parameter of Gaming.

The getAttribute method would invoke the pathLiteral function. This function traverses a path (or in rare cases a set of paths) through a PDM graph. Its name is a hint as to how it operates. This function takes two arguments (v:n, v:given-name). It starts at the root of the p:Person graph (i.e. the RootMe node) and searches breadth-first following p:subCorrelation links for the p:Person node that best matches the roles in the role[] parameter and that has the required attribute.

The pathLiteral function will start at the root RootMe node and breadth-first find the p:Person node whose role(s) best match the value(s) of role[] which in this case is the single value Gaming and that has a complex-valued attribute (aka link) of type v:n (from the vcard vocabulary). Further, it must have a simple-valued attribute of type v:given-name. The value of this literal attribute is the result of mapping the human concept of "given name."

Attributes

Account

  • foaf:accountName : pathLiteral (foaf:account, foaf:accountName)
  • fp:accountPassword : pathLiteral (foaf:account, p:password)
  • fp:accountConfirmPassword : pathLiteral (foaf:account, p:password)

Email

  • fp:email : literal (role[], foaf:mbox)

Name

  • fp:honorificPrefix : pathLiteral (v:n, v:honorific-prefix)
  • fp:givenName : pathLiteral (v:n, v:given-name)
  • fp:additionalName : pathLiteral (v:n, v:additional-name)
  • fp:additionalNameInitial : pathLiteralInitial (v:n, v:additional-name)
  • fp:familyName : pathLiteral (v:n, v:family-name)
  • fp:honorificSuffix : pathLiteral (v:n, v:honorific-suffix)
  • fp:mothersMaidenName : literal (p:mothersMaidenName)
  • fp:familyNameAtBirth : pathLiteral (v:n, p:familyNameAtBirth)
  • fp:formattedName : TBD
  • fp:title : pathLiteral(v:title)

Address

  • fp:streetAddress : pathLiteral (v:adr, v:street-address)
  • fp:extendedAddress : pathLiteral (v:adr, v:extended-address)
  • fp:appartmentNumber : appartmentNumber () - extract from street-address and extended-address
  • fp:buildingName : buildingName () - extract from street-address and extended-address
  • fp:houseNumber : houseNumber () - extract from street-address and extended-address
  • fp:buildingNameOrNumber : buildingNameOrNumber () - extract from street-address and extended-address
  • fp:locality : pathLiteral (v:adr, v:locality)
  • fp:district : district () - extract from locality
  • fp:region : pathLiteral (v:adr, v:region)
  • fp:postalCode : pathLiteral (v:adr, v:postal-code)
  • fp:4digitExtensionZip : TBD
  • fp:residentFrom : pathLiteral (v:adr, h:start)
  • fp:residentFromDay : day (pathLiteral (v:adr, h:start))
  • fp:residentFromMonth : month (pathLiteral (v:adr, h:start))
  • fp:residentFromYear : year (pathLiteral (v:adr, h:start))
  • fp:residentUntil : pathLiteral (v:adr, h:end)
  • fp:residentUntilDay : day (pathLiteral (v:adr, h:end))
  • fp:residentUntilMonth : month (pathLiteral (v:adr, h:end))
  • fp:residentUntilYear : year (pathLiteral (v:adr, h:end))

Payment

  • fp:creditCardType : TBD
  • fp:creditCardNumber : pathClassLiteral (pay:payment, pay:CreditCard, pay:ccNumber)
  • fp:creditCardExpirationMonth : pathClassMonth (pay:payment, pay:CreditCard, pay:ccExpiration)
  • fp:creditCardExpirationYear : pathClassYear (pay:payment, pay:CreditCard, pay:ccExpiration)

Telephone Numbers

  • fp:phone : pathRDFValue (v:tel)
  • fp:mobilePhone : pathClassRDFValue (v:tel, v:Cell)
  • fp:phoneAreaCode : pathAreaCode (v:tel)
  • fp:phoneSeven : pathSeven (v:tel)
  • fp:phoneFirstThree : pathFirstThree (v:tel)
  • fp:phoneLastFour : pathLastFour (v:tel)

Birth-related

  • fp:localityOfBirth : pathClassLiteral (v:adr, p:Birth, v:locality)
  • fp:countryOfBirth : pathClassLiteral (v:adr, p:Birth, v:country)
  • fp:age : age() - uses v:bday
  • fp:dateOfBirth : literal (v:bday)
  • fp:dayOfBirth : day (v:bday)
  • fp:monthOfBirth : month (v:bday)
  • fp:yearOfBirth : year (v:bday)

Geolocation

Misc

  • fp:gender : literal (foaf:gender)
  • fp:relationshipStatus : literal (osoc:relationshipStatus)
  • fp:numberOfDependents : literal (p:numberOfDependents)
  • fp:familyNameAtBirth : pathClassLiteral (v:adr, p:Birth, v:family-name)
  • fp:passportNumber : pathClassLiteral (idDoc, p:Passport, p:docNumber)
  • fp:currentEmployerName : currentEmployerName()
  • fp:bankSortCode : pathClassLiteral (pay:paymentMethod, pay:DirectDebit, pay:bankSortCode)
  • fp:bankAccountNumber : pathClassLiteral (pay:paymentMedhod, pay:DirectDebit, pay:bankSortCode)
  • fp:timeAtCurrentEmployer : timeAtCurrentEmployer ()
  • fp:vehicleLicenseNumber : pathClassLiteral (idDoc, p:VehicleLicense, p:docNumber)
  • fp:nationalInsuranceNumber : literal (p:nationalInsuranceNumber)

Links

Back to the top