Subversion

helios_wp3

[/] [trunk/] [triplify/] [triplify-0.5/] [config.inc.php] - Rev 55 Go to most recent revision

Compare with Previous - Blame


<?php
/* This file contains the configuration for triplify.
 * Triplify rapidly simplifies the creation of structured content for Web 2.0
 * mashups and Semantic Web applications.
 *
 * Triplyfy uses a number of SQL queries, whose results are converted into
 * either RDF/N3, JSON or Linked Data.
 *
 * @version $Id:$
 * @license LGPL
 * @copyright 2008 Sören Auer (soeren.auer@gmail.com)
 */

include("db.inc.php");

$triplify['namespaces']=array(
    
'vocabulary'=>'http://your-webapp.com/vocabulary/',
    
'rdf'=>'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
    
'rdfs'=>'http://www.w3.org/2000/01/rdf-schema#',
    
'owl'=>'http://www.w3.org/2002/07/owl#',
    
'foaf'=>'http://xmlns.com/foaf/0.1/',
    
'doap'=>'http://usefulinc.com/ns/doap#',
    
'sioc'=>'http://rdfs.org/sioc/ns#',
    
'sioctypes'=>'http://rdfs.org/sioc/types#',
    
'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#',
    
'bom'=>'http://www.ifi.uzh.ch/ddis/evoont/2008/11/bom#',
    
'hel'=>'http://picoforge.int-evry.fr/projects/svn/helios_wp3/helios_bt.owl#',
    
'wf'=>'http://www.w3.org/2005/01/wf/flow#',
    
'update'=>'http://triplify.org/vocabulary/update#',
);

/*
 * Bugzilla queries
 */

$triplify['queries']=array(
    
'project'=>"SELECT p.id AS id,
            p.name AS 'doap:name',
            c.name AS 'doap:classification',
            p.description AS 'doap:description' 
            FROM products p INNER JOIN classifications c ON ( classification_id = c.id )"
,
    
'bug'=>"SELECT b.bug_id AS id,
            b.short_desc AS 'bom:hasComment',
            b.creation_ts AS 'doap:created',
            b.assigned_to AS 'bom:hasAssignee', # maybe use the id instead of the name?
            b.bug_severity AS 'bom:hasSeverity',
            LOWER(b.bug_status) AS 'wf:State',
            b.product_id AS 'bom:inProject', # maybe use the id instead of the name?
            b.priority AS 'bom:hasPriority',
            b.reporter AS 'bom:hasReporter', # maybe use the id instead of the name?
            b.resolution AS 'bom:hasResolution',
            b.target_milestone AS 'bom:hasMilestone',
            b.op_sys AS 'doap:os',
            b.rep_platform AS 'doap:platform',
            b.version AS 'doap:version'
            FROM bugs b INNER JOIN profiles u ON (assigned_to = u.userid)"
,
    
'os'=>"SELECT id AS id,
            value AS 'hel:BugzillaOS'
            FROM op_sys"
,
    
'platform'=>"SELECT id AS id,
            value AS 'hel:BugzillaPlatform'
            FROM rep_platform"
,
    
'user'=>"SELECT    userid, SHA(CONCAT('mailto:',login_name)) AS 'foaf:mbox_sha1sum'
            FROM profiles"
,
    
'person'=>"SELECT userid, SHA(CONCAT('mailto:',login_name)) AS 'foaf:mbox_sha1sum',
            realname AS 'foaf:person'
                        FROM profiles"
,
);

$triplify['objectProperties']=array(
    
'bom:hasAssignee'=>'user',
    
'bom:hasReporter'=>'user',
    
'bom:hasState'=>'http://www.helios-platform.org/ontologies/2009/6/helios_bt.owl#Bugzilla',
);

$triplify['classMap']=array(
    
'user'=>'sioc:User',
    
'comment'=>'Comment',
);

function 
bugstate ($string)
{
    switch (
$string) {
    case 
'new':
        
$string 'BugzillaNew';
        break;
    case 
'unconfirmed':
        
$string 'BugzillaUnconfirmed';
        break;
    case 
'assigned':
        
$string 'BugzillaAssigned';
        break;
    case 
'reopened':
        
$string 'BugzillaReopened';
        break;
    case 
'resolved':
        
$string 'BugzillaResolved';
        break;
    case 
'verified':
        
$string 'BugzillaVerified';
        break;
    case 
'closed':
        
$string 'BugzillaClosed';
        break;
    }

    return 
$string;
}


$triplify['license']='http://creativecommons.org/licenses/by/3.0/us/';

#$triplify['metadata']=array(
#    'dc:title'=>'',
#    'dc:publisher'=>''
#);

$triplify['register']=true;

$triplify['TTL']=0;

$triplify['cachedir']='cache/';

$triplify['LinkedDataDepth']='0';

$triplify['CallbackFunctions']=array(
    
'wf:State'=> 'bugstate',
);
?>

Powered by WebSVN v1.61