Skip to content

Instantly share code, notes, and snippets.

@James-Hudson3010
James-Hudson3010 / gist:882ae10308614d8848c9c020b54c921b
Last active March 6, 2020 18:58
Learning JSON-LD - Some Questions
I have the following JSON-LD document:
[
{
"@context": {
"tt": "http://my-company-name/Tasking#",
"task": "http://my-company-name/data/TaskingOntology#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#"
},
"@id": "tt:Task_3",
{
"@context": {
"mne": "http://company.org/",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"sch": "http://schema.org/",
"subclassOf": "rdfs:subClassOf",
"valueTypes": "sch:rangeIncludes",
"propertyOf": "sch:domainIncludes"
},
@James-Hudson3010
James-Hudson3010 / gist:227ffb77b853a29556be5b5c3a67c309
Created March 26, 2020 15:08
sample json-ld instance of schema
{
"@context": {
"mne": "http://example.com/",
"itemIdentifier": "mne:itemIdentifier",
"iteration": "mne:iteration",
"item": "mne:item",
"containerVersion": "mne:containerVersion",
},
"@id": "the_container_identifier",
"@type": "mne:CONTAINER",
@James-Hudson3010
James-Hudson3010 / employees.ttl
Created March 30, 2020 17:11
Testing pySHACL
@prefix hr: <http://learningsparql.com/ns/humanResources#> .
@prefix d: <http://learningsparql.com/ns/data#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
#### Regular RDFS modeling ####
hr:Employee a rdfs:Class .
@prefix hr: <http://learningsparql.com/ns/humanResources#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] a sh:ValidationReport ;
sh:conforms false ;
@James-Hudson3010
James-Hudson3010 / Data & Shape Graph
Last active April 14, 2020 11:52
Validation Errors
@prefix hr: <http://learningsparql.com/ns/humanResources#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
hr:Employee a rdfs:Class .
@prefix hr: <http://learningsparql.com/ns/humanResources#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sch: <http://schema.org/> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
hr:Another a rdfs:Class .
hr:Employee a rdfs:Class ;
@prefix hr: <http://learningsparql.com/ns/humanResources#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sch: <http://schema.org/> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
hr:Another a rdfs:Class .
hr:Employee a rdfs:Class ;
@prefix : <http://www.pizza.com/ontologies/pizza.owl#> .
@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 rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.pizza.com/ontologies/pizza.owl> .
<http://www.pizza.com/ontologies/pizza.owl> rdf:type owl:Ontology ;
rdfs:comment "A pizza ontology that describes various pizzas based on their toppings" .
@James-Hudson3010
James-Hudson3010 / docker-compose.yml
Last active August 1, 2020 05:27
Working to get Neo4J, Docker, and neosemantics working together
version: '3'
services:
neo4j:
image: neo4j:3.5
container_name: neo4j
ports:
- 7474:7474
- 7687:7687
environment: