Created
May 20, 2022 12:01
-
-
Save abroniewski/01e241092d4c067bdd8904105a6a5b72 to your computer and use it in GitHub Desktop.
an example where multiple subProperties are created to allow for query flexibility
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
graph.add((KG.title, RDF.type, RDF.Property)) | |
graph.add((KG.title, RDFS.label, Literal("title"))) | |
graph.add((KG.title, RDFS.comment, Literal("this is a super-property that can be used to query all items that " | |
"have a title"))) | |
graph.add((KG.title, RDFS.range, XSD.string)) | |
#all title are subproperties of KG:title, allowing for flexible querying. | |
graph.add((KG.paperTitle, RDF.type, RDF.Property)) | |
graph.add((KG.paperTitle, RDFS.domain, KG.Paper)) | |
graph.add((KG.paperTitle, RDFS.range, XSD.string)) | |
graph.add((KG.paperTitle, RDFS.subPropertyOf, KG.title)) | |
graph.add((KG.paperTitle, RDFS.label, Literal("title of a Paper"))) | |
graph.add((KG.journalTitle, RDF.type, RDF.Property)) | |
graph.add((KG.journalTitle, RDFS.domain, KG.Journal)) | |
graph.add((KG.journalTitle, RDFS.range, XSD.string)) | |
graph.add((KG.journalTitle, RDFS.subPropertyOf, KG.title)) | |
graph.add((KG.journalTitle, RDFS.label, Literal("title of a Journal"))) | |
graph.add((KG.conferenceTitle, RDF.type, RDF.Property)) | |
graph.add((KG.conferenceTitle, RDFS.domain, KG.Conference)) | |
graph.add((KG.conferenceTitle, RDFS.range, XSD.string)) | |
graph.add((KG.conferenceTitle, RDFS.subPropertyOf, KG.title)) | |
graph.add((KG.conferenceTitle, RDFS.label, Literal("title of a Conference"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment