Subversion

helios_wp3

[/] [trunk/] [d2r/] [bugzilla/] [mapping.n3] - Rev 184 Go to most recent revision

Compare with Previous - Blame


@prefix map: <file:/var/www/d2r/mapping.n3#> .
@prefix db: <> .
@prefix vocab: <http://erty.int-evry.fr:2020/vocab/resource/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@prefix jdbc: <http://d2rq.org/terms/jdbc/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix sioctypes: <http://rdfs.org/sioc/types#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix bom: <http://www.ifi.uzh.ch/ddis/evoont/2008/11/bom#> .
@prefix hel: <http://picoforge.int-evry.fr/projects/svn/helios_wp3/helios_bt.owl#> .
@prefix wf: <http://www.w3.org/2005/01/wf/flow#> .
@prefix d2r: <http://sites.wiwiss.fu-berlin.de/suhl/bizer/d2r-server/config.rdf#> .

<> a d2r:Server;
        rdfs:label "Bugzilla D2R Server";
        d2r:port 2020;
        d2r:baseURI <http://erty.int-evry.fr:2020/>;
        d2r:documentMetadata [
                rdfs:comment "This comment is custom document metadata.";
        ];
        .

map:database a d2rq:Database;
        d2rq:jdbcDriver "com.mysql.jdbc.Driver";
        d2rq:jdbcDSN "jdbc:mysql://127.0.0.1/bugzilla";
        d2rq:username "bugzilla";
        d2rq:password "qLu2hA8r";
        jdbc:autoReconnect "true";
        jdbc:zeroDateTimeBehavior "convertToNull";
    d2rq:resultSizeLimit 500;
        .

map:Configuration a d2rq:Configuration;
    d2rq:useAllOptimizations true.

# Table bugs
map:issue a d2rq:ClassMap;
        d2rq:dataStorage map:database;
        d2rq:uriPattern "issue/@@bugs.bug_id@@";
        d2rq:class bom:Issue;
        d2rq:classDefinitionLabel "issue";
        .
map:bugs__label a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property rdfs:label;
        d2rq:pattern "Bug #@@bugs.bug_id@@ of http://erty.int-evry.fr/bugzilla/";
        .
map:issue_id a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property bom:Issue;
        d2rq:propertyDefinitionLabel "issue id";
        d2rq:column "bugs.bug_id";
        d2rq:datatype xsd:int;
        .
map:issue_bugurl a d2rq:PropertyBridge;
    d2rq:belongsToClassMap map:issue;
    d2rq:property bom:bugURL;
    d2rq:uriSqlExpression "CONCAT('http://erty.int-evry.fr/bugzilla/show_bug.cgi?id=', bugs.bug_id)";
    .
#map:issue_component_id a d2rq:PropertyBridge;
#    d2rq:belongsToClassMap map:issue;
#    d2rq:property bom:isIssueOf;
#    d2rq:uriPattern "component/@@bugs.component_id@@";
#    .
map:issue_short_desc a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property dc:title;
        d2rq:propertyDefinitionLabel "issue title";
        d2rq:column "bugs.short_desc";
        .
map:issue_cf_rpmpkg a d2rq:PropertyBridge;
    d2rq:belongsToClassMap map:issue;
    d2rq:property bom:foundInVersion;
    d2rq:uriPattern "package/@@rpmpkg.package|urlify@@/@@rpmpkg.ver|urlify@@";
    d2rq:join "bugs.cf_rpmpkg = rpmpkg.fullname";
    .
map:issue_assigned_to a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property bom:hasAssignee;
    d2rq:uriPattern "user/@@bugs.assigned_to@@";
        .
map:issue_severity a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property bom:hasSeverity;
        d2rq:propertyDefinitionLabel "issue has severity";
        d2rq:column "bugs.bug_severity";
        .
map:issue_status a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property bom:hasState;
        d2rq:propertyDefinitionLabel "issue has status";
        d2rq:column "bugs.bug_status";
        .
map:issue_creation_ts a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property bom:dateOpened;
        d2rq:propertyDefinitionLabel "issue date opened";
        d2rq:column "bugs.creation_ts";
        d2rq:datatype xsd:dateTime;
        .
map:issue_priority a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property bom:hasPriority;
        d2rq:propertyDefinitionLabel "issue has priority";
        d2rq:column "bugs.priority";
        .
map:issue_computersystem a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property bom:hasComputerSystem;
        d2rq:propertyDefinitionLabel "issue has computer system";
    d2rq:sqlExpression "10 * op_sys.id + rep_platform.id";
        d2rq:join "bugs.op_sys = op_sys.value";
    d2rq:join "bugs.rep_platform = rep_platform.value";
    .
map:issue_reporter a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property bom:hasReporter;
    d2rq:uriPattern "user/@@bugs.reporter@@"; 
        .
map:issue_resolution a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property bom:hasResolution;
        d2rq:propertyDefinitionLabel "issue has resolution";
        d2rq:column "bugs.resolution";
        .
map:issue_milestone a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:issue;
        d2rq:property bom:hasMilestone;
        d2rq:propertyDefinitionLabel "issue has milestone";
        d2rq:column "bugs.target_milestone";
        .

# Table rpmpkg
map:package a d2rq:ClassMap;
    d2rq:dataStorage map:database;
    d2rq:uriPattern "package/@@rpmpkg.package|urlify@@";
    d2rq:class hel:SoftwarePackage;
    d2rq:classDefinitionLabel "package";
    .
map:package_version a d2rq:PropertyBridge;
    d2rq:belongsToClassMap map:package;
    d2rq:property hel:hasVersion;
    d2rq:uriPattern "package/@@rpmpkg.package|urlify@@/@@rpmpkg.ver|urlify@@";
    . 
map:package_component a d2rq:PropertyBridge;
    d2rq:belongsToClassMap map:package;
    d2rq:property hel:isPackageOf;
    d2rq:join "rpmpkg.fullname = bugs.cf_rpmpkg";
    d2rq:uriPattern "component/@@bugs.component_id@@";
    .

# Table components
map:component a d2rq:ClassMap;
        d2rq:dataStorage map:database;
        d2rq:uriPattern "component/@@components.id@@";
        d2rq:class bom:Component;
        d2rq:classDefinitionLabel "component";
        .
map:component_name a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:component;
        d2rq:property bom:title;
        d2rq:propertyDefinitionLabel "component title";
        d2rq:column "components.name";
        .
map:component_product_id a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:component;
        d2rq:property bom:isInProduct;
    d2rq:uriPattern "product/@@components.product_id@@";
        .
map:component_description a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:component;
        d2rq:property rdfs:label;
        d2rq:propertyDefinitionLabel "component label";
        d2rq:column "components.description";
        .
map:component_initialowner a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:component;
        d2rq:property sioc:User;
        d2rq:refersToClassMap map:person;
        d2rq:join "components.initialowner = profiles.userid";
        .

# Blank node for ComputerSystem
#map:computersystem a d2rq:ClassMap ;
#    d2rq:dataStorage map:database;
#    d2rq:bNodeIdColumns "op_sys.id,rep_platform.id" ;
#    d2rq:class bom:ComputerSystem ;
#    d2rq:classDefinitionLabel "Computer system";
#    .
#map:computersystem_os a d2rq:PropertyBridge;
#    d2rq:belongsToClassMap map:computersystem;
#    d2rq:property bom:OS;
#    d2rq:column "op_sys.value";
#    d2rq:propertyDefinitionLabel "Operating system";
#    .
#map:computersystem_rep_platform a d2rq:PropertyBridge;
#    d2rq:belongsToClassMap map:computersystem;
#    d2rq:property bom:Platform;
#    d2rq:column "rep_platform.value";
#    d2rq:propertyDefinitionLabel "Platform";
#    .

# Table longdescs
map:comment a d2rq:ClassMap;
        d2rq:dataStorage map:database;
        d2rq:uriPattern "comment/@@longdescs.comment_id@@";
        d2rq:class bom:Comment;
        d2rq:classDefinitionLabel "comment";
        .
map:comment__label a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:comment;
        d2rq:property rdfs:label;
        d2rq:pattern "comment #@@longdescs.comment_id@@";
        .
map:comment_bug_id a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:comment;
        d2rq:property bom:isCommentOf;
    d2rq:uriPattern "issue/@@longdescs.bug_id@@";
        .
map:comment_who a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:comment;
        d2rq:property bom:hasCreator;
    d2rq:uriPattern "user/@@longdescs.who@@";
    .
map:comment_thetext a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:comment;
        d2rq:property bom:Comment;
        d2rq:propertyDefinitionLabel "comment thetext";
        d2rq:column "longdescs.thetext";
        .

# Table milestones
map:milestone a d2rq:ClassMap;
        d2rq:dataStorage map:database;
        d2rq:uriPattern "milestone/@@milestones.id@@";
        d2rq:class bom:Milestone;
        d2rq:classDefinitionLabel "milestone";
        .
map:milestone__label a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:milestone;
        d2rq:property rdfs:label;
        d2rq:pattern "milestone #@@milestones.id@@";
        .
map:milestone_value a d2rq:PropertyBridge;
    d2rq:belongsToClassMap map:milestone;
    d2rq:property bom:Milestone;
    d2rq:column "milestones.value";
    d2rq:propertyDefinitionLabel "Milestone";
    .
map:milestone_product_id a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:milestone;
        d2rq:property bom:product;
    d2rq:uriPattern "product/@@milestones.product_id@@";
        .

# Table products
map:product a d2rq:ClassMap;
        d2rq:dataStorage map:database;
        d2rq:uriPattern "product/@@products.id@@";
        d2rq:class bom:Product;
        d2rq:classDefinitionLabel "products";
        .
map:product__label a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:product;
        d2rq:property rdfs:label;
        d2rq:pattern "product #@@products.id@@";
        .
map:product_name a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:product;
        d2rq:property bom:name;
        d2rq:propertyDefinitionLabel "product name";
        d2rq:column "products.name";
        .
map:product_description a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:product;
        d2rq:property rdfs:label;
        d2rq:propertyDefinitionLabel "product label";
        d2rq:column "products.description";
        .

# Table profiles
map:person a d2rq:ClassMap;
        d2rq:dataStorage map:database;
        d2rq:uriPattern "person/@@profiles.userid@@";
        d2rq:class foaf:Person;
        d2rq:classDefinitionLabel "person";
          .
map:person__label a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:person;
        d2rq:property rdfs:label;
        d2rq:pattern "person #@@profiles.userid@@";
        .
map:person_userid a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:person;
        d2rq:property foaf:holdsAccount;
    d2rq:uriPattern "user/@@profiles.userid@@";
    .
map:person_realname a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:person;
        d2rq:property foaf:name;
        d2rq:propertyDefinitionLabel "person realname";
        d2rq:column "profiles.realname";
        .
map:person_mailto a d2rq:PropertyBridge;
    d2rq:belongsToClassMap map:person;
        d2rq:property foaf:mbox_sha1sum;
        d2rq:propertyDefinitionLabel "person mbox_sha1sum";
        d2rq:sqlExpression "SHA(CONCAT('mailto:',profiles.login_name))";
        .


# Table users (profiles)
map:user a d2rq:ClassMap;
        d2rq:dataStorage map:database;
        d2rq:uriPattern "user/@@profiles.userid@@";
        d2rq:class sioc:User;
        d2rq:classDefinitionLabel "user";
        .
map:user__label a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:user;
        d2rq:property rdfs:label;
        d2rq:pattern "user id #@@profiles.userid@@";
        .
map:user_userid a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:user;
        d2rq:property rdf:sameAs;
    d2rq:uriPattern "user/@@profiles.userid@@";
        .
map:user_realname a d2rq:PropertyBridge;
        d2rq:belongsToClassMap map:user;
        d2rq:property rdfs:seeAlso;
        d2rq:propertyDefinitionLabel "user realname";
        d2rq:column "profiles.realname";
        .
map:user_mailto a d2rq:PropertyBridge;
    d2rq:belongsToClassMap map:user;
        d2rq:property sioc:email_sha1;
        d2rq:propertyDefinitionLabel "user email_sha1";
        d2rq:sqlExpression "SHA(CONCAT('mailto:',profiles.login_name))";
        .


Powered by WebSVN v1.61