David Leal

Added status for volume values, and fixed a welltest report bug.

This diff could not be displayed because it is too large.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
23 23
24 <http://www.reportinghub.no/ep/mpr/spin/1.1/lib> 24 <http://www.reportinghub.no/ep/mpr/spin/1.1/lib>
25 rdf:type owl:Ontology ; 25 rdf:type owl:Ontology ;
26 - owl:imports <http://www.reportinghub.no/ep/transform/transform-helper-schema> , <http://spinrdf.org/spin> , <http://www.epim.no/schemas/mprml/1> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://www.reportinghub.no/ep/spin/1.1/lib> ; 26 + owl:imports <http://www.reportinghub.no/ep/spin/1.1/lib> , <http://www.reportinghub.no/ep/schema/1.0/production-equipment> , <http://www.reportinghub.no/ep/schema/1.0/production-activity> , <http://www.reportinghub.no/ep/schema/1.0/production> , <http://www.epim.no/schemas/mprml/1> , <http://spinrdf.org/spin> , <http://www.reportinghub.no/ep/transform/transform-helper-schema> ;
27 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 27 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
28 28
29 ep-mpr-spin-lib:Function 29 ep-mpr-spin-lib:Function
...@@ -2826,6 +2826,79 @@ ep-mpr-spin-lib:selectMassScale ...@@ -2826,6 +2826,79 @@ ep-mpr-spin-lib:selectMassScale
2826 ]) 2826 ])
2827 ] . 2827 ] .
2828 2828
2829 +ep-mpr-spin-lib:selectMeasuredQualityType
2830 + rdf:type spin:Function ;
2831 + rdfs:label "select MeasuredQualityType"^^xsd:string ;
2832 + rdfs:subClassOf ep-mpr-spin-lib:Function ;
2833 + spin:body
2834 + [ rdf:type sp:Select ;
2835 + sp:resultVariables ([ sp:varName "measuredQualityType"^^xsd:string
2836 + ]) ;
2837 + sp:where ([ rdf:type sp:Bind ;
2838 + sp:expression
2839 + [ rdf:type sp:if ;
2840 + sp:arg1 [ rdf:type sp:eq ;
2841 + sp:arg1 spin:_arg1 ;
2842 + sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_badcalibration>
2843 + ] ;
2844 + sp:arg2 <http://www.reportinghub.no/ep/schema/core#MeasuredWithABadlyCalibratedSensor> ;
2845 + sp:arg3 [ rdf:type sp:if ;
2846 + sp:arg1 [ rdf:type sp:eq ;
2847 + sp:arg1 spin:_arg1 ;
2848 + sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_rangelimit>
2849 + ] ;
2850 + sp:arg2 <http://www.reportinghub.no/ep/schema/core#MeasuredWithASensorThatIsNearTheLimitOfItsRange> ;
2851 + sp:arg3 [ rdf:type sp:if ;
2852 + sp:arg1 [ rdf:type sp:eq ;
2853 + sp:arg1 spin:_arg1 ;
2854 + sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_questionable>
2855 + ] ;
2856 + sp:arg2 <http://www.reportinghub.no/ep/schema/core#QuestionablyMeasured> ;
2857 + sp:arg3 [ rdf:type sp:if ;
2858 + sp:arg1 [ rdf:type sp:eq ;
2859 + sp:arg1 spin:_arg1 ;
2860 + sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_devicefailure>
2861 + ] ;
2862 + sp:arg2 <http://www.reportinghub.no/ep/schema/core#InvalidlyMeasuredBecauseOfDeviceFailure> ;
2863 + sp:arg3 [ rdf:type sp:if ;
2864 + sp:arg1 [ rdf:type sp:eq ;
2865 + sp:arg1 spin:_arg1 ;
2866 + sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_sensorfailure>
2867 + ] ;
2868 + sp:arg2 <http://www.reportinghub.no/ep/schema/core#InvalidlyMeasuredBecauseOfSensorFailure> ;
2869 + sp:arg3 [ rdf:type sp:if ;
2870 + sp:arg1 [ rdf:type sp:eq ;
2871 + sp:arg1 spin:_arg1 ;
2872 + sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_commfailure>
2873 + ] ;
2874 + sp:arg2 <http://www.reportinghub.no/ep/schema/core#InvalidlyMeasuredBecauseOfCommunicationsFailure> ;
2875 + sp:arg3 [ rdf:type sp:if ;
2876 + sp:arg1 [ rdf:type sp:eq ;
2877 + sp:arg1 spin:_arg1 ;
2878 + sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_timeout>
2879 + ] ;
2880 + sp:arg2 <http://www.reportinghub.no/ep/schema/core#InvalidlyMeasuredBecauseTheSensorHasNotReturnedDataInTime> ;
2881 + sp:arg3 [ rdf:type sp:if ;
2882 + sp:arg1 [ rdf:type sp:eq ;
2883 + sp:arg1 spin:_arg1 ;
2884 + sp:arg2 <http://www.epim.no/schemas/mprml/1#VS_unknown>
2885 + ] ;
2886 + sp:arg2 <http://www.reportinghub.no/ep/schema/core#InvalidlyMeasured> ;
2887 + sp:arg3 <http://www.reportinghub.no/ep/schema/core#PhysicalThing>
2888 + ]
2889 + ]
2890 + ]
2891 + ]
2892 + ]
2893 + ]
2894 + ]
2895 + ] ;
2896 + sp:variable
2897 + [ sp:varName "measuredQualityType"^^xsd:string
2898 + ]
2899 + ])
2900 + ] .
2901 +
2829 ep-mpr-spin-lib:selectMolarVolumeScale 2902 ep-mpr-spin-lib:selectMolarVolumeScale
2830 rdf:type spin:Function ; 2903 rdf:type spin:Function ;
2831 rdfs:subClassOf ep-mpr-spin-lib:Function ; 2904 rdfs:subClassOf ep-mpr-spin-lib:Function ;
......
...@@ -2504,19 +2504,32 @@ except where the quantity of material is derived from a flow"""^^xsd:string ; ...@@ -2504,19 +2504,32 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
2504 <http://www.epim.no/schemas/mprml/1#VolumeQualifiedMeasure> 2504 <http://www.epim.no/schemas/mprml/1#VolumeQualifiedMeasure>
2505 spin:rule 2505 spin:rule
2506 [ rdf:type sp:Construct ; 2506 [ rdf:type sp:Construct ;
2507 - rdfs:comment "STEP 90071a Process volume for a flow - creating a quantity of material if necessary"^^xsd:string ; 2507 + rdfs:comment "STEP 90172 Process volume at standard conditions for a quantity of material - status exists - create a new state and volume and associate status with that state"^^xsd:string ;
2508 - sp:templates ([ sp:object _:b41 ; 2508 + sp:templates ([ sp:object
2509 - sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ; 2509 + [ sp:varName "quantityOfMaterial"^^xsd:string
2510 - sp:subject 2510 + ] ;
2511 - [ sp:varName "flow"^^xsd:string 2511 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
2512 - ] 2512 + sp:subject _:b41
2513 ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ; 2513 ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
2514 sp:predicate rdf:type ; 2514 sp:predicate rdf:type ;
2515 sp:subject _:b41 2515 sp:subject _:b41
2516 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInAStandardState> ;
2517 + sp:predicate rdf:type ;
2518 + sp:subject _:b41
2516 ] [ sp:object 2519 ] [ sp:object
2517 - [ sp:varName "target"^^xsd:string 2520 + [ sp:varName "standardTemperature"^^xsd:string
2518 ] ; 2521 ] ;
2519 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 2522 + sp:predicate rdf:type ;
2523 + sp:subject _:b41
2524 + ] [ sp:object
2525 + [ sp:varName "standardPressure"^^xsd:string
2526 + ] ;
2527 + sp:predicate rdf:type ;
2528 + sp:subject _:b41
2529 + ] [ sp:object
2530 + [ sp:varName "measuredQualityType"^^xsd:string
2531 + ] ;
2532 + sp:predicate rdf:type ;
2520 sp:subject _:b41 2533 sp:subject _:b41
2521 ] [ sp:object _:b42 ; 2534 ] [ sp:object _:b42 ;
2522 sp:predicate rdf:type ; 2535 sp:predicate rdf:type ;
...@@ -2533,34 +2546,335 @@ except where the quantity of material is derived from a flow"""^^xsd:string ; ...@@ -2533,34 +2546,335 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
2533 sp:subject _:b42 2546 sp:subject _:b42
2534 ]) ; 2547 ]) ;
2535 sp:where ([ sp:object spin:_this ; 2548 sp:where ([ sp:object spin:_this ;
2549 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeStdRef> ;
2550 + sp:subject
2551 + [ sp:varName "target"^^xsd:string
2552 + ]
2553 + ] [ rdf:type sp:Optional ;
2554 + sp:elements ([ sp:object
2555 + [ sp:varName "standardTempPresRef"^^xsd:string
2556 + ] ;
2557 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#standardTempPres> ;
2558 + sp:subject
2559 + [ sp:varName "target"^^xsd:string
2560 + ]
2561 + ])
2562 + ] [ sp:object
2563 + [ sp:varName "target"^^xsd:string
2564 + ] ;
2565 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
2566 + sp:subject
2567 + [ sp:varName "quantityOfMaterial"^^xsd:string
2568 + ]
2569 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
2570 + sp:predicate rdf:type ;
2571 + sp:subject
2572 + [ sp:varName "quantityOfMaterial"^^xsd:string
2573 + ]
2574 + ] [ sp:object
2575 + [ sp:varName "realVolume"^^xsd:string
2576 + ] ;
2577 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
2578 + sp:subject spin:_this
2579 + ] [ sp:object
2580 + [ sp:varName "uomVolume"^^xsd:string
2581 + ] ;
2582 + sp:predicate <http://www.epim.no/schemas/mprml/1#uomRef> ;
2583 + sp:subject spin:_this
2584 + ] [ rdf:type sp:Bind ;
2585 + sp:expression
2586 + [ rdf:type ep-mpr-spin-lib:selectVolumeScale ;
2587 + sp:arg1 [ sp:varName "uomVolume"^^xsd:string
2588 + ]
2589 + ] ;
2590 + sp:variable
2591 + [ sp:varName "volumeScale"^^xsd:string
2592 + ]
2593 + ] [ rdf:type sp:Optional ;
2594 + sp:elements ([ sp:object
2595 + [ sp:varName "statusRef"^^xsd:string
2596 + ] ;
2597 + sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
2598 + sp:subject spin:_this
2599 + ] [ rdf:type sp:Bind ;
2600 + sp:expression
2601 + [ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
2602 + sp:arg1 [ sp:varName "statusRef"^^xsd:string
2603 + ]
2604 + ] ;
2605 + sp:variable
2606 + [ sp:varName "measuredQualityType"^^xsd:string
2607 + ]
2608 + ])
2609 + ] [ rdf:type sp:Bind ;
2610 + sp:expression
2611 + [ rdf:type ep-mpr-spin-lib:selectStandardTempPres-Temperature ;
2612 + sp:arg1 [ sp:varName "standardTempPresRef"^^xsd:string
2613 + ]
2614 + ] ;
2615 + sp:variable
2616 + [ sp:varName "standardTemperature"^^xsd:string
2617 + ]
2618 + ] [ rdf:type sp:Bind ;
2619 + sp:expression
2620 + [ rdf:type ep-mpr-spin-lib:selectStandardTempPres-Pressure ;
2621 + sp:arg1 [ sp:varName "standardTempPresRef"^^xsd:string
2622 + ]
2623 + ] ;
2624 + sp:variable
2625 + [ sp:varName "standardPressure"^^xsd:string
2626 + ]
2627 + ])
2628 + ] ;
2629 + spin:rule
2630 + [ rdf:type sp:Construct ;
2631 + rdfs:comment "STEP 90171c Process volume for a quantity of material - volume for not for a specified state - status exists - create a new state and volume and associate status with that state"^^xsd:string ;
2632 + sp:templates ([ sp:object
2633 + [ sp:varName "quantityOfMaterial"^^xsd:string
2634 + ] ;
2635 + sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
2636 + sp:subject _:b43
2637 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
2638 + sp:predicate rdf:type ;
2639 + sp:subject _:b43
2640 + ] [ sp:object
2641 + [ sp:varName "measuredQualityType"^^xsd:string
2642 + ] ;
2643 + sp:predicate rdf:type ;
2644 + sp:subject _:b43
2645 + ] [ sp:object _:b44 ;
2646 + sp:predicate rdf:type ;
2647 + sp:subject _:b43
2648 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
2649 + sp:predicate rdf:type ;
2650 + sp:subject _:b44
2651 + ] [ sp:object
2652 + [ sp:varName "realVolume"^^xsd:string
2653 + ] ;
2654 + sp:predicate
2655 + [ sp:varName "volumeScale"^^xsd:string
2656 + ] ;
2657 + sp:subject _:b44
2658 + ]) ;
2659 + sp:where ([ sp:object spin:_this ;
2536 sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ; 2660 sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
2537 sp:subject 2661 sp:subject
2538 [ sp:varName "target"^^xsd:string 2662 [ sp:varName "target"^^xsd:string
2539 ] 2663 ]
2664 + ] [ rdf:type sp:NotExists ;
2665 + sp:elements ([ sp:object
2666 + [ sp:varName "target"^^xsd:string
2667 + ] ;
2668 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeValueRef> ;
2669 + sp:subject
2670 + [ sp:varName "somethingRef"^^xsd:string
2671 + ]
2672 + ])
2540 ] [ sp:object 2673 ] [ sp:object
2541 [ sp:varName "target"^^xsd:string 2674 [ sp:varName "target"^^xsd:string
2542 ] ; 2675 ] ;
2543 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 2676 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
2544 sp:subject 2677 sp:subject
2545 - [ sp:varName "flow"^^xsd:string 2678 + [ sp:varName "quantityOfMaterial"^^xsd:string
2546 ] 2679 ]
2547 - ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ; 2680 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
2548 sp:predicate rdf:type ; 2681 sp:predicate rdf:type ;
2549 sp:subject 2682 sp:subject
2550 - [ sp:varName "flow"^^xsd:string 2683 + [ sp:varName "quantityOfMaterial"^^xsd:string
2684 + ]
2685 + ] [ sp:object
2686 + [ sp:varName "realVolume"^^xsd:string
2687 + ] ;
2688 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
2689 + sp:subject spin:_this
2690 + ] [ sp:object
2691 + [ sp:varName "uomVolume"^^xsd:string
2692 + ] ;
2693 + sp:predicate <http://www.epim.no/schemas/mprml/1#uomRef> ;
2694 + sp:subject spin:_this
2695 + ] [ rdf:type sp:Bind ;
2696 + sp:expression
2697 + [ rdf:type ep-mpr-spin-lib:selectVolumeScale ;
2698 + sp:arg1 [ sp:varName "uomVolume"^^xsd:string
2699 + ]
2700 + ] ;
2701 + sp:variable
2702 + [ sp:varName "volumeScale"^^xsd:string
2703 + ]
2704 + ] [ sp:object
2705 + [ sp:varName "statusRef"^^xsd:string
2706 + ] ;
2707 + sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
2708 + sp:subject spin:_this
2709 + ] [ rdf:type sp:Bind ;
2710 + sp:expression
2711 + [ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
2712 + sp:arg1 [ sp:varName "statusRef"^^xsd:string
2713 + ]
2714 + ] ;
2715 + sp:variable
2716 + [ sp:varName "measuredQualityType"^^xsd:string
2717 + ]
2718 + ])
2719 + ] ;
2720 + spin:rule
2721 + [ rdf:type sp:Construct ;
2722 + rdfs:comment "STEP 90171b Process volume for a quantity of material - creating volume if necessary - volume for a specified state, so associate status with that state"^^xsd:string ;
2723 + sp:templates ([ sp:object _:b45 ;
2724 + sp:predicate rdf:type ;
2725 + sp:subject
2726 + [ sp:varName "quantityOfMaterial"^^xsd:string
2727 + ]
2728 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
2729 + sp:predicate rdf:type ;
2730 + sp:subject _:b45
2731 + ] [ sp:object
2732 + [ sp:varName "realVolume"^^xsd:string
2733 + ] ;
2734 + sp:predicate
2735 + [ sp:varName "volumeScale"^^xsd:string
2736 + ] ;
2737 + sp:subject _:b45
2738 + ] [ sp:object
2739 + [ sp:varName "measuredQualityType"^^xsd:string
2740 + ] ;
2741 + sp:predicate rdf:type ;
2742 + sp:subject
2743 + [ sp:varName "quantityOfMaterial"^^xsd:string
2744 + ]
2745 + ]) ;
2746 + sp:where ([ sp:object
2747 + [ sp:varName "target"^^xsd:string
2748 + ] ;
2749 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeValueRef> ;
2750 + sp:subject
2751 + [ sp:varName "somethingRef"^^xsd:string
2752 + ]
2753 + ] [ sp:object spin:_this ;
2754 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
2755 + sp:subject
2756 + [ sp:varName "target"^^xsd:string
2757 + ]
2758 + ] [ sp:object
2759 + [ sp:varName "target"^^xsd:string
2760 + ] ;
2761 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
2762 + sp:subject
2763 + [ sp:varName "quantityOfMaterial"^^xsd:string
2764 + ]
2765 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
2766 + sp:predicate rdf:type ;
2767 + sp:subject
2768 + [ sp:varName "quantityOfMaterial"^^xsd:string
2769 + ]
2770 + ] [ rdf:type sp:NotExists ;
2771 + sp:elements ([ sp:object
2772 + [ sp:varName "volume"^^xsd:string
2773 + ] ;
2774 + sp:predicate rdf:type ;
2775 + sp:subject
2776 + [ sp:varName "quantityOfMaterial"^^xsd:string
2777 + ]
2778 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
2779 + sp:predicate rdf:type ;
2780 + sp:subject
2781 + [ sp:varName "volume"^^xsd:string
2782 + ]
2783 + ])
2784 + ] [ sp:object
2785 + [ sp:varName "realVolume"^^xsd:string
2786 + ] ;
2787 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
2788 + sp:subject spin:_this
2789 + ] [ sp:object
2790 + [ sp:varName "uomVolume"^^xsd:string
2791 + ] ;
2792 + sp:predicate <http://www.epim.no/schemas/mprml/1#uomRef> ;
2793 + sp:subject spin:_this
2794 + ] [ rdf:type sp:Bind ;
2795 + sp:expression
2796 + [ rdf:type ep-mpr-spin-lib:selectVolumeScale ;
2797 + sp:arg1 [ sp:varName "uomVolume"^^xsd:string
2798 + ]
2799 + ] ;
2800 + sp:variable
2801 + [ sp:varName "volumeScale"^^xsd:string
2802 + ]
2803 + ] [ rdf:type sp:Optional ;
2804 + sp:elements ([ sp:object
2805 + [ sp:varName "statusRef"^^xsd:string
2806 + ] ;
2807 + sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
2808 + sp:subject spin:_this
2809 + ] [ rdf:type sp:Bind ;
2810 + sp:expression
2811 + [ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
2812 + sp:arg1 [ sp:varName "statusRef"^^xsd:string
2813 + ]
2814 + ] ;
2815 + sp:variable
2816 + [ sp:varName "measuredQualityType"^^xsd:string
2817 + ]
2818 + ])
2819 + ])
2820 + ] ;
2821 + spin:rule
2822 + [ rdf:type sp:Construct ;
2823 + rdfs:comment "STEP 90171e Process volume for a quantity of material - volume for not for a specified state - no status exists - volume does not exist"^^xsd:string ;
2824 + sp:templates ([ sp:object _:b46 ;
2825 + sp:predicate rdf:type ;
2826 + sp:subject
2827 + [ sp:varName "quantityOfMaterial"^^xsd:string
2828 + ]
2829 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
2830 + sp:predicate rdf:type ;
2831 + sp:subject _:b46
2832 + ] [ sp:object
2833 + [ sp:varName "realVolume"^^xsd:string
2834 + ] ;
2835 + sp:predicate
2836 + [ sp:varName "volumeScale"^^xsd:string
2837 + ] ;
2838 + sp:subject _:b46
2839 + ]) ;
2840 + sp:where ([ sp:object spin:_this ;
2841 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
2842 + sp:subject
2843 + [ sp:varName "target"^^xsd:string
2551 ] 2844 ]
2552 ] [ rdf:type sp:NotExists ; 2845 ] [ rdf:type sp:NotExists ;
2553 sp:elements ([ sp:object 2846 sp:elements ([ sp:object
2554 [ sp:varName "target"^^xsd:string 2847 [ sp:varName "target"^^xsd:string
2555 ] ; 2848 ] ;
2556 - sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 2849 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeValueRef> ;
2557 sp:subject 2850 sp:subject
2558 - [ sp:varName "quantityOfMaterialx"^^xsd:string 2851 + [ sp:varName "somethingRef"^^xsd:string
2559 ] 2852 ]
2560 - ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ; 2853 + ])
2854 + ] [ sp:object
2855 + [ sp:varName "target"^^xsd:string
2856 + ] ;
2857 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
2858 + sp:subject
2859 + [ sp:varName "quantityOfMaterial"^^xsd:string
2860 + ]
2861 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
2862 + sp:predicate rdf:type ;
2863 + sp:subject
2864 + [ sp:varName "quantityOfMaterial"^^xsd:string
2865 + ]
2866 + ] [ rdf:type sp:NotExists ;
2867 + sp:elements ([ sp:object
2868 + [ sp:varName "volume"^^xsd:string
2869 + ] ;
2561 sp:predicate rdf:type ; 2870 sp:predicate rdf:type ;
2562 sp:subject 2871 sp:subject
2563 - [ sp:varName "quantityOfMaterialx"^^xsd:string 2872 + [ sp:varName "quantityOfMaterial"^^xsd:string
2873 + ]
2874 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
2875 + sp:predicate rdf:type ;
2876 + sp:subject
2877 + [ sp:varName "volume"^^xsd:string
2564 ] 2878 ]
2565 ]) 2879 ])
2566 ] [ sp:object 2880 ] [ sp:object
...@@ -2582,32 +2896,194 @@ except where the quantity of material is derived from a flow"""^^xsd:string ; ...@@ -2582,32 +2896,194 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
2582 sp:variable 2896 sp:variable
2583 [ sp:varName "volumeScale"^^xsd:string 2897 [ sp:varName "volumeScale"^^xsd:string
2584 ] 2898 ]
2899 + ] [ rdf:type sp:NotExists ;
2900 + sp:elements ([ sp:object
2901 + [ sp:varName "statusRef"^^xsd:string
2902 + ] ;
2903 + sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
2904 + sp:subject spin:_this
2905 + ])
2585 ]) 2906 ])
2586 ] ; 2907 ] ;
2587 spin:rule 2908 spin:rule
2588 [ rdf:type sp:Construct ; 2909 [ rdf:type sp:Construct ;
2589 - rdfs:comment "STEP 90070a Process volume for a quantity of material"^^xsd:string ; 2910 + rdfs:comment "STEP 90171a Process volume for a quantity of material - volume exists - volume for a specified state, so associate status with that state"^^xsd:string ;
2590 - sp:templates ([ sp:object _:b43 ; 2911 + sp:templates ([ sp:object
2912 + [ sp:varName "realVolume"^^xsd:string
2913 + ] ;
2914 + sp:predicate
2915 + [ sp:varName "volumeScale"^^xsd:string
2916 + ] ;
2917 + sp:subject
2918 + [ sp:varName "volume"^^xsd:string
2919 + ]
2920 + ] [ sp:object
2921 + [ sp:varName "measuredQualityType"^^xsd:string
2922 + ] ;
2923 + sp:predicate rdf:type ;
2924 + sp:subject
2925 + [ sp:varName "quantityOfMaterial"^^xsd:string
2926 + ]
2927 + ]) ;
2928 + sp:where ([ sp:object
2929 + [ sp:varName "target"^^xsd:string
2930 + ] ;
2931 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeValueRef> ;
2932 + sp:subject
2933 + [ sp:varName "somethingRef"^^xsd:string
2934 + ]
2935 + ] [ sp:object spin:_this ;
2936 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
2937 + sp:subject
2938 + [ sp:varName "target"^^xsd:string
2939 + ]
2940 + ] [ sp:object
2941 + [ sp:varName "target"^^xsd:string
2942 + ] ;
2943 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
2944 + sp:subject
2945 + [ sp:varName "quantityOfMaterial"^^xsd:string
2946 + ]
2947 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
2948 + sp:predicate rdf:type ;
2949 + sp:subject
2950 + [ sp:varName "quantityOfMaterial"^^xsd:string
2951 + ]
2952 + ] [ sp:object
2953 + [ sp:varName "volume"^^xsd:string
2954 + ] ;
2591 sp:predicate rdf:type ; 2955 sp:predicate rdf:type ;
2592 sp:subject 2956 sp:subject
2593 [ sp:varName "quantityOfMaterial"^^xsd:string 2957 [ sp:varName "quantityOfMaterial"^^xsd:string
2594 ] 2958 ]
2595 ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ; 2959 ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
2596 sp:predicate rdf:type ; 2960 sp:predicate rdf:type ;
2597 - sp:subject _:b43 2961 + sp:subject
2962 + [ sp:varName "volume"^^xsd:string
2963 + ]
2598 ] [ sp:object 2964 ] [ sp:object
2599 [ sp:varName "realVolume"^^xsd:string 2965 [ sp:varName "realVolume"^^xsd:string
2600 ] ; 2966 ] ;
2967 + sp:predicate <http://www.linkedmodel.org/schema/dtype#value> ;
2968 + sp:subject spin:_this
2969 + ] [ sp:object
2970 + [ sp:varName "uomVolume"^^xsd:string
2971 + ] ;
2972 + sp:predicate <http://www.epim.no/schemas/mprml/1#uomRef> ;
2973 + sp:subject spin:_this
2974 + ] [ rdf:type sp:Bind ;
2975 + sp:expression
2976 + [ rdf:type ep-mpr-spin-lib:selectVolumeScale ;
2977 + sp:arg1 [ sp:varName "uomVolume"^^xsd:string
2978 + ]
2979 + ] ;
2980 + sp:variable
2981 + [ sp:varName "volumeScale"^^xsd:string
2982 + ]
2983 + ] [ rdf:type sp:Optional ;
2984 + sp:elements ([ sp:object
2985 + [ sp:varName "statusRef"^^xsd:string
2986 + ] ;
2987 + sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
2988 + sp:subject spin:_this
2989 + ] [ rdf:type sp:Bind ;
2990 + sp:expression
2991 + [ rdf:type ep-mpr-spin-lib:selectMeasuredQualityType ;
2992 + sp:arg1 [ sp:varName "statusRef"^^xsd:string
2993 + ]
2994 + ] ;
2995 + sp:variable
2996 + [ sp:varName "measuredQualityType"^^xsd:string
2997 + ]
2998 + ])
2999 + ])
3000 + ] ;
3001 + spin:rule
3002 + [ rdf:type sp:Construct ;
3003 + rdfs:comment "STEP 90170 Process volume for a flow - creating a quantity of material if necessary"^^xsd:string ;
3004 + sp:templates ([ sp:object _:b47 ;
3005 + sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
3006 + sp:subject
3007 + [ sp:varName "flow"^^xsd:string
3008 + ]
3009 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
3010 + sp:predicate rdf:type ;
3011 + sp:subject _:b47
3012 + ] [ sp:object
3013 + [ sp:varName "target"^^xsd:string
3014 + ] ;
3015 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
3016 + sp:subject _:b47
3017 + ]) ;
3018 + sp:where ([ rdf:type sp:Exists ;
3019 + sp:elements ([ rdf:type sp:Union ;
3020 + sp:elements (([ sp:object spin:_this ;
3021 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
3022 + sp:subject
3023 + [ sp:varName "target"^^xsd:string
3024 + ]
3025 + ]) ([ sp:object spin:_this ;
3026 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeStdRef> ;
3027 + sp:subject
3028 + [ sp:varName "target"^^xsd:string
3029 + ]
3030 + ]))
3031 + ])
3032 + ] [ sp:object
3033 + [ sp:varName "target"^^xsd:string
3034 + ] ;
3035 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
3036 + sp:subject
3037 + [ sp:varName "flow"^^xsd:string
3038 + ]
3039 + ] [ sp:object <http://www.reportinghub.no/ep/schema/flow#Flow> ;
3040 + sp:predicate rdf:type ;
3041 + sp:subject
3042 + [ sp:varName "flow"^^xsd:string
3043 + ]
3044 + ] [ rdf:type sp:NotExists ;
3045 + sp:elements ([ sp:object
3046 + [ sp:varName "target"^^xsd:string
3047 + ] ;
3048 + sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
3049 + sp:subject
3050 + [ sp:varName "quantityOfMaterialx"^^xsd:string
3051 + ]
3052 + ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
3053 + sp:predicate rdf:type ;
3054 + sp:subject
3055 + [ sp:varName "quantityOfMaterialx"^^xsd:string
3056 + ]
3057 + ])
3058 + ])
3059 + ] ;
3060 + spin:rule
3061 + [ rdf:type sp:Construct ;
3062 + rdfs:comment "STEP 90171d Process volume for a quantity of material - volume for not for a specified state - no status exists - volume exists"^^xsd:string ;
3063 + sp:templates ([ sp:object
3064 + [ sp:varName "realVolume"^^xsd:string
3065 + ] ;
2601 sp:predicate 3066 sp:predicate
2602 [ sp:varName "volumeScale"^^xsd:string 3067 [ sp:varName "volumeScale"^^xsd:string
2603 ] ; 3068 ] ;
2604 - sp:subject _:b43 3069 + sp:subject
3070 + [ sp:varName "volume"^^xsd:string
3071 + ]
2605 ]) ; 3072 ]) ;
2606 sp:where ([ sp:object spin:_this ; 3073 sp:where ([ sp:object spin:_this ;
2607 sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ; 3074 sp:predicate <http://www.epim.no/schemas/mprml/1#volumeRef> ;
2608 sp:subject 3075 sp:subject
2609 [ sp:varName "target"^^xsd:string 3076 [ sp:varName "target"^^xsd:string
2610 ] 3077 ]
3078 + ] [ rdf:type sp:NotExists ;
3079 + sp:elements ([ sp:object
3080 + [ sp:varName "target"^^xsd:string
3081 + ] ;
3082 + sp:predicate <http://www.epim.no/schemas/mprml/1#volumeValueRef> ;
3083 + sp:subject
3084 + [ sp:varName "somethingRef"^^xsd:string
3085 + ]
3086 + ])
2611 ] [ sp:object 3087 ] [ sp:object
2612 [ sp:varName "target"^^xsd:string 3088 [ sp:varName "target"^^xsd:string
2613 ] ; 3089 ] ;
...@@ -2620,6 +3096,18 @@ except where the quantity of material is derived from a flow"""^^xsd:string ; ...@@ -2620,6 +3096,18 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
2620 sp:subject 3096 sp:subject
2621 [ sp:varName "quantityOfMaterial"^^xsd:string 3097 [ sp:varName "quantityOfMaterial"^^xsd:string
2622 ] 3098 ]
3099 + ] [ sp:object
3100 + [ sp:varName "volume"^^xsd:string
3101 + ] ;
3102 + sp:predicate rdf:type ;
3103 + sp:subject
3104 + [ sp:varName "quantityOfMaterial"^^xsd:string
3105 + ]
3106 + ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Volume> ;
3107 + sp:predicate rdf:type ;
3108 + sp:subject
3109 + [ sp:varName "volume"^^xsd:string
3110 + ]
2623 ] [ rdf:type sp:NotExists ; 3111 ] [ rdf:type sp:NotExists ;
2624 sp:elements ([ sp:object 3112 sp:elements ([ sp:object
2625 [ sp:varName "target"^^xsd:string 3113 [ sp:varName "target"^^xsd:string
...@@ -2653,6 +3141,13 @@ except where the quantity of material is derived from a flow"""^^xsd:string ; ...@@ -2653,6 +3141,13 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
2653 sp:variable 3141 sp:variable
2654 [ sp:varName "volumeScale"^^xsd:string 3142 [ sp:varName "volumeScale"^^xsd:string
2655 ] 3143 ]
3144 + ] [ rdf:type sp:NotExists ;
3145 + sp:elements ([ sp:object
3146 + [ sp:varName "statusRef"^^xsd:string
3147 + ] ;
3148 + sp:predicate <http://www.epim.no/schemas/mprml/1#statusRef> ;
3149 + sp:subject spin:_this
3150 + ])
2656 ]) 3151 ])
2657 ] . 3152 ] .
2658 3153
...@@ -2660,21 +3155,21 @@ except where the quantity of material is derived from a flow"""^^xsd:string ; ...@@ -2660,21 +3155,21 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
2660 spin:rule 3155 spin:rule
2661 [ rdf:type sp:Construct ; 3156 [ rdf:type sp:Construct ;
2662 rdfs:comment "STEP 90031 Process work for a quantity of material"^^xsd:string ; 3157 rdfs:comment "STEP 90031 Process work for a quantity of material"^^xsd:string ;
2663 - sp:templates ([ sp:object _:b44 ; 3158 + sp:templates ([ sp:object _:b48 ;
2664 sp:predicate rdf:type ; 3159 sp:predicate rdf:type ;
2665 sp:subject 3160 sp:subject
2666 [ sp:varName "quantityOfMaterial"^^xsd:string 3161 [ sp:varName "quantityOfMaterial"^^xsd:string
2667 ] 3162 ]
2668 ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Work> ; 3163 ] [ sp:object <http://www.reportinghub.no/ep/schema/core#Work> ;
2669 sp:predicate rdf:type ; 3164 sp:predicate rdf:type ;
2670 - sp:subject _:b44 3165 + sp:subject _:b48
2671 ] [ sp:object 3166 ] [ sp:object
2672 [ sp:varName "realWork"^^xsd:string 3167 [ sp:varName "realWork"^^xsd:string
2673 ] ; 3168 ] ;
2674 sp:predicate 3169 sp:predicate
2675 [ sp:varName "workScale"^^xsd:string 3170 [ sp:varName "workScale"^^xsd:string
2676 ] ; 3171 ] ;
2677 - sp:subject _:b44 3172 + sp:subject _:b48
2678 ]) ; 3173 ]) ;
2679 sp:where ([ sp:object spin:_this ; 3174 sp:where ([ sp:object spin:_this ;
2680 sp:predicate <http://www.epim.no/schemas/mprml/1#workRef> ; 3175 sp:predicate <http://www.epim.no/schemas/mprml/1#workRef> ;
...@@ -2784,19 +3279,19 @@ except where the quantity of material is derived from a flow"""^^xsd:string ; ...@@ -2784,19 +3279,19 @@ except where the quantity of material is derived from a flow"""^^xsd:string ;
2784 spin:rule 3279 spin:rule
2785 [ rdf:type sp:Construct ; 3280 [ rdf:type sp:Construct ;
2786 rdfs:comment "STEP 90030b Ensure that a quantity of material is derived from the target - flow does not have quantity of material"^^xsd:string ; 3281 rdfs:comment "STEP 90030b Ensure that a quantity of material is derived from the target - flow does not have quantity of material"^^xsd:string ;
2787 - sp:templates ([ sp:object _:b45 ; 3282 + sp:templates ([ sp:object _:b49 ;
2788 sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ; 3283 sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
2789 sp:subject 3284 sp:subject
2790 [ sp:varName "flow"^^xsd:string 3285 [ sp:varName "flow"^^xsd:string
2791 ] 3286 ]
2792 ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ; 3287 ] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
2793 sp:predicate rdf:type ; 3288 sp:predicate rdf:type ;
2794 - sp:subject _:b45 3289 + sp:subject _:b49
2795 ] [ sp:object 3290 ] [ sp:object
2796 [ sp:varName "target"^^xsd:string 3291 [ sp:varName "target"^^xsd:string
2797 ] ; 3292 ] ;
2798 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ; 3293 sp:predicate <http://www.reportinghub.no/ep/transform/transform-helper-schema#derivedFrom> ;
2799 - sp:subject _:b45 3294 + sp:subject _:b49
2800 ]) ; 3295 ]) ;
2801 sp:where ([ rdf:type sp:Exists ; 3296 sp:where ([ rdf:type sp:Exists ;
2802 sp:elements ([ sp:object spin:_this ; 3297 sp:elements ([ sp:object spin:_this ;
......