Upload
andrew-jackson
View
220
Download
2
Embed Size (px)
Citation preview
The European Organisation for the Safety of Air Navigation
AIXM 5.1 – Business rules
AIXM XML Developers' Seminar
AIXM 5.1 – Business rules 2
Content
• What are AIXM Business rules ?
• Presentation of Schematron
• Presentation of Eurocontrol AIXM Rules Checker – ARC
AIXM 5.1 – Business rules 3
Validation of AIXM 5.1
Syntactic check
- Does the data make sense?- Is it compliant with international standards ?- Do I respect recommended practices?- …
Semantic check
Rules
=
- Check the compliance of an XML dataset with the XSD grammar- Performed by standard XML parsers (e.g. xerxes, MSXML, XMLSpy, etc.)
AIXM 5.1UML
PropertiesWithSchedule(from Schedules)
<<object>>
ContactInformation
name : TextNameTypetitle : TextNameType
(from Address)
<<object>>
FlightRestrictionRoute
priorPermission : CodeYesNoType
<<object>>
0..*
+contact
0..*
hasContactInstructions
FlightRestriction
designator : CodeFlightRestrictionDesignatorType...type : CodeFlightRestrictionTypeinstruction : TextInstructionType
<<feature>>
0..*
+regulatedRoute
0..*
regulatesUseOf
FlightRoutingElement
orderNumber : NoSequenceTypespeed : ValSpeedTypespeedReference : CodeSpeedReferenceTypespeedCriteria : CodeComparisonType
<<object>>
1..*+routeElement 1..*
isSequenceOf
FlightConditionCombination
logicalOperator : CodeFlowConditionOperationType
<<object>>
1+flight
1
appliesToFlight
FlightConditionCircumstance<<object>>
FlightRestrictionLevel<<object>>
0..* +flightLevel0..*
isRestrictedTo
FlightConditionElement
index : NoSequenceType
<<object>>
0..*+element 0..*
hasOperand
0..1
+operationalCondition
0..1
hasCondition
0..*
+flightLevel
0..*
isApplicableAt
FlightConditionElementChoice<<choice>>
1 +flightCondition1
is
AIXM 5.1XML
Airportfeatures
AIXM 5.1XSD
AIXM 5.1 – Business rules 4
Business Rules or Validation Rules ?• Definition of “business rules” has been standardized by OMG since Jan 2008
• See Semantics of Business Vocabulary and Business Rules (SBVR), v1.0• Chapter 12.1.2 • Annex A.2.3
AIXM 5.1 – Business rules 5
Business Rules vs Validation Rules ?
• OMG specification makes no difference based on validation means
• It identifies two types of business rules • Structural rules• Operative rules
• AIXM 5 will adopt this terminology and identify the following business rules:• AIXM Structural rules: the enumerations of values
(datatypes)• AIXM Operative rules: rules extracted from official
documents (ICAO Annexes), minimum data rules, consistency rules, recommended practices, coding rules…
AIXM 5.1 – Business rules 6
AIXM Operative Business rules
• Scope:• List of mandatory elements for AIXM 4.5 baseline
information• A set of rules extracted from ICAO Annexes• AIXM GML profile• Arinc424-based rules for AIXM 5.0.• EAD rules for Obstacle• …
• Work on this subject is underway
AIXM 5.1 – Business rules 7
Validation of AIXM 5.1
Syntactic check Semantic check
AIXM 5.1UML
PropertiesWithSchedule(from Schedules)
<<object>>
ContactInformation
name : TextNameTypetitle : TextNameType
(from Address)
<<object>>
FlightRestrictionRoute
priorPermission : CodeYesNoType
<<object>>
0..*
+contact
0..*
hasContactInstructions
FlightRestriction
designator : CodeFlightRestrictionDesignatorType...type : CodeFlightRestrictionTypeinstruction : TextInstructionType
<<feature>>
0..*
+regulatedRoute
0..*
regulatesUseOf
FlightRoutingElement
orderNumber : NoSequenceTypespeed : ValSpeedTypespeedReference : CodeSpeedReferenceTypespeedCriteria : CodeComparisonType
<<object>>
1..*+routeElement 1..*
isSequenceOf
FlightConditionCombination
logicalOperator : CodeFlowConditionOperationType
<<object>>
1+flight
1
appliesToFlight
FlightConditionCircumstance<<object>>
FlightRestrictionLevel<<object>>
0..* +flightLevel0..*
isRestrictedTo
FlightConditionElement
index : NoSequenceType
<<object>>
0..*+element 0..*
hasOperand
0..1
+operationalCondition
0..1
hasCondition
0..*
+flightLevel
0..*
isApplicableAt
FlightConditionElementChoice<<choice>>
1 +flightCondition1
is
AIXM 5.1XML
Airportfeatures
AIXM 5.1XSD
Structural Rules
Operative Rules
How to encode these rules ?
AIXM 5.1 – Business rules 8
Schematron
• Schematron (http://www.schematron.com/)• is an open language for the validation of XML document… • …whose specification is standardized (ISO/IEC 19757)
• There are 6 basic elements in ISO Schematron: assertion, rule, pattern, schema, namespace and phase.
AIXM 5.1 – Business rules 9
Schematron
• <assert> and <report> elements• Simple declarative sentences in natural language• <assert> used to tag assertions positively
<!-- The assert element matches if test is false --><assert test="//designator">An AirportHeliport shall have a designator.</assert>
• <rule> element• Used to group assertions• Has a context: if the context matches, the assertions are tested
AIXM 5.1 – Business rules 10
Schematron
• <pattern> elements• Used to group rules having the same objective
• <phase> elements• Used to group patterns
• <schema> and <namespace> elements• Root Elements
AIXM 5.1 – Business rules 11
Schematron – Example #1 (simple)A424: an AF leg requires a turn direction
<rule id="1" context="//SegmentLeg[@legTypeARINC='AF'] ">
<assert id="1_1" test="boolean(@turnDirection)"></assert>
</rule>
<rule id="1" -> unique identifier of the rule
context="// SegmentLeg[@legTypeARINC='AF'] "->Defines the conditions of the rule (If attribute SegmentLeg.legTypeARINC= “AF”). ->The rule will be tested if the context is true.
<assert id="1_1"-> unique identifier of the assertion
test="boolean(@turnDirection)"-> the logical test to be performed. The “assert” element matches if the logical test returns false (in this case, if the turnDirection is not provided).
Translation in AIXM: property turnDirection is required for a SegmentLeg of type AF
SegmentLeg
endConditionDesignator : CodeSegmentTerminationTypelegPath : CodeTrajectoryTypelegTypeARINC : CodeSegmentPathTypecourse : ValBearingTypecourseType : CodeCourseTypecourseDirection : CodeDirectionReferenceTypeturnDirection : CodeDirectionTurnTypespeedLimit : ValSpeedTypespeedReference : CodeSpeedReferenceTypespeedInterpretation : CodeAltitudeUseTypebankAngle : ValAngleTypelength : ValDistanceTypeduration : ValDurationTypeprocedureTurnRequired : CodeYesNoTypeupperLimitAltitude : ValDistanceVerticalTypeupperLimitReference : CodeVerticalReferenceTypelowerLimitAltitude : ValDistanceVerticalTypelowerLimitReference : CodeVerticalReferenceTypealtitudeInterpretation : CodeAltitudeUseTypealtitudeOverrideATC : ValDistanceVerticalTypealtitudeOverrideReference : CodeVerticalReferenceTypeverticalAngle : ValAngleType
<<feature>>
Simplified Schematron example<SegmentLeg>
<legTypeARINC>AF</legTypeARINC><turnDirection>L</turnDirection>
</SegmentLeg>
AIXM 5.1 – Business rules 12
Schematron – Example #2 (less simple)
• A424: The intercept angle of CI or VI in Loc based Approach transition must be between 10 and 90 degrees.
not(./parent::*/parent::*/parent::*/parent::*/parent::*/aixm:codingStandard = 'ARINC_424_18') or not(saxon:evaluate(arcext:getXPath(@xlink:href))/*/*[aixm:legTypeARINC='CI' or aixm:legTypeARINC='VI']) or not(./aixm:type='FINAL' and ./parent::*/parent::aixm:InstrumentApproachProcedureTimeSlice[aixm:approachType='LOC_BC' or aixm:approachType='LOC_DME_BC' or aixm:approachType='IGS' or aixm:approachType='ILS' or aixm:approachType='ILS_PRM' or aixm:approachType='LOC' or aixm:approachType='LOC_DME' or aixm:approachType='SDF' or aixm:approachType='LDA' or aixm:approachType='LDA_DME' or aixm:approachType='ILS_DME']) or not(./parent::*/parent::*/following-sibling::*//aixm:theSegmentLeg) or saxon:evaluate(arcext:getXPath((./parent::*/parent::*/following-sibling::*//aixm:theSegmentLeg)[1]/@xlink:href))/*/*[aixm:legTypeARINC = 'IF'] or (if(saxon:evaluate(arcext:getXPath((./parent::*/parent::*/following-sibling::*//aixm:theSegmentLeg)[1]/@xlink:href))/*/*[aixm:legTypeARINC = 'AF']) then (if(saxon:evaluate(arcext:getXPath((./parent::*/parent::*/following-sibling::*//aixm:theSegmentLeg)[1]/@xlink:href))/*/*[aixm:turnDirection = 'LEFT']) then (arcext:courseDiff(saxon:evaluate(arcext:getXPath(@xlink:href))/*/*/aixm:course, arcext:substractAngle(saxon:evaluate(arcext:getXPath((./parent::*/parent::*/following-sibling::*//aixm:theSegmentLeg)[1]/@xlink:href))/*/*/aixm:course , 90.0)) <= 90.0 and arcext:courseDiff(saxon:evaluate(arcext:getXPath(@xlink:href))/*/*/aixm:course, arcext:substractAngle(saxon:evaluate(arcext:getXPath((./parent::*/parent::*/following-sibling::*//aixm:theSegmentLeg)[1]/@xlink:href))/*/*/aixm:course , 90.0)) >= 10.0) else (arcext:courseDiff(saxon:evaluate(arcext:getXPath(@xlink:href))/*/*/aixm:course, arcext:additionAngle(saxon:evaluate(arcext:getXPath((./parent::*/parent::*/following-sibling::*//aixm:theSegmentLeg)[1]/@xlink:href))/*/*/aixm:course , 90.0)) <= 90.0 and arcext:courseDiff(saxon:evaluate(arcext:getXPath(@xlink:href))/*/*/aixm:course, arcext:additionAngle(saxon:evaluate(arcext:getXPath((./parent::*/parent::*/following-sibling::*//aixm:theSegmentLeg)[1]/@xlink:href))/*/*/aixm:course , 90.0)) >= 10.0)) else (arcext:courseDiff(saxon:evaluate(arcext:getXPath(@xlink:href))/*/*/aixm:course, saxon:evaluate(arcext:getXPath((./parent::*/parent::*/following-sibling::*//aixm:theSegmentLeg)[1]/@xlink:href))/*/*/aixm:course) <= 90.0 and arcext:courseDiff(saxon:evaluate(arcext:getXPath(@xlink:href))/*/*/aixm:course, saxon:evaluate(arcext:getXPath((./parent::*/parent::*/following-sibling::*//aixm:theSegmentLeg)[1]/@xlink:href))/*/*/aixm:course) >= 10.0))
AIXM 5.1 – Business rules 13
ARC (AIXM Rules Checker)
• ARC is a proof-of-concept tool provided by Eurocontrol:• Open source• Compliant with Schematron standard• Based on Java and Web technologies HTML, Javascript and
CSS
• Main features of ARC:• Creation of profiles (Example of profiles: AIXM 4.5, AIXM
5.0)• Schematron validation of XML data, according to the
selected profile• Generation and display of a validation report with detected
errors
AIXM 5.1 – Business rules 14
ARC (AIXM Rules Checker)
• The result of the validation is an XML Report• every item in the XML source data that does not comply with
a specific business rule is reported• details of the incompliance detected is provided. • It is possible to qualify the incompliance in a number of
levels (fatal error, error, warning).
AIXM 5.1 – Business rules 15
ARC (AIXM Rules Checker)
• ARC was improved in 2009• New Java engine to run the Schematron validation• New Java extension:
• Support the XML namespaces• ARC can now evaluate xlink:href• Perform geographical computations in WGS84