-
Notifications
You must be signed in to change notification settings - Fork 7
Document hierarchy
AtomGraph Processor does not require a specific RDF dataset layout. It includes however a useful one that extends the core AtomGraph Processor vocabulary and uses container/item membership properties from SIOC to describe a resource hierarchy, which is very common in web applications and filesystems.
In the dataset, a structure of this wiki could be described like this:
@base <https://github.com/AtomGraph/> .
@prefix gp: <http://graphity.org/gp#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
# webapp root resource
<> a gp:Container .
# 1st level container
<graphity-client> a gp:Container ;
sioc:has_parent <> .
# 1st level container
<graphity-core> a gp:Container ;
sioc:has_parent <> .
# 1st level container
<graphity-processor> a gp:Container ;
sioc:has_parent <> .
# 2nd level container
<graphity-processor/wiki> a gp:Container ;
sioc:has_parent <graphity-processor> .
# 2nd level item
<graphity-processor/wiki/Data-hierarchy> a gp:Document ;
sioc:has_container <graphity-processor/wiki> .
# 1st level item
<graphity-processor/pulse> a gp:Document ;
sioc:has_container <graphity-processor> .
And so on, deeper down into the container hierarchy where items are leaves - a parent/child relationship just like with folders and files in a file system.
Abstract concepts and things that cannot be directly accessed over HTTP but can still be described in RDF documents can be attached to the document hierarchy using foaf:isPrimaryTopicOf
and foaf:primaryTopic
properties:
@base <https://github.com/AtomGraph/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<> a foaf:Document ;
foaf:primaryTopic <#project> .
<#project> a doap:Project ;
dct:created "2011-09-13"^^xsd:date ;
foaf:isPrimaryTopicOf <> .
Here the example above is depicted as a resource tree, with resource URIs relative to their parents':
<>
+-- <graphity-client>
+-- <graphity-core>
+-- <graphity-processor>
| +-- <wiki>
| | +-- <Data-hierarchy>
| +-- <pulse>
All HTTP-accessible resources (which excludes hash URIs such as <graphity-processor#this>
) are gp:Document
s.
By convention, the slashes in the URI structure mark a SIOC parent/children relation in RDF.