Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonicalize preloads to save memory and fix broken preload #7

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions json-ld-preloaded.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency 'json-ld', '~> 3.3'
gem.add_development_dependency 'rspec', '~> 3.12'
gem.add_development_dependency 'yard' , '~> 0.9'
gem.add_development_dependency 'webmock'
gem.add_development_dependency 'rake'

gem.post_install_message = nil
end
1 change: 0 additions & 1 deletion lib/json/ld/preloaded/activitystreams.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,4 @@ class JSON::LD::Context
"xsd" => TermDefinition.new("xsd", id: "http://www.w3.org/2001/XMLSchema#", simple: true, prefix: true)
})
end
alias_preloaded("https://www.w3.org/ns/activitystreams", "http://www.w3.org/ns/activitystreams")
end
1 change: 0 additions & 1 deletion lib/json/ld/preloaded/csvw.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,4 @@ class JSON::LD::Context
"yearMonthDuration" => TermDefinition.new("yearMonthDuration", id: "http://www.w3.org/2001/XMLSchema#yearMonthDuration", simple: true)
})
end
alias_preloaded("https://www.w3.org/ns/csvw", "http://www.w3.org/ns/csvw")
end
1 change: 0 additions & 1 deletion lib/json/ld/preloaded/datacube.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@ class JSON::LD::Context
"xsd" => TermDefinition.new("xsd", id: "http://www.w3.org/2001/XMLSchema#", simple: true, prefix: true)
})
end
alias_preloaded("https://pebbie.org/context/qb", "http://pebbie.org/context/qb")
end
4 changes: 3 additions & 1 deletion lib/json/ld/preloaded/entityfacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class JSON::LD::Context
"attributionRequired" => TermDefinition.new("attributionRequired", id: "https://d-nb.info/standards/elementset/dnb#attributionRequired", simple: true),
"biographicalOrHistoricalInformation" => TermDefinition.new("biographicalOrHistoricalInformation", id: "https://d-nb.info/standards/elementset/gnd#biographicalOrHistoricalInformation", language_mapping: "de"),
"collection" => TermDefinition.new("collection", id: "https://d-nb.info/standards/elementset/dnb#isDescribedIn", simple: true),
"completeName" => TermDefinition.new("completeName", id: "https://d-nb.info/standards/elementset/gnd#FullerFormOfNameOfThePerson", simple: true),
"coordinates" => TermDefinition.new("coordinates", id: "https://purl.org/geojson/vocab#coordinates", container_mapping: "@list"),
"copyrighted" => TermDefinition.new("copyrighted", id: "https://d-nb.info/standards/elementset/dnb#copyrighted", simple: true),
"creator" => TermDefinition.new("creator", id: "http://purl.org/dc/elements/1.1/creator", simple: true),
Expand All @@ -32,6 +33,7 @@ class JSON::LD::Context
"depiction" => TermDefinition.new("depiction", id: "http://xmlns.com/foaf/0.1/depiction", simple: true),
"describedBy" => TermDefinition.new("describedBy", id: "http://www.w3.org/2007/05/powder-s#describedby", simple: true),
"description" => TermDefinition.new("description", id: "http://purl.org/dc/terms/description", simple: true),
"earlierName" => TermDefinition.new("earlierName", id: "https://d-nb.info/standards/elementset/gnd#EarlierNameOfThePerson", simple: true),
"event" => TermDefinition.new("event", id: "https://d-nb.info/standards/elementset/gnd#ConferenceOrEvent", simple: true),
"familialRelationship" => TermDefinition.new("familialRelationship", id: "https://d-nb.info/standards/elementset/gnd#familialRelationship", simple: true),
"family" => TermDefinition.new("family", id: "https://d-nb.info/standards/elementset/gnd#Family", simple: true),
Expand All @@ -46,6 +48,7 @@ class JSON::LD::Context
"isA" => TermDefinition.new("isA", id: "https://d-nb.info/standards/elementset/gnd#broaderTermInstantial", simple: true),
"isPartOf" => TermDefinition.new("isPartOf", id: "https://d-nb.info/standards/elementset/gnd#hierarchicalSuperior", simple: true),
"label" => TermDefinition.new("label", id: "http://www.w3.org/2000/01/rdf-schema#label", language_mapping: "de"),
"laterName" => TermDefinition.new("laterName", id: "https://d-nb.info/standards/elementset/gnd#LaterNameOfThePerson", simple: true),
"license" => TermDefinition.new("license", id: "http://purl.org/dc/terms/license", type_mapping: "@id"),
"location" => TermDefinition.new("location", id: "http://purl.org/dc/terms/spatial", simple: true),
"name" => TermDefinition.new("name", id: "http://xmlns.com/foaf/0.1/name", simple: true),
Expand Down Expand Up @@ -86,5 +89,4 @@ class JSON::LD::Context
"xsd" => TermDefinition.new("xsd", id: "http://www.w3.org/2001/XMLSchema#", simple: true, prefix: true)
})
end
alias_preloaded("https://hub.culturegraph.org/entityfacts/context/v1/entityfacts.jsonld", "http://hub.culturegraph.org/entityfacts/context/v1/entityfacts.jsonld")
end
1 change: 0 additions & 1 deletion lib/json/ld/preloaded/foaf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ class JSON::LD::Context
"workplaceHomepage" => TermDefinition.new("workplaceHomepage", id: "http://xmlns.com/foaf/0.1/workplaceHomepage", type_mapping: "@id")
})
end
alias_preloaded("https://xmlns.com/foaf/context", "http://xmlns.com/foaf/context")
end
1 change: 0 additions & 1 deletion lib/json/ld/preloaded/geojson.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ class JSON::LD::Context
"type" => TermDefinition.new("type", id: "@type", simple: true)
})
end
alias_preloaded("https://geojson.org/geojson-ld/geojson-context.jsonld", "http://geojson.org/geojson-ld/geojson-context.jsonld")
end
1 change: 0 additions & 1 deletion lib/json/ld/preloaded/hydra.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,4 @@ class JSON::LD::Context
"xsd" => TermDefinition.new("xsd", id: "http://www.w3.org/2001/XMLSchema#", simple: true, prefix: true)
})
end
alias_preloaded("https://www.w3.org/ns/hydra/core", "http://www.w3.org/ns/hydra/core")
end
1 change: 0 additions & 1 deletion lib/json/ld/preloaded/iiif.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,4 @@ class JSON::LD::Context
"xsd" => TermDefinition.new("xsd", id: "http://www.w3.org/2001/XMLSchema#", simple: true, prefix: true)
})
end
alias_preloaded("https://iiif.io/api/image/2/context.json", "http://iiif.io/api/image/2/context.json")
end
1 change: 0 additions & 1 deletion lib/json/ld/preloaded/linkedart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -450,5 +450,4 @@ class JSON::LD::Context
"xsd" => TermDefinition.new("xsd", id: "http://www.w3.org/2001/XMLSchema#", simple: true, prefix: true)
})
end
alias_preloaded("https://linked.art/ns/v1/linked-art.json", "http://linked.art/ns/v1/linked-art.json")
end
Loading