Skip to content

Commit

Permalink
Merge pull request #3 from julianrojas87/dev
Browse files Browse the repository at this point in the history
v0.9.1
  • Loading branch information
julianrojas87 authored Sep 9, 2020
2 parents a00ca9b + d58002b commit be9f3bb
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 13 deletions.
32 changes: 31 additions & 1 deletion mappings/internal-node-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,34 @@ mappings:
- [a, era:InternalNodeLink]
- [era:bidirectional, "true", xsd:boolean]
- [era:startPort, http://era.europa.eu/abstraction#NP_$(UOPID)_$(INCOMING)_$(VersionID)~iri]
- [era:endPort, http://era.europa.eu/abstraction#NP_$(UOPID)_$(OUTGOING)_$(VersionID)~iri]
- [era:endPort, http://era.europa.eu/abstraction#NP_$(UOPID)_$(OUTGOING)_$(VersionID)~iri]

border-internal-node-link:
sources:
- access: *host
type: *typeMSSQL
credentials: *credentials
queryFormulation: *queryFormulation
referenceFormulation: *referenceFormulation
query: SELECT TRIM(OP2.UOPID) AS UOPID, LineEdges2.ID AS INCOMING, LineEdges1.ID AS OUTGOING, LineEdges2.VersionID AS StartV, LineEdges1.VersionID AS EndV FROM RINF.dbo.LineEdges AS LineEdges2, RINF.dbo.LineEdges AS LineEdges1, RINF.dbo.LineNodes AS LineNodes1, RINF.dbo.LineNodes AS LineNodes2, RINF.dbo.OperationalPoints AS OP1, RINF.dbo.OperationalPoints AS OP2, RINF.dbo.LookupValues WHERE LineEdges2.LineNodeEndID = LineNodes2.ID AND LineEdges1.LineNodeStartID = LineNodes1.ID AND LineEdges1.ID != LineEdges2.ID AND LineEdges2.VersionID = LineNodes2.VersionID AND LineEdges1.VersionID = LineNodes1.VersionID AND LineNodes2.OperationalPointID = OP2.ID AND LineNodes1.OperationalPointID = OP1.ID AND LineNodes2.VersionID = OP2.VersionID AND LineNodes1.VersionID = OP1.VersionID AND OP2.UOPID = OP1.UOPID AND OP1.[Type] = LookupValues.ID AND OP2.[Type] = LookupValues.ID AND LookupValues.[Value] = 'border point'
s: http://era.europa.eu/abstraction#INL_$(UOPID)_$(INCOMING)_$(OUTGOING)_$(StartV)
po:
- [a, era:InternalNodeLink]
- [era:bidirectional, "true", xsd:boolean]
- [era:startPort, http://era.europa.eu/abstraction#NP_$(UOPID)_$(INCOMING)_$(StartV)~iri]
- [era:endPort, http://era.europa.eu/abstraction#NP_$(UOPID)_$(OUTGOING)_$(EndV)~iri]

border-internal-node-link-no-out:
sources:
- access: *host
type: *typeMSSQL
credentials: *credentials
queryFormulation: *queryFormulation
referenceFormulation: *referenceFormulation
query: SELECT TRIM(OP1.UOPID) AS UOPID, LineEdges1.ID AS Line1, LineEdges2.ID AS Line2, LineEdges1.VersionID AS StartV, LineEdges2.VersionID AS EndV FROM RINF.dbo.LineEdges AS LineEdges1, RINF.dbo.LineEdges AS LineEdges2, RINF.dbo.LineNodes AS LineNodes1, RINF.dbo.LineNodes AS LineNodes2, RINF.dbo.OperationalPoints AS OP1, RINF.dbo.OperationalPoints AS OP2, RINF.dbo.LookupValues WHERE LineEdges2.LineNodeEndID = LineNodes2.ID AND LineEdges2.VersionID = LineNodes2.VersionID AND LineEdges1.LineNodeEndID = LineNodes1.ID AND LineEdges1.ID != LineEdges2.ID AND LineNodes2.OperationalPointID = OP2.ID AND LineNodes2.VersionID = OP2.VersionID AND LineNodes1.OperationalPointID = OP1.ID AND LineNodes1.VersionID = OP1.VersionID AND OP2.UOPID = OP1.UOPID AND OP1.[Type] = LookupValues.ID AND OP2.[Type] = LookupValues.ID AND LookupValues.[Value] = 'border point';
s: http://era.europa.eu/abstraction#INL_$(UOPID)_$(Line1)_$(Line2)_$(StartV)
po:
- [a, era:InternalNodeLink]
- [era:bidirectional, "true", xsd:boolean]
- [era:startPort, http://era.europa.eu/abstraction#NP_$(UOPID)_$(Line1)_$(StartV)~iri]
- [era:endPort, http://era.europa.eu/abstraction#NP_$(UOPID)_$(Line2)_$(EndV)~iri]
4 changes: 2 additions & 2 deletions mappings/operational-points.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ prefixes:
grel: "http://users.ugent.be/~bjdmeest/function/grel.ttl#"
wgs: "http://www.w3.org/2003/01/geo/wgs84_pos#"
geosparql: "http://www.opengis.net/ont/geosparql#"
eu-country: "http://publications.europa.eu/resource/authority/country/"
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
skos: "http://www.w3.org/2004/02/skos/core#"
eu-country: "http://publications.europa.eu/resource/authority/country/"
era: "http://era.europa.eu/ns#"
era-op-types: "http://era.europa.eu/concepts/op-types#"
xsd: "http://www.w3.org/2001/XMLSchema#"
# era-op-types: "http://era.europa.eu/concepts/op-types#"
variables:
connection:
access: &host //10.10.160.21:1433
Expand Down
2 changes: 1 addition & 1 deletion mappings/sol-tracks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ mappings:
query: SELECT SectionOfLines.ID, SOLTracks.TrackID, SOLTracks.VersionID, REPLACE(CONCAT((SELECT LookupValues.[Value] FROM RINF.dbo.LookupValues WHERE LookupValues.ID = TrackParameters.LookupValueID), TrackParameters.Value, ''), ' ', '_') AS UriName FROM RINF.dbo.TrackParameters, RINF.dbo.Parameters, RINF.dbo.SOLTracks, RINF.dbo.SectionOfLines WHERE SOLTracks.TrackID = TrackParameters.TrackID AND TrackParameters.ParameterId = Parameters.ID AND (TrackParameters.[Value] IS NOT NULL OR TrackParameters.LookupValueID IS NOT NULL) AND "Index" IN ('1.1.1.2.3.2') AND SOLTracks.SectionOfLineID = SectionOfLines.ID AND SOLTracks.VersionID = SectionOfLines.VersionID;
s: http://era.europa.eu/implementation#T_$(ID)_$(VersionID)_$(TrackID)
po:
- [era:otherPantographHeads, era-tph:$(UriName)~iri]
- [era:otherPantographHead, era-tph:$(UriName)~iri]

contact-strip-material: # 1.1.1.2.3.4
sources:
Expand Down
6 changes: 3 additions & 3 deletions mappings/tunnels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@ mappings:
s: http://era.europa.eu/implementation#TN_$(VersionID)_$(TunnelID)
po:
- p: era:rollingStockFireCategory
o: era-rs-fire:a~iri
o: era-rsf:a~iri
condition:
function: idlab-fn:equal
parameters:
- [grel:valueParameter, $(Value)]
- [grel:valueParameter2, "A"]
- p: era:rollingStockFireCategory
o: era-rs-fire:b~iri
o: era-rsf:b~iri
condition:
function: idlab-fn:equal
parameters:
- [grel:valueParameter, $(Value)]
- [grel:valueParameter2, "B"]
- p: era:rollingStockFireCategory
o: era-rs-fire:none~iri
o: era-rsf:none~iri
condition:
function: idlab-fn:equal
parameters:
Expand Down
104 changes: 104 additions & 0 deletions rml/internal-node-links_rml.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,107 @@
:om_3 a rr:ObjectMap;
rr:template "http://era.europa.eu/abstraction#NP_{UOPID}_{OUTGOING}_{VersionID}";
rr:termType rr:IRI.
:map_border-internal-node-link_0 rml:logicalSource :source_1.
:source_1 a rml:LogicalSource;
rml:source :database_1;
rml:query "SELECT TRIM(OP2.UOPID) AS UOPID, LineEdges2.ID AS INCOMING, LineEdges1.ID AS OUTGOING, LineEdges2.VersionID AS StartV, LineEdges1.VersionID AS EndV FROM RINF.dbo.LineEdges AS LineEdges2, RINF.dbo.LineEdges AS LineEdges1, RINF.dbo.LineNodes AS LineNodes1, RINF.dbo.LineNodes AS LineNodes2, RINF.dbo.OperationalPoints AS OP1, RINF.dbo.OperationalPoints AS OP2, RINF.dbo.LookupValues WHERE LineEdges2.LineNodeEndID = LineNodes2.ID AND LineEdges1.LineNodeStartID = LineNodes1.ID AND LineEdges1.ID != LineEdges2.ID AND LineEdges2.VersionID = LineNodes2.VersionID AND LineEdges1.VersionID = LineNodes1.VersionID AND LineNodes2.OperationalPointID = OP2.ID AND LineNodes1.OperationalPointID = OP1.ID AND LineNodes2.VersionID = OP2.VersionID AND LineNodes1.VersionID = OP1.VersionID AND OP2.UOPID = OP1.UOPID AND OP1.[Type] = LookupValues.ID AND OP2.[Type] = LookupValues.ID AND LookupValues.[Value] = 'border point'".
:database_1 a d2rq:Database;
d2rq:jdbcDSN "//10.10.160.21:1433";
d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
d2rq:username "SA";
d2rq:password "ChooChoo2020".
:source_1 rml:referenceFormulation ql:CSV.
:map_border-internal-node-link_0 a rr:TriplesMap;
rdfs:label "border-internal-node-link".
:s_1 a rr:SubjectMap.
:map_border-internal-node-link_0 rr:subjectMap :s_1.
:s_1 rr:template "http://era.europa.eu/abstraction#INL_{UOPID}_{INCOMING}_{OUTGOING}_{StartV}".
:pom_4 a rr:PredicateObjectMap.
:map_border-internal-node-link_0 rr:predicateObjectMap :pom_4.
:pm_4 a rr:PredicateMap.
:pom_4 rr:predicateMap :pm_4.
:pm_4 rr:constant rdf:type.
:pom_4 rr:objectMap :om_4.
:om_4 a rr:ObjectMap;
rr:constant "http://era.europa.eu/ns#InternalNodeLink";
rr:termType rr:IRI.
:pom_5 a rr:PredicateObjectMap.
:map_border-internal-node-link_0 rr:predicateObjectMap :pom_5.
:pm_5 a rr:PredicateMap.
:pom_5 rr:predicateMap :pm_5.
:pm_5 rr:constant era:bidirectional.
:pom_5 rr:objectMap :om_5.
:om_5 a rr:ObjectMap;
rr:constant "true";
rr:termType rr:Literal;
rr:datatype xsd:boolean.
:pom_6 a rr:PredicateObjectMap.
:map_border-internal-node-link_0 rr:predicateObjectMap :pom_6.
:pm_6 a rr:PredicateMap.
:pom_6 rr:predicateMap :pm_6.
:pm_6 rr:constant era:startPort.
:pom_6 rr:objectMap :om_6.
:om_6 a rr:ObjectMap;
rr:template "http://era.europa.eu/abstraction#NP_{UOPID}_{INCOMING}_{StartV}";
rr:termType rr:IRI.
:pom_7 a rr:PredicateObjectMap.
:map_border-internal-node-link_0 rr:predicateObjectMap :pom_7.
:pm_7 a rr:PredicateMap.
:pom_7 rr:predicateMap :pm_7.
:pm_7 rr:constant era:endPort.
:pom_7 rr:objectMap :om_7.
:om_7 a rr:ObjectMap;
rr:template "http://era.europa.eu/abstraction#NP_{UOPID}_{OUTGOING}_{EndV}";
rr:termType rr:IRI.
:map_border-internal-node-link-no-out_0 rml:logicalSource :source_2.
:source_2 a rml:LogicalSource;
rml:source :database_2;
rml:query "SELECT TRIM(OP1.UOPID) AS UOPID, LineEdges1.ID AS Line1, LineEdges2.ID AS Line2, LineEdges1.VersionID AS StartV, LineEdges2.VersionID AS EndV FROM RINF.dbo.LineEdges AS LineEdges1, RINF.dbo.LineEdges AS LineEdges2, RINF.dbo.LineNodes AS LineNodes1, RINF.dbo.LineNodes AS LineNodes2, RINF.dbo.OperationalPoints AS OP1, RINF.dbo.OperationalPoints AS OP2, RINF.dbo.LookupValues WHERE LineEdges2.LineNodeEndID = LineNodes2.ID AND LineEdges2.VersionID = LineNodes2.VersionID AND LineEdges1.LineNodeEndID = LineNodes1.ID AND LineEdges1.ID != LineEdges2.ID AND LineNodes2.OperationalPointID = OP2.ID AND LineNodes2.VersionID = OP2.VersionID AND LineNodes1.OperationalPointID = OP1.ID AND LineNodes1.VersionID = OP1.VersionID AND OP2.UOPID = OP1.UOPID AND OP1.[Type] = LookupValues.ID AND OP2.[Type] = LookupValues.ID AND LookupValues.[Value] = 'border point';".
:database_2 a d2rq:Database;
d2rq:jdbcDSN "//10.10.160.21:1433";
d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
d2rq:username "SA";
d2rq:password "ChooChoo2020".
:source_2 rml:referenceFormulation ql:CSV.
:map_border-internal-node-link-no-out_0 a rr:TriplesMap;
rdfs:label "border-internal-node-link-no-out".
:s_2 a rr:SubjectMap.
:map_border-internal-node-link-no-out_0 rr:subjectMap :s_2.
:s_2 rr:template "http://era.europa.eu/abstraction#INL_{UOPID}_{Line1}_{Line2}_{StartV}".
:pom_8 a rr:PredicateObjectMap.
:map_border-internal-node-link-no-out_0 rr:predicateObjectMap :pom_8.
:pm_8 a rr:PredicateMap.
:pom_8 rr:predicateMap :pm_8.
:pm_8 rr:constant rdf:type.
:pom_8 rr:objectMap :om_8.
:om_8 a rr:ObjectMap;
rr:constant "http://era.europa.eu/ns#InternalNodeLink";
rr:termType rr:IRI.
:pom_9 a rr:PredicateObjectMap.
:map_border-internal-node-link-no-out_0 rr:predicateObjectMap :pom_9.
:pm_9 a rr:PredicateMap.
:pom_9 rr:predicateMap :pm_9.
:pm_9 rr:constant era:bidirectional.
:pom_9 rr:objectMap :om_9.
:om_9 a rr:ObjectMap;
rr:constant "true";
rr:termType rr:Literal;
rr:datatype xsd:boolean.
:pom_10 a rr:PredicateObjectMap.
:map_border-internal-node-link-no-out_0 rr:predicateObjectMap :pom_10.
:pm_10 a rr:PredicateMap.
:pom_10 rr:predicateMap :pm_10.
:pm_10 rr:constant era:startPort.
:pom_10 rr:objectMap :om_10.
:om_10 a rr:ObjectMap;
rr:template "http://era.europa.eu/abstraction#NP_{UOPID}_{Line1}_{StartV}";
rr:termType rr:IRI.
:pom_11 a rr:PredicateObjectMap.
:map_border-internal-node-link-no-out_0 rr:predicateObjectMap :pom_11.
:pm_11 a rr:PredicateMap.
:pom_11 rr:predicateMap :pm_11.
:pm_11 rr:constant era:endPort.
:pom_11 rr:objectMap :om_11.
:om_11 a rr:ObjectMap;
rr:template "http://era.europa.eu/abstraction#NP_{UOPID}_{Line2}_{EndV}";
rr:termType rr:IRI.
3 changes: 1 addition & 2 deletions rml/operational-points_rml.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#>.
@prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>.
@prefix geosparql: <http://www.opengis.net/ont/geosparql#>.
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.
@prefix eu-country: <http://publications.europa.eu/resource/authority/country/>.
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.
@prefix era: <http://era.europa.eu/ns#>.
@prefix era-op-types: <http://era.europa.eu/concepts/op-types#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.

:map_operational-point_0 rml:logicalSource :source_0.
Expand Down
2 changes: 1 addition & 1 deletion rml/sol-tracks_rml.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -2825,7 +2825,7 @@
:map_other-accepted-pantographs_0 rr:predicateObjectMap :pom_184.
:pm_184 a rr:PredicateMap.
:pom_184 rr:predicateMap :pm_184.
:pm_184 rr:constant era:otherPantographHeads.
:pm_184 rr:constant era:otherPantographHead.
:pom_184 rr:objectMap :om_184.
:om_184 a rr:ObjectMap;
rr:template "http://era.europa.eu/concepts/tsi-pantograph-heads#{UriName}";
Expand Down
6 changes: 3 additions & 3 deletions rml/tunnels_rml.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
rr:constant idlab-fn:str.
:pom_20 rr:objectMap :om_20.
:om_20 a rr:ObjectMap;
rr:constant "era-rs-fire:a";
rr:constant "http://era.europa.eu/concepts/rolling-stock-fire#a";
rr:termType rr:IRI.
:pom_21 a rr:PredicateObjectMap.
:map_required-rolling-stock-fire-category_0 rr:predicateObjectMap :pom_21.
Expand Down Expand Up @@ -339,7 +339,7 @@
rr:constant idlab-fn:str.
:pom_25 rr:objectMap :om_25.
:om_25 a rr:ObjectMap;
rr:constant "era-rs-fire:b";
rr:constant "http://era.europa.eu/concepts/rolling-stock-fire#b";
rr:termType rr:IRI.
:pom_26 a rr:PredicateObjectMap.
:map_required-rolling-stock-fire-category_0 rr:predicateObjectMap :pom_26.
Expand Down Expand Up @@ -397,7 +397,7 @@
rr:constant idlab-fn:str.
:pom_30 rr:objectMap :om_30.
:om_30 a rr:ObjectMap;
rr:constant "era-rs-fire:none";
rr:constant "http://era.europa.eu/concepts/rolling-stock-fire#none";
rr:termType rr:IRI.
:map_required-national-rolling-stock-fire-category_0 rml:logicalSource :source_4.
:source_4 a rml:LogicalSource;
Expand Down

0 comments on commit be9f3bb

Please sign in to comment.