@prefix spkc: <https://spkcspider.net/static/schemes/spkcgraph#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix cc: <https://creativecommons.org/ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<https://spkcspider.net/static/schemes/spkcgraph#> a owl:Ontology ;
  dc:title "The spkcgraph format" ;
  dc:description "This is the spkcgraph format used by spkcspider." ;
  cc:license <https://creativecommons.org/publicdomain/zero/1.0/> .

spkc:Entity a rdfs:Class ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Entity" ;
  rdfs:comment "A spkc Entity. Contains spkc:Property." .

spkc:type a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "type" ;
  rdfs:comment "The type of an Entity." ;
  rdfs:domain spkc:Entity ;
  rdfs:subClassOf rdfs:Container;
  rdfs:range (
    rdfs:Literal
    rdf:nil
  ) .

spkc:strength a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Strength" ;
  rdfs:comment "The protection strength of an component or content access." ;
  rdfs:domain rdfs:Resource ;
  rdfs:range xsd:integer .


spkc:Component a rdfs:Class ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Component" ;
  rdfs:subClassOf spkc:Entity ;
  rdfs:comment "Container for contents. Defines Protections." .

spkc:Content a rdfs:Class ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Content" ;
  rdfs:subClassOf spkc:Entity ;
  rdfs:comment "Contains real content." .

spkc:Feature a rdfs:Class ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Feature" ;
  rdfs:subClassOf spkc:Entity ;
  rdfs:comment "Contains Feature." .

spkc:Intention a rdfs:Class ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Intention" ;
  rdfs:comment "What can be done with referred token." .


spkc:Protection a rdfs:Class ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Protection" ;
  rdfs:subClassOf spkc:Entity ;
  rdfs:comment "Protection" .

spkc:contents a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Contents" ;
  rdfs:comment "Set of Contents" ;
  rdf:Seq spkc:Content ;
  rdfs:domain rdfs:Resource .


spkc:components a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Components" ;
  rdfs:comment "Set of components" ;
  rdf:Seq spkc:Component ;
  rdfs:domain rdfs:Resource .


spkc:Property a rdfs:Class ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Structured Property" ;
  rdfs:comment "Structured Property of an Entity." .

spkc:properties a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Properties" ;
  rdfs:comment "Set of properties" ;
  rdf:Bag spkc:Property ;
  rdfs:domain rdfs:Entity .

spkc:accessTo a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "AccessTo" ;
  rdfs:comment "Set of Entities which can be accessed" ;
  rdf:Bag rdfs:Entity ;
  rdfs:domain rdfs:Resource .

spkc:hashableURI a rdfs:Datatype ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:subClassOf xsd:anyURI .

spkc:value a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "value" ;
  rdfs:comment "The value of spkc:properties" ;
  rdfs:domain spkc:Property ;
  rdfs:range rdfs:Literal .

spkc:name a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "name" ;
  rdfs:comment "The name of a spkc:property, protection" ;
  rdfs:domain spkc:Property ;
  rdfs:domain spkc:Protection ;
  rdfs:domain spkc:Entity ;
  rdfs:range xsd:string .

spkc:fieldname a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "name" ;
  rdfs:comment "(Optional) the original fieldname of a property (in case form is used)." ;
  rdfs:domain spkc:Property ;
  rdfs:range xsd:string .

spkc:hashable a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "hashable" ;
  rdfs:comment "Should this property be used for hashing/verification?" ;
  rdfs:domain spkc:Property ;
  rdfs:range xsd:boolean .


spkc:action:view a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "view" ;
  rdfs:comment "View/Access Resource" ;
  rdfs:domain spkc:Entity ;
  rdfs:range xsd:anyURI .

spkc:action:feature a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "feature url" ;
  rdfs:comment "Access Feature" ;
  rdfs:domain spkc:Entity ;
  rdfs:range rdfs:Resource .

spkc:action:update a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "update url" ;
  rdfs:comment "(Optional) Update Resource. In raw mode not defined." ;
  rdfs:domain spkc:Entity ;
  rdfs:range rdfs:Resource .

spkc:action:delete a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "delete" ;
  rdfs:comment "(Optional) Delete Resource. In raw mode not defined." ;
  rdfs:domain spkc:Entity ;
  rdfs:range rdfs:Resource .

spkc:feature:name a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "feature name" ;
  rdfs:comment "Annotates Feature Url with name" ;
  rdfs:domain rdfs:Resource ;
  rdfs:range rdf:string .

spkc:ability:name a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "ability name" ;
  rdfs:comment "Name of extra access method" ;
  rdfs:domain rdfs:Resource ;
  rdfs:range rdf:string .

spkc:pages.num_pages a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Amount Pages" ;
  rdfs:comment "The amount of pages. 1 indicates no paging" ;
  rdfs:domain rdfs:Resource ;
  rdfs:range xsd:positiveInteger .

spkc:pages.size_page a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Page Size" ;
  rdfs:comment "The size of the page." ;
  rdfs:domain rdfs:Resource ;
  rdfs:range xsd:positiveInteger .

spkc:pages.current_page a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Page Size" ;
  rdfs:comment "The current page." ;
  rdfs:domain rdfs:Resource ;
  rdfs:range xsd:positiveInteger .


spkc:verified a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Verified" ;
  rdfs:comment "false, timestamp of verification or true in case timestamp not available" ;
  rdfs:domain rdfs:Resource ;
  rdfs:range (
    xsd:boolean
    xsd:dateTime
  ) .

spkc:hash a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Hash" ;
  rdfs:comment "(Optional) Hash of an external resource in hexadecimal" ;
  rdfs:domain rdfs:Resource ;
  rdfs:range xsd:string .

spkc:hash.algorithm a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Hash Algorithm" ;
  rdfs:comment "The hash algorithm used for generating hash" ;
  rdfs:domain spkc:hash ;
  rdfs:range xsd:string .

spkc:hashed a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Hashed Objects" ;
  rdfs:comment "Link to hashed resources. Used by verifier." ;
  rdfs:domain rdfs:Resource ;
  rdfs:range spkc:hash .


spkc:protections a rdf:Property ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Protections" ;
  rdfs:comment "Protections" ;
  rdfs:domain rdfs:Resource ;
  rdfs:range spkc:Protection .

spkc:protections.amount a rdf:value ;
  rdfs:isDefinedBy <https://spkcspider.net/static/schemes/spkcgraph#> ;
  rdfs:label "Protection Amount" ;
  rdfs:comment "Amount of protections" ;
  rdfs:subPropertyOf spkc:protections ;
  rdfs:range xsd:nonNegativeInteger .
