1 Star 0 Fork 1

天外飞碟/CyberSecurity_Knowledge_graph

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
kg_movie.ttl 5.43 KB
一键复制 编辑 原始数据 按行查看 历史
HoloLen 提交于 2020-01-19 16:49 . mapping Rule in r2rML
@prefix map: <#> .
@prefix db: <> .
@prefix vocab: <vocab/> .
@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/> .
map:database a d2rq:Database;
d2rq:jdbcDriver "com.mysql.jdbc.Driver";
d2rq:jdbcDSN "jdbc:mysql:///kg_demo_movie";
d2rq:username "root";
d2rq:password "root";
jdbc:autoReconnect "true";
jdbc:zeroDateTimeBehavior "convertToNull";
.
# Table genre
map:genre a d2rq:ClassMap;
d2rq:dataStorage map:database;
d2rq:uriPattern "genre/@@genre.genre_id@@";
d2rq:class vocab:genre;
d2rq:classDefinitionLabel "genre";
.
map:genre__label a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:genre;
d2rq:property rdfs:label;
d2rq:pattern "genre #@@genre.genre_id@@";
.
map:genre_genre_id a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:genre;
d2rq:property vocab:genre_genre_id;
d2rq:propertyDefinitionLabel "genre genre_id";
d2rq:column "genre.genre_id";
d2rq:datatype xsd:integer;
.
map:genre_genre_name a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:genre;
d2rq:property vocab:genre_genre_name;
d2rq:propertyDefinitionLabel "genre genre_name";
d2rq:column "genre.genre_name";
.
# Table movie
map:movie a d2rq:ClassMap;
d2rq:dataStorage map:database;
d2rq:uriPattern "movie/@@movie.movie_id@@";
d2rq:class vocab:movie;
d2rq:classDefinitionLabel "movie";
.
map:movie__label a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:movie;
d2rq:property rdfs:label;
d2rq:pattern "movie #@@movie.movie_id@@";
.
map:movie_movie_id a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:movie;
d2rq:property vocab:movie_movie_id;
d2rq:propertyDefinitionLabel "movie movie_id";
d2rq:column "movie.movie_id";
d2rq:datatype xsd:integer;
.
map:movie_movie_title a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:movie;
d2rq:property vocab:movie_movie_title;
d2rq:propertyDefinitionLabel "movie movie_title";
d2rq:column "movie.movie_title";
.
map:movie_movie_introduction a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:movie;
d2rq:property vocab:movie_movie_introduction;
d2rq:propertyDefinitionLabel "movie movie_introduction";
d2rq:column "movie.movie_introduction";
.
map:movie_movie_rating a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:movie;
d2rq:property vocab:movie_movie_rating;
d2rq:propertyDefinitionLabel "movie movie_rating";
d2rq:column "movie.movie_rating";
d2rq:datatype xsd:double;
.
map:movie_movie_release_date a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:movie;
d2rq:property vocab:movie_movie_release_date;
d2rq:propertyDefinitionLabel "movie movie_release_date";
d2rq:column "movie.movie_release_date";
.
# Table movie_to_genre (n:m)
map:movie_to_genre__link a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:movie;
d2rq:property vocab:movie_to_genre;
d2rq:refersToClassMap map:genre;
d2rq:join "movie_to_genre.movie_id => movie.movie_id";
d2rq:join "movie_to_genre.genre_id => genre.genre_id";
.
# Table person
map:person a d2rq:ClassMap;
d2rq:dataStorage map:database;
d2rq:uriPattern "person/@@person.person_id@@";
d2rq:class vocab:person;
d2rq:classDefinitionLabel "person";
.
map:person__label a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:person;
d2rq:property rdfs:label;
d2rq:pattern "person #@@person.person_id@@";
.
map:person_person_id a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:person;
d2rq:property vocab:person_person_id;
d2rq:propertyDefinitionLabel "person person_id";
d2rq:column "person.person_id";
d2rq:datatype xsd:integer;
.
map:person_person_birth_day a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:person;
d2rq:property vocab:person_person_birth_day;
d2rq:propertyDefinitionLabel "person person_birth_day";
d2rq:column "person.person_birth_day";
.
map:person_person_death_day a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:person;
d2rq:property vocab:person_person_death_day;
d2rq:propertyDefinitionLabel "person person_death_day";
d2rq:column "person.person_death_day";
.
map:person_person_name a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:person;
d2rq:property vocab:person_person_name;
d2rq:propertyDefinitionLabel "person person_name";
d2rq:column "person.person_name";
.
map:person_person_english_name a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:person;
d2rq:property vocab:person_person_english_name;
d2rq:propertyDefinitionLabel "person person_english_name";
d2rq:column "person.person_english_name";
.
map:person_person_biography a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:person;
d2rq:property vocab:person_person_biography;
d2rq:propertyDefinitionLabel "person person_biography";
d2rq:column "person.person_biography";
.
map:person_person_birth_place a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:person;
d2rq:property vocab:person_person_birth_place;
d2rq:propertyDefinitionLabel "person person_birth_place";
d2rq:column "person.person_birth_place";
.
# Table person_to_movie (n:m)
map:person_to_movie__link a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:movie;
d2rq:property vocab:person_to_movie;
d2rq:refersToClassMap map:person;
d2rq:join "person_to_movie.movie_id => movie.movie_id";
d2rq:join "person_to_movie.person_id => person.person_id";
.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tianwaifeidie/CyberSecurity_Knowledge_graph.git
git@gitee.com:tianwaifeidie/CyberSecurity_Knowledge_graph.git
tianwaifeidie
CyberSecurity_Knowledge_graph
CyberSecurity_Knowledge_graph
master

搜索帮助