Unverified Commit 335c549b authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

remove pattern commodities for now

parent 0cd38a7b
Loading
Loading
Loading
Loading

patterns/commodities/README.md

deleted100644 → 0
+0 −4
Changes for patterns/commodities/README.md: 0 added lines, 4 removed lines.
Original line number Diff line number Diff line
# Commodities

The SAREF ontology reference pattern `Commodities` defines the saref:Commodity class and its subclasses.

patterns/commodities/pattern.ttl

deleted100644 → 0
+0 −14
Changes for patterns/commodities/pattern.ttl: 0 added lines, 14 removed lines.
Original line number Diff line number Diff line
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix saref: <https://saref.etsi.org/core/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix vann: <http://purl.org/vocab/vann/> .
@base <https://saref.etsi.org/core/> .

saref:Commodity rdf:type owl:Class ;
    rdfs:comment "A marketable item for which there is demand, but which is supplied without qualitative differentiation across a market. SAREF refers to energy commodities such as electricity, gas, coal and oil. "@en ;
    rdfs:label "Commodity"@en .

patterns/commodities/query.rq

deleted100644 → 0
+0 −9
Changes for patterns/commodities/query.rq: 0 added lines, 9 removed lines.
Original line number Diff line number Diff line
PREFIX owl:   <http://www.w3.org/2002/07/owl#>
PREFIX rdfs:  <http://www.w3.org/2000/01/rdf-schema#>
PREFIX saref: <https://saref.etsi.org/core/>
SELECT * WHERE {
 ?commodity a owl:Class ;
   rdfs:subClassOf saref:Commodity ;
   rdfs:label ?label ;
   rdfs:comment ?comment .
}
 No newline at end of file
+0 −19
Changes for patterns/commodities/specialization.py: 0 added lines, 19 removed lines.
Original line number Diff line number Diff line
from saref_patterns import SAREF, check_patterns
from rdflib import Graph, Literal, RDF, RDFS, OWL

schema = {
    'description': 'The name of the commodity. Will be used as the local name of the IRI and the label',
    'title': 'label',
    'type': 'string'
}

def specialize(namespace, execution):
    g = Graph()
    g.add((namespace[execution], RDF.type, OWL.Class))
    g.add((namespace[execution], RDFS.subClassOf, SAREF.Commodity))
    g.add((namespace[execution], RDFS.label, Literal(execution, "en")))
    g.add((namespace[execution], RDFS.comment, Literal("A type of commodity", "en")))
    return g

if __name__ == "__main__":
    check_patterns(specialize, schema)