Commit a53076df authored by joaquinvalentin's avatar joaquinvalentin
Browse files

Add mapping

parent b4c9956e
This diff is collapsed.
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix tmk: <http://football.org/ontologies/tmk#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
# java -jar r2rml.jar .\config.properties
<#PlayersMapping>
rr:logicalTable [
rr:tableName "players"
] ;
rr:subjectMap [
rr:template "http://football.org/tmk/jugador/{NAME}-{PLAYER_ID}";
rr:class tmk:Jugador;
] ;
rr:predicateObjectMap [
rr:predicate tmk:idTmk;
rr:objectMap [
rr:column "PLAYER_ID";
rr:datatype xsd:integer
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:nombre;
rr:objectMap [
rr:column "PRETTY_NAME";
rr:datatype xsd:string
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:nacionalidad;
rr:objectMap [
rr:column "COUNTRY_OF_CITIZENSHIP";
rr:datatype xsd:string;
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:posicion;
rr:objectMap [
rr:column "SUB_POSITION" ;
rr:datatype xsd:string
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:transfermarktURL;
rr:objectMap [ rr:column "URL";
rr:datatype xsd:string;
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:fechaNac;
rr:objectMap [
rr:column "DATE_OF_BIRTH";
rr:datatype xsd:date;
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:altura;
rr:objectMap [
rr:column "HEIGHT_IN_CM";
rr:datatype xsd:float;
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:pierna;
rr:objectMap [
rr:column "FOOT";
rr:datatype xsd:string;
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:juegaPara;
rr:objectMap [
rr:parentTriplesMap <#ClubsMapping>;
rr:joinCondition [
rr:child "CURRENT_CLUB_ID";
rr:parent "CLUB_ID";
];
];
];
rr:predicateObjectMap [
rr:predicate tmk:juegaPartido;
rr:objectMap [
rr:parentTriplesMap <#AppearancesMapping>;
rr:joinCondition [
rr:child "PLAYER_ID";
rr:parent "PLAYER_ID";
];
];
].
<#ClubsMapping>
rr:logicalTable [
rr:tableName "clubs"
] ;
rr:subjectMap [
rr:template "http://football.org/tmk/club/{NAME}";
rr:class tmk:Club;
] ;
rr:predicateObjectMap [
rr:predicate tmk:idTmk;
rr:objectMap [
rr:column "CLUB_ID";
rr:datatype xsd:integer
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:nombreClub;
rr:objectMap [
rr:column "PRETTY_NAME";
rr:datatype xsd:string
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:Competicion;
rr:objectMap [
rr:column "DOMESTIC_COMPETITION_ID";
rr:datatype xsd:string;
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:valorPlantilla;
rr:objectMap [
rr:column "TOTAL_MARKET_VALUE" ;
rr:datatype xsd:float
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:transfermarktURL;
rr:objectMap [
rr:column "URL";
rr:datatype xsd:string;
];
];
rr:predicateObjectMap [
rr:predicate tmk:tecnico;
rr:objectMap [
rr:column "COACH_NAME";
rr:datatype xsd:string;
];
];
rr:predicateObjectMap [
rr:predicate tmk:estadioClub;
rr:objectMap [
rr:column "STADIUM_NAME";
rr:datatype xsd:string;
];
];
rr:predicateObjectMap [
rr:predicate tmk:perteneceA;
rr:objectMap [
rr:parentTriplesMap <#CompetitionsMapping>;
rr:joinCondition [
rr:child "DOMESTIC_COMPETITION_ID";
rr:parent "DOMESTIC_LEAGUE_CODE";
];
];
].
<#CompetitionsMapping>
rr:logicalTable [
rr:tableName "competitions"
] ;
rr:subjectMap [
rr:template "http://football.org/tmk/competicion/{NAME}";
rr:class tmk:Competicion;
] ;
rr:predicateObjectMap [
rr:predicate tmk:nombre;
rr:objectMap [
rr:column "NAME";
rr:datatype xsd:string
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:idTmk;
rr:objectMap [
rr:column "COMPETITION_ID";
rr:datatype xsd:string
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:tipoCompe;
rr:objectMap [
rr:column "TYPE";
rr:datatype xsd:string
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:Pais;
rr:objectMap [
rr:column "COUNTRY_NAME";
rr:datatype xsd:string;
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:confederacion;
rr:objectMap [
rr:column "CONFEDERATION" ;
rr:datatype xsd:string
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:transfermarktURL;
rr:objectMap [
rr:column "URL";
rr:datatype xsd:string;
];
] .
<#GamesMapping>
rr:logicalTable [
rr:tableName "games"
] ;
rr:subjectMap [
rr:template "http://football.org/tmk/partido/{GAME_ID}";
rr:class tmk:Partido;
] ;
rr:predicateObjectMap [
rr:predicate tmk:idTmk;
rr:objectMap [
rr:column "GAME_ID";
rr:datatype xsd:integer
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:fecha;
rr:objectMap [
rr:column "DATE";
rr:datatype xsd:date
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:golesLocal;
rr:objectMap [
rr:column "HOME_CLUB_GOALS" ;
rr:datatype xsd:float
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:golesVisita;
rr:objectMap [
rr:column "AWAY_CLUB_GOALS" ;
rr:datatype xsd:float
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:localPartido;
rr:objectMap [
rr:parentTriplesMap <#ClubsMapping>;
rr:joinCondition [
rr:child "HOME_CLUB_ID";
rr:parent "CLUB_ID";
];
];
];
rr:predicateObjectMap [
rr:predicate tmk:visitantePartido;
rr:objectMap [
rr:parentTriplesMap <#ClubsMapping>;
rr:joinCondition [
rr:child "AWAY_CLUB_ID";
rr:parent "CLUB_ID";
];
];
];
rr:predicateObjectMap [
rr:predicate tmk:temporada;
rr:objectMap [
rr:column "SEASON" ;
rr:datatype xsd:integer
];
] .
<#AppearancesMapping>
rr:logicalTable [
rr:tableName "appearances"
] ;
rr:subjectMap [
rr:template "http://football.org/tmk/participacion/{APPEARANCE_ID}";
rr:class tmk:Participacion;
] ;
rr:predicateObjectMap [
rr:predicate tmk:idTmk;
rr:objectMap [
rr:column "APPEARANCE_ID";
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:asistencias;
rr:objectMap [
rr:column "ASSISTS";
rr:datatype xsd:integer
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:goles;
rr:objectMap [
rr:column "GOALS";
rr:datatype xsd:integer
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:minutos;
rr:objectMap [
rr:column "MINUTES_PLAYED";
rr:datatype xsd:integer
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:tarjetaRoja;
rr:objectMap [
rr:column "RED_CARDS";
rr:datatype xsd:integer
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:tarjetasAmarillas;
rr:objectMap [
rr:column "YELLOW_CARDS";
rr:datatype xsd:integer
];
] ;
rr:predicateObjectMap [
rr:predicate tmk:participaPartido;
rr:objectMap [
rr:parentTriplesMap <#GamesMapping>;
rr:joinCondition [
rr:child "GAME_ID";
rr:parent "GAME_ID";
];
];
];
rr:predicateObjectMap [
rr:predicate tmk:loJugoPara;
rr:objectMap [
rr:parentTriplesMap <#ClubsMapping>;
rr:joinCondition [
rr:child "PLAYER_CLUB_ID";
rr:parent "CLUB_ID";
];
];
];
rr:predicateObjectMap [
rr:predicate tmk:organizadoPor;
rr:objectMap [
rr:parentTriplesMap <#CompetitionsMapping>;
rr:joinCondition [
rr:child "GAME_ID";
rr:parent "COMPETITION_ID";
];
];
].
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment