Showing
2 changed files
with
109 additions
and
1 deletions
... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
6 | # imports: http://www.reportinghub.no/ep/schema/1.0/production-equipment | 6 | # imports: http://www.reportinghub.no/ep/schema/1.0/production-equipment |
7 | # imports: http://www.reportinghub.no/ep/spin/1.1/lib | 7 | # imports: http://www.reportinghub.no/ep/spin/1.1/lib |
8 | 8 | ||
9 | +@prefix arg: <http://spinrdf.org/arg#> . | ||
9 | @prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> . | 10 | @prefix ep-mpr-spin-lib: <http://www.reportinghub.no/ep/mpr/spin/1.1/lib#> . |
10 | @prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> . | 11 | @prefix ep-spin-lib: <http://www.reportinghub.no/ep/spin/lib#> . |
11 | @prefix fn: <http://www.w3.org/2005/xpath-functions#> . | 12 | @prefix fn: <http://www.w3.org/2005/xpath-functions#> . |
... | @@ -13,6 +14,7 @@ | ... | @@ -13,6 +14,7 @@ |
13 | @prefix production-geometry: <http://evn.topbraidlive.org/www.reportinghub.no/ep/schema/1.0/production-geometry#> . | 14 | @prefix production-geometry: <http://evn.topbraidlive.org/www.reportinghub.no/ep/schema/1.0/production-geometry#> . |
14 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | 15 | @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . |
15 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | 16 | @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . |
17 | +@prefix smf: <http://topbraid.org/sparqlmotionfunctions#> . | ||
16 | @prefix sp: <http://spinrdf.org/sp#> . | 18 | @prefix sp: <http://spinrdf.org/sp#> . |
17 | @prefix spin: <http://spinrdf.org/spin#> . | 19 | @prefix spin: <http://spinrdf.org/spin#> . |
18 | @prefix spl: <http://spinrdf.org/spl#> . | 20 | @prefix spl: <http://spinrdf.org/spl#> . |
... | @@ -20,7 +22,7 @@ | ... | @@ -20,7 +22,7 @@ |
20 | 22 | ||
21 | <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> | 23 | <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> |
22 | rdf:type owl:Ontology ; | 24 | rdf:type owl:Ontology ; |
23 | - owl:imports <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://spinrdf.org/spin> ; | 25 | + owl:imports <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/production> ; |
24 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . | 26 | owl:versionInfo "Created with TopBraid Composer"^^xsd:string . |
25 | 27 | ||
26 | ep-mpr-spin-lib:Function | 28 | ep-mpr-spin-lib:Function |
... | @@ -2713,6 +2715,112 @@ ep-mpr-spin-lib:selectMolarVolumeScale | ... | @@ -2713,6 +2715,112 @@ ep-mpr-spin-lib:selectMolarVolumeScale |
2713 | ]) | 2715 | ]) |
2714 | ] . | 2716 | ] . |
2715 | 2717 | ||
2718 | +ep-mpr-spin-lib:selectMonthRelationship | ||
2719 | + rdf:type spin:Function ; | ||
2720 | + rdfs:subClassOf ep-mpr-spin-lib:Function ; | ||
2721 | + spin:body | ||
2722 | + [ rdf:type sp:Select ; | ||
2723 | + rdfs:comment """arg1 startDate | ||
2724 | +arg2 endDate | ||
2725 | +arg3 month | ||
2726 | +returns existsWithin or existsThroughout . | ||
2727 | +At present checks only that the start is the first day of the month and that the end is the 31st, 30th, 29th or 28th day. There is no check for the right number of days in the month."""^^xsd:string ; | ||
2728 | + sp:resultVariables ([ sp:varName "myVar"^^xsd:string | ||
2729 | + ]) ; | ||
2730 | + sp:where ([ rdf:type sp:Bind ; | ||
2731 | + sp:expression | ||
2732 | + [ rdf:type sp:if ; | ||
2733 | + sp:arg1 [ rdf:type sp:eq ; | ||
2734 | + sp:arg1 [ rdf:type smf:subString ; | ||
2735 | + arg:fromIndex 0 ; | ||
2736 | + arg:toIndex 7 ; | ||
2737 | + sp:arg1 spin:_arg1 | ||
2738 | + ] ; | ||
2739 | + sp:arg2 [ rdf:type smf:subString ; | ||
2740 | + arg:fromIndex 0 ; | ||
2741 | + arg:toIndex 7 ; | ||
2742 | + sp:arg1 spin:_arg3 | ||
2743 | + ] | ||
2744 | + ] ; | ||
2745 | + sp:arg2 [ rdf:type sp:if ; | ||
2746 | + sp:arg1 [ rdf:type sp:eq ; | ||
2747 | + sp:arg1 [ rdf:type smf:subString ; | ||
2748 | + arg:fromIndex 0 ; | ||
2749 | + arg:toIndex 7 ; | ||
2750 | + sp:arg1 spin:_arg2 | ||
2751 | + ] ; | ||
2752 | + sp:arg2 [ rdf:type smf:subString ; | ||
2753 | + arg:fromIndex 0 ; | ||
2754 | + arg:toIndex 7 ; | ||
2755 | + sp:arg1 spin:_arg3 | ||
2756 | + ] | ||
2757 | + ] ; | ||
2758 | + sp:arg2 [ rdf:type sp:if ; | ||
2759 | + sp:arg1 [ rdf:type sp:eq ; | ||
2760 | + sp:arg1 [ rdf:type smf:subString ; | ||
2761 | + arg:fromIndex 8 ; | ||
2762 | + arg:toIndex 10 ; | ||
2763 | + sp:arg1 spin:_arg1 | ||
2764 | + ] ; | ||
2765 | + sp:arg2 "01" | ||
2766 | + ] ; | ||
2767 | + sp:arg2 [ rdf:type sp:if ; | ||
2768 | + sp:arg1 [ rdf:type sp:eq ; | ||
2769 | + sp:arg1 [ rdf:type smf:subString ; | ||
2770 | + arg:fromIndex 8 ; | ||
2771 | + arg:toIndex 10 ; | ||
2772 | + sp:arg1 spin:_arg2 | ||
2773 | + ] ; | ||
2774 | + sp:arg2 "31" | ||
2775 | + ] ; | ||
2776 | + sp:arg2 <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ; | ||
2777 | + sp:arg3 [ rdf:type sp:if ; | ||
2778 | + sp:arg1 [ rdf:type sp:eq ; | ||
2779 | + sp:arg1 [ rdf:type smf:subString ; | ||
2780 | + arg:fromIndex 8 ; | ||
2781 | + arg:toIndex 10 ; | ||
2782 | + sp:arg1 spin:_arg2 | ||
2783 | + ] ; | ||
2784 | + sp:arg2 "30" | ||
2785 | + ] ; | ||
2786 | + sp:arg2 <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ; | ||
2787 | + sp:arg3 [ rdf:type sp:if ; | ||
2788 | + sp:arg1 [ rdf:type sp:eq ; | ||
2789 | + sp:arg1 [ rdf:type smf:subString ; | ||
2790 | + arg:fromIndex 8 ; | ||
2791 | + arg:toIndex 10 ; | ||
2792 | + sp:arg1 spin:_arg2 | ||
2793 | + ] ; | ||
2794 | + sp:arg2 "29" | ||
2795 | + ] ; | ||
2796 | + sp:arg2 <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ; | ||
2797 | + sp:arg3 [ rdf:type sp:if ; | ||
2798 | + sp:arg1 [ rdf:type sp:eq ; | ||
2799 | + sp:arg1 [ rdf:type smf:subString ; | ||
2800 | + arg:fromIndex 8 ; | ||
2801 | + arg:toIndex 10 ; | ||
2802 | + sp:arg1 spin:_arg2 | ||
2803 | + ] ; | ||
2804 | + sp:arg2 "28" | ||
2805 | + ] ; | ||
2806 | + sp:arg2 <http://www.reportinghub.no/ep/schema/activity#existsThroughout> ; | ||
2807 | + sp:arg3 <http://www.reportinghub.no/ep/schema/activity#existsWithin> | ||
2808 | + ] | ||
2809 | + ] | ||
2810 | + ] | ||
2811 | + ] ; | ||
2812 | + sp:arg3 <http://www.reportinghub.no/ep/schema/activity#existsWithin> | ||
2813 | + ] ; | ||
2814 | + sp:arg3 <http://www.reportinghub.no/ep/schema/activity#existsWithin> | ||
2815 | + ] ; | ||
2816 | + sp:arg3 <http://www.reportinghub.no/ep/schema/activity#existsWithin> | ||
2817 | + ] ; | ||
2818 | + sp:variable | ||
2819 | + [ sp:varName "myVar"^^xsd:string | ||
2820 | + ] | ||
2821 | + ]) | ||
2822 | + ] . | ||
2823 | + | ||
2716 | ep-mpr-spin-lib:selectMovementOfProductFlag | 2824 | ep-mpr-spin-lib:selectMovementOfProductFlag |
2717 | rdf:type spin:Function ; | 2825 | rdf:type spin:Function ; |
2718 | rdfs:label "select MovementOfProductFlag"^^xsd:string ; | 2826 | rdfs:label "select MovementOfProductFlag"^^xsd:string ; | ... | ... |
This diff could not be displayed because it is too large.
-
Please register or login to post a comment