SemanticComputing / sampo-ui

Sampo-UI – A framework for building user interfaces for semantic portals
https://seco.cs.aalto.fi/tools/sampo-ui
MIT License
33 stars 7 forks source link

How to integrate the backend data or interfaces? #60

Open fishfree opened 3 months ago

fishfree commented 3 months ago

I mean your ***-sampo series, are there universal data structures or interface specifications to conform? Many thanks for your great work-pieces!

HeikkiR commented 3 months ago

Sampo-portals don't generally have any unified data model, and Sampo-UI has been greated to be more or less generic. There are however some very general principles that may make Sampo-ui more or less suitable for particular data. Sampo-UI is meant to work with search perspectives that allow user to search instances of a specific class using various facets. In very simple terms basically you define a facet class (such as example:Person) for a search perspective and then some facets which will have mainly the type of the facets and the property path from an instance of the facet class to facet value (such as example:birthPlace for a birth place facet). To show results, assuming you use the default mapper, you will need to write a result set SPARQL query so that the variable names follow a specific form (see examples in code), but it doesn't really matter how the data is actually stuctured. If you use the default "server side" faceted search option, then Sampo-UI is designed to run faceted search directly using SPARQL queries, and very large numbers of instances of the facet class can slow the search (depending on the endpoint). Similarly long property paths from the instances to facet values will slow down the search.