One or more RDF graphs that represent an institution's "facts" or information modeled as relationships and entities as IRI
@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/> . <http://intro2libsys.info/code4lib-2017> a schema:EducationEvent ; schema:endDate "2017-03-11T26:59:99" ; schema:superEvent <http://2017.code4lib.org/> ; schema:startDate "2017-03-11T20:00:00" .
>> import rdflib
>> SCHEMA = rdflib.Namespace("http://schema.org/")
>> preconference = rdflib.ConjunctiveGraph()
>> preconference_iri = rdflib.URIRef("http://intro2libsys.info/code4lib-2017")
>> code4lib_2017 = rdflib.URIRef("http://2017.code4lib.org/")
>> preconference.add((preconference_iri,
rdflib.RDF.type,
SCHEMA.EducationEvent))
>> preconference.add((preconference_iri,
SCHEMA.startDate,
rdflib.Literal("2017-03-06T20:30:00")))
>> prefconference.add((prefconference_iri,
SCHEMA.superEvent,
code4lib_2017))
RDF Applications and microservices use the base knowledge graph composed of colorado-college.ttl , cc-people.ttl, and cc-2016-2017.ttl all managed using Git and Github as part of the ongoing TIGER Catalog project.
This application allows seniors at Colorado College to self-submit their thesis along with any accompanying datasets, video, or audio to Colorado College's Fedora-based institutional repository.
Source Code Repository Live Application
>>> import requests
>>> TRIPLESTORE_URL = 'http://localhost:9999/blazegraph/sparql'
>>> def setup_etd_knowledgegraph():
cc_path = 'E:/2017/tiger-catalog/custom/'
etd_path = "E:/2017/ccetd/custom/etd-2016-2017.ttl"
for name in ["colorado-college.ttl",
"cc-people.ttl",
"cc-2016-2017.ttl"]:
with open("{}/{}".format(cc_path, name), "rb") as fo:
requests.post(TRIPLESTORE_URL,
data=fo.read(),
headers={"Content-Type": "text/turtle"})
with open(etd_path, 'rb') as fo:
requests.post(TRIPLESTORE_URL,
data=fo.read(),
headers={"Content-Type": "text/turtle"})
print("Finished")
>>> setup_etd_knowledgegraph()
Finished