POSC Specifications: Epicentre Version 3.0 | Logical Data Model |
Fix parsing problems in where rules.
CHANGE ERP_change_rules ALTER ENTITY activity; WHERE ALTER dri1 : SELF :<>: containing_activity (*<CHANGE>The "IN" syntax requires an aggregate. Use "instance equal" instead.*); ALTER val1 : (ref_transient_period.identifier = 'event') AND ((NOT (EXISTS (start_time) OR (EXISTS (end_time)))) OR (start_time = end_time)) (*<CHANGE>The next to last closed paren was in the wrong place (also move an open paren). Insure that neither start_time nor end_time exists.*); ALTER val2 : ((ref_transient_period.identifier <> 'year to date') AND (ref_transient_period.identifier <> 'month to date') AND (ref_transient_period.identifier <> 'cumulative') ) OR (((ref_transient_period.identifier = 'year to date') OR (ref_transient_period.identifier = 'month to date') OR (ref_transient_period.identifier = 'cumulative') ) AND EXISTS(end_time) ) (*<CHANGE>Alter to match the textual description of the intent.*); ALTER val3 : ((ref_transient_period.identifier <> 'annual') AND (ref_transient_period.identifier <> 'semiannual') AND (ref_transient_period.identifier <> 'quarter') AND (ref_transient_period.identifier <> 'monthly') AND (ref_transient_period.identifier <> 'daily') AND (ref_transient_period.identifier <> 'hourly') ) OR (((ref_transient_period.identifier = 'annual') OR (ref_transient_period.identifier = 'semiannual') OR (ref_transient_period.identifier = 'quarter') OR (ref_transient_period.identifier = 'monthly') OR (ref_transient_period.identifier = 'daily') OR (ref_transient_period.identifier = 'hourly') ) AND (EXISTS(start_time) AND EXISTS(end_time) ) OR NOT(EXISTS(start_time) OR EXISTS(end_time)) ) (*<CHANGE>Alter to match the textual description of the intent.*); END_ENTITY; ALTER ENTITY contract_designation; WHERE ALTER sri : NOT (address IN business_associate.address) (*<CHANGE>Change "value less than or equal" to "instance not in aggregate".*); END_ENTITY; ALTER ENTITY contractual_obligation; WHERE ALTER sri : SIZEOF (QUERY (c <* contract_clause | (c.contract :=: contract))) <> 0 (*<CHANGE>Use instance comparison rather than value comparison.*); END_ENTITY; ALTER ENTITY data_collection; WHERE ALTER ose : NOT (EXISTS (updated_by) AND EXISTS (populated_by)) (*<CHANGE>EXISTS() was missing around the second updated_by. Use a simpler form.*); END_ENTITY; ALTER ENTITY graphical_element; WHERE ALTER dri : NOT (SELF :=: depicted_object) (*<CHANGE>change IN to "instance equal" since depicted_object is not an aggregate.*); END_ENTITY; ALTER ENTITY pty_legal_survey_location; WHERE ALTER mse99 : EXISTS (legal_survey_area) XOR ( EXISTS (north_south_line) XOR EXISTS (east_west_line)) (*<CHANGE>EXIST can only apply to one instance at a time.*); END_ENTITY; ALTER ENTITY pty_transient_property; WHERE ALTER val1 : (ref_transient_period.identifier = 'event') AND ((NOT (EXISTS (start_time) OR (EXISTS (end_time)))) OR (start_time = end_time)) (*<CHANGE>The next to last closed paren was in the wrong place (also move an open paren). Insure that neither start_time nor end_time exists. This is the same change as was made for Activity.*); ALTER val2 : ((ref_transient_period.identifier <> 'year to date') AND (ref_transient_period.identifier <> 'month to date') AND (ref_transient_period.identifier <> 'cumulative') ) OR (((ref_transient_period.identifier = 'year to date') OR (ref_transient_period.identifier = 'month to date') OR (ref_transient_period.identifier = 'cumulative') ) AND EXISTS(end_time) ) (*<CHANGE>Add ".identifier". Alter to match the textual description of the intent.*); ALTER val3 : ((ref_transient_period.identifier <> 'annual') AND (ref_transient_period.identifier <> 'semiannual') AND (ref_transient_period.identifier <> 'quarter') AND (ref_transient_period.identifier <> 'monthly') AND (ref_transient_period.identifier <> 'daily') AND (ref_transient_period.identifier <> 'hourly') ) OR (((ref_transient_period.identifier = 'annual') OR (ref_transient_period.identifier = 'semiannual') OR (ref_transient_period.identifier = 'quarter') OR (ref_transient_period.identifier = 'monthly') OR (ref_transient_period.identifier = 'daily') OR (ref_transient_period.identifier = 'hourly') ) AND (EXISTS(start_time) AND EXISTS(end_time) ) OR NOT(EXISTS(start_time) OR EXISTS(end_time)) ) (*<CHANGE>Add ".identifier". Alter to match the textual description of the intent.*); END_ENTITY; ALTER ENTITY seismic_data_set; WHERE ALTER dri2 : NOT (derived_from IN derived_data) (*<CHANGE>Instead of an instance compare, perform an aggregate compare.*); END_ENTITY; ALTER ENTITY transient_association; WHERE ALTER val99 : (ref_transient_period.identifier = 'event') AND ((NOT (EXISTS (start_time) OR (EXISTS (end_time)))) OR (start_time = end_time)) (*<CHANGE>The next to last closed paren was in the wrong place (also move an open paren). Insure that neither start_time nor end_time exists. This is the same change as was made for Activity.*); ALTER val2 : ((ref_transient_period.identifier <> 'year to date') AND (ref_transient_period.identifier <> 'month to date') AND (ref_transient_period.identifier <> 'cumulative') ) OR (((ref_transient_period.identifier = 'year to date') OR (ref_transient_period.identifier = 'month to date') OR (ref_transient_period.identifier = 'cumulative') ) AND EXISTS (end_time) ) (*<CHANGE>Alter to match the textual description of the intent.*); ALTER val3 : ((ref_transient_period.identifier <> 'annual') AND (ref_transient_period.identifier <> 'semiannual') AND (ref_transient_period.identifier <> 'quarter') AND (ref_transient_period.identifier <> 'monthly') AND (ref_transient_period.identifier <> 'daily') AND (ref_transient_period.identifier <> 'hourly') ) OR (((ref_transient_period.identifier = 'annual') OR (ref_transient_period.identifier = 'semiannual') OR (ref_transient_period.identifier = 'quarter') OR (ref_transient_period.identifier = 'monthly') OR (ref_transient_period.identifier = 'daily') OR (ref_transient_period.identifier = 'hourly') ) AND (EXISTS(start_time) AND EXISTS(end_time) ) OR NOT(EXISTS(start_time) OR EXISTS(end_time)) ) (*<CHANGE>Alter to match the textual description of the intent.*); END_ENTITY; ALTER ENTITY wavelet_or_filter; WHERE ALTER val3 : ((ref_wavelet_or_filter.identifier = 'wavelet') and exists (impulse_response)) or (ref_wavelet_or_filter.identifier <> 'wavelet') (*<CHANGE>Add ".identifier".*); ALTER val4 : ( (ref_wavelet_or_filter.identifier <> 'wavelet') and not (exists (dominant_period) or exists (dominant_wavelength)) ) or (ref_wavelet_or_filter.identifier = 'wavelet') (*<CHANGE>Add ".identifier".*); END_ENTITY; ALTER ENTITY well_test_recovery; WHERE ALTER mse : EXISTS (fluid_component) XOR (EXISTS (fluid_phase) XOR EXISTS (reservoir_fluid_system)) (*<CHANGE>Put parens in correct place.*); END_ENTITY; ALTER ENTITY well_test_trace; WHERE ALTER ose : (exists(well_completion) xor exists(temporary_completion)) xor not (exists(well_completion) or exists(temporary_completion)) (*<CHANGE>Add EXISTS.*); END_ENTITY; ALTER ENTITY wellbore_geologic_target; WHERE ALTER sri : next_target.wellbore :=: wellbore (*<CHANGE>Change value comparison to instance comparison.*); END_ENTITY; END_CHANGE;