This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"@context": {"@base": "http://a/bb/ccc/d;p?q", "urn:ex:p": {"@type": "@id"}}, | |
"@graph": [ | |
{"@id": "urn:ex:s001", "urn:ex:p": "g:h"}, | |
{"@id": "urn:ex:s002", "urn:ex:p": "g"}, | |
{"@id": "urn:ex:s003", "urn:ex:p": "./g"}, | |
{"@id": "urn:ex:s004", "urn:ex:p": "g/"}, | |
{"@id": "urn:ex:s005", "urn:ex:p": "/g"}, | |
{"@id": "urn:ex:s006", "urn:ex:p": "//g"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From agenda, | |
https://www.w3.org/2013/csvw/wiki/F2F_Agenda_2015-02 | |
09:00 - 10:30 Primary Keys & Cross References[edit] | |
Limit foreign key cross references to the same batch of processed resources | |
Should primary keys be skipped from cell level triple (or k/v pairs) generation? | |
Alternate structure in JSON mapping output graph if Primary Key is specified | |
Making `schema` property mandatory for table description objects & explicit identification of schemas | |
Composite primary keys and foreign key references |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context": { | |
"Agent": "http://purl.org/dc/terms/Agent", | |
"AgentClass": "http://purl.org/dc/terms/AgentClass", | |
"BibliographicResource": "http://purl.org/dc/terms/BibliographicResource", | |
"Box": "http://purl.org/dc/terms/Box", | |
"DCMIType": "http://purl.org/dc/terms/DCMIType", | |
"DDC": "http://purl.org/dc/terms/DDC", | |
"FileFormat": "http://purl.org/dc/terms/FileFormat", | |
"Frequency": "http://purl.org/dc/terms/Frequency", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bson' | |
module Wikia::Screen | |
# Extensions for mapping to/from BSON. | |
module MongoExtensions | |
def to_bson(obj) | |
obj = obj.dup | |
# Add created and modified dates | |
obj["schema:dateCreated"] = Time.parse(obj["schema:dateCreated"]) if obj.has_key?("schema:dateCreated") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Vocab | |
# Generate a JSON-LD context for the vocabulary + schema.org | |
module Context | |
# @return [Hash] | |
def generate_context | |
context = { | |
"@vocab" => "http://schema.org/", | |
"@language" => "en", | |
"foaf" => "http://xmlns.com/foaf/0.1/", | |
"hydra" => "http://www.w3.org/ns/hydra/core#", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
{ | |
"@context": [ | |
"http://schema.org/", | |
"http://yoursports.com/vocab" | |
], | |
"@id": "http://yoursports.com/giants", | |
"@type": "SportsTeam", | |
"name": "San Francisco Giants", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context": { | |
"rdfs": "http://www.w3.org/2000/01/rdf-schema#", | |
"schema": "http://schema.org/", | |
"xsd": "http://www.w3.org/2001/XMLSchema#", | |
"rdfs:subClassOf": { | |
"@type": "@id" | |
}, | |
"name": "rdfs:label", | |
"description": "rdfs:comment", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context": { | |
"children": {"@id": "yard:children", "@type": "@id"}, | |
"children": {"@id": "yard:children", "@type": "@id"}, | |
"docstring": "yard:docstring", | |
"explicit": "yard:explicit", | |
"files": {"@id": "yard:files", "@type": "@id"}, | |
"group": "yard:group", | |
"groups": "yard:groups", | |
"name": "yard:name", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "http://rubygems.org" | |
gemspec | |
group :development do | |
gem 'shotgun' | |
gem "wirble" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rdf' | |
require 'rdf/n3' | |
doc = %q( | |
@prefix dms: <http://example.stanford.edu/ns/> . | |
@prefix ore: <http://www.openarchives.org/ore/terms/> . | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
@prefix item: <http://example.stanford.edu/item/> . |