|
107
|
1 |
# -*- coding: utf-8 -*- |
|
|
2 |
''' |
|
|
3 |
Created on Aug 30, 2013 |
|
|
4 |
|
|
|
5 |
@author: ymh |
|
|
6 |
''' |
|
|
7 |
from rdflib.graph import Graph |
|
|
8 |
from rdflib.namespace import Namespace, RDF |
|
|
9 |
|
|
|
10 |
|
|
|
11 |
DCT = Namespace("http://purl.org/dc/terms/") |
|
|
12 |
IIEP = Namespace("http://www.iiep.unesco.org/plan4learning/model.owl#") |
|
|
13 |
UNESCO = Namespace("http://www.iiep.unesco.org/Ontology/") |
|
|
14 |
|
|
|
15 |
GRAPH_NAMESPACES = { |
|
|
16 |
'iiep': IIEP, |
|
|
17 |
'dct': DCT, |
|
|
18 |
'rdf': RDF |
|
|
19 |
} |
|
|
20 |
|
|
|
21 |
def get_empty_graph(): |
|
|
22 |
record_graph = Graph() |
|
|
23 |
for prefix,uri in GRAPH_NAMESPACES.items(): |
|
|
24 |
record_graph.bind(prefix,uri) |
|
|
25 |
return record_graph |