For the record, there is a solution for this built into EDG. Assuming you have the SKOS shapes namespace imported into your ontology, you can switch to SKOS-specific constraints (or activate Merged mode) to see the property "from concept scheme"

The values of that are skos:ConceptScheme instances, and the constraint is that all values of the property must be part of that scheme. Then select the corresponding editor for the same property:

which is an auto-complete editor that only shows suitable values from the provided concept scheme.

For the technical record, here is the definition of the underlying constraint component:

skosshapes:FromConceptSchemeConstraintComponent
  a sh:ConstraintComponent ;
  dash:propertySuggestionGenerator tosh:DeleteTripleSuggestionGenerator ;
  rdfs:comment "A SHACL constraint component that can be used to state that all value nodes must be concepts from a given skos:ConceptScheme." ;
  rdfs:label "From concept scheme constraint component" ;
  sh:labelTemplate "Values need to be concepts from {?fromConceptScheme}" ;
  sh:parameter skosshapes:FromConceptSchemeConstraintComponent-fromConceptScheme ;
  sh:validator [
      a sh:SPARQLAskValidator ;
      sh:ask """ASK {
    $value skos:broader* ?concept .
    $fromConceptScheme skos:hasTopConcept ?concept .
}""" ;
      sh:message "Value must be from concept scheme {?fromConceptScheme}." ;
      sh:prefixes <http://topbraid.org/skos.shapes> ;
    ] ;
.

Note that any shape declarations must be stored in Ontology asset collections, i.e. the Ontology needs to owl:import the ConceptScheme's definition (at least it needs to have the instances of skos:ConceptScheme - it doesn't require all the Concepts under them).

HTH
Holger


On 2021-08-24 4:05 am, Tim Smith wrote:
Hi,

I have a taxonomy called "Security Classification" that contains five classification levels in a hierarchy modeled using skos:broader.  This was manually created in an EDG Taxonomy as the "Security Classification Concept Scheme".

I have added a property/property shape to edg:InformationAsset using a new property :securityClassification.  I'm struggling with how to assert that all values of the property :securityClassification must be a member of the Security Classification Concept Scheme. The simple thing to do would be to also create a Security Classification class and make all concepts instances of the class, leaving SKOS as the vocabulary by which I structure the terms.  Then sh:class can be used to define the values.  This appears to be how the Geography Taxonomy and Geo Ontology work together.  Doing so also feels redundant as I can see needing to make an ontology that mirrors my Concept Schemes for all cases where I need to restrict values to a specific Concept Scheme.

Is there a recommended design pattern for using concept schemes as the values for a property shape?  I'm looking for a solution that EDG will support, i.e. limit the values the user can select on a form to the specific Concept Scheme members.

Thanks in advance for your assistance,

Tim
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com <mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CAF0Wbn%2B0qg_u4qbJsC2bmRLbG2sFUgCeHKMJ32x2v7M3hpEkfw%40mail.gmail.com <https://groups.google.com/d/msgid/topbraid-users/CAF0Wbn%2B0qg_u4qbJsC2bmRLbG2sFUgCeHKMJ32x2v7M3hpEkfw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "TopBraid 
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/11423daf-7ada-c771-837d-624f42964855%40topquadrant.com.

Reply via email to