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 "View-builder vocabulary"

(Example)
(UML Overview)
Line 9: Line 9:
 
==UML Overview ==
 
==UML Overview ==
  
[[Image:View 2.0.104.png|center]]
+
[[Image:View 2.0.105.png|center]]
  
 
==Classes==
 
==Classes==

Revision as of 12:48, 8 March 2011

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

Vocabulary to describe a view of a context. A view is a tree structure of groups of attributes to be displayed/edited.

Files

UML Overview

View 2.0.105.png

Classes

Frame

Metadata about a complex (possibly multi-valued) attribute from the Persona vocabulary (or one of its imports). It may have a skos:prefLabel to be displayed. Must have at least one child.

  • subClassOf: ViewNode
  • 1..N slot
  • 0..1 skos:prefLabel

Group

A logical group of Slots and/or sub-Groups and/or sub-Objects

  • subClassOf: ViewNode
  • 0..N field
  • 1..1 skos:prefLabel
  • 0..N subgroup

Slot

Metadata about how an attribute from the Persona vocabulary (or one of its imports) or from the Flat Persona vocabulary or from the rdf (e.g. rdf:class) should be presented

  • subClassOf: ViewNode
  • 1..1 attribute

ViewNode

Metadata about how an attribute from the Persona vocabulary (or one of its imports) or from the Flat Persona vocabulary or from the rdf (e.g. rdf:class) should be presented

  • 1..1 attribute
  • 1..1 displayOrder

Attributes

attribute

The attribute that should be displayed in this field. The attribute may be in the Flat Persona vocabulary or in the Persona vocabulary (or one of its imported sub-vocabularies).

  • domain: Slot or Frame
  • value: rdf:Property

child

A frame child of a Group

  • domain: Group or Frame
  • value: ViewNode

displayOrder

A number that indicates the relative position with respect to the displayOrder of sibling objects with this same attribute. Lower numbers indicate precedence. The displayOrder values of all child nodes of a given node in the tree should be considered together irrespective of the class of the child (i.e. Slot, Group or Frame).

  • domain: Slot, Frame or Group
  • value: xsd:Integer

viewRoot

Link to the root of the tree of Groups, Frames and Slots (aka ViewNodes)

  • domain: h:Context
  • range: Group

Example

Here is an example of a view:

<http://higgins.eclipse.org/pds/anonymous-web-profile-template>
     rdf:type owl:Ontology , higgins:Context ;
     view:viewRoot :ViewRoot ;
     owl:imports <http://www.eclipse.org/higgins/ontology/2011/2/view> ;
     owl:versionInfo "2.0.101"^^xsd:string .

:AgeRange
     rdf:type view:Slot ;
     view:attribute <http://www.eclipse.org/higgins/ontologies/2010/6/fp#ageRange> ;
     view:displayOrder "1"^^xsd:string .

:DemographicsGroup
     rdf:type view:Group ;
     view:child :PostalCode , :AgeRange , :Gender ;
     view:displayOrder "1"^^xsd:string ;
     skos:prefLabel "DemographicsGroup"^^xsd:string .

:Gender
     rdf:type view:Slot ;
     view:attribute <http://www.eclipse.org/higgins/ontologies/2010/6/fp#gender> ;
     view:displayOrder "2"^^xsd:string . 

:Interest
     rdf:type view:Slot ;
     view:attribute rdf:type ;
     view:displayOrder 1 .

:InterestFrame
     rdf:type view:Frame ;
     rdfs:comment "Presentation of an online-behavior:InterestTopic instance"^^xsd:string ;
     view:attribute <http://www.eclipse.org/higgins/ontologies/2010/6/online-behavior#interest> ;
     view:child :Interest .

:InterestsGroup
     rdf:type view:Group ;
     view:child :InterestFrame ;
     view:displayOrder "2"^^xsd:string ;
     skos:prefLabel "InterestsGroup"^^xsd:string .

:PostalCode
     rdf:type view:Slot ;
     view:attribute <http://www.eclipse.org/higgins/ontologies/2010/6/fp#postalCode> ;
     view:displayOrder 10 .

:ViewRoot
     rdf:type view:Group ;
     view:child :InterestsGroup , :DemographicsGroup ;
     skos:prefLabel "Root"^^xsd:string .


Here is a visual representation:

Demo-group v2.png

The demographics group shown above has slots whose attributes, fp:gender, fp:ageRange, fp:postalCode, are all from the Flat Persona vocabulary.

Interests-group v2.png

The interests group shown above has a frame whose attribute is the complex valued attribute, online-behavior:interest. The frame in turn has a slot whose attribute is rdf:class. In this rather special case the presentation logic should render the name of class of the instance (e.g. "Humor > Satire" or "World Destinations > Africa > East Africa > Nigeria") as opposed to rendering the value of an attribute of the instance as is done in the usual case.

A few additional notes on the above example

The FlatPersona namespace is only useful when either (a) there are not multiple entity values of the same attribute being requested, or, (b) there are just a few alternative entities and the "right" one can be figured out by matching using the role tags (e.g. "home" vCard entity vs. "work" vCard entity). Flattening, a simplification. It is an attempt to hide some complexity. But there are times when we can't hide the complexity. Multiple non-role-tagged entity values of an attribute is one of those times.

Displaying the "interests" of a user is a case where the flat persona approach won't work because a single p:Person node has a multi-entity-valued "online-behavior:interest" attribute. You'll notice in the view hieararchy under the interests Group there is an InterestFrame. This InterestFrame has an view:attribute attribute whose value is <http://www.eclipse.org/higgins/ontologies/2010/6/online-behavior#interest>--a value that is from the persona vocabulary (well, the online-behavior sub-vocabulary) and NOT from the flat persona vocabulary. We have to get all of the values of this attribute. These values are (multiple) online-behavior:InterestTopic-class entities. This InterestFrame in turn has a has a Slot child. The Slot child tells what attribute (in the persona not the flat persona vocabulary) to pull from EACH of these multiple entities.

BTW, that Slot in the InterestFrame has an "attribute" value of "rdf:type"--which is a real curve ball. The presentation code will have to have some way of rendering the value of a class. The value of the class might be "Satire", but of course we probably want to display something like "Humor > Satire" --in other words rendering not just the "leaf" class name but where it sits in relation to the (up to 6 levels) of super-classes ("Humor" being the super-class of "Satire" in this case).

Back to the top