Fresnel Labeling Extension

Author
Dorian Taylor
Created
June 3, 2014
Updated
January 11, 2020
Namespace URI
https://vocab.methodandstructure.com/fresnel-label#
Preferred Namespace Prefix
flx

This document specifies additional extensions to the Fresnel vocabulary.

Value Ordering

The Fresnel vocabulary provides a useful mechanism for encoding the desired behaviour for rendering the presence, sequence, and additional styling accoutrements to the properties associated with a given RDF resource.

However, neither the core nor extended Fresnel vocabularies explicitly depict a method for specifying the sequence of property values. A resource can have multiple values for a given property, which, in addition to resources and blank nodes, can contain languages, datatypes, or XML content.

If we are faced with the problem of selecting exactly one property value to display, for instance, as a label, how would we choose it? The fresnel:alternateProperties property can give us a short list, but past that we're left on our own. We're in the same situation when we're trying to sort multiple property values any other way than a naïve lexical sort.

The Algorithm

We must first consider sorting literal values and then sorting resources.

Literal values in RDF have three different dimensions, although only one of the latter two can be active at once:

  • lexical content
  • language
  • datatype

There is also a fourth quasi-dimension, which is the specific property the literal rode in on.

Lexical content can also be interpreted as a number or number-like object based on the datatype, however this ought to be amenable to being overridden.

there is the issue of sorting plain/language/datatype values wholesale

There is the issue of showing and hiding values when there is more than one of them; we can just sort the list and take the first one, but we need to be able to instruct the property description that all subsequent results after the first one should be hidden.

there is the issue of subproperties and equivalent properties, ie do we penalize topological distance from the asserted property and if so how much

fresnel:alternateProperties and fresnel:mergeProperties have different implications. The former implies testing for the presence of one property and then another until you find the one you want; the latter implies pooling all the properties together.

fresnel:allProperties also has no blanket policy and will have to be sorted, but in this case we will be sorting the properties themselves, not their values.


resource values have their own lexical content but also tend to be associated with some sort of label or other

resources also have types, and it is conceivable to want to sort resource values by their own type

a property may mix literal and resource values together

Reverse Properties

Short of FSL or SPARQL selectors, there is no denotation of reverse properties in plain Fresnel.

A common scenario for reverse properties is when the subject is in a list, collection, or other blank node-identified entity, and we are looking for a link to a resource. We need to be able to eg trace up to the head of the list and see what property ultimately connected the subject to the reverse relation.

Classes

Value Ordering

SortingPolicy

This class encapsulates a reusable sorting policy which can be applied to multiple property descriptions.

Subclass of:
sh:PropertyShape

Back to Top

SortPropertyList

A SortPropertyList is just an ordinary list with some additional constraints related to sorting properties.

Subclass of:
rdf:List
Property restrictions:
rdf:first rdf:Propertysh:PropertyShape
rdf:restflx:SortPropertyList

Formatting

Disposition

A Disposition marks out the way a term is rendered on a canvas.

Subclass of:
fresnel:PropertyValueStyle

Properties

Value Ordering

descending

Specify that the sort should be in descending order.

Domain:
flx:SortingPolicy
Range:
xsd:boolean

Back to Top

longestFirst

When this flag is set to true, if two strings are being compared where one (starting from the beginning) is an exact substring of the other, the longer string will precede the shorter one.

Domain:
flx:SortingPolicy
Range:
xsd:boolean

Back to Top

sortValuesBy

Domain:
fresnel:PropertyDescription
Range:
rdf:Property sh:PropertyShape flx:SortPropertyList

Reverse Properties

reverse

This flag signifies when a property description is intended to represent a reverse relationship.

Domain:
fresnel:PropertyDescription
Range:
xsd:boolean

Back to Top

Lens Selection

priority

Ascribe an arbitrary tiebreaking priority to a lens.

Domain:
fresnel:Lens
Range:
xsd:decimal

Formatting

disposition

Ascribe a flx:Disposition to the given format.

Domain:
fresnel:Format
Range:
flx:Disposition

Individuals

Reverse Properties

allReverseProperties

This property set, analogous to fresnel:allProperties, designates all reverse properties from a given subject.

Back to Top

Dispositions

block

Display each value as a generic block.

paragraph

Display each value as a paragraph.

section

Display each value as a section.

inline

Display each value inline.

hidden

Render the value in the markup but do not display it.