How do I query say people with certain ExperienceType?
A. Short answer
- Go to the said experience type (using the search box for example).
- All related items will be listed there. Among them all the people with this experience type.
Drawback of this method:
- Links will appear mixed with other uses of this experience type. Imagine you have also courses requiring a given experience type they may be mixed with it.
- This list will appear on the ExperienceType itself, what if I needed it anywhere else ?
B. With some typing
Links are displayed once only. So if they are listed in the body of the item they won’t be listed again after. This is great to produce successives filters. This is done by calling in the body of the ExperienceType 3 templates like this
{{ KNVSortLinksClear }} {{ KNVSortLinksByTypeOrderByGroupBy Query ||}} {{ KNVLinks }}
KNVSortLinksClear clears all links to be printed KNVSortLinksByTypeOrderByGroupBy query links and items, arguments are separated with the vertical bar. There are 3 of them: the “Query” and 2 empty ones. KNVLinks displays the selected links The query could be something like KNV:PartOfLinkType;KNV:PersonType;!KNV:StudentType This means Take all items of class KNV:PersonType but not of Type KNVStudentType found behind a link KNV:PartOfLinkType The semi colon separates filters, it corresponds to an “AND”. The exclamation marks means “NOT”. When a type is an Item type it applies to target items. When a type is an Link type it applies to the link leading to target item. Note: If there are errors, they will be displayed at the position of the template calls. The first template use can be cumbersome but once you have been through the first experience it’s pretty easy and powerful. With it Kneaver becomes the spreadsheet of semantic databases. Hint: When typing template calls using double braces there should be nothing else than spaces between braces and the template name. It is sometime advisable to check the source mode of the editor instead of the wysiwyg HTML editor.
C. Group them all in a new template
A template could be done to wrap the 3 above
and call it anywhere
{{ ExperiencesList }}
To add such a template access to the custom templates must be enabled.
D. Change the template to display experiences or persons.
It is sufficient to change SortLinks for KNV:PersonType. Below is the original definition of it that could serve as an example.
It would be sufficient to add the call below to separate the experiences.
E. Perspectives.
We could go even further by making sure we add some custom owl:class for the link types to ensure we are representing exactly the fact that the people possess such a experience and add some attributes to the link. Attributes could then be used in the query using the XPath syntax (like @attrName=value). Even further: Templates can call javascript and access directly Kneaver Core engine: KNVSrv. At this level absolutely everything is possible like combining queries on Social Media with Kneaver items.