Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Use-case : tree selectors widgets #29

Open
tfrancart opened this issue Oct 4, 2023 · 2 comments
Open

Use-case : tree selectors widgets #29

tfrancart opened this issue Oct 4, 2023 · 2 comments

Comments

@tfrancart
Copy link
Contributor

See #16 for the full story.

I have tree selectors.
They rely on:

  • which property/path is used to construct the hierarchy (skos:broader/ narrower, dt:has_part/is_part_of, etc.)
  • optionally, which property/path is used to indicate the roots of the tree (skos:hasTopConcept|^skos:topConceptOf)

having the ability to indicate with property roles which properties are used for tree navigation could automate tree selectors.

@bergos
Copy link
Member

bergos commented Oct 16, 2023

@tfrancart can you please provide an example given as Turtle? Maybe you can also give more context based on that example. I think that would be useful for further discussions.

@tfrancart
Copy link
Contributor Author

Here is an example given as Turtle of how things currently look like:

xxx:PersonShape a sh:NodeShape
  rdfs:label "Person"@en ;
  sh:property [
    sh:path dct:subject ;
    sh:name "category (tree)";
    config-datasource:treeRootsDatasource [
      a config-datasource:tSPARQLDatasource ;
      config-datasource:queryString """A SPARQL query selecting the roots of the tree to display"""";
   ] ;
   config-datasource:treeChildrenDatasource [
      a config-datasource:tSPARQLDatasource ;
      config-datasource:queryString """A SPARQL query selecting the children of a node being unfolded"""";
   ] ;
  ]

Maybe this could be generalized as a TreeSelector ? Something like

xxx:PersonShape a sh:NodeShape
  rdfs:label "Painter"@en ;
  sh:property [
    sh:path dct:subject ;
    sh:name "category (tree)";
    sh:node [
     # this represents our tree structure

      sh:property [
        sh:path [ sh:alternativePath(skos:narrower [sh:inversePath skos:broader])] ;
        # flagging this path as the one to use to fetch chidren
        xxxxx:propertyRole xxxxx:HierarchyChildrenRole ;
     ] ;
    # need to find something similar to say "dct:subject values are connected to a tree in which the roots are indicated by this path expression" - that's a bit difficult :-) and requires more thinking
    ]
  ]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants