Skip to content

Commit

Permalink
Merge pull request #13 from julianrojas87/dev
Browse files Browse the repository at this point in the history
v0.9.3
  • Loading branch information
julianrojas87 authored Oct 21, 2020
2 parents f31a6e9 + b1924ca commit 8cd5240
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mappings/internal-node-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ mappings:
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;
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]

internal-node-link-no-in:
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.LineNodeStartID = LineNodes2.ID AND LineEdges2.VersionID = LineNodes2.VersionID AND LineEdges1.LineNodeStartID = 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 ORDER BY OP2.UOPID;
s: http://era.europa.eu/abstraction#INL_$(UOPID)_$(Line1)_$(Line2)_$(StartV)
po:
- [a, era:InternalNodeLink]
- [era:bidirectional, "true", xsd:boolean]
Expand Down
52 changes: 52 additions & 0 deletions rml/internal-node-links_rml.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,55 @@
:om_7 a rr:ObjectMap;
rr:template "http://era.europa.eu/abstraction#NP_{UOPID}_{Line2}_{EndV}";
rr:termType rr:IRI.
:map_internal-node-link-no-in_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.LineNodeStartID = LineNodes2.ID AND LineEdges2.VersionID = LineNodes2.VersionID AND LineEdges1.LineNodeStartID = 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 ORDER BY OP2.UOPID;".
: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_internal-node-link-no-in_0 a rr:TriplesMap;
rdfs:label "internal-node-link-no-in".
:s_2 a rr:SubjectMap.
:map_internal-node-link-no-in_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_internal-node-link-no-in_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_internal-node-link-no-in_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_internal-node-link-no-in_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_internal-node-link-no-in_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.

0 comments on commit 8cd5240

Please sign in to comment.