software:Snippet leaf node


URI

https://spdx.org/rdf/3.0.1/terms/Software/Snippet

Label

Snippet

Description

Describes a certain part of a file.

Targets (1)

Node Constraints

value type sh:IRI

Property Constraints (3)

Focus nodes of this shape (software:Snippet) can have the following properties:

PROPERTY DESCRIPTION MIN MAX VALUE TYPE OTHER CONSTRAINTS
software:byteRange Defines the byte range in the original host file that the snippet information applies to. 0 1 core:PositiveIntegerRange
sh:BlankNodeOrIRI
software:lineRange Defines the line range in the original host file that the snippet information applies to. 0 1 core:PositiveIntegerRange
sh:BlankNodeOrIRI
software:snippetFromFile Defines the original host file that the snippet information applies to. 1 1 software:File
sh:IRI

Implementation

@prefix core: <https://spdx.org/rdf/3.0.1/terms/Core/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix software: <https://spdx.org/rdf/3.0.1/terms/Software/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

software:Snippet a owl:Class,
        sh:NodeShape ;
    rdfs:comment "Describes a certain part of a file."@en ;
    rdfs:subClassOf software:SoftwareArtifact ;
    sh:nodeKind sh:IRI ;
    sh:property [ sh:class core:PositiveIntegerRange ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:path software:lineRange ],
        [ sh:class software:File ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:nodeKind sh:IRI ;
            sh:path software:snippetFromFile ],
        [ sh:class core:PositiveIntegerRange ;
            sh:maxCount 1 ;
            sh:nodeKind sh:BlankNodeOrIRI ;
            sh:path software:byteRange ] .