Holger Knublauch
Committed by David Price

Added rhspin:ddrActivityStartDate

...@@ -30,6 +30,11 @@ ...@@ -30,6 +30,11 @@
30 rdfs:label "company name"^^xsd:string ; 30 rdfs:label "company name"^^xsd:string ;
31 rdfs:subPropertyOf sp:arg . 31 rdfs:subPropertyOf sp:arg .
32 32
33 +<http://spinrdf.org/arg#ddr>
34 + rdf:type rdf:Property ;
35 + rdfs:label "ddr"^^xsd:string ;
36 + rdfs:subPropertyOf sp:arg .
37 +
33 <http://spinrdf.org/arg#id> 38 <http://spinrdf.org/arg#id>
34 rdf:type rdf:Property ; 39 rdf:type rdf:Property ;
35 rdfs:label "id"^^xsd:string ; 40 rdfs:label "id"^^xsd:string ;
...@@ -87,14 +92,14 @@ ...@@ -87,14 +92,14 @@
87 ] ; 92 ] ;
88 spin:constraint 93 spin:constraint
89 [ rdf:type spl:Argument ; 94 [ rdf:type spl:Argument ;
90 - rdfs:comment "The property that must be used in the result resource."^^xsd:string ; 95 + rdfs:comment "The value to match against."^^xsd:string ;
91 - spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ; 96 + spl:predicate sp:arg1
92 - spl:valueType rdf:Property
93 ] ; 97 ] ;
94 spin:constraint 98 spin:constraint
95 [ rdf:type spl:Argument ; 99 [ rdf:type spl:Argument ;
96 - rdfs:comment "The value to match against."^^xsd:string ; 100 + rdfs:comment "The property that must be used in the result resource."^^xsd:string ;
97 - spl:predicate sp:arg1 101 + spl:predicate <http://topbraid.org/spin/spinmapl#predicate> ;
102 + spl:valueType rdf:Property
98 ] ; 103 ] ;
99 spin:returnType rdfs:Resource . 104 spin:returnType rdfs:Resource .
100 105
...@@ -349,6 +354,35 @@ rhspin:companyWithName ...@@ -349,6 +354,35 @@ rhspin:companyWithName
349 ] ; 354 ] ;
350 spin:returnType <http://www.reportinghub.no/ep/schema/organization#Company> . 355 spin:returnType <http://www.reportinghub.no/ep/schema/organization#Company> .
351 356
357 +rhspin:ddrActivityStartDate
358 + rdf:type spin:Function ;
359 + rdfs:comment "Gets the declared start time of the activity in a DDR, as an xsd:date literal."^^xsd:string ;
360 + rdfs:label "DDR activity start date"^^xsd:string ;
361 + rdfs:subClassOf spin:Functions ;
362 + spin:body
363 + [ rdf:type sp:Select ;
364 + sp:resultVariables ([ rdf:type xsd:date ;
365 + sp:arg1 _:b15
366 + ]) ;
367 + sp:where ([ rdf:type sp:TriplePath ;
368 + sp:object _:b15 ;
369 + sp:path [ rdf:type sp:SeqPath ;
370 + sp:path1 <http://www.reportinghub.no/ep/schema/activity#reportOn> ;
371 + sp:path2 <http://www.reportinghub.no/ep/schema/activity#startedAt>
372 + ] ;
373 + sp:subject
374 + [ sp:varName "ddr"^^xsd:string
375 + ]
376 + ])
377 + ] ;
378 + spin:constraint
379 + [ rdf:type spl:Argument ;
380 + rdfs:comment "The DailyDrillingReport to get the start date of."^^xsd:string ;
381 + spl:predicate <http://spinrdf.org/arg#ddr> ;
382 + spl:valueType <http://www.reportinghub.no/ep/schema/report#DailyDrillingReport>
383 + ] ;
384 + spin:returnType xsd:date .
385 +
352 rhspin:discoveryById 386 rhspin:discoveryById
353 rdf:type spin:Function ; 387 rdf:type spin:Function ;
354 rdfs:label "discovery by id"^^xsd:string ; 388 rdfs:label "discovery by id"^^xsd:string ;
...@@ -378,26 +412,26 @@ rhspin:dtypeValue ...@@ -378,26 +412,26 @@ rhspin:dtypeValue
378 rdfs:subClassOf spl:OntologyFunctions ; 412 rdfs:subClassOf spl:OntologyFunctions ;
379 spin:body 413 spin:body
380 [ rdf:type sp:Select ; 414 [ rdf:type sp:Select ;
381 - sp:resultVariables (_:b15) ; 415 + sp:resultVariables (_:b16) ;
382 - sp:where ([ sp:object _:b16 ; 416 + sp:where ([ sp:object _:b17 ;
383 sp:predicate spin:_arg2 ; 417 sp:predicate spin:_arg2 ;
384 sp:subject spin:_arg1 418 sp:subject spin:_arg1
385 - ] [ sp:object _:b15 ; 419 + ] [ sp:object _:b16 ;
386 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ; 420 sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
387 - sp:subject _:b16 421 + sp:subject _:b17
388 ]) 422 ])
389 ] ; 423 ] ;
390 spin:constraint 424 spin:constraint
391 [ rdf:type spl:Argument ; 425 [ rdf:type spl:Argument ;
392 - rdfs:comment "The subject of the value."^^xsd:string ;
393 - spl:predicate sp:arg1 ;
394 - spl:valueType rdfs:Resource
395 - ] ;
396 - spin:constraint
397 - [ rdf:type spl:Argument ;
398 rdfs:comment "The predicate that points to the reified value."^^xsd:string ; 426 rdfs:comment "The predicate that points to the reified value."^^xsd:string ;
399 spl:predicate sp:arg2 ; 427 spl:predicate sp:arg2 ;
400 spl:valueType rdf:Property 428 spl:valueType rdf:Property
429 + ] ;
430 + spin:constraint
431 + [ rdf:type spl:Argument ;
432 + rdfs:comment "The subject of the value."^^xsd:string ;
433 + spl:predicate sp:arg1 ;
434 + spl:valueType rdfs:Resource
401 ] . 435 ] .
402 436
403 rhspin:facilityById 437 rhspin:facilityById
...@@ -474,9 +508,9 @@ rhspin:licenceForWellBore ...@@ -474,9 +508,9 @@ rhspin:licenceForWellBore
474 rdfs:subClassOf spin:Functions ; 508 rdfs:subClassOf spin:Functions ;
475 spin:body 509 spin:body
476 [ rdf:type sp:Select ; 510 [ rdf:type sp:Select ;
477 - sp:resultVariables (_:b17) ; 511 + sp:resultVariables (_:b18) ;
478 sp:where ([ rdf:type sp:NamedGraph ; 512 sp:where ([ rdf:type sp:NamedGraph ;
479 - sp:elements ([ sp:object _:b17 ; 513 + sp:elements ([ sp:object _:b18 ;
480 sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ; 514 sp:predicate <http://www.reportinghub.no/np/schema/npd#drilledInProductionLicence> ;
481 sp:subject 515 sp:subject
482 [ sp:varName "wellBore"^^xsd:string 516 [ sp:varName "wellBore"^^xsd:string
...@@ -500,7 +534,7 @@ rhspin:normalizeString ...@@ -500,7 +534,7 @@ rhspin:normalizeString
500 rdfs:subClassOf spl:StringFunctions ; 534 rdfs:subClassOf spl:StringFunctions ;
501 spin:body 535 spin:body
502 [ rdf:type sp:Select ; 536 [ rdf:type sp:Select ;
503 - sp:resultVariables (_:b18) ; 537 + sp:resultVariables (_:b19) ;
504 sp:where ([ rdf:type sp:Bind ; 538 sp:where ([ rdf:type sp:Bind ;
505 sp:expression 539 sp:expression
506 [ rdf:type spif:regex ; 540 [ rdf:type spif:regex ;
...@@ -508,67 +542,67 @@ rhspin:normalizeString ...@@ -508,67 +542,67 @@ rhspin:normalizeString
508 sp:arg2 "\\((.*)\\)" ; 542 sp:arg2 "\\((.*)\\)" ;
509 sp:arg3 "" 543 sp:arg3 ""
510 ] ; 544 ] ;
511 - sp:variable _:b19 545 + sp:variable _:b20
512 ] [ rdf:type sp:Bind ; 546 ] [ rdf:type sp:Bind ;
513 sp:expression 547 sp:expression
514 [ rdf:type spif:trim ; 548 [ rdf:type spif:trim ;
515 - sp:arg1 _:b19 549 + sp:arg1 _:b20
516 ] ; 550 ] ;
517 - sp:variable _:b20 551 + sp:variable _:b21
518 ] [ rdf:type sp:Bind ; 552 ] [ rdf:type sp:Bind ;
519 sp:expression 553 sp:expression
520 [ rdf:type spif:encodeURL ; 554 [ rdf:type spif:encodeURL ;
521 - sp:arg1 _:b20 555 + sp:arg1 _:b21
522 ] ; 556 ] ;
523 - sp:variable _:b21 557 + sp:variable _:b22
524 ] [ rdf:type sp:Bind ; 558 ] [ rdf:type sp:Bind ;
525 sp:expression 559 sp:expression
526 [ rdf:type spif:regex ; 560 [ rdf:type spif:regex ;
527 - sp:arg1 _:b21 ; 561 + sp:arg1 _:b22 ;
528 sp:arg2 "%2F" ; 562 sp:arg2 "%2F" ;
529 sp:arg3 "_" 563 sp:arg3 "_"
530 ] ; 564 ] ;
531 - sp:variable _:b22 565 + sp:variable _:b23
532 ] [ rdf:type sp:Bind ; 566 ] [ rdf:type sp:Bind ;
533 sp:expression 567 sp:expression
534 [ rdf:type spif:regex ; 568 [ rdf:type spif:regex ;
535 - sp:arg1 _:b22 ; 569 + sp:arg1 _:b23 ;
536 sp:arg2 "%[0-9A-F][0-9A-F]" ; 570 sp:arg2 "%[0-9A-F][0-9A-F]" ;
537 sp:arg3 "" 571 sp:arg3 ""
538 ] ; 572 ] ;
539 - sp:variable _:b23 573 + sp:variable _:b24
540 ] [ rdf:type sp:Bind ; 574 ] [ rdf:type sp:Bind ;
541 sp:expression 575 sp:expression
542 [ rdf:type spif:regex ; 576 [ rdf:type spif:regex ;
543 - sp:arg1 _:b23 ; 577 + sp:arg1 _:b24 ;
544 sp:arg2 "\\+" ; 578 sp:arg2 "\\+" ;
545 sp:arg3 "_" 579 sp:arg3 "_"
546 ] ; 580 ] ;
547 - sp:variable _:b24 581 + sp:variable _:b25
548 ] [ rdf:type sp:Bind ; 582 ] [ rdf:type sp:Bind ;
549 sp:expression 583 sp:expression
550 [ rdf:type spif:regex ; 584 [ rdf:type spif:regex ;
551 - sp:arg1 _:b24 ; 585 + sp:arg1 _:b25 ;
552 sp:arg2 "_+" ; 586 sp:arg2 "_+" ;
553 sp:arg3 "_" 587 sp:arg3 "_"
554 ] ; 588 ] ;
555 - sp:variable _:b25 589 + sp:variable _:b26
556 ] [ rdf:type sp:Bind ; 590 ] [ rdf:type sp:Bind ;
557 sp:expression 591 sp:expression
558 [ rdf:type spif:regex ; 592 [ rdf:type spif:regex ;
559 - sp:arg1 _:b25 ; 593 + sp:arg1 _:b26 ;
560 sp:arg2 "\\*" ; 594 sp:arg2 "\\*" ;
561 sp:arg3 "" 595 sp:arg3 ""
562 ] ; 596 ] ;
563 - sp:variable _:b26 597 + sp:variable _:b27
564 ] [ rdf:type sp:Bind ; 598 ] [ rdf:type sp:Bind ;
565 sp:expression 599 sp:expression
566 [ rdf:type xsd:string ; 600 [ rdf:type xsd:string ;
567 sp:arg1 [ rdf:type spif:upperCase ; 601 sp:arg1 [ rdf:type spif:upperCase ;
568 - sp:arg1 _:b26 602 + sp:arg1 _:b27
569 ] 603 ]
570 ] ; 604 ] ;
571 - sp:variable _:b18 605 + sp:variable _:b19
572 ]) 606 ])
573 ] ; 607 ] ;
574 spin:constraint 608 spin:constraint
...@@ -585,9 +619,9 @@ rhspin:npdId ...@@ -585,9 +619,9 @@ rhspin:npdId
585 rdfs:subClassOf spl:StringFunctions ; 619 rdfs:subClassOf spl:StringFunctions ;
586 spin:body 620 spin:body
587 [ rdf:type sp:Select ; 621 [ rdf:type sp:Select ;
588 - sp:resultVariables (_:b27) ; 622 + sp:resultVariables (_:b28) ;
589 sp:where ([ rdf:type sp:NamedGraph ; 623 sp:where ([ rdf:type sp:NamedGraph ;
590 - sp:elements ([ sp:object _:b27 ; 624 + sp:elements ([ sp:object _:b28 ;
591 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ; 625 sp:predicate <http://www.reportinghub.no/np/schema/npd#id> ;
592 sp:subject 626 sp:subject
593 [ sp:varName "resource"^^xsd:string 627 [ sp:varName "resource"^^xsd:string
...@@ -610,9 +644,9 @@ rhspin:npdName ...@@ -610,9 +644,9 @@ rhspin:npdName
610 rdfs:subClassOf spl:StringFunctions ; 644 rdfs:subClassOf spl:StringFunctions ;
611 spin:body 645 spin:body
612 [ rdf:type sp:Select ; 646 [ rdf:type sp:Select ;
613 - sp:resultVariables (_:b28) ; 647 + sp:resultVariables (_:b29) ;
614 sp:where ([ rdf:type sp:NamedGraph ; 648 sp:where ([ rdf:type sp:NamedGraph ;
615 - sp:elements ([ sp:object _:b28 ; 649 + sp:elements ([ sp:object _:b29 ;
616 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 650 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
617 sp:subject 651 sp:subject
618 [ sp:varName "resource"^^xsd:string 652 [ sp:varName "resource"^^xsd:string
...@@ -724,27 +758,27 @@ rhspin:wellBoreByName ...@@ -724,27 +758,27 @@ rhspin:wellBoreByName
724 rdfs:subClassOf spl:URIFunctions ; 758 rdfs:subClassOf spl:URIFunctions ;
725 spin:body 759 spin:body
726 [ rdf:type sp:Select ; 760 [ rdf:type sp:Select ;
727 - sp:resultVariables (_:b29) ; 761 + sp:resultVariables (_:b30) ;
728 sp:where ([ rdf:type sp:NamedGraph ; 762 sp:where ([ rdf:type sp:NamedGraph ;
729 sp:elements ([ rdf:type sp:Union ; 763 sp:elements ([ rdf:type sp:Union ;
730 - sp:elements (([ sp:object _:b30 ; 764 + sp:elements (([ sp:object _:b31 ;
731 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 765 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
732 - sp:subject _:b29 766 + sp:subject _:b30
733 ]) ([ rdf:type sp:Bind ; 767 ]) ([ rdf:type sp:Bind ;
734 sp:expression 768 sp:expression
735 [ rdf:type spif:replaceAll ; 769 [ rdf:type spif:replaceAll ;
736 - sp:arg1 _:b30 ; 770 + sp:arg1 _:b31 ;
737 sp:arg2 "/0" ; 771 sp:arg2 "/0" ;
738 sp:arg3 "/" 772 sp:arg3 "/"
739 ] ; 773 ] ;
740 - sp:variable _:b31 774 + sp:variable _:b32
741 - ] [ sp:object _:b31 ; 775 + ] [ sp:object _:b32 ;
742 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ; 776 sp:predicate <http://www.reportinghub.no/np/schema/npd#name> ;
743 - sp:subject _:b29 777 + sp:subject _:b30
744 ])) 778 ]))
745 ] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ; 779 ] [ sp:object <http://www.reportinghub.no/ep/schema/well#WellBore> ;
746 sp:predicate rdf:type ; 780 sp:predicate rdf:type ;
747 - sp:subject _:b29 781 + sp:subject _:b30
748 ]) ; 782 ]) ;
749 sp:graphNameNode npdata:npd 783 sp:graphNameNode npdata:npd
750 ]) 784 ])
...@@ -783,63 +817,58 @@ rhspin:wellByName ...@@ -783,63 +817,58 @@ rhspin:wellByName
783 ] ; 817 ] ;
784 spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> . 818 spin:returnType <http://www.reportinghub.no/ep/schema/well#Well> .
785 819
786 -_:b5 sp:varName "wellName"^^xsd:string . 820 +_:b15
787 - 821 + sp:varName "startedAt"^^xsd:string .
788 -_:b6 sp:varName "well"^^xsd:string .
789 -
790 -_:b8 sp:varName "wellBore"^^xsd:string .
791 -
792 -_:b7 sp:varName "company"^^xsd:string .
793 822
794 -_:b31 823 +_:b32
795 sp:varName "str"^^xsd:string . 824 sp:varName "str"^^xsd:string .
796 825
797 -_:b30 826 +_:b31
798 sp:varName "wellBoreName"^^xsd:string . 827 sp:varName "wellBoreName"^^xsd:string .
799 828
800 -_:b29 829 +_:b30
801 sp:varName "wellBore"^^xsd:string . 830 sp:varName "wellBore"^^xsd:string .
802 831
803 -_:b28 832 +_:b29
804 sp:varName "name"^^xsd:string . 833 sp:varName "name"^^xsd:string .
805 834
806 -_:b27 835 +_:b28
807 sp:varName "id"^^xsd:string . 836 sp:varName "id"^^xsd:string .
808 837
809 -_:b26 838 +_:b27
810 sp:varName "t4"^^xsd:string . 839 sp:varName "t4"^^xsd:string .
811 840
812 -_:b25 841 +_:b26
813 sp:varName "t3"^^xsd:string . 842 sp:varName "t3"^^xsd:string .
814 843
815 -_:b24 844 +_:b25
816 sp:varName "t2"^^xsd:string . 845 sp:varName "t2"^^xsd:string .
817 846
818 -_:b23 847 +_:b24
819 sp:varName "t1"^^xsd:string . 848 sp:varName "t1"^^xsd:string .
820 849
821 -_:b22 850 +_:b23
822 sp:varName "t0b"^^xsd:string . 851 sp:varName "t0b"^^xsd:string .
823 852
824 -_:b21 853 +_:b22
825 sp:varName "t0a"^^xsd:string . 854 sp:varName "t0a"^^xsd:string .
826 855
827 -_:b20 856 +_:b21
828 sp:varName "s2"^^xsd:string . 857 sp:varName "s2"^^xsd:string .
829 858
830 -_:b19 859 +_:b20
831 sp:varName "s1"^^xsd:string . 860 sp:varName "s1"^^xsd:string .
832 861
833 -_:b18 862 +_:b19
834 sp:varName "normalizedStr"^^xsd:string . 863 sp:varName "normalizedStr"^^xsd:string .
835 864
836 -_:b17 865 +_:b18
837 sp:varName "licence"^^xsd:string . 866 sp:varName "licence"^^xsd:string .
838 867
839 -_:b16 868 +_:b17
840 sp:varName "reif"^^xsd:string . 869 sp:varName "reif"^^xsd:string .
841 870
842 -_:b15 871 +_:b16
843 sp:varName "value"^^xsd:string . 872 sp:varName "value"^^xsd:string .
844 873
845 _:b14 874 _:b14
...@@ -859,6 +888,14 @@ _:b10 ...@@ -859,6 +888,14 @@ _:b10
859 888
860 _:b9 sp:varName "licence"^^xsd:string . 889 _:b9 sp:varName "licence"^^xsd:string .
861 890
891 +_:b8 sp:varName "wellBore"^^xsd:string .
892 +
893 +_:b7 sp:varName "company"^^xsd:string .
894 +
895 +_:b6 sp:varName "well"^^xsd:string .
896 +
897 +_:b5 sp:varName "wellName"^^xsd:string .
898 +
862 _:b4 sp:varName "wellBore"^^xsd:string . 899 _:b4 sp:varName "wellBore"^^xsd:string .
863 900
864 _:b3 sp:varName "wellBoreId"^^xsd:string . 901 _:b3 sp:varName "wellBoreId"^^xsd:string .
......