core:UcoThing-identifier-regex-shape leaf node


URI

https://ontology.unifiedcyberontology.org/uco/core/UcoThing-identifier-regex-shape

Label

UcoThing-identifier-regex-shape

Description

This shape is given an independent IRI for applications that have sufficient controls in place to deactivate this advisory of node identification practice.

Target Classes (1)

Shape Properties

Instances of core:UcoThing can have the following properties:

PROPERTY

MIN COUNT

MAX COUNT

TYPE

Implementation

@prefix core: <https://ontology.unifiedcyberontology.org/uco/core/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .

core:UcoThing-identifier-regex-shape a sh:NodeShape ;
    rdfs:comment "This shape is given an independent IRI for applications that have sufficient controls in place to deactivate this advisory of node identification practice."@en ;
    rdfs:seeAlso sh:deactivated ;
    sh:severity sh:Info ;
    sh:sparql [ a sh:SPARQLConstraint ;
            rdfs:seeAlso <https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.3> ;
            sh:message "UcoThings are suggested to end with a UUID."@en ;
            sh:select """
			PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
			PREFIX core: <https://ontology.unifiedcyberontology.org/uco/core/>
			SELECT $this
			WHERE {
			        $this a/rdfs:subClassOf* core:UcoThing .
			        FILTER (
			                ! REGEX (
			                        STR($this),
			                        "[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$",
			                        "i"
			                )
			        )
			}
		""" ] ;
    sh:targetClass core:UcoThing .