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

Mapping vocabulary

Revision as of 22:38, 1 September 2011 by Ptrevithick.gmail.com (Talk | contribs) (sameAs (equivalentAttribute))

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

Vocabulary for describing attribute schema mapping rules. Part of the Persona Data Model 2.0. Used by Flat Persona vocabulary and others.

Files

Classes

This section lists a set of subclasses of spin:Templates. Note that these class names (unlike all others in Higgins) do not start with an initial capital letter. To learn more about the SPIN vocabulary and spin:Templates see http://spinrdf.org .

The so-called body of a spin:Template is supposed to contain an RDF representation of a set of SPARQL statements that, when interpreted, compute the value of the function (and potentially have other side effects). In the mapping vocabulary these bodies are empty since we don't presume the existence of a SPARQL interpreter. Thus implementations of these functions must be pre-compiled in some local language (Javascript, Java, etc.)

roleAge (role[])

Find best p:Person entity matching against role (if any). Lookup the literal value of v:bday attribute. Function value is age in years based on current dateTime.

  • subClassOf: spin:Templates

roleAgeRange (role[], ageRanges)

Find best p:Person entity matching against role (if any). Lookup the literal value of v:bday attribute. Function value is the index of which age-range value best matches based on computing the person's age from their v:bday and (plus or minus) their p:ageEpsilon. Returns -1 if no age-range provided is a good match. The ageRanges argument is a string of the form "<integer>-<integer>,<integer>-<integer>, etc." Example: "10-19,20-29"

  • subClassOf: spin:Templates

roleDay (role[], mappedAtt)

Find best p:Person entity matching against role (if any). Return the day portion of the xsd:date value of its mappedAtt attribute

  • subClassOf: spin:Templates

roleMonth (role[], mappedAtt)

Find best p:Person entity matching against role (if any). Return the month portion of the xsd:date value of its mappedAtt attribute

  • subClassOf: spin:Templates

roleYear (role[], mappedAtt)

Find best p:Person entity matching against role (if any). Return the year portion of the xsd:date value of its mappedAtt attribute

  • subClassOf: spin:Templates

roleEntity (role[], mappedAtt)

Find best p:Person entity matching against role parameter (if any). Function value is (object) value of that entity's mappedAtt attribute.

  • subClassOf: spin:Templates

roleFullnane (role[])

Find best p:Person entity matching against role parameter (if any). Function value is string concatenation of the (string) values of the following attributes of the v:Name instance that is the value of the v:n attribute of this entity. The attributes to concatentate are: v:honorific-prefix, v:given-name, v:additional-name(s), v:family-name, v:honorific-suffix.

  • subClassOf: spin:Templates

roleLiteral (role[], mappedAtt)

Find best p:Person entity matching against role parameter (if any). Function value is the literal value(s) of that entity's mappedAtt attribute.

  • subClassOf: spin:Templates

roleLiteralStringValue (role[], mappedAtt, val)

Find best p:Person entity matching against role parameter (if any). Function is true if value literal value(s) of that entity's mappedAtt attribute matches the value of the string val parameter.

  • subClassOf: spin:Templates

roleLiteralInitial (role[], mappedAtt)

Find best p:Person entity matching against role parameter (if any). Function value is the upper-cased first character of the simple, literal value of that entity's mappedAtt attribute.

  • subClassOf: spin:Templates

rolePathClassLiteral(role[], path, className, mapppedAtt)

Find best p:Person entity matching against role parameter (if any). Find the the set, A, of (complex) values of the path attribute where the values are instances of class className. Function value is literal value(s) of the mappedAtt attribute of all members of A.

  • subClassOf: spin:Templates

rolePathLiteral (role[], path, mappedAtt)

Find best p:Person entity matching against role parameter (if any). Find the the set, A, of (complex) values of the path attribute. Function value is literal value(s) of the mappedAtt attribute of members of A.

  • subClassOf: spin:Templates

(boolean)rolePathLiteralStringValue (role[], path, mappedAtt, val)

Find best p:Person entity matching against role parameter (if any). Find the the set, A, of (complex) values of the path attribute. Function value is true if any literal value(s) of the mappedAtt attribute of members of A match the value of the string val parameter.

  • subClassOf: spin:Templates

(boolean)rolePathLiteralStringValue2 (role[], path, mappedAtt, val, val2)

Find best p:Person entity matching against role parameter (if any). Find the the set, A, of (complex) values of the path attribute. Function value is true if any literal value(s) of the mappedAtt attribute of members of A match the value of the string val and the val2 parameters.

  • subClassOf: spin:Templates

rolePathLiteral2 (role[], path, mappedAtt)

Like rolePathLiteral except that the mappedAtt param may be an rdf:Property instead of an owl:DatatypeProperty AND the path param may be an rdf:Property instead of an owl:ObjectProperty

  • subClassOf: spin:Templates

rolePathLiteralInitial (role[], path, mappedAtt)

@@@TODO

rolePathPartialPostal (role[], path, mappedAtt)

@@@TODO

rolePathPartialPostal (role[], path, mappedAtt)

@@@TODO

roleRangeIndex (role[], mappedAtt, epsilonAtt, integerRanges)

Find best p:Person entity matching against role (if any). Lookup the literal value of mappedAtt attribute. Function value is the index of which age-range value pair (e.g. 10-19) best matches the literal value of mappedAtt attribute +/- the value of the same entity's epsilonAtt. Returns -1 if no age-range provided is a good match.

  • subClassOf: spin:Templates

sameAs (equivalentAttribute)

Indirection. The value of this function is the value of the equivalentAttribute in some other vocabulary.

roleSameAs(role[], equivalentAttribute)

Indirection. The value of this function is the value of the equivalentAttribute in some other vocabulary. The role[] parameter is optional. If one (or more) role parameter(s) is required it can be added to the equivalentAttribute. For example:

 bFirstName := sameAs(p:Buyer, fp:givenName)

sameAsAnd (equivalentAttribute, equivalentAttribute2)

Indirection. The value of this function is non-null iff the evaluation of both predicate and predicate2 attributes parameter (both of which are in vocabularies other than this one) are both non-null

Under development

currentEmployerName (role[])

  • find the p:Person by role
  • find the h:start..h:end ranges for all osoc:jobs
  • return list of all osoc:name values

timeAtCurrentEmployer (role[])

  • find the p:Person by role
  • find the h:start..h:end ranges ranges for all osoc:jobs
  • return list of all osoc:name values

Links

Back to the top