-
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 LDT Document hierarchy 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 dh: <https://www.w3.org/ns/ldt/document-hierarchy/domain#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
# webapp root resource
<> a dh:Container .
# 1st level container
<Processor> a dh:Container ;
sioc:has_parent <> .
# 2nd level container
<Processor/wiki> a dh:Container ;
sioc:has_parent <Processor> .
# 2nd level item
<Processor/wiki/Data-hierarchy> a dh:Item ;
sioc:has_container <Processor/wiki> .
# 1st level item
<Processor/pulse> a dh:Item ;
sioc:has_container <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':
<>
+-- <Processor>
| +-- <wiki>
| | +-- <Data-hierarchy>
| +-- <pulse>
All HTTP-accessible resources (which excludes hash URIs such as <Processor#project>
) are c:Document
s.
By convention, the slashes in the URI structure mark a SIOC parent/children relation in RDF.