Triplify configuration for Word Press 2.1

<?php
include('../wp-config.php');

$triplify['namespaces']=array(
    
'vocabulary'=>'http://triplify.org/vocabulary/Wordpress/',
    
'foaf'=>'http://xmlns.com/foaf/0.1/',
    
'sioc'=>'http://rdfs.org/sioc/ns#',
    
'dc'=>'http://purl.org/dc/elements/1.1/',
    
'dcterms'=>'http://purl.org/dc/terms/',
    
'skos'=>'http://www.w3.org/2004/02/skos/core#',
    
'tag'=>'http://www.holygoat.co.uk/owl/redwood/0.1/tags/',
    
'xsd'=>'http://www.w3.org/2001/XMLSchema#',
);

$triplify['queries']=array(
    
'post'=>array(
        
"SELECT id,post_author 'sioc:has_creator',post_date 'dcterms:created',post_title 'dc:title',
                post_content 'sioc:content',post_modified 'dcterms:modified'
            FROM {$table_prefix}posts WHERE post_status='publish'"
,
        
"SELECT post_id id,tag_id 'tag:taggedWithTag' FROM {$table_prefix}post2tag",
        
"SELECT post_id id,category_id 'belongsToCategory' FROM {$table_prefix}post2cat",
    ),
    
'tag'=>"SELECT tag_ID id,tag 'tag:tagName' FROM {$table_prefix}tags",
    
'category'=>"SELECT cat_ID id,cat_name 'skos:prefLabel',category_parent 'skos:narrower' FROM {$table_prefix}categories",
    
'user'=>array(
        
"SELECT id,user_login 'foaf:accountName',SHA(CONCAT('mailto:',user_email)) 'foaf:mbox_sha1sum',
                user_url 'foaf:homepage',display_name 'foaf:name'
            FROM {$table_prefix}users"
,
        
"SELECT user_id id,meta_value 'foaf:firstName' FROM {$table_prefix}usermeta WHERE meta_key='first_name'",
        
"SELECT user_id id,meta_value 'foaf:family_name' FROM {$table_prefix}usermeta WHERE meta_key='last_name'",
    ),
    
'comment'=>"SELECT comment_ID id,comment_post_id 'sioc:reply_of',comment_author AS 'foaf:name',
            SHA(CONCAT('mailto:',comment_author_email)) 'foaf:mbox_sha1sum',
            comment_author_url 'foaf:homepage',comment_date AS  'dcterms:created',
            comment_content 'sioc:content',comment_karma,comment_type
        FROM {$table_prefix}comments WHERE comment_approved='1'"
,
);

$triplify['objectProperties']=array(
    
'sioc:has_creator'=>'user',
    
'tag:taggedWithTag'=>'tag',
    
'belongsToCategory'=>'category',
    
'skos:narrower'=>'category',
    
'sioc:reply_of'=>'post',
);

$triplify['classMap']=array(
    
'user'=>'foaf:Person',
    
'post'=>'sioc:Post',
    
'tag'=>'tag:Tag',
    
'category'=>'skos:Concept',
);

$triplify['TTL']=0;

$triplify['db']=new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME,DB_USER,DB_PASSWORD);
?>


 
There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]

Information

Last Modification: 2008-05-29 09:26:15 by Soeren Auer