Skip to content

Instantly share code, notes, and snippets.

View philbarker's full-sized avatar

Phil Barker philbarker

View GitHub Profile
<div vocab="http://schema.org/" typeof="Person">
<span property="name">Alice</span> is a
<span property="worksFor" typeof="EmployeeRole">
<span property="roleName">teacher</span>
who works for
<span property="worksFor" typeof="HighSchool">
<span property="Name">Rydell High</span>
</span>
</span>
</div>
<div vocab="http://schema.org/" typeof="CreativeWork">
<span property="name">Designing a treasure map</span> is a
<span property="learningResourceType">lesson plan</span> for
<span rel="audience" typeof="EducationalAudience">
<span property="educationalRole">teacher</span>s
</span>
</div>
<div vocab="http://schema.org/" typeof="CreativeWork">
<span property="name">Designing a treasure map</span> is a
<span property="learningResourceType">lesson plan</span> for
<span rel="audience" typeof="EducationalAudience">
<span property="educationalRole" typeof="EducationalRole">
<span property="roleName">teacher</span>s
<span>
</span>
</div>
@philbarker
philbarker / ap.csv
Created May 19, 2020 14:52
Application Profile in csv and ShEx and a conformant instance
ID URI Label Type Value Space Comment
sdo: http://schema.org/ schema.org
foaf: http://xmlns.com/foaf/ FOAF
wd: http://www.wikidata.org/entity/ Wikidata Entities
wdt: http://www.wikidata.org/prop/direct/ Wikidata Properties
xsd: http://www.w3.org/2001/XMLSchema# XML Schema
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# RDF
@book Book
rdf:type instance of URI sdo:Book must be schema.org/Book
@prefix dct: <http://purl.org/dc/terms/> .
@prefix desm: <http://desm.org/ns/> .
@prefix ceds: <http://desm.org/ns/ceds/> .
@prefix credReg: <http://desm.org/ns/credReg/> .
@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#> .
<http://desm.org/TermMapping/635cac5803e6> a desm:AbstractClassMapping ;
@philbarker
philbarker / navy_maintence_task_abbr.json
Last active May 5, 2021 13:23
Example of describing task in CTDL.
{
"@context": {
"@version": 1.1,
"@import": "https://credreg.net/ctdl/schema/context/json",
"res": "http://example.org/resources/"
},
"@graph": [
{
"@id": "res:ce-ef0dc515-1234-446a-ae77-9ec83f3aa1ef",
"@type": "skos:ConceptScheme",
@philbarker
philbarker / nice-rsk.json
Last active May 5, 2021 13:17
Example of an occupation - workrole - task - competency described in CTDL; based on NICE Cyber Security framework.
{
"@context": {
"@version": 1.1,
"@import": "https://credreg.net/ctdl/schema/context/json",
"res": "http://example.org/resources/"
},
"@graph": [
{
"@id": "res:ce-ef0dc515-9d18-446a-ae77-3dc7797bc0de",
"@type": "ceterms:Occupation",
@philbarker
philbarker / acme-job.json
Last active May 5, 2021 11:51
Job description example
{
"@context": {
"@version": 1.1,
"@import": "https://credreg.net/ctdl/schema/context/json",
"res": "http://example.org/resources/"
},
"@graph": [
{
"@id": "res:Job_100-1234",
"@type": "ceterms:Job",
@philbarker
philbarker / acme-job-abbrev.json
Last active May 5, 2021 13:47
Description of a job offered by an organization, requiring a license
{
"@context": {
"@version": 1.1,
"@import": "https://credreg.net/ctdl/schema/context/json",
"res": "http://example.org/resources/"
},
"@graph": [
{
"@id": "res:ce-df180ff8-48fb-4a2b-8781-b812f901ae23",
"@type": "ceterms:Job",
@philbarker
philbarker / exMapping.ttl
Last active December 15, 2021 18:01
First cut at example DESM mapping & sparql query to pull out pairs of matching terms
@prefix : <http://example.local/> . # the "home" for this mapping
@prefix spine: <http://example.local/spine/> .
@prefix pred: <http://example.local/concepts/mappingPredicates#> .
@prefix abcl: <http://example.local/concepts/abstractClasses#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix desm: <http://desm.local/> . # to do: get real URI