
-- load base data

select load_namespace('http://cyberconcepts.org/cco-blank#', '_');
select load_namespace('http://cyberconcepts.org/cco-common#', 'cco');
select load_namespace('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'rdf');
select load_namespace('http://www.w3.org/2000/01/rdf-schema#', 'rdfs');

select load_datatype('namespace', 'namespaces');
select load_datatype('node', 'nodes');
select load_datatype('datatype', 'datatypes');
select load_datatype('event', 'events');
select load_datatype('triple', 'triples');
select load_datatype('text', 'texts');
select load_datatype('int');
select load_datatype('decimal');
select load_datatype('timestamp');

select new_event() as event
\gset

insert into vtriples (stname, stext, ptext, otname, otext, creation) values 
    ('node', 'rdf:type', 'rdf:type', 'node', 'rdf:Property', :event),
    ('node', 'rdf:Property', 'rdf:type', 'node', 'rdfs:Class', :event),
    ('node', 'rdfs:Class', 'rdf:type', 'node', 'rdfs:Class', :event),
    ('node', 'rdfs:label', 'rdf:type', 'node', 'rdf:Property', :event),
    ('node', 'rdfs:domain', 'rdf:type', 'node', 'rdf:Property', :event),
    ('node', 'rdfs:range', 'rdf:type', 'node', 'rdf:Property', :event);
