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 11:36, 13 October 2011 by Ptrevithick.gmail.com (Talk | contribs) (rolePathLiteral (role, path, mappedAtt))

{{#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.

Contents

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)

From current person lookup the literal value of v:bday attribute. Function value is age in years based on current dateTime.

  • subClassOf: spin:Templates

roleDay (role, mappedAtt)

From current person return the day portion of the xsd:date value of its mappedAtt attribute.

  • subClassOf: spin:Templates

roleDiscreteRangeId (role, mappedAtt, discreteRange)

Same as roleDiscreteRangeString() except that instead of returning the value of the rdfs:label attribute of the selected member of p:DiscreteRange it returns the value of p:id.

  • subClassOf: spin:Templates

roleDiscreteRangeString (role, mappedAtt, discreteRange)

discreteRange, is a subclass of p:DiscreteRange, wherein each member has been mapped (using one of several links of mapping links (e.g. sameAs)) to member(s) in a roughly equivalent subclass of p:DiscreteRange defined in the persona data model. mappedAtt is an attribute of the current person in the persona data model. Search all members of discreteRange for a member, M, whose mapping link points to the value of mappedAtt. Return the rdfs:label of M.

When the function is used in reverse (i.e. to set the value of mappedAtt), and when there is a one-to-many mapping link relationship between a member of DiscreteRange in the external vocabulary and N members of the corresponding DiscreteRange in the persona data model, the value pointed to the *Default mapping link (e.g. map:sameAsNDefault) should be used.

  • subClassOf: spin:Templates

roleEntity (role, mappedAtt)

From current person return (complex) value of its mappedAtt attribute.

  • subClassOf: spin:Templates

roleFullnane (role)

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 the current person. 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

roleLiteralInitial (role, mappedAtt)

From current person return the upper-cased first character of the simple, literal value of its mappedAtt attribute.

  • subClassOf: spin:Templates

roleLiteralRange (role, mappedAtt, range)

From current person return the literal value of its mappedAtt. The mappedAtt is an attibute whose values are instances of a class of pre-defined strings representing numeric, integer ranges (e.g. "13-18" or "0-9999"). The range is a class that defines the possible values as a set of pre-defined strings representing numeric, integer ranges (e.g. "13-15", "16-20"). The mapping function must return the closest value within this range. So if the persona data model (mappeAtt) had a value of "13-18" and the predicateRange had "13-15" and "16-20" then the function would return "13-15".

NOTE: at present we're not using this function. Lately we've found it easier to create a class for all possible values in the native vocab and then just use roleDiscreteRangeString() instead.

  • subClassOf: spin:Templates

roleLiteralStringValue (role, mappedAtt, val)

From current person return true if value literal value(s) of its mappedAtt attribute matches the value of the val parameter.

  • subClassOf: spin:Templates

roleLiteralStringValue2 (role, mappedAtt, val)

From current person return true if value literal value(s) of its mappedAtt attribute matches the value of the val and the val2 parameters.

  • subClassOf: spin:Templates

roleMonth (role, mappedAtt)

From current person return the month portion of the xsd:date value of its mappedAtt attribute.

  • subClassOf: spin:Templates
  • subClassOf: spin:Templates

rolePathClass(role, path, className, mapppedAtt)

Start with current person. Function value is true if any of the values of its path attribute is the class (not an instance of) className.

  • subClassOf: spin:Templates

rolePathClassLiteral(role, path, className, mapppedAtt)

Start with current person. Find the the set, A, of (complex) values of its 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

rolePathEntity(role, path, mapppedAtt)

Start with current person. Find the the set, A, of (complex) values of its path attribute. Function value is the set of all values of mappedAtt attribute of all members of A.

  • subClassOf: spin:Templates


rolePathClassEntity(role, path, className, mapppedAtt)

Start with current person. Find the the set, A, of (complex) values of its path attribute whose members are of class className. Function value is the set of all values of mappedAtt attribute of all members of A.

  • subClassOf: spin:Templates

rolePathLiteral (role, path, mappedAtt)

Start with current person. Find the the set, A, of (complex) values of its path attribute. Function value is literal value(s) of the mappedAtt attribute of all members of A.

  • subClassOf: spin:Templates

rolePathLiteral2 (role, path, mappedAtt)

Like rolePathLiteral except that the mappAtt 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

(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)

From current person return true if value literal value(s) of its mappedAtt attribute matches the value of the val and the val2 parameters.

  • subClassOf: spin:Templates

(boolean)rolePathPathLiteral (role, path, path2, mappedAtt)

Start with current person. Find the the set, A, of (complex) values of its path attribute. For each member of A find the set, B, of (complex) values of its path2 attribute. Function value is literal value(s) of the mappedAtt attribute of all members of all sets B (B1, B2, ...).

  • subClassOf: spin:Templates

roleMonth (role, mappedAtt)

Given a class, possibleValues, that must be a subclass of map:PossibleStringValues the individual members of which possible values of a (native) attribute. Return the skos:prefLabel value of the member of possibleValues to which an attribute, mappedAtt, in the persona data model's value is mapped via an owl:sameAs link.

  • subClassOf: spin:Templates

roleMultiString (role, mappedAtt, possibleValues)

possibleValues, is a subclass of p:DiscreteRange, wherein each member has a map:mapTo link that points to to an individual member of a corresponding class in the persona data model. Let X be the the value of mappedAtt (in the persona data model) attribute of the current person. Search all members of possibleValues for a member, M, whose map:mapTo link points to X. Return the skos:prefLabel of M.

  • subClassOf: spin:Templates

rolePathClassLiteral(role, path, class, mappedAtt)

Start with current person. Find the the set, A, of (complex) values of its 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)

Start with current person. Find the the set, A, of (complex) values of its path attribute. Function value is literal value(s) of the mappedAtt attribute of all members of A.

  • 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

rolePathLiteralStringValue (role, path, mappedAtt)

Start with current person. Find the the set, A, of (complex) values of its path attribute. Function value is true if any literal value(s) of the mappedAtt attribute of members of A match the value of the val parameter.

  • subClassOf: spin:Templates

rolePathPartialPostal (role, path, mappedAtt)

@@@TODO

rolePathPartialExtension (role, path, mappedAtt)

@@@TODO

roleSameAs (role, equivalentAttribute)

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

  • subClassOf: spin:Templates

roleSameAsAnd (role, 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

  • subClassOf: spin:Templates

roleYear (role, mappedAtt)

Return the year portion of the xsd:date value of its mappedAtt attribute

  • subClassOf: spin:Templates

Under development

currentEmployerName (role)

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

timeAtCurrentEmployer (role)

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

Mapping Attributes

The following mapping (annotation) attributes are defined:

  • sameAs - Used to link this instance or subclass of p:DiscreteRange defined in an external vocabulary with an instance or subclass of p:DiscreteRange defined in the persona data model. Functional, InverseFunctional.
  • sameAsN - Used (along with map:sameAsNDefault) to link this instance or subclass of p:DiscreteRange with N other instances or subclasses of p:DiscreteRange that are not pointed to by map:sameAs.
  • sameAsNDefault - Used (along with map:sameAsN) to link this instance or subclass of p:DiscreteRange with N other instances or subclasses of p:DiscreteRange. InverseFunctional.

Here is an example of instance-to-instance mapping using sameAs, sameAsN and sameAsNDefault:

Mapping example 2.0.100.png

Links

Back to the top