Skip to content

Commit

Permalink
Merge pull request NeTEx-CEN#14 from entur/nand_nor_boolean_operators
Browse files Browse the repository at this point in the history
Add support for NAND, NOR, XNOR as a LogicalOperation.
  • Loading branch information
seime authored Nov 4, 2020
2 parents ad89a56 + 5cbd8d5 commit 55cd207
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ Rail transport, Roads and Road transport
</xsd:complexContent>
</xsd:complexType>
<!-- ======================================================================= -->
<xsd:simpleType name="BooleanOperatorEnumeration">
<xsd:simpleType name="LogicalOperationEnumeration">
<xsd:annotation>
<xsd:documentation>Allowed values for Boolean operations.</xsd:documentation>
<xsd:documentation>Allowed values for logical operations. See https://en.wikipedia.org/wiki/Logic_gate</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="AND">
Expand All @@ -107,17 +107,32 @@ Rail transport, Roads and Road transport
</xsd:enumeration>
<xsd:enumeration value="OR">
<xsd:annotation>
<xsd:documentation>Successive elements are logically ORed together; comparison must satisfy at least one specified value.</xsd:documentation>
<xsd:documentation>Successive elements are logically ORed together; comparison must satisfy at least one specified value.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="NOT">
<xsd:annotation>
<xsd:documentation>Specified elements must be different from the given value.</xsd:documentation>
<xsd:documentation>Specified elements must be different from the given value. If the number of specified elements is equal to 1, the function negates it. If the number of specified elements > 1, this operator is equal to the NOR operator</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="XOR">
<xsd:annotation>
<xsd:documentation>Successive elements are logically ORed together; comparison must satisfy only one specified value.</xsd:documentation>
<xsd:documentation>Successive elements are logically ORed together; comparison must satisfy only one specified value.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="NAND">
<xsd:annotation>
<xsd:documentation>Successive elements are logically ANDed together; comparison must satisfy all specified values. The result is then negated.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="NOR">
<xsd:annotation>
<xsd:documentation>Successive elements are logically ORed together; comparison must satisfy at least one specified value. The result is then negated.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="XNOR">
<xsd:annotation>
<xsd:documentation>Successive elements are logically ORed together; comparison must satisfy only one specified value. The result is then negated.</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Rail transport, Roads and Road transport
<xsd:documentation>Limiting USAGE PARAMETER Elements or ACCESS RIGHT PARAMETER ASSIGNMENT.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="LimitationGroupingType" type="BooleanOperatorEnumeration" default="AND" minOccurs="0">
<xsd:element name="LimitationGroupingType" type="LogicalOperationEnumeration" default="AND" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Operator for Grouping Scope Elements: logical OR, AND, NOT. Default is AND.</xsd:documentation>
</xsd:annotation>
Expand All @@ -289,7 +289,7 @@ Rail transport, Roads and Road transport
<xsd:documentation>Comparison Operator for comparing Validity Erlements valeus. Defalut is EQ.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="ValidityParameterGroupingType" type="BooleanOperatorEnumeration" default="AND" minOccurs="0">
<xsd:element name="ValidityParameterGroupingType" type="LogicalOperationEnumeration" default="AND" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Operator for Grouping Scope Elements: logical OR, AND, NOT. Default is AND.</xsd:documentation>
</xsd:annotation>
Expand Down Expand Up @@ -735,7 +735,7 @@ Rail transport, Roads and Road transport
<xsd:documentation>Elements for compound GENERIC PARAMETER ASSIGNMENT.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="IncludesGroupingType" type="BooleanOperatorEnumeration" default="OR" minOccurs="0">
<xsd:element name="IncludesGroupingType" type="LogicalOperationEnumeration" default="OR" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Operator for Grouping Scope Elements. Default is OR.</xsd:documentation>
</xsd:annotation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ Rail transport, Roads and Road transport
<xsd:documentation>Elements for Compound SPECIFIC PARAMETER ASSIGNMENT.</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="IncludesGroupingType" type="BooleanOperatorEnumeration" default="OR" minOccurs="0">
<xsd:element name="IncludesGroupingType" type="LogicalOperationEnumeration" default="OR" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Operator for Grouping Scope Elements. Default is OR.</xsd:documentation>
</xsd:annotation>
Expand Down

0 comments on commit 55cd207

Please sign in to comment.