summaryrefslogtreecommitdiff
path: root/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org')
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/BooleanExpression.java47
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/BooleanLiteral.java87
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ClassAttribute.java225
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ComparisonOperator.java326
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ComparisonPredicate.java118
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DownCastPredicate.java143
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DyadicExpression.java199
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DyadicLogicalOperator.java219
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/FilterexprFactory.java148
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/FilterexprPackage.java1559
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/InOperator.java218
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/InPredicate.java186
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/IsSetPredicate.java60
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ListOperator.java243
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/Literal.java25
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/MetaOperator.java188
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/MultiplicityPredicate.java194
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/Predicate.java28
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/SignedIntegerLiteral.java87
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/StringLiteral.java87
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/SubClassPredicate.java141
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/UnaryExpression.java91
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/UnaryLogicalOperator.java191
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/BooleanExpressionImpl.java67
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/BooleanLiteralImpl.java204
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/ClassAttributeImpl.java587
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/ComparisonPredicateImpl.java580
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/DownCastPredicateImpl.java412
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/DyadicExpressionImpl.java593
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/FilterexprFactoryImpl.java394
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/FilterexprPackageImpl.java934
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/InPredicateImpl.java613
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/IsSetPredicateImpl.java245
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/LiteralImpl.java57
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/MultiplicityPredicateImpl.java638
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/PredicateImpl.java60
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/SignedIntegerLiteralImpl.java204
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/StringLiteralImpl.java207
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/SubClassPredicateImpl.java462
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/UnaryExpressionImpl.java306
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterExprUtil.java714
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterexprAdapterFactory.java379
-rwxr-xr-xsrc/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterexprSwitch.java429
43 files changed, 12895 insertions, 0 deletions
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/BooleanExpression.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/BooleanExpression.java
new file mode 100755
index 0000000..ba61597
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/BooleanExpression.java
@@ -0,0 +1,47 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import org.eclipse.emf.ecore.EObject;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Filter Expression</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This is the top level class for boolean expressions.
+ * <!-- end-model-doc -->
+ *
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getBooleanExpression()
+ * @model abstract="true"
+ * @generated
+ */
+public interface BooleanExpression extends EObject {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ boolean evaluate(Object object);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ String format(String indent, String indentSize);
+
+} // FilterExpression
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/BooleanLiteral.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/BooleanLiteral.java
new file mode 100755
index 0000000..3cce8c1
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/BooleanLiteral.java
@@ -0,0 +1,87 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Boolean Literal</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This class represents the boolean literal values 'true' and 'false'.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.BooleanLiteral#isValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getBooleanLiteral()
+ * @model
+ * @generated
+ */
+public interface BooleanLiteral extends Literal {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #isSetValue()
+ * @see #unsetValue()
+ * @see #setValue(boolean)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getBooleanLiteral_Value()
+ * @model unsettable="true" required="true"
+ * @generated
+ */
+ boolean isValue();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.BooleanLiteral#isValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #isSetValue()
+ * @see #unsetValue()
+ * @see #isValue()
+ * @generated
+ */
+ void setValue(boolean value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.BooleanLiteral#isValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetValue()
+ * @see #isValue()
+ * @see #setValue(boolean)
+ * @generated
+ */
+ void unsetValue();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.BooleanLiteral#isValue <em>Value</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Value</em>' attribute is set.
+ * @see #unsetValue()
+ * @see #isValue()
+ * @see #setValue(boolean)
+ * @generated
+ */
+ boolean isSetValue();
+
+} // BooleanLiteral
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ClassAttribute.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ClassAttribute.java
new file mode 100755
index 0000000..63c4871
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ClassAttribute.java
@@ -0,0 +1,225 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Class Attribute</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This class represents an attribute of a class of a data model. The attribute is identified by its name.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.ClassAttribute#getAttributeName <em>Attribute Name</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.ClassAttribute#getMetaOperator <em>Meta Operator</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.ClassAttribute#getIndex <em>Index</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getClassAttribute()
+ * @model
+ * @generated
+ */
+public interface ClassAttribute extends EObject {
+ /**
+ * Returns the value of the '<em><b>Attribute Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Attribute Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Attribute Name</em>' attribute.
+ * @see #isSetAttributeName()
+ * @see #unsetAttributeName()
+ * @see #setAttributeName(String)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getClassAttribute_AttributeName()
+ * @model unsettable="true" required="true"
+ * @generated
+ */
+ String getAttributeName();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getAttributeName <em>Attribute Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Attribute Name</em>' attribute.
+ * @see #isSetAttributeName()
+ * @see #unsetAttributeName()
+ * @see #getAttributeName()
+ * @generated
+ */
+ void setAttributeName(String value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getAttributeName <em>Attribute Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetAttributeName()
+ * @see #getAttributeName()
+ * @see #setAttributeName(String)
+ * @generated
+ */
+ void unsetAttributeName();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getAttributeName <em>Attribute Name</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Attribute Name</em>' attribute is set.
+ * @see #unsetAttributeName()
+ * @see #getAttributeName()
+ * @see #setAttributeName(String)
+ * @generated
+ */
+ boolean isSetAttributeName();
+
+ /**
+ * Returns the value of the '<em><b>Meta Operator</b></em>' attribute.
+ * The literals are from the enumeration {@link org.genivi.booleanexpr.MetaOperator}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Meta Operator</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Meta Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.MetaOperator
+ * @see #isSetMetaOperator()
+ * @see #unsetMetaOperator()
+ * @see #setMetaOperator(MetaOperator)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getClassAttribute_MetaOperator()
+ * @model unsettable="true"
+ * @generated
+ */
+ MetaOperator getMetaOperator();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getMetaOperator <em>Meta Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Meta Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.MetaOperator
+ * @see #isSetMetaOperator()
+ * @see #unsetMetaOperator()
+ * @see #getMetaOperator()
+ * @generated
+ */
+ void setMetaOperator(MetaOperator value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getMetaOperator <em>Meta Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetMetaOperator()
+ * @see #getMetaOperator()
+ * @see #setMetaOperator(MetaOperator)
+ * @generated
+ */
+ void unsetMetaOperator();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getMetaOperator <em>Meta Operator</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Meta Operator</em>' attribute is set.
+ * @see #unsetMetaOperator()
+ * @see #getMetaOperator()
+ * @see #setMetaOperator(MetaOperator)
+ * @generated
+ */
+ boolean isSetMetaOperator();
+
+ /**
+ * Returns the value of the '<em><b>Index</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Index</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Index</em>' attribute.
+ * @see #isSetIndex()
+ * @see #unsetIndex()
+ * @see #setIndex(int)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getClassAttribute_Index()
+ * @model unsettable="true"
+ * @generated
+ */
+ int getIndex();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getIndex <em>Index</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Index</em>' attribute.
+ * @see #isSetIndex()
+ * @see #unsetIndex()
+ * @see #getIndex()
+ * @generated
+ */
+ void setIndex(int value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getIndex <em>Index</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetIndex()
+ * @see #getIndex()
+ * @see #setIndex(int)
+ * @generated
+ */
+ void unsetIndex();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getIndex <em>Index</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Index</em>' attribute is set.
+ * @see #unsetIndex()
+ * @see #getIndex()
+ * @see #setIndex(int)
+ * @generated
+ */
+ boolean isSetIndex();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ boolean isSet(EObject object);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model many="false"
+ * @generated
+ */
+ EList<?> getListValue(Object object);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ Object getValue(Object object);
+
+} // ClassAttribute
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ComparisonOperator.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ComparisonOperator.java
new file mode 100755
index 0000000..b1dacc2
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ComparisonOperator.java
@@ -0,0 +1,326 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Comparison Operator</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This enumeration defines the operators for comparison.
+ * <!-- end-model-doc -->
+ * @see org.genivi.booleanexpr.FilterexprPackage#getComparisonOperator()
+ * @model
+ * @generated
+ */
+public enum ComparisonOperator implements Enumerator {
+ /**
+ * The '<em><b>EQUAL</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #EQUAL_VALUE
+ * @generated
+ * @ordered
+ */
+ EQUAL(0, "EQUAL", "EQUAL"),
+
+ /**
+ * The '<em><b>NOT EQUAL</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #NOT_EQUAL_VALUE
+ * @generated
+ * @ordered
+ */
+ NOT_EQUAL(1, "NOT_EQUAL", "NOT_EQUAL"),
+
+ /**
+ * The '<em><b>GREATER THEN</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #GREATER_THEN_VALUE
+ * @generated
+ * @ordered
+ */
+ GREATER_THEN(2, "GREATER_THEN", "GREATER_THEN"),
+
+ /**
+ * The '<em><b>GREATER OR EQUAL THAN</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #GREATER_OR_EQUAL_THAN_VALUE
+ * @generated
+ * @ordered
+ */
+ GREATER_OR_EQUAL_THAN(3, "GREATER_OR_EQUAL_THAN", "GREATER_OR_EQUAL_THAN"),
+
+ /**
+ * The '<em><b>LESS THAN</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #LESS_THAN_VALUE
+ * @generated
+ * @ordered
+ */
+ LESS_THAN(4, "LESS_THAN", "LESS_THAN"),
+
+ /**
+ * The '<em><b>LESS OR EQUAL THAN</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #LESS_OR_EQUAL_THAN_VALUE
+ * @generated
+ * @ordered
+ */
+ LESS_OR_EQUAL_THAN(5, "LESS_OR_EQUAL_THAN", "LESS_OR_EQUAL_THAN");
+
+ /**
+ * The '<em><b>EQUAL</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>EQUAL</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #EQUAL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int EQUAL_VALUE = 0;
+
+ /**
+ * The '<em><b>NOT EQUAL</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>NOT EQUAL</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #NOT_EQUAL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int NOT_EQUAL_VALUE = 1;
+
+ /**
+ * The '<em><b>GREATER THEN</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>GREATER THEN</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #GREATER_THEN
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int GREATER_THEN_VALUE = 2;
+
+ /**
+ * The '<em><b>GREATER OR EQUAL THAN</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>GREATER OR EQUAL THAN</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #GREATER_OR_EQUAL_THAN
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int GREATER_OR_EQUAL_THAN_VALUE = 3;
+
+ /**
+ * The '<em><b>LESS THAN</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>LESS THAN</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #LESS_THAN
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int LESS_THAN_VALUE = 4;
+
+ /**
+ * The '<em><b>LESS OR EQUAL THAN</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>LESS OR EQUAL THAN</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #LESS_OR_EQUAL_THAN
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int LESS_OR_EQUAL_THAN_VALUE = 5;
+
+ /**
+ * An array of all the '<em><b>Comparison Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final ComparisonOperator[] VALUES_ARRAY =
+ new ComparisonOperator[] {
+ EQUAL,
+ NOT_EQUAL,
+ GREATER_THEN,
+ GREATER_OR_EQUAL_THAN,
+ LESS_THAN,
+ LESS_OR_EQUAL_THAN,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Comparison Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<ComparisonOperator> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Comparison Operator</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ComparisonOperator get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ ComparisonOperator result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Comparison Operator</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ComparisonOperator getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ ComparisonOperator result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Comparison Operator</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ComparisonOperator get(int value) {
+ switch (value) {
+ case EQUAL_VALUE: return EQUAL;
+ case NOT_EQUAL_VALUE: return NOT_EQUAL;
+ case GREATER_THEN_VALUE: return GREATER_THEN;
+ case GREATER_OR_EQUAL_THAN_VALUE: return GREATER_OR_EQUAL_THAN;
+ case LESS_THAN_VALUE: return LESS_THAN;
+ case LESS_OR_EQUAL_THAN_VALUE: return LESS_OR_EQUAL_THAN;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private ComparisonOperator(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //ComparisonOperator
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ComparisonPredicate.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ComparisonPredicate.java
new file mode 100755
index 0000000..ce24fb2
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ComparisonPredicate.java
@@ -0,0 +1,118 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Comparison Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This predicate compares the value of an attribute of a class to a literal value (a constant).
+ * For example "myAttribute == 22".
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.ComparisonPredicate#getLiteral <em>Literal</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.ComparisonPredicate#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.ComparisonPredicate#getComparisonOperator <em>Comparison Operator</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getComparisonPredicate()
+ * @model
+ * @generated
+ */
+public interface ComparisonPredicate extends Predicate {
+ /**
+ * Returns the value of the '<em><b>Comparison Operator</b></em>' attribute.
+ * The literals are from the enumeration {@link org.genivi.booleanexpr.ComparisonOperator}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Comparison Operator</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Comparison Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.ComparisonOperator
+ * @see #setComparisonOperator(ComparisonOperator)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getComparisonPredicate_ComparisonOperator()
+ * @model required="true"
+ * @generated
+ */
+ ComparisonOperator getComparisonOperator();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.ComparisonPredicate#getComparisonOperator <em>Comparison Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Comparison Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.ComparisonOperator
+ * @see #getComparisonOperator()
+ * @generated
+ */
+ void setComparisonOperator(ComparisonOperator value);
+
+ /**
+ * Returns the value of the '<em><b>Literal</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Literal</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Literal</em>' containment reference.
+ * @see #setLiteral(Literal)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getComparisonPredicate_Literal()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ Literal getLiteral();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.ComparisonPredicate#getLiteral <em>Literal</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Literal</em>' containment reference.
+ * @see #getLiteral()
+ * @generated
+ */
+ void setLiteral(Literal value);
+
+ /**
+ * Returns the value of the '<em><b>Attribute</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Attribute</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Attribute</em>' containment reference.
+ * @see #setAttribute(ClassAttribute)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getComparisonPredicate_Attribute()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ ClassAttribute getAttribute();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.ComparisonPredicate#getAttribute <em>Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Attribute</em>' containment reference.
+ * @see #getAttribute()
+ * @generated
+ */
+ void setAttribute(ClassAttribute value);
+
+} // ComparisonPredicate
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DownCastPredicate.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DownCastPredicate.java
new file mode 100755
index 0000000..8d2ea0f
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DownCastPredicate.java
@@ -0,0 +1,143 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Down Cast Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This predicate is used to handle expressions on classes which extend a base class.
+ * Example: Class Person has one attribute 'name'. Class Driver extends Person and adds an attribute 'driversLicenseNo'.
+ * Now anywhere that Person can be used in a data model, it may also be a Driver. But to use a Driver specific attribute, the Person has to be downcast to a Driver.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.DownCastPredicate#getClassName <em>Class Name</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.DownCastPredicate#getExpression <em>Expression</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getDownCastPredicate()
+ * @model
+ * @generated
+ */
+public interface DownCastPredicate extends Predicate {
+ /**
+ * Returns the value of the '<em><b>Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Class Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Class Name</em>' attribute.
+ * @see #isSetClassName()
+ * @see #unsetClassName()
+ * @see #setClassName(String)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getDownCastPredicate_ClassName()
+ * @model unsettable="true" required="true"
+ * @generated
+ */
+ String getClassName();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.DownCastPredicate#getClassName <em>Class Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Class Name</em>' attribute.
+ * @see #isSetClassName()
+ * @see #unsetClassName()
+ * @see #getClassName()
+ * @generated
+ */
+ void setClassName(String value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.DownCastPredicate#getClassName <em>Class Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetClassName()
+ * @see #getClassName()
+ * @see #setClassName(String)
+ * @generated
+ */
+ void unsetClassName();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.DownCastPredicate#getClassName <em>Class Name</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Class Name</em>' attribute is set.
+ * @see #unsetClassName()
+ * @see #getClassName()
+ * @see #setClassName(String)
+ * @generated
+ */
+ boolean isSetClassName();
+
+ /**
+ * Returns the value of the '<em><b>Expression</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Expression</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Expression</em>' containment reference.
+ * @see #isSetExpression()
+ * @see #unsetExpression()
+ * @see #setExpression(BooleanExpression)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getDownCastPredicate_Expression()
+ * @model containment="true" unsettable="true" required="true"
+ * @generated
+ */
+ BooleanExpression getExpression();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.DownCastPredicate#getExpression <em>Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Expression</em>' containment reference.
+ * @see #isSetExpression()
+ * @see #unsetExpression()
+ * @see #getExpression()
+ * @generated
+ */
+ void setExpression(BooleanExpression value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.DownCastPredicate#getExpression <em>Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetExpression()
+ * @see #getExpression()
+ * @see #setExpression(BooleanExpression)
+ * @generated
+ */
+ void unsetExpression();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.DownCastPredicate#getExpression <em>Expression</em>}' containment reference is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Expression</em>' containment reference is set.
+ * @see #unsetExpression()
+ * @see #getExpression()
+ * @see #setExpression(BooleanExpression)
+ * @generated
+ */
+ boolean isSetExpression();
+
+} // DownCastPredicate
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DyadicExpression.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DyadicExpression.java
new file mode 100755
index 0000000..53d2972
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DyadicExpression.java
@@ -0,0 +1,199 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Dyadic Expression</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This is an expression of the form 'expression' DyadicLogicalOperator 'expression', like 'expression' AND 'expression'.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.DyadicExpression#getLogicalOperator <em>Logical Operator</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.DyadicExpression#getLeftHandTerm <em>Left Hand Term</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.DyadicExpression#getRightHandTerm <em>Right Hand Term</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getDyadicExpression()
+ * @model
+ * @generated
+ */
+public interface DyadicExpression extends BooleanExpression {
+ /**
+ * Returns the value of the '<em><b>Logical Operator</b></em>' attribute.
+ * The default value is <code>"AND"</code>.
+ * The literals are from the enumeration {@link org.genivi.booleanexpr.DyadicLogicalOperator}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Logical Operator</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Logical Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.DyadicLogicalOperator
+ * @see #isSetLogicalOperator()
+ * @see #unsetLogicalOperator()
+ * @see #setLogicalOperator(DyadicLogicalOperator)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getDyadicExpression_LogicalOperator()
+ * @model default="AND" unsettable="true" required="true"
+ * @generated
+ */
+ DyadicLogicalOperator getLogicalOperator();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getLogicalOperator <em>Logical Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Logical Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.DyadicLogicalOperator
+ * @see #isSetLogicalOperator()
+ * @see #unsetLogicalOperator()
+ * @see #getLogicalOperator()
+ * @generated
+ */
+ void setLogicalOperator(DyadicLogicalOperator value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getLogicalOperator <em>Logical Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetLogicalOperator()
+ * @see #getLogicalOperator()
+ * @see #setLogicalOperator(DyadicLogicalOperator)
+ * @generated
+ */
+ void unsetLogicalOperator();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getLogicalOperator <em>Logical Operator</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Logical Operator</em>' attribute is set.
+ * @see #unsetLogicalOperator()
+ * @see #getLogicalOperator()
+ * @see #setLogicalOperator(DyadicLogicalOperator)
+ * @generated
+ */
+ boolean isSetLogicalOperator();
+
+ /**
+ * Returns the value of the '<em><b>Left Hand Term</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Left Hand Term</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Left Hand Term</em>' containment reference.
+ * @see #isSetLeftHandTerm()
+ * @see #unsetLeftHandTerm()
+ * @see #setLeftHandTerm(BooleanExpression)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getDyadicExpression_LeftHandTerm()
+ * @model containment="true" unsettable="true" required="true"
+ * @generated
+ */
+ BooleanExpression getLeftHandTerm();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getLeftHandTerm <em>Left Hand Term</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Left Hand Term</em>' containment reference.
+ * @see #isSetLeftHandTerm()
+ * @see #unsetLeftHandTerm()
+ * @see #getLeftHandTerm()
+ * @generated
+ */
+ void setLeftHandTerm(BooleanExpression value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getLeftHandTerm <em>Left Hand Term</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetLeftHandTerm()
+ * @see #getLeftHandTerm()
+ * @see #setLeftHandTerm(BooleanExpression)
+ * @generated
+ */
+ void unsetLeftHandTerm();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getLeftHandTerm <em>Left Hand Term</em>}' containment reference is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Left Hand Term</em>' containment reference is set.
+ * @see #unsetLeftHandTerm()
+ * @see #getLeftHandTerm()
+ * @see #setLeftHandTerm(BooleanExpression)
+ * @generated
+ */
+ boolean isSetLeftHandTerm();
+
+ /**
+ * Returns the value of the '<em><b>Right Hand Term</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Right Hand Term</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Right Hand Term</em>' containment reference.
+ * @see #isSetRightHandTerm()
+ * @see #unsetRightHandTerm()
+ * @see #setRightHandTerm(BooleanExpression)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getDyadicExpression_RightHandTerm()
+ * @model containment="true" unsettable="true" required="true"
+ * @generated
+ */
+ BooleanExpression getRightHandTerm();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getRightHandTerm <em>Right Hand Term</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Right Hand Term</em>' containment reference.
+ * @see #isSetRightHandTerm()
+ * @see #unsetRightHandTerm()
+ * @see #getRightHandTerm()
+ * @generated
+ */
+ void setRightHandTerm(BooleanExpression value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getRightHandTerm <em>Right Hand Term</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetRightHandTerm()
+ * @see #getRightHandTerm()
+ * @see #setRightHandTerm(BooleanExpression)
+ * @generated
+ */
+ void unsetRightHandTerm();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getRightHandTerm <em>Right Hand Term</em>}' containment reference is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Right Hand Term</em>' containment reference is set.
+ * @see #unsetRightHandTerm()
+ * @see #getRightHandTerm()
+ * @see #setRightHandTerm(BooleanExpression)
+ * @generated
+ */
+ boolean isSetRightHandTerm();
+
+} // DyadicExpression
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DyadicLogicalOperator.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DyadicLogicalOperator.java
new file mode 100755
index 0000000..1785bef
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/DyadicLogicalOperator.java
@@ -0,0 +1,219 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Dyadic Logical Operator</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This enumeration defines the operators for DyadicExpressions.
+ * AND has a higher precedence than OR.
+ * <!-- end-model-doc -->
+ * @see org.genivi.booleanexpr.FilterexprPackage#getDyadicLogicalOperator()
+ * @model
+ * @generated
+ */
+public enum DyadicLogicalOperator implements Enumerator {
+ /**
+ * The '<em><b>AND</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #AND_VALUE
+ * @generated
+ * @ordered
+ */
+ AND(0, "AND", "AND"),
+
+ /**
+ * The '<em><b>OR</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #OR_VALUE
+ * @generated
+ * @ordered
+ */
+ OR(1, "OR", "OR");
+
+ /**
+ * The '<em><b>AND</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>AND</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #AND
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int AND_VALUE = 0;
+
+ /**
+ * The '<em><b>OR</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>OR</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #OR
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int OR_VALUE = 1;
+
+ /**
+ * An array of all the '<em><b>Dyadic Logical Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final DyadicLogicalOperator[] VALUES_ARRAY =
+ new DyadicLogicalOperator[] {
+ AND,
+ OR,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Dyadic Logical Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<DyadicLogicalOperator> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Dyadic Logical Operator</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static DyadicLogicalOperator get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ DyadicLogicalOperator result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Dyadic Logical Operator</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static DyadicLogicalOperator getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ DyadicLogicalOperator result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Dyadic Logical Operator</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static DyadicLogicalOperator get(int value) {
+ switch (value) {
+ case AND_VALUE: return AND;
+ case OR_VALUE: return OR;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private DyadicLogicalOperator(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //DyadicLogicalOperator
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/FilterexprFactory.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/FilterexprFactory.java
new file mode 100755
index 0000000..8943b73
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/FilterexprFactory.java
@@ -0,0 +1,148 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.FilterexprPackage
+ * @generated
+ */
+public interface FilterexprFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ FilterexprFactory eINSTANCE = org.genivi.booleanexpr.impl.FilterexprFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Unary Expression</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Unary Expression</em>'.
+ * @generated
+ */
+ UnaryExpression createUnaryExpression();
+
+ /**
+ * Returns a new object of class '<em>Dyadic Expression</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Dyadic Expression</em>'.
+ * @generated
+ */
+ DyadicExpression createDyadicExpression();
+
+ /**
+ * Returns a new object of class '<em>Comparison Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Comparison Predicate</em>'.
+ * @generated
+ */
+ ComparisonPredicate createComparisonPredicate();
+
+ /**
+ * Returns a new object of class '<em>In Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>In Predicate</em>'.
+ * @generated
+ */
+ InPredicate createInPredicate();
+
+ /**
+ * Returns a new object of class '<em>Signed Integer Literal</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Signed Integer Literal</em>'.
+ * @generated
+ */
+ SignedIntegerLiteral createSignedIntegerLiteral();
+
+ /**
+ * Returns a new object of class '<em>String Literal</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>String Literal</em>'.
+ * @generated
+ */
+ StringLiteral createStringLiteral();
+
+ /**
+ * Returns a new object of class '<em>Boolean Literal</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Boolean Literal</em>'.
+ * @generated
+ */
+ BooleanLiteral createBooleanLiteral();
+
+ /**
+ * Returns a new object of class '<em>Sub Class Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Sub Class Predicate</em>'.
+ * @generated
+ */
+ SubClassPredicate createSubClassPredicate();
+
+ /**
+ * Returns a new object of class '<em>Class Attribute</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Class Attribute</em>'.
+ * @generated
+ */
+ ClassAttribute createClassAttribute();
+
+ /**
+ * Returns a new object of class '<em>Down Cast Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Down Cast Predicate</em>'.
+ * @generated
+ */
+ DownCastPredicate createDownCastPredicate();
+
+ /**
+ * Returns a new object of class '<em>Multiplicity Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Multiplicity Predicate</em>'.
+ * @generated
+ */
+ MultiplicityPredicate createMultiplicityPredicate();
+
+ /**
+ * Returns a new object of class '<em>Is Set Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Is Set Predicate</em>'.
+ * @generated
+ */
+ IsSetPredicate createIsSetPredicate();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ FilterexprPackage getFilterexprPackage();
+
+} //FilterexprFactory
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/FilterexprPackage.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/FilterexprPackage.java
new file mode 100755
index 0000000..c507f74
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/FilterexprPackage.java
@@ -0,0 +1,1559 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.FilterexprFactory
+ * @model kind="package"
+ * annotation="GenModel documentation='Copyright (C) 2013 TomTom International B.V.\r\n\r\nThis Source Code Form is subject to the terms of the Mozilla Public\r\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\r\nfile, You can obtain one at http://mozilla.org/MPL/2.0/.'"
+ * @generated
+ */
+public interface FilterexprPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "booleanexpr";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://org.genivi.booleanexpr";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "booleanexpr";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ FilterexprPackage eINSTANCE = org.genivi.booleanexpr.impl.FilterexprPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.BooleanExpressionImpl <em>Boolean Expression</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.BooleanExpressionImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getBooleanExpression()
+ * @generated
+ */
+ int BOOLEAN_EXPRESSION = 0;
+
+ /**
+ * The number of structural features of the '<em>Boolean Expression</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOLEAN_EXPRESSION_FEATURE_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.UnaryExpressionImpl <em>Unary Expression</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.UnaryExpressionImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getUnaryExpression()
+ * @generated
+ */
+ int UNARY_EXPRESSION = 1;
+
+ /**
+ * The feature id for the '<em><b>Unary Operator</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int UNARY_EXPRESSION__UNARY_OPERATOR = BOOLEAN_EXPRESSION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Expression</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int UNARY_EXPRESSION__EXPRESSION = BOOLEAN_EXPRESSION_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Unary Expression</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int UNARY_EXPRESSION_FEATURE_COUNT = BOOLEAN_EXPRESSION_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.PredicateImpl <em>Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.PredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getPredicate()
+ * @generated
+ */
+ int PREDICATE = 2;
+
+ /**
+ * The number of structural features of the '<em>Predicate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PREDICATE_FEATURE_COUNT = BOOLEAN_EXPRESSION_FEATURE_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.DyadicExpressionImpl <em>Dyadic Expression</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.DyadicExpressionImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getDyadicExpression()
+ * @generated
+ */
+ int DYADIC_EXPRESSION = 3;
+
+ /**
+ * The feature id for the '<em><b>Logical Operator</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYADIC_EXPRESSION__LOGICAL_OPERATOR = BOOLEAN_EXPRESSION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Left Hand Term</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYADIC_EXPRESSION__LEFT_HAND_TERM = BOOLEAN_EXPRESSION_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Right Hand Term</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYADIC_EXPRESSION__RIGHT_HAND_TERM = BOOLEAN_EXPRESSION_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Dyadic Expression</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYADIC_EXPRESSION_FEATURE_COUNT = BOOLEAN_EXPRESSION_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.ComparisonPredicateImpl <em>Comparison Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.ComparisonPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getComparisonPredicate()
+ * @generated
+ */
+ int COMPARISON_PREDICATE = 4;
+
+ /**
+ * The feature id for the '<em><b>Literal</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPARISON_PREDICATE__LITERAL = PREDICATE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Attribute</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPARISON_PREDICATE__ATTRIBUTE = PREDICATE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Comparison Operator</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPARISON_PREDICATE__COMPARISON_OPERATOR = PREDICATE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Comparison Predicate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPARISON_PREDICATE_FEATURE_COUNT = PREDICATE_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.InPredicateImpl <em>In Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.InPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getInPredicate()
+ * @generated
+ */
+ int IN_PREDICATE = 5;
+
+ /**
+ * The feature id for the '<em><b>Attribute</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IN_PREDICATE__ATTRIBUTE = PREDICATE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>In Operator</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IN_PREDICATE__IN_OPERATOR = PREDICATE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Literals</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IN_PREDICATE__LITERALS = PREDICATE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>In Predicate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IN_PREDICATE_FEATURE_COUNT = PREDICATE_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.LiteralImpl <em>Literal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.LiteralImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getLiteral()
+ * @generated
+ */
+ int LITERAL = 6;
+
+ /**
+ * The number of structural features of the '<em>Literal</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LITERAL_FEATURE_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.SignedIntegerLiteralImpl <em>Signed Integer Literal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.SignedIntegerLiteralImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getSignedIntegerLiteral()
+ * @generated
+ */
+ int SIGNED_INTEGER_LITERAL = 7;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SIGNED_INTEGER_LITERAL__VALUE = LITERAL_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Signed Integer Literal</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SIGNED_INTEGER_LITERAL_FEATURE_COUNT = LITERAL_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.StringLiteralImpl <em>String Literal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.StringLiteralImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getStringLiteral()
+ * @generated
+ */
+ int STRING_LITERAL = 8;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING_LITERAL__VALUE = LITERAL_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>String Literal</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING_LITERAL_FEATURE_COUNT = LITERAL_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.BooleanLiteralImpl <em>Boolean Literal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.BooleanLiteralImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getBooleanLiteral()
+ * @generated
+ */
+ int BOOLEAN_LITERAL = 9;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOLEAN_LITERAL__VALUE = LITERAL_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Boolean Literal</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOOLEAN_LITERAL_FEATURE_COUNT = LITERAL_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.SubClassPredicateImpl <em>Sub Class Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.SubClassPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getSubClassPredicate()
+ * @generated
+ */
+ int SUB_CLASS_PREDICATE = 10;
+
+ /**
+ * The feature id for the '<em><b>Sub Class Expression</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION = PREDICATE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Sub Class Attribute</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE = PREDICATE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Sub Class Predicate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_CLASS_PREDICATE_FEATURE_COUNT = PREDICATE_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.ClassAttributeImpl <em>Class Attribute</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.ClassAttributeImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getClassAttribute()
+ * @generated
+ */
+ int CLASS_ATTRIBUTE = 11;
+
+ /**
+ * The feature id for the '<em><b>Attribute Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS_ATTRIBUTE__ATTRIBUTE_NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Meta Operator</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS_ATTRIBUTE__META_OPERATOR = 1;
+
+ /**
+ * The feature id for the '<em><b>Index</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS_ATTRIBUTE__INDEX = 2;
+
+ /**
+ * The number of structural features of the '<em>Class Attribute</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CLASS_ATTRIBUTE_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.DownCastPredicateImpl <em>Down Cast Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.DownCastPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getDownCastPredicate()
+ * @generated
+ */
+ int DOWN_CAST_PREDICATE = 12;
+
+ /**
+ * The feature id for the '<em><b>Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOWN_CAST_PREDICATE__CLASS_NAME = PREDICATE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Expression</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOWN_CAST_PREDICATE__EXPRESSION = PREDICATE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Down Cast Predicate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOWN_CAST_PREDICATE_FEATURE_COUNT = PREDICATE_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.MultiplicityPredicateImpl <em>Multiplicity Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.MultiplicityPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getMultiplicityPredicate()
+ * @generated
+ */
+ int MULTIPLICITY_PREDICATE = 13;
+
+ /**
+ * The feature id for the '<em><b>Expression</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MULTIPLICITY_PREDICATE__EXPRESSION = PREDICATE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Attribute</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MULTIPLICITY_PREDICATE__ATTRIBUTE = PREDICATE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>List Operator</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MULTIPLICITY_PREDICATE__LIST_OPERATOR = PREDICATE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Multiplicity Predicate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MULTIPLICITY_PREDICATE_FEATURE_COUNT = PREDICATE_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.impl.IsSetPredicateImpl <em>Is Set Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.IsSetPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getIsSetPredicate()
+ * @generated
+ */
+ int IS_SET_PREDICATE = 14;
+
+ /**
+ * The feature id for the '<em><b>Attribute</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IS_SET_PREDICATE__ATTRIBUTE = PREDICATE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Is Set Predicate</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int IS_SET_PREDICATE_FEATURE_COUNT = PREDICATE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.DyadicLogicalOperator <em>Dyadic Logical Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.DyadicLogicalOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getDyadicLogicalOperator()
+ * @generated
+ */
+ int DYADIC_LOGICAL_OPERATOR = 15;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.UnaryLogicalOperator <em>Unary Logical Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.UnaryLogicalOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getUnaryLogicalOperator()
+ * @generated
+ */
+ int UNARY_LOGICAL_OPERATOR = 16;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.ComparisonOperator <em>Comparison Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.ComparisonOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getComparisonOperator()
+ * @generated
+ */
+ int COMPARISON_OPERATOR = 17;
+
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.ListOperator <em>List Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.ListOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getListOperator()
+ * @generated
+ */
+ int LIST_OPERATOR = 18;
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.InOperator <em>In Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.InOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getInOperator()
+ * @generated
+ */
+ int IN_OPERATOR = 19;
+
+
+ /**
+ * The meta object id for the '{@link org.genivi.booleanexpr.MetaOperator <em>Meta Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.MetaOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getMetaOperator()
+ * @generated
+ */
+ int META_OPERATOR = 20;
+
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.BooleanExpression <em>Boolean Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Boolean Expression</em>'.
+ * @see org.genivi.booleanexpr.BooleanExpression
+ * @generated
+ */
+ EClass getBooleanExpression();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.UnaryExpression <em>Unary Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Unary Expression</em>'.
+ * @see org.genivi.booleanexpr.UnaryExpression
+ * @generated
+ */
+ EClass getUnaryExpression();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.UnaryExpression#getUnaryOperator <em>Unary Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Unary Operator</em>'.
+ * @see org.genivi.booleanexpr.UnaryExpression#getUnaryOperator()
+ * @see #getUnaryExpression()
+ * @generated
+ */
+ EAttribute getUnaryExpression_UnaryOperator();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.UnaryExpression#getExpression <em>Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Expression</em>'.
+ * @see org.genivi.booleanexpr.UnaryExpression#getExpression()
+ * @see #getUnaryExpression()
+ * @generated
+ */
+ EReference getUnaryExpression_Expression();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.Predicate <em>Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Predicate</em>'.
+ * @see org.genivi.booleanexpr.Predicate
+ * @generated
+ */
+ EClass getPredicate();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.DyadicExpression <em>Dyadic Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Dyadic Expression</em>'.
+ * @see org.genivi.booleanexpr.DyadicExpression
+ * @generated
+ */
+ EClass getDyadicExpression();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.DyadicExpression#getLogicalOperator <em>Logical Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Logical Operator</em>'.
+ * @see org.genivi.booleanexpr.DyadicExpression#getLogicalOperator()
+ * @see #getDyadicExpression()
+ * @generated
+ */
+ EAttribute getDyadicExpression_LogicalOperator();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.DyadicExpression#getLeftHandTerm <em>Left Hand Term</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Left Hand Term</em>'.
+ * @see org.genivi.booleanexpr.DyadicExpression#getLeftHandTerm()
+ * @see #getDyadicExpression()
+ * @generated
+ */
+ EReference getDyadicExpression_LeftHandTerm();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.DyadicExpression#getRightHandTerm <em>Right Hand Term</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Right Hand Term</em>'.
+ * @see org.genivi.booleanexpr.DyadicExpression#getRightHandTerm()
+ * @see #getDyadicExpression()
+ * @generated
+ */
+ EReference getDyadicExpression_RightHandTerm();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.ComparisonPredicate <em>Comparison Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Comparison Predicate</em>'.
+ * @see org.genivi.booleanexpr.ComparisonPredicate
+ * @generated
+ */
+ EClass getComparisonPredicate();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.ComparisonPredicate#getComparisonOperator <em>Comparison Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Comparison Operator</em>'.
+ * @see org.genivi.booleanexpr.ComparisonPredicate#getComparisonOperator()
+ * @see #getComparisonPredicate()
+ * @generated
+ */
+ EAttribute getComparisonPredicate_ComparisonOperator();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.ComparisonPredicate#getLiteral <em>Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Literal</em>'.
+ * @see org.genivi.booleanexpr.ComparisonPredicate#getLiteral()
+ * @see #getComparisonPredicate()
+ * @generated
+ */
+ EReference getComparisonPredicate_Literal();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.ComparisonPredicate#getAttribute <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Attribute</em>'.
+ * @see org.genivi.booleanexpr.ComparisonPredicate#getAttribute()
+ * @see #getComparisonPredicate()
+ * @generated
+ */
+ EReference getComparisonPredicate_Attribute();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.InPredicate <em>In Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>In Predicate</em>'.
+ * @see org.genivi.booleanexpr.InPredicate
+ * @generated
+ */
+ EClass getInPredicate();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.InPredicate#getAttribute <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Attribute</em>'.
+ * @see org.genivi.booleanexpr.InPredicate#getAttribute()
+ * @see #getInPredicate()
+ * @generated
+ */
+ EReference getInPredicate_Attribute();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.InPredicate#getInOperator <em>In Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>In Operator</em>'.
+ * @see org.genivi.booleanexpr.InPredicate#getInOperator()
+ * @see #getInPredicate()
+ * @generated
+ */
+ EAttribute getInPredicate_InOperator();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.genivi.booleanexpr.InPredicate#getLiterals <em>Literals</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Literals</em>'.
+ * @see org.genivi.booleanexpr.InPredicate#getLiterals()
+ * @see #getInPredicate()
+ * @generated
+ */
+ EReference getInPredicate_Literals();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.Literal <em>Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Literal</em>'.
+ * @see org.genivi.booleanexpr.Literal
+ * @generated
+ */
+ EClass getLiteral();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.SignedIntegerLiteral <em>Signed Integer Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Signed Integer Literal</em>'.
+ * @see org.genivi.booleanexpr.SignedIntegerLiteral
+ * @generated
+ */
+ EClass getSignedIntegerLiteral();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.SignedIntegerLiteral#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.genivi.booleanexpr.SignedIntegerLiteral#getValue()
+ * @see #getSignedIntegerLiteral()
+ * @generated
+ */
+ EAttribute getSignedIntegerLiteral_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.StringLiteral <em>String Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>String Literal</em>'.
+ * @see org.genivi.booleanexpr.StringLiteral
+ * @generated
+ */
+ EClass getStringLiteral();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.StringLiteral#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.genivi.booleanexpr.StringLiteral#getValue()
+ * @see #getStringLiteral()
+ * @generated
+ */
+ EAttribute getStringLiteral_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.BooleanLiteral <em>Boolean Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Boolean Literal</em>'.
+ * @see org.genivi.booleanexpr.BooleanLiteral
+ * @generated
+ */
+ EClass getBooleanLiteral();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.BooleanLiteral#isValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.genivi.booleanexpr.BooleanLiteral#isValue()
+ * @see #getBooleanLiteral()
+ * @generated
+ */
+ EAttribute getBooleanLiteral_Value();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.SubClassPredicate <em>Sub Class Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Sub Class Predicate</em>'.
+ * @see org.genivi.booleanexpr.SubClassPredicate
+ * @generated
+ */
+ EClass getSubClassPredicate();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassExpression <em>Sub Class Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Sub Class Expression</em>'.
+ * @see org.genivi.booleanexpr.SubClassPredicate#getSubClassExpression()
+ * @see #getSubClassPredicate()
+ * @generated
+ */
+ EReference getSubClassPredicate_SubClassExpression();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassAttribute <em>Sub Class Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Sub Class Attribute</em>'.
+ * @see org.genivi.booleanexpr.SubClassPredicate#getSubClassAttribute()
+ * @see #getSubClassPredicate()
+ * @generated
+ */
+ EReference getSubClassPredicate_SubClassAttribute();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.ClassAttribute <em>Class Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Class Attribute</em>'.
+ * @see org.genivi.booleanexpr.ClassAttribute
+ * @generated
+ */
+ EClass getClassAttribute();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.ClassAttribute#getAttributeName <em>Attribute Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Attribute Name</em>'.
+ * @see org.genivi.booleanexpr.ClassAttribute#getAttributeName()
+ * @see #getClassAttribute()
+ * @generated
+ */
+ EAttribute getClassAttribute_AttributeName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.ClassAttribute#getMetaOperator <em>Meta Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Meta Operator</em>'.
+ * @see org.genivi.booleanexpr.ClassAttribute#getMetaOperator()
+ * @see #getClassAttribute()
+ * @generated
+ */
+ EAttribute getClassAttribute_MetaOperator();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.ClassAttribute#getIndex <em>Index</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Index</em>'.
+ * @see org.genivi.booleanexpr.ClassAttribute#getIndex()
+ * @see #getClassAttribute()
+ * @generated
+ */
+ EAttribute getClassAttribute_Index();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.DownCastPredicate <em>Down Cast Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Down Cast Predicate</em>'.
+ * @see org.genivi.booleanexpr.DownCastPredicate
+ * @generated
+ */
+ EClass getDownCastPredicate();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.DownCastPredicate#getClassName <em>Class Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Class Name</em>'.
+ * @see org.genivi.booleanexpr.DownCastPredicate#getClassName()
+ * @see #getDownCastPredicate()
+ * @generated
+ */
+ EAttribute getDownCastPredicate_ClassName();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.DownCastPredicate#getExpression <em>Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Expression</em>'.
+ * @see org.genivi.booleanexpr.DownCastPredicate#getExpression()
+ * @see #getDownCastPredicate()
+ * @generated
+ */
+ EReference getDownCastPredicate_Expression();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.MultiplicityPredicate <em>Multiplicity Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Multiplicity Predicate</em>'.
+ * @see org.genivi.booleanexpr.MultiplicityPredicate
+ * @generated
+ */
+ EClass getMultiplicityPredicate();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.MultiplicityPredicate#getExpression <em>Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Expression</em>'.
+ * @see org.genivi.booleanexpr.MultiplicityPredicate#getExpression()
+ * @see #getMultiplicityPredicate()
+ * @generated
+ */
+ EReference getMultiplicityPredicate_Expression();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.booleanexpr.MultiplicityPredicate#getListOperator <em>List Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>List Operator</em>'.
+ * @see org.genivi.booleanexpr.MultiplicityPredicate#getListOperator()
+ * @see #getMultiplicityPredicate()
+ * @generated
+ */
+ EAttribute getMultiplicityPredicate_ListOperator();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.MultiplicityPredicate#getAttribute <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Attribute</em>'.
+ * @see org.genivi.booleanexpr.MultiplicityPredicate#getAttribute()
+ * @see #getMultiplicityPredicate()
+ * @generated
+ */
+ EReference getMultiplicityPredicate_Attribute();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.booleanexpr.IsSetPredicate <em>Is Set Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Is Set Predicate</em>'.
+ * @see org.genivi.booleanexpr.IsSetPredicate
+ * @generated
+ */
+ EClass getIsSetPredicate();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.booleanexpr.IsSetPredicate#getAttribute <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Attribute</em>'.
+ * @see org.genivi.booleanexpr.IsSetPredicate#getAttribute()
+ * @see #getIsSetPredicate()
+ * @generated
+ */
+ EReference getIsSetPredicate_Attribute();
+
+ /**
+ * Returns the meta object for enum '{@link org.genivi.booleanexpr.DyadicLogicalOperator <em>Dyadic Logical Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Dyadic Logical Operator</em>'.
+ * @see org.genivi.booleanexpr.DyadicLogicalOperator
+ * @generated
+ */
+ EEnum getDyadicLogicalOperator();
+
+ /**
+ * Returns the meta object for enum '{@link org.genivi.booleanexpr.UnaryLogicalOperator <em>Unary Logical Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Unary Logical Operator</em>'.
+ * @see org.genivi.booleanexpr.UnaryLogicalOperator
+ * @generated
+ */
+ EEnum getUnaryLogicalOperator();
+
+ /**
+ * Returns the meta object for enum '{@link org.genivi.booleanexpr.ComparisonOperator <em>Comparison Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Comparison Operator</em>'.
+ * @see org.genivi.booleanexpr.ComparisonOperator
+ * @generated
+ */
+ EEnum getComparisonOperator();
+
+ /**
+ * Returns the meta object for enum '{@link org.genivi.booleanexpr.ListOperator <em>List Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>List Operator</em>'.
+ * @see org.genivi.booleanexpr.ListOperator
+ * @generated
+ */
+ EEnum getListOperator();
+
+ /**
+ * Returns the meta object for enum '{@link org.genivi.booleanexpr.InOperator <em>In Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>In Operator</em>'.
+ * @see org.genivi.booleanexpr.InOperator
+ * @generated
+ */
+ EEnum getInOperator();
+
+ /**
+ * Returns the meta object for enum '{@link org.genivi.booleanexpr.MetaOperator <em>Meta Operator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Meta Operator</em>'.
+ * @see org.genivi.booleanexpr.MetaOperator
+ * @generated
+ */
+ EEnum getMetaOperator();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ FilterexprFactory getFilterexprFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.BooleanExpressionImpl <em>Boolean Expression</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.BooleanExpressionImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getBooleanExpression()
+ * @generated
+ */
+ EClass BOOLEAN_EXPRESSION = eINSTANCE.getBooleanExpression();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.UnaryExpressionImpl <em>Unary Expression</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.UnaryExpressionImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getUnaryExpression()
+ * @generated
+ */
+ EClass UNARY_EXPRESSION = eINSTANCE.getUnaryExpression();
+
+ /**
+ * The meta object literal for the '<em><b>Unary Operator</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute UNARY_EXPRESSION__UNARY_OPERATOR = eINSTANCE.getUnaryExpression_UnaryOperator();
+
+ /**
+ * The meta object literal for the '<em><b>Expression</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference UNARY_EXPRESSION__EXPRESSION = eINSTANCE.getUnaryExpression_Expression();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.PredicateImpl <em>Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.PredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getPredicate()
+ * @generated
+ */
+ EClass PREDICATE = eINSTANCE.getPredicate();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.DyadicExpressionImpl <em>Dyadic Expression</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.DyadicExpressionImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getDyadicExpression()
+ * @generated
+ */
+ EClass DYADIC_EXPRESSION = eINSTANCE.getDyadicExpression();
+
+ /**
+ * The meta object literal for the '<em><b>Logical Operator</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DYADIC_EXPRESSION__LOGICAL_OPERATOR = eINSTANCE.getDyadicExpression_LogicalOperator();
+
+ /**
+ * The meta object literal for the '<em><b>Left Hand Term</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DYADIC_EXPRESSION__LEFT_HAND_TERM = eINSTANCE.getDyadicExpression_LeftHandTerm();
+
+ /**
+ * The meta object literal for the '<em><b>Right Hand Term</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DYADIC_EXPRESSION__RIGHT_HAND_TERM = eINSTANCE.getDyadicExpression_RightHandTerm();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.ComparisonPredicateImpl <em>Comparison Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.ComparisonPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getComparisonPredicate()
+ * @generated
+ */
+ EClass COMPARISON_PREDICATE = eINSTANCE.getComparisonPredicate();
+
+ /**
+ * The meta object literal for the '<em><b>Comparison Operator</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute COMPARISON_PREDICATE__COMPARISON_OPERATOR = eINSTANCE.getComparisonPredicate_ComparisonOperator();
+
+ /**
+ * The meta object literal for the '<em><b>Literal</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference COMPARISON_PREDICATE__LITERAL = eINSTANCE.getComparisonPredicate_Literal();
+
+ /**
+ * The meta object literal for the '<em><b>Attribute</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference COMPARISON_PREDICATE__ATTRIBUTE = eINSTANCE.getComparisonPredicate_Attribute();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.InPredicateImpl <em>In Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.InPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getInPredicate()
+ * @generated
+ */
+ EClass IN_PREDICATE = eINSTANCE.getInPredicate();
+
+ /**
+ * The meta object literal for the '<em><b>Attribute</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference IN_PREDICATE__ATTRIBUTE = eINSTANCE.getInPredicate_Attribute();
+
+ /**
+ * The meta object literal for the '<em><b>In Operator</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute IN_PREDICATE__IN_OPERATOR = eINSTANCE.getInPredicate_InOperator();
+
+ /**
+ * The meta object literal for the '<em><b>Literals</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference IN_PREDICATE__LITERALS = eINSTANCE.getInPredicate_Literals();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.LiteralImpl <em>Literal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.LiteralImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getLiteral()
+ * @generated
+ */
+ EClass LITERAL = eINSTANCE.getLiteral();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.SignedIntegerLiteralImpl <em>Signed Integer Literal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.SignedIntegerLiteralImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getSignedIntegerLiteral()
+ * @generated
+ */
+ EClass SIGNED_INTEGER_LITERAL = eINSTANCE.getSignedIntegerLiteral();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute SIGNED_INTEGER_LITERAL__VALUE = eINSTANCE.getSignedIntegerLiteral_Value();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.StringLiteralImpl <em>String Literal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.StringLiteralImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getStringLiteral()
+ * @generated
+ */
+ EClass STRING_LITERAL = eINSTANCE.getStringLiteral();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute STRING_LITERAL__VALUE = eINSTANCE.getStringLiteral_Value();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.BooleanLiteralImpl <em>Boolean Literal</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.BooleanLiteralImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getBooleanLiteral()
+ * @generated
+ */
+ EClass BOOLEAN_LITERAL = eINSTANCE.getBooleanLiteral();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute BOOLEAN_LITERAL__VALUE = eINSTANCE.getBooleanLiteral_Value();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.SubClassPredicateImpl <em>Sub Class Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.SubClassPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getSubClassPredicate()
+ * @generated
+ */
+ EClass SUB_CLASS_PREDICATE = eINSTANCE.getSubClassPredicate();
+
+ /**
+ * The meta object literal for the '<em><b>Sub Class Expression</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION = eINSTANCE.getSubClassPredicate_SubClassExpression();
+
+ /**
+ * The meta object literal for the '<em><b>Sub Class Attribute</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE = eINSTANCE.getSubClassPredicate_SubClassAttribute();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.ClassAttributeImpl <em>Class Attribute</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.ClassAttributeImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getClassAttribute()
+ * @generated
+ */
+ EClass CLASS_ATTRIBUTE = eINSTANCE.getClassAttribute();
+
+ /**
+ * The meta object literal for the '<em><b>Attribute Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CLASS_ATTRIBUTE__ATTRIBUTE_NAME = eINSTANCE.getClassAttribute_AttributeName();
+
+ /**
+ * The meta object literal for the '<em><b>Meta Operator</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CLASS_ATTRIBUTE__META_OPERATOR = eINSTANCE.getClassAttribute_MetaOperator();
+
+ /**
+ * The meta object literal for the '<em><b>Index</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute CLASS_ATTRIBUTE__INDEX = eINSTANCE.getClassAttribute_Index();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.DownCastPredicateImpl <em>Down Cast Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.DownCastPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getDownCastPredicate()
+ * @generated
+ */
+ EClass DOWN_CAST_PREDICATE = eINSTANCE.getDownCastPredicate();
+
+ /**
+ * The meta object literal for the '<em><b>Class Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DOWN_CAST_PREDICATE__CLASS_NAME = eINSTANCE.getDownCastPredicate_ClassName();
+
+ /**
+ * The meta object literal for the '<em><b>Expression</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOWN_CAST_PREDICATE__EXPRESSION = eINSTANCE.getDownCastPredicate_Expression();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.MultiplicityPredicateImpl <em>Multiplicity Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.MultiplicityPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getMultiplicityPredicate()
+ * @generated
+ */
+ EClass MULTIPLICITY_PREDICATE = eINSTANCE.getMultiplicityPredicate();
+
+ /**
+ * The meta object literal for the '<em><b>Expression</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MULTIPLICITY_PREDICATE__EXPRESSION = eINSTANCE.getMultiplicityPredicate_Expression();
+
+ /**
+ * The meta object literal for the '<em><b>List Operator</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MULTIPLICITY_PREDICATE__LIST_OPERATOR = eINSTANCE.getMultiplicityPredicate_ListOperator();
+
+ /**
+ * The meta object literal for the '<em><b>Attribute</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MULTIPLICITY_PREDICATE__ATTRIBUTE = eINSTANCE.getMultiplicityPredicate_Attribute();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.impl.IsSetPredicateImpl <em>Is Set Predicate</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.impl.IsSetPredicateImpl
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getIsSetPredicate()
+ * @generated
+ */
+ EClass IS_SET_PREDICATE = eINSTANCE.getIsSetPredicate();
+
+ /**
+ * The meta object literal for the '<em><b>Attribute</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference IS_SET_PREDICATE__ATTRIBUTE = eINSTANCE.getIsSetPredicate_Attribute();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.DyadicLogicalOperator <em>Dyadic Logical Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.DyadicLogicalOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getDyadicLogicalOperator()
+ * @generated
+ */
+ EEnum DYADIC_LOGICAL_OPERATOR = eINSTANCE.getDyadicLogicalOperator();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.UnaryLogicalOperator <em>Unary Logical Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.UnaryLogicalOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getUnaryLogicalOperator()
+ * @generated
+ */
+ EEnum UNARY_LOGICAL_OPERATOR = eINSTANCE.getUnaryLogicalOperator();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.ComparisonOperator <em>Comparison Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.ComparisonOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getComparisonOperator()
+ * @generated
+ */
+ EEnum COMPARISON_OPERATOR = eINSTANCE.getComparisonOperator();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.ListOperator <em>List Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.ListOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getListOperator()
+ * @generated
+ */
+ EEnum LIST_OPERATOR = eINSTANCE.getListOperator();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.InOperator <em>In Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.InOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getInOperator()
+ * @generated
+ */
+ EEnum IN_OPERATOR = eINSTANCE.getInOperator();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.booleanexpr.MetaOperator <em>Meta Operator</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.MetaOperator
+ * @see org.genivi.booleanexpr.impl.FilterexprPackageImpl#getMetaOperator()
+ * @generated
+ */
+ EEnum META_OPERATOR = eINSTANCE.getMetaOperator();
+
+ }
+
+} //FilterexprPackage
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/InOperator.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/InOperator.java
new file mode 100755
index 0000000..390aec2
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/InOperator.java
@@ -0,0 +1,218 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>In Operator</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This enumeration defines the operators for an InPredicate.
+ * <!-- end-model-doc -->
+ * @see org.genivi.booleanexpr.FilterexprPackage#getInOperator()
+ * @model
+ * @generated
+ */
+public enum InOperator implements Enumerator {
+ /**
+ * The '<em><b>IN</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #IN_VALUE
+ * @generated
+ * @ordered
+ */
+ IN(0, "IN", "IN"),
+
+ /**
+ * The '<em><b>NOT IN</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #NOT_IN_VALUE
+ * @generated
+ * @ordered
+ */
+ NOT_IN(1, "NOT_IN", "NOT_IN");
+
+ /**
+ * The '<em><b>IN</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>IN</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #IN
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int IN_VALUE = 0;
+
+ /**
+ * The '<em><b>NOT IN</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>NOT IN</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #NOT_IN
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int NOT_IN_VALUE = 1;
+
+ /**
+ * An array of all the '<em><b>In Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final InOperator[] VALUES_ARRAY =
+ new InOperator[] {
+ IN,
+ NOT_IN,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>In Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<InOperator> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>In Operator</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static InOperator get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ InOperator result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>In Operator</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static InOperator getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ InOperator result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>In Operator</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static InOperator get(int value) {
+ switch (value) {
+ case IN_VALUE: return IN;
+ case NOT_IN_VALUE: return NOT_IN;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private InOperator(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //InOperator
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/InPredicate.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/InPredicate.java
new file mode 100755
index 0000000..abd13a0
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/InPredicate.java
@@ -0,0 +1,186 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import org.eclipse.emf.common.util.EList;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>In Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This predicate checks whether an attribute value is in, or not in, a set of values.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.InPredicate#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.InPredicate#getInOperator <em>In Operator</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.InPredicate#getLiterals <em>Literals</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getInPredicate()
+ * @model
+ * @generated
+ */
+public interface InPredicate extends Predicate {
+
+ /**
+ * Returns the value of the '<em><b>Attribute</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Attribute</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Attribute</em>' containment reference.
+ * @see #isSetAttribute()
+ * @see #unsetAttribute()
+ * @see #setAttribute(ClassAttribute)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getInPredicate_Attribute()
+ * @model containment="true" unsettable="true" required="true"
+ * @generated
+ */
+ ClassAttribute getAttribute();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.InPredicate#getAttribute <em>Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Attribute</em>' containment reference.
+ * @see #isSetAttribute()
+ * @see #unsetAttribute()
+ * @see #getAttribute()
+ * @generated
+ */
+ void setAttribute(ClassAttribute value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.InPredicate#getAttribute <em>Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetAttribute()
+ * @see #getAttribute()
+ * @see #setAttribute(ClassAttribute)
+ * @generated
+ */
+ void unsetAttribute();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.InPredicate#getAttribute <em>Attribute</em>}' containment reference is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Attribute</em>' containment reference is set.
+ * @see #unsetAttribute()
+ * @see #getAttribute()
+ * @see #setAttribute(ClassAttribute)
+ * @generated
+ */
+ boolean isSetAttribute();
+
+ /**
+ * Returns the value of the '<em><b>In Operator</b></em>' attribute.
+ * The literals are from the enumeration {@link org.genivi.booleanexpr.InOperator}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>In Operator</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>In Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.InOperator
+ * @see #isSetInOperator()
+ * @see #unsetInOperator()
+ * @see #setInOperator(InOperator)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getInPredicate_InOperator()
+ * @model unsettable="true" required="true"
+ * @generated
+ */
+ InOperator getInOperator();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.InPredicate#getInOperator <em>In Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>In Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.InOperator
+ * @see #isSetInOperator()
+ * @see #unsetInOperator()
+ * @see #getInOperator()
+ * @generated
+ */
+ void setInOperator(InOperator value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.InPredicate#getInOperator <em>In Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetInOperator()
+ * @see #getInOperator()
+ * @see #setInOperator(InOperator)
+ * @generated
+ */
+ void unsetInOperator();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.InPredicate#getInOperator <em>In Operator</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>In Operator</em>' attribute is set.
+ * @see #unsetInOperator()
+ * @see #getInOperator()
+ * @see #setInOperator(InOperator)
+ * @generated
+ */
+ boolean isSetInOperator();
+
+ /**
+ * Returns the value of the '<em><b>Literals</b></em>' containment reference list.
+ * The list contents are of type {@link org.genivi.booleanexpr.Literal}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Literals</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Literals</em>' containment reference list.
+ * @see #isSetLiterals()
+ * @see #unsetLiterals()
+ * @see org.genivi.booleanexpr.FilterexprPackage#getInPredicate_Literals()
+ * @model containment="true" unsettable="true"
+ * @generated
+ */
+ EList<Literal> getLiterals();
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.InPredicate#getLiterals <em>Literals</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetLiterals()
+ * @see #getLiterals()
+ * @generated
+ */
+ void unsetLiterals();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.InPredicate#getLiterals <em>Literals</em>}' containment reference list is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Literals</em>' containment reference list is set.
+ * @see #unsetLiterals()
+ * @see #getLiterals()
+ * @generated
+ */
+ boolean isSetLiterals();
+} // InPredicate
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/IsSetPredicate.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/IsSetPredicate.java
new file mode 100755
index 0000000..5b8ec7e
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/IsSetPredicate.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Is Set Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This predicate checks whether an optional value is set or not.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.IsSetPredicate#getAttribute <em>Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getIsSetPredicate()
+ * @model
+ * @generated
+ */
+public interface IsSetPredicate extends Predicate {
+ /**
+ * Returns the value of the '<em><b>Attribute</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Attribute</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Attribute</em>' containment reference.
+ * @see #setAttribute(ClassAttribute)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getIsSetPredicate_Attribute()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ ClassAttribute getAttribute();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.IsSetPredicate#getAttribute <em>Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Attribute</em>' containment reference.
+ * @see #getAttribute()
+ * @generated
+ */
+ void setAttribute(ClassAttribute value);
+
+} // IsSetPredicate
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ListOperator.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ListOperator.java
new file mode 100755
index 0000000..1c966b1
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/ListOperator.java
@@ -0,0 +1,243 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>List Operator</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This enumeration defines the operators for a MultiplicityPredicate.
+ * <!-- end-model-doc -->
+ * @see org.genivi.booleanexpr.FilterexprPackage#getListOperator()
+ * @model
+ * @generated
+ */
+public enum ListOperator implements Enumerator {
+ /**
+ * The '<em><b>ANY</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #ANY_VALUE
+ * @generated
+ * @ordered
+ */
+ ANY(0, "ANY", "ANY"),
+
+ /**
+ * The '<em><b>ALL</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #ALL_VALUE
+ * @generated
+ * @ordered
+ */
+ ALL(1, "ALL", "ALL"), /**
+ * The '<em><b>NONE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #NONE_VALUE
+ * @generated
+ * @ordered
+ */
+ NONE(2, "NONE", "NONE");
+
+ /**
+ * The '<em><b>ANY</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ANY</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #ANY
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int ANY_VALUE = 0;
+
+ /**
+ * The '<em><b>ALL</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>ALL</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #ALL
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int ALL_VALUE = 1;
+
+ /**
+ * The '<em><b>NONE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #NONE
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int NONE_VALUE = 2;
+
+ /**
+ * An array of all the '<em><b>List Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final ListOperator[] VALUES_ARRAY =
+ new ListOperator[] {
+ ANY,
+ ALL,
+ NONE,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>List Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<ListOperator> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>List Operator</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ListOperator get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ ListOperator result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>List Operator</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ListOperator getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ ListOperator result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>List Operator</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ListOperator get(int value) {
+ switch (value) {
+ case ANY_VALUE: return ANY;
+ case ALL_VALUE: return ALL;
+ case NONE_VALUE: return NONE;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private ListOperator(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //ListOperator
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/Literal.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/Literal.java
new file mode 100755
index 0000000..cba102d
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/Literal.java
@@ -0,0 +1,25 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Literal</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getLiteral()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Literal extends EObject {
+} // Literal
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/MetaOperator.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/MetaOperator.java
new file mode 100755
index 0000000..1093295
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/MetaOperator.java
@@ -0,0 +1,188 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Meta Operator</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.FilterexprPackage#getMetaOperator()
+ * @model
+ * @generated
+ */
+public enum MetaOperator implements Enumerator {
+ /**
+ * The '<em><b>SIZE</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #SIZE_VALUE
+ * @generated
+ * @ordered
+ */
+ SIZE(0, "SIZE", "SIZE");
+
+ /**
+ * The '<em><b>SIZE</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>SIZE</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #SIZE
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int SIZE_VALUE = 0;
+
+ /**
+ * An array of all the '<em><b>Meta Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final MetaOperator[] VALUES_ARRAY =
+ new MetaOperator[] {
+ SIZE,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Meta Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<MetaOperator> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Meta Operator</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static MetaOperator get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ MetaOperator result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Meta Operator</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static MetaOperator getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ MetaOperator result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Meta Operator</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static MetaOperator get(int value) {
+ switch (value) {
+ case SIZE_VALUE: return SIZE;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private MetaOperator(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //MetaOperator
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/MultiplicityPredicate.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/MultiplicityPredicate.java
new file mode 100755
index 0000000..f51bc0b
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/MultiplicityPredicate.java
@@ -0,0 +1,194 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Multiplicity Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.MultiplicityPredicate#getExpression <em>Expression</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.MultiplicityPredicate#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.MultiplicityPredicate#getListOperator <em>List Operator</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getMultiplicityPredicate()
+ * @model
+ * @generated
+ */
+public interface MultiplicityPredicate extends Predicate {
+ /**
+ * Returns the value of the '<em><b>Expression</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Expression</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Expression</em>' containment reference.
+ * @see #isSetExpression()
+ * @see #unsetExpression()
+ * @see #setExpression(BooleanExpression)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getMultiplicityPredicate_Expression()
+ * @model containment="true" unsettable="true" required="true"
+ * @generated
+ */
+ BooleanExpression getExpression();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getExpression <em>Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Expression</em>' containment reference.
+ * @see #isSetExpression()
+ * @see #unsetExpression()
+ * @see #getExpression()
+ * @generated
+ */
+ void setExpression(BooleanExpression value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getExpression <em>Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetExpression()
+ * @see #getExpression()
+ * @see #setExpression(BooleanExpression)
+ * @generated
+ */
+ void unsetExpression();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getExpression <em>Expression</em>}' containment reference is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Expression</em>' containment reference is set.
+ * @see #unsetExpression()
+ * @see #getExpression()
+ * @see #setExpression(BooleanExpression)
+ * @generated
+ */
+ boolean isSetExpression();
+
+ /**
+ * Returns the value of the '<em><b>List Operator</b></em>' attribute.
+ * The literals are from the enumeration {@link org.genivi.booleanexpr.ListOperator}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>List Operator</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>List Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.ListOperator
+ * @see #isSetListOperator()
+ * @see #unsetListOperator()
+ * @see #setListOperator(ListOperator)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getMultiplicityPredicate_ListOperator()
+ * @model unsettable="true" required="true"
+ * @generated
+ */
+ ListOperator getListOperator();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getListOperator <em>List Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>List Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.ListOperator
+ * @see #isSetListOperator()
+ * @see #unsetListOperator()
+ * @see #getListOperator()
+ * @generated
+ */
+ void setListOperator(ListOperator value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getListOperator <em>List Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetListOperator()
+ * @see #getListOperator()
+ * @see #setListOperator(ListOperator)
+ * @generated
+ */
+ void unsetListOperator();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getListOperator <em>List Operator</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>List Operator</em>' attribute is set.
+ * @see #unsetListOperator()
+ * @see #getListOperator()
+ * @see #setListOperator(ListOperator)
+ * @generated
+ */
+ boolean isSetListOperator();
+
+ /**
+ * Returns the value of the '<em><b>Attribute</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Attribute</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Attribute</em>' containment reference.
+ * @see #isSetAttribute()
+ * @see #unsetAttribute()
+ * @see #setAttribute(ClassAttribute)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getMultiplicityPredicate_Attribute()
+ * @model containment="true" unsettable="true" required="true"
+ * @generated
+ */
+ ClassAttribute getAttribute();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getAttribute <em>Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Attribute</em>' containment reference.
+ * @see #isSetAttribute()
+ * @see #unsetAttribute()
+ * @see #getAttribute()
+ * @generated
+ */
+ void setAttribute(ClassAttribute value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getAttribute <em>Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetAttribute()
+ * @see #getAttribute()
+ * @see #setAttribute(ClassAttribute)
+ * @generated
+ */
+ void unsetAttribute();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getAttribute <em>Attribute</em>}' containment reference is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Attribute</em>' containment reference is set.
+ * @see #unsetAttribute()
+ * @see #getAttribute()
+ * @see #setAttribute(ClassAttribute)
+ * @generated
+ */
+ boolean isSetAttribute();
+
+} // MultiplicityPredicate
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/Predicate.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/Predicate.java
new file mode 100755
index 0000000..7248fe4
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/Predicate.java
@@ -0,0 +1,28 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This is the top level class for predicates.
+ * <!-- end-model-doc -->
+ *
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getPredicate()
+ * @model abstract="true"
+ * @generated
+ */
+public interface Predicate extends BooleanExpression {
+} // Predicate
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/SignedIntegerLiteral.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/SignedIntegerLiteral.java
new file mode 100755
index 0000000..263f1b7
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/SignedIntegerLiteral.java
@@ -0,0 +1,87 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Signed Integer Literal</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * An optionally signed integer values.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.SignedIntegerLiteral#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getSignedIntegerLiteral()
+ * @model
+ * @generated
+ */
+public interface SignedIntegerLiteral extends Literal {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #isSetValue()
+ * @see #unsetValue()
+ * @see #setValue(long)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getSignedIntegerLiteral_Value()
+ * @model unsettable="true" required="true"
+ * @generated
+ */
+ long getValue();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.SignedIntegerLiteral#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #isSetValue()
+ * @see #unsetValue()
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(long value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.SignedIntegerLiteral#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetValue()
+ * @see #getValue()
+ * @see #setValue(long)
+ * @generated
+ */
+ void unsetValue();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.SignedIntegerLiteral#getValue <em>Value</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Value</em>' attribute is set.
+ * @see #unsetValue()
+ * @see #getValue()
+ * @see #setValue(long)
+ * @generated
+ */
+ boolean isSetValue();
+
+} // SignedIntegerLiteral
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/StringLiteral.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/StringLiteral.java
new file mode 100755
index 0000000..e38e37f
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/StringLiteral.java
@@ -0,0 +1,87 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>String Literal</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * A String value.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.StringLiteral#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getStringLiteral()
+ * @model
+ * @generated
+ */
+public interface StringLiteral extends Literal {
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #isSetValue()
+ * @see #unsetValue()
+ * @see #setValue(String)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getStringLiteral_Value()
+ * @model unsettable="true" required="true"
+ * @generated
+ */
+ String getValue();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.StringLiteral#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #isSetValue()
+ * @see #unsetValue()
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(String value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.StringLiteral#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetValue()
+ * @see #getValue()
+ * @see #setValue(String)
+ * @generated
+ */
+ void unsetValue();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.StringLiteral#getValue <em>Value</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Value</em>' attribute is set.
+ * @see #unsetValue()
+ * @see #getValue()
+ * @see #setValue(String)
+ * @generated
+ */
+ boolean isSetValue();
+
+} // StringLiteral
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/SubClassPredicate.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/SubClassPredicate.java
new file mode 100755
index 0000000..7e4e65f
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/SubClassPredicate.java
@@ -0,0 +1,141 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Sub Class Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This predicate is used to evaluate an expression on a subclass of the current class.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassExpression <em>Sub Class Expression</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassAttribute <em>Sub Class Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getSubClassPredicate()
+ * @model
+ * @generated
+ */
+public interface SubClassPredicate extends Predicate {
+ /**
+ * Returns the value of the '<em><b>Sub Class Expression</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sub Class Expression</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sub Class Expression</em>' containment reference.
+ * @see #isSetSubClassExpression()
+ * @see #unsetSubClassExpression()
+ * @see #setSubClassExpression(BooleanExpression)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getSubClassPredicate_SubClassExpression()
+ * @model containment="true" unsettable="true" required="true"
+ * @generated
+ */
+ BooleanExpression getSubClassExpression();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassExpression <em>Sub Class Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Sub Class Expression</em>' containment reference.
+ * @see #isSetSubClassExpression()
+ * @see #unsetSubClassExpression()
+ * @see #getSubClassExpression()
+ * @generated
+ */
+ void setSubClassExpression(BooleanExpression value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassExpression <em>Sub Class Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetSubClassExpression()
+ * @see #getSubClassExpression()
+ * @see #setSubClassExpression(BooleanExpression)
+ * @generated
+ */
+ void unsetSubClassExpression();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassExpression <em>Sub Class Expression</em>}' containment reference is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Sub Class Expression</em>' containment reference is set.
+ * @see #unsetSubClassExpression()
+ * @see #getSubClassExpression()
+ * @see #setSubClassExpression(BooleanExpression)
+ * @generated
+ */
+ boolean isSetSubClassExpression();
+
+ /**
+ * Returns the value of the '<em><b>Sub Class Attribute</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sub Class Attribute</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sub Class Attribute</em>' containment reference.
+ * @see #isSetSubClassAttribute()
+ * @see #unsetSubClassAttribute()
+ * @see #setSubClassAttribute(ClassAttribute)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getSubClassPredicate_SubClassAttribute()
+ * @model containment="true" unsettable="true" required="true"
+ * @generated
+ */
+ ClassAttribute getSubClassAttribute();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassAttribute <em>Sub Class Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Sub Class Attribute</em>' containment reference.
+ * @see #isSetSubClassAttribute()
+ * @see #unsetSubClassAttribute()
+ * @see #getSubClassAttribute()
+ * @generated
+ */
+ void setSubClassAttribute(ClassAttribute value);
+
+ /**
+ * Unsets the value of the '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassAttribute <em>Sub Class Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetSubClassAttribute()
+ * @see #getSubClassAttribute()
+ * @see #setSubClassAttribute(ClassAttribute)
+ * @generated
+ */
+ void unsetSubClassAttribute();
+
+ /**
+ * Returns whether the value of the '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassAttribute <em>Sub Class Attribute</em>}' containment reference is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Sub Class Attribute</em>' containment reference is set.
+ * @see #unsetSubClassAttribute()
+ * @see #getSubClassAttribute()
+ * @see #setSubClassAttribute(ClassAttribute)
+ * @generated
+ */
+ boolean isSetSubClassAttribute();
+
+} // SubClassPredicate
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/UnaryExpression.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/UnaryExpression.java
new file mode 100755
index 0000000..f8dd628
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/UnaryExpression.java
@@ -0,0 +1,91 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>unary Expression</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This is an expression of the form UnaryLogicalOperator 'expression', like: NOT 'expression'.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.UnaryExpression#getUnaryOperator <em>Unary Operator</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.UnaryExpression#getExpression <em>Expression</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage#getUnaryExpression()
+ * @model
+ * @generated
+ */
+public interface UnaryExpression extends BooleanExpression {
+ /**
+ * Returns the value of the '<em><b>Unary Operator</b></em>' attribute.
+ * The default value is <code>"NOT"</code>.
+ * The literals are from the enumeration {@link org.genivi.booleanexpr.UnaryLogicalOperator}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Unary Operator</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Unary Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.UnaryLogicalOperator
+ * @see #setUnaryOperator(UnaryLogicalOperator)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getUnaryExpression_UnaryOperator()
+ * @model default="NOT" required="true"
+ * @generated
+ */
+ UnaryLogicalOperator getUnaryOperator();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.UnaryExpression#getUnaryOperator <em>Unary Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Unary Operator</em>' attribute.
+ * @see org.genivi.booleanexpr.UnaryLogicalOperator
+ * @see #getUnaryOperator()
+ * @generated
+ */
+ void setUnaryOperator(UnaryLogicalOperator value);
+
+ /**
+ * Returns the value of the '<em><b>Expression</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Expression</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Expression</em>' containment reference.
+ * @see #setExpression(BooleanExpression)
+ * @see org.genivi.booleanexpr.FilterexprPackage#getUnaryExpression_Expression()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ BooleanExpression getExpression();
+
+ /**
+ * Sets the value of the '{@link org.genivi.booleanexpr.UnaryExpression#getExpression <em>Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Expression</em>' containment reference.
+ * @see #getExpression()
+ * @generated
+ */
+ void setExpression(BooleanExpression value);
+
+} // unaryExpression
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/UnaryLogicalOperator.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/UnaryLogicalOperator.java
new file mode 100755
index 0000000..fc5b01a
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/UnaryLogicalOperator.java
@@ -0,0 +1,191 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Unary Logical Operator</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * This enumeration defines the operators for UnaryExpressions.
+ * <!-- end-model-doc -->
+ * @see org.genivi.booleanexpr.FilterexprPackage#getUnaryLogicalOperator()
+ * @model
+ * @generated
+ */
+public enum UnaryLogicalOperator implements Enumerator {
+ /**
+ * The '<em><b>NOT</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #NOT_VALUE
+ * @generated
+ * @ordered
+ */
+ NOT(0, "NOT", "NOT");
+
+ /**
+ * The '<em><b>NOT</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>NOT</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #NOT
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int NOT_VALUE = 0;
+
+ /**
+ * An array of all the '<em><b>Unary Logical Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final UnaryLogicalOperator[] VALUES_ARRAY =
+ new UnaryLogicalOperator[] {
+ NOT,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Unary Logical Operator</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<UnaryLogicalOperator> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Unary Logical Operator</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static UnaryLogicalOperator get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ UnaryLogicalOperator result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Unary Logical Operator</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static UnaryLogicalOperator getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ UnaryLogicalOperator result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Unary Logical Operator</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static UnaryLogicalOperator get(int value) {
+ switch (value) {
+ case NOT_VALUE: return NOT;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private UnaryLogicalOperator(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //UnaryLogicalOperator
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/BooleanExpressionImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/BooleanExpressionImpl.java
new file mode 100755
index 0000000..4069149
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/BooleanExpressionImpl.java
@@ -0,0 +1,67 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.genivi.booleanexpr.BooleanExpression;
+import org.genivi.booleanexpr.FilterexprPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Boolean Expression</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class BooleanExpressionImpl extends EObjectImpl implements BooleanExpression {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BooleanExpressionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.BOOLEAN_EXPRESSION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * Actually there should be no implementation at all here.
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean evaluate(Object object) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String format(String indent, String indentSize) {
+ throw new UnsupportedOperationException();
+ }
+
+} //BooleanExpressionImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/BooleanLiteralImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/BooleanLiteralImpl.java
new file mode 100755
index 0000000..8c3e672
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/BooleanLiteralImpl.java
@@ -0,0 +1,204 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.genivi.booleanexpr.BooleanLiteral;
+import org.genivi.booleanexpr.FilterexprPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Boolean Literal</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.BooleanLiteralImpl#isValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BooleanLiteralImpl extends LiteralImpl implements BooleanLiteral {
+ /**
+ * The default value of the '{@link #isValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isValue()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean VALUE_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isValue()
+ * @generated
+ * @ordered
+ */
+ protected boolean value = VALUE_EDEFAULT;
+
+ /**
+ * This is true if the Value attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean valueESet;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BooleanLiteralImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.BOOLEAN_LITERAL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(boolean newValue) {
+ boolean oldValue = value;
+ value = newValue;
+ boolean oldValueESet = valueESet;
+ valueESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.BOOLEAN_LITERAL__VALUE, oldValue, value, !oldValueESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetValue() {
+ boolean oldValue = value;
+ boolean oldValueESet = valueESet;
+ value = VALUE_EDEFAULT;
+ valueESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.BOOLEAN_LITERAL__VALUE, oldValue, VALUE_EDEFAULT, oldValueESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetValue() {
+ return valueESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.BOOLEAN_LITERAL__VALUE:
+ return isValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.BOOLEAN_LITERAL__VALUE:
+ setValue((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.BOOLEAN_LITERAL__VALUE:
+ unsetValue();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.BOOLEAN_LITERAL__VALUE:
+ return isSetValue();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ if (valueESet)
+ result.append(value);
+ else
+ result.append("<unset>");
+
+ return result.toString();
+ }
+
+} //BooleanLiteralImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/ClassAttributeImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/ClassAttributeImpl.java
new file mode 100755
index 0000000..8844b49
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/ClassAttributeImpl.java
@@ -0,0 +1,587 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.Enumerator;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.ecore.impl.EEnumImpl;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.genivi.booleanexpr.ClassAttribute;
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.MetaOperator;
+import org.genivi.booleanexpr.util.FilterExprUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Class Attribute</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.ClassAttributeImpl#getAttributeName <em>Attribute Name</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.ClassAttributeImpl#getMetaOperator <em>Meta Operator</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.ClassAttributeImpl#getIndex <em>Index</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ClassAttributeImpl extends EObjectImpl implements ClassAttribute {
+ /**
+ * The default value of the '{@link #getAttributeName() <em>Attribute Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttributeName()
+ * @generated
+ * @ordered
+ */
+ protected static final String ATTRIBUTE_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getAttributeName() <em>Attribute Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttributeName()
+ * @generated
+ * @ordered
+ */
+ protected String attributeName = ATTRIBUTE_NAME_EDEFAULT;
+
+ /**
+ * This is true if the Attribute Name attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean attributeNameESet;
+
+ /**
+ * The default value of the '{@link #getMetaOperator() <em>Meta Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMetaOperator()
+ * @generated
+ * @ordered
+ */
+ protected static final MetaOperator META_OPERATOR_EDEFAULT = MetaOperator.SIZE;
+
+ /**
+ * The cached value of the '{@link #getMetaOperator() <em>Meta Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMetaOperator()
+ * @generated
+ * @ordered
+ */
+ protected MetaOperator metaOperator = META_OPERATOR_EDEFAULT;
+
+ /**
+ * This is true if the Meta Operator attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean metaOperatorESet;
+
+ /**
+ * The default value of the '{@link #getIndex() <em>Index</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIndex()
+ * @generated
+ * @ordered
+ */
+ protected static final int INDEX_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIndex()
+ * @generated
+ * @ordered
+ */
+ protected int index = INDEX_EDEFAULT;
+
+ /**
+ * This is true if the Index attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean indexESet;
+
+ private final static Logger LOGGER = Logger.getLogger(ClassAttributeImpl.class.getName());
+
+ static {
+ LOGGER.setLevel(Level.SEVERE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ClassAttributeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.CLASS_ATTRIBUTE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getAttributeName() {
+ return attributeName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAttributeName(String newAttributeName) {
+ String oldAttributeName = attributeName;
+ attributeName = newAttributeName;
+ boolean oldAttributeNameESet = attributeNameESet;
+ attributeNameESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.CLASS_ATTRIBUTE__ATTRIBUTE_NAME, oldAttributeName, attributeName, !oldAttributeNameESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetAttributeName() {
+ String oldAttributeName = attributeName;
+ boolean oldAttributeNameESet = attributeNameESet;
+ attributeName = ATTRIBUTE_NAME_EDEFAULT;
+ attributeNameESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.CLASS_ATTRIBUTE__ATTRIBUTE_NAME, oldAttributeName, ATTRIBUTE_NAME_EDEFAULT, oldAttributeNameESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetAttributeName() {
+ return attributeNameESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MetaOperator getMetaOperator() {
+ return metaOperator;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMetaOperator(MetaOperator newMetaOperator) {
+ MetaOperator oldMetaOperator = metaOperator;
+ metaOperator = newMetaOperator == null ? META_OPERATOR_EDEFAULT : newMetaOperator;
+ boolean oldMetaOperatorESet = metaOperatorESet;
+ metaOperatorESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.CLASS_ATTRIBUTE__META_OPERATOR, oldMetaOperator, metaOperator, !oldMetaOperatorESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetMetaOperator() {
+ MetaOperator oldMetaOperator = metaOperator;
+ boolean oldMetaOperatorESet = metaOperatorESet;
+ metaOperator = META_OPERATOR_EDEFAULT;
+ metaOperatorESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.CLASS_ATTRIBUTE__META_OPERATOR, oldMetaOperator, META_OPERATOR_EDEFAULT, oldMetaOperatorESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetMetaOperator() {
+ return metaOperatorESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getIndex() {
+ return index;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIndex(int newIndex) {
+ int oldIndex = index;
+ index = newIndex;
+ boolean oldIndexESet = indexESet;
+ indexESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.CLASS_ATTRIBUTE__INDEX, oldIndex, index, !oldIndexESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetIndex() {
+ int oldIndex = index;
+ boolean oldIndexESet = indexESet;
+ index = INDEX_EDEFAULT;
+ indexESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.CLASS_ATTRIBUTE__INDEX, oldIndex, INDEX_EDEFAULT, oldIndexESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetIndex() {
+ return indexESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.CLASS_ATTRIBUTE__ATTRIBUTE_NAME:
+ return getAttributeName();
+ case FilterexprPackage.CLASS_ATTRIBUTE__META_OPERATOR:
+ return getMetaOperator();
+ case FilterexprPackage.CLASS_ATTRIBUTE__INDEX:
+ return getIndex();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.CLASS_ATTRIBUTE__ATTRIBUTE_NAME:
+ setAttributeName((String)newValue);
+ return;
+ case FilterexprPackage.CLASS_ATTRIBUTE__META_OPERATOR:
+ setMetaOperator((MetaOperator)newValue);
+ return;
+ case FilterexprPackage.CLASS_ATTRIBUTE__INDEX:
+ setIndex((Integer)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.CLASS_ATTRIBUTE__ATTRIBUTE_NAME:
+ unsetAttributeName();
+ return;
+ case FilterexprPackage.CLASS_ATTRIBUTE__META_OPERATOR:
+ unsetMetaOperator();
+ return;
+ case FilterexprPackage.CLASS_ATTRIBUTE__INDEX:
+ unsetIndex();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.CLASS_ATTRIBUTE__ATTRIBUTE_NAME:
+ return isSetAttributeName();
+ case FilterexprPackage.CLASS_ATTRIBUTE__META_OPERATOR:
+ return isSetMetaOperator();
+ case FilterexprPackage.CLASS_ATTRIBUTE__INDEX:
+ return isSetIndex();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ if (attributeNameESet) {
+ result.append("@");
+ result.append(attributeName);
+
+ if (indexESet) {
+ result.append("[");
+ result.append(index);
+ result.append("]");
+ }
+
+ if (metaOperatorESet) {
+ result.append("^");
+ result.append(FilterExprUtil.metaOperatorToString(metaOperator));
+ }
+ } else {
+ result.append("<unset>");
+ }
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean isSet(EObject object) {
+ LOGGER.info("Looking for attribute name: " + attributeName);
+
+ boolean returnValue = false;
+
+ EStructuralFeature eStructuralFeature = getEStructuralFeatureForAttributeName(object, attributeName);
+
+ if (eStructuralFeature != null) {
+
+ LOGGER.info("Feature found: eType = " + eStructuralFeature.getEType());
+ returnValue = object.eIsSet(eStructuralFeature);
+ } else {
+ LOGGER.info("Feature NOT found");
+ throw new IllegalArgumentException("The object doesn't have an attribute named: " + attributeName);
+ }
+
+ LOGGER.info("<=" + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<?> getListValue(Object object) {
+ LOGGER.info("=> " + toString());
+
+ EList<?> returnValue = null;
+ EObject eObject = (EObject) object;
+
+ EStructuralFeature eStructuralFeature = getEStructuralFeatureForAttributeName(eObject, attributeName);
+
+ if (eStructuralFeature != null) {
+
+ LOGGER.fine("Feature found: eType = " + eStructuralFeature.getEType());
+ Object attributeValue = eObject.eGet(eStructuralFeature);
+
+ if (attributeValue instanceof EList<?>) {
+ returnValue = (EList<?>) attributeValue;
+ } else {
+ throw new IllegalArgumentException("The object is not a list ");
+ }
+ } else {
+ LOGGER.info("Feature NOT found");
+ throw new IllegalArgumentException("The object doesn't have an attribute named: " + attributeName);
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public Object getValue(Object object) {
+ LOGGER.info("=> " + toString());
+
+ Object returnValue = null;
+ EObject eObject = (EObject) object;
+ boolean indexHandled = false;
+
+ EStructuralFeature eStructuralFeature = getEStructuralFeatureForAttributeName(eObject, attributeName);
+
+ if (eStructuralFeature != null) {
+
+ LOGGER.info("Feature found: eType = " + eStructuralFeature.getEType());
+ Object attributeObject = eObject.eGet(eStructuralFeature);
+
+ if (attributeObject instanceof EList<?> && indexESet) {
+ attributeObject = ((EList<?>) attributeObject).get(index);
+ indexHandled = true;
+ }
+
+ if (attributeObject instanceof EList<?>) {
+ EList<?> eListObject = (EList<?>) attributeObject;
+ if (metaOperatorESet) {
+ switch (metaOperator) {
+ case SIZE:
+ returnValue = eListObject.size();
+ break;
+
+ default:
+ throw new IllegalArgumentException("Illegal meta operator: " + metaOperator);
+ }
+ } else {
+ throw new IllegalArgumentException("A list class attribute can only be used in combination with an index or a metaOperator.");
+ }
+ } else if (attributeObject instanceof EEnumImpl) {
+ LOGGER.info("EType is instance of EEnumImpl => Attribute is enum");
+
+ if (indexESet && !indexHandled) {
+ throw new IllegalArgumentException("An index can not be used on an enum.");
+ }
+
+ if (metaOperatorESet) {
+ throw new IllegalArgumentException("A meta operator cannot be used on an enum.");
+ }
+
+ Enumerator enumerator = (Enumerator) attributeObject;
+ returnValue = (Long) (long) enumerator.getValue();
+// } else if (eStructuralFeature.getEType().isInstance(Enumerator.class)) {
+ } else if (attributeObject instanceof Enumerator) {
+ LOGGER.info("EType isInstance is Enumerator => Attribute is enum");
+ LOGGER.info("EObject = " + eObject);
+ LOGGER.info("eStructuralFeature = " + eStructuralFeature);
+
+ if (indexESet && !indexHandled) {
+ throw new IllegalArgumentException("An index can not be used on an enum.");
+ }
+
+ if (metaOperatorESet) {
+ throw new IllegalArgumentException("A meta operator cannot be used on an enum.");
+ }
+
+ Enumerator enumerator = (Enumerator) attributeObject;
+ if (enumerator != null) {
+ returnValue = (Long) (long) enumerator.getValue();
+ }
+ } else {
+
+ if (indexESet && !indexHandled) {
+ throw new IllegalArgumentException("An index can only be used on a list.");
+ }
+
+ if (metaOperatorESet) {
+ throw new IllegalArgumentException("A meta operator can only be used on a list.");
+ }
+
+ returnValue = attributeObject;
+ }
+ } else {
+ LOGGER.info("Feature NOT found");
+ throw new IllegalArgumentException("The object doesn't have an attribute named: " + attributeName);
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EAttribute getEStructuralFeatureForAttributeByName(EObject object, String attributeName) {
+ for (EAttribute eAttribute: object.eClass().getEAllAttributes()) {
+ if (eAttribute.getName().equals(attributeName)) {
+ return eAttribute;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EStructuralFeature getEStructuralFeatureForAttributeName(EObject object, String attributeName) {
+ for (EStructuralFeature eStructuralFeature: object.eClass().getEAllStructuralFeatures()) {
+ if (eStructuralFeature.getName().equals(attributeName)) {
+ return eStructuralFeature;
+ }
+ }
+
+ return null;
+ }
+
+} //ClassAttributeImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/ComparisonPredicateImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/ComparisonPredicateImpl.java
new file mode 100755
index 0000000..b8cb7fa
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/ComparisonPredicateImpl.java
@@ -0,0 +1,580 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.genivi.booleanexpr.BooleanLiteral;
+import org.genivi.booleanexpr.ClassAttribute;
+import org.genivi.booleanexpr.ComparisonOperator;
+import org.genivi.booleanexpr.ComparisonPredicate;
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.Literal;
+import org.genivi.booleanexpr.SignedIntegerLiteral;
+import org.genivi.booleanexpr.StringLiteral;
+import org.genivi.booleanexpr.util.FilterExprUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Comparison Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.ComparisonPredicateImpl#getLiteral <em>Literal</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.ComparisonPredicateImpl#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.ComparisonPredicateImpl#getComparisonOperator <em>Comparison Operator</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ComparisonPredicateImpl extends PredicateImpl implements ComparisonPredicate {
+ private final static Logger LOGGER = Logger.getLogger(ComparisonPredicateImpl.class.getName());
+
+ /**
+ * The cached value of the '{@link #getLiteral() <em>Literal</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLiteral()
+ * @generated
+ * @ordered
+ */
+ protected Literal literal;
+
+ /**
+ * The cached value of the '{@link #getAttribute() <em>Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttribute()
+ * @generated
+ * @ordered
+ */
+ protected ClassAttribute attribute;
+
+ /**
+ * The default value of the '{@link #getComparisonOperator() <em>Comparison Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getComparisonOperator()
+ * @generated
+ * @ordered
+ */
+ protected static final ComparisonOperator COMPARISON_OPERATOR_EDEFAULT = ComparisonOperator.EQUAL;
+
+ /**
+ * The cached value of the '{@link #getComparisonOperator() <em>Comparison Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getComparisonOperator()
+ * @generated
+ * @ordered
+ */
+ protected ComparisonOperator comparisonOperator = COMPARISON_OPERATOR_EDEFAULT;
+
+ static {
+ LOGGER.setLevel(Level.SEVERE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComparisonPredicateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.COMPARISON_PREDICATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComparisonOperator getComparisonOperator() {
+ return comparisonOperator;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setComparisonOperator(ComparisonOperator newComparisonOperator) {
+ ComparisonOperator oldComparisonOperator = comparisonOperator;
+ comparisonOperator = newComparisonOperator == null ? COMPARISON_OPERATOR_EDEFAULT : newComparisonOperator;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.COMPARISON_PREDICATE__COMPARISON_OPERATOR, oldComparisonOperator, comparisonOperator));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Literal getLiteral() {
+ return literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetLiteral(Literal newLiteral, NotificationChain msgs) {
+ Literal oldLiteral = literal;
+ literal = newLiteral;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.COMPARISON_PREDICATE__LITERAL, oldLiteral, newLiteral);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLiteral(Literal newLiteral) {
+ if (newLiteral != literal) {
+ NotificationChain msgs = null;
+ if (literal != null)
+ msgs = ((InternalEObject)literal).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.COMPARISON_PREDICATE__LITERAL, null, msgs);
+ if (newLiteral != null)
+ msgs = ((InternalEObject)newLiteral).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.COMPARISON_PREDICATE__LITERAL, null, msgs);
+ msgs = basicSetLiteral(newLiteral, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.COMPARISON_PREDICATE__LITERAL, newLiteral, newLiteral));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ClassAttribute getAttribute() {
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetAttribute(ClassAttribute newAttribute, NotificationChain msgs) {
+ ClassAttribute oldAttribute = attribute;
+ attribute = newAttribute;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.COMPARISON_PREDICATE__ATTRIBUTE, oldAttribute, newAttribute);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAttribute(ClassAttribute newAttribute) {
+ if (newAttribute != attribute) {
+ NotificationChain msgs = null;
+ if (attribute != null)
+ msgs = ((InternalEObject)attribute).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.COMPARISON_PREDICATE__ATTRIBUTE, null, msgs);
+ if (newAttribute != null)
+ msgs = ((InternalEObject)newAttribute).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.COMPARISON_PREDICATE__ATTRIBUTE, null, msgs);
+ msgs = basicSetAttribute(newAttribute, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.COMPARISON_PREDICATE__ATTRIBUTE, newAttribute, newAttribute));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FilterexprPackage.COMPARISON_PREDICATE__LITERAL:
+ return basicSetLiteral(null, msgs);
+ case FilterexprPackage.COMPARISON_PREDICATE__ATTRIBUTE:
+ return basicSetAttribute(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.COMPARISON_PREDICATE__LITERAL:
+ return getLiteral();
+ case FilterexprPackage.COMPARISON_PREDICATE__ATTRIBUTE:
+ return getAttribute();
+ case FilterexprPackage.COMPARISON_PREDICATE__COMPARISON_OPERATOR:
+ return getComparisonOperator();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.COMPARISON_PREDICATE__LITERAL:
+ setLiteral((Literal)newValue);
+ return;
+ case FilterexprPackage.COMPARISON_PREDICATE__ATTRIBUTE:
+ setAttribute((ClassAttribute)newValue);
+ return;
+ case FilterexprPackage.COMPARISON_PREDICATE__COMPARISON_OPERATOR:
+ setComparisonOperator((ComparisonOperator)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.COMPARISON_PREDICATE__LITERAL:
+ setLiteral((Literal)null);
+ return;
+ case FilterexprPackage.COMPARISON_PREDICATE__ATTRIBUTE:
+ setAttribute((ClassAttribute)null);
+ return;
+ case FilterexprPackage.COMPARISON_PREDICATE__COMPARISON_OPERATOR:
+ setComparisonOperator(COMPARISON_OPERATOR_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.COMPARISON_PREDICATE__LITERAL:
+ return literal != null;
+ case FilterexprPackage.COMPARISON_PREDICATE__ATTRIBUTE:
+ return attribute != null;
+ case FilterexprPackage.COMPARISON_PREDICATE__COMPARISON_OPERATOR:
+ return comparisonOperator != COMPARISON_OPERATOR_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ // Attribute
+ if (attribute != null) {
+ result.append(attribute.toString());
+ } else {
+ result.append("<attribute is null>");
+ }
+ result.append(' ');
+
+ // ComparisonOperator
+ result.append(FilterExprUtil.comparisonOperatorToString(comparisonOperator));
+ result.append(' ');
+
+ // Literal
+ if (literal != null) {
+ result.append(literal.toString());
+ } else {
+ result.append("<literal is null>");
+ }
+
+ return result.toString();
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String format(String indent, String indentSize) {
+ StringBuffer result = new StringBuffer();
+
+ result.append(indent);
+ result.append(toString());
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean evaluate(Object object) {
+ LOGGER.info("evaluate => " + toString());
+ boolean returnValue = false;
+ Object attributeObjectValue = null;
+ if (attribute != null) {
+ attributeObjectValue = attribute.getValue(object);
+ } else {
+ attributeObjectValue = object;
+ }
+
+ if (attributeObjectValue == null) {
+ returnValue = evaluateNull();
+ } else if (attributeObjectValue instanceof Boolean) {
+ returnValue = evaluateBoolean(attributeObjectValue);
+ } else if (attributeObjectValue instanceof Integer) {
+ returnValue = evaluateInteger(attributeObjectValue);
+ } else if (attributeObjectValue instanceof Long) {
+ returnValue = evaluateInteger(attributeObjectValue);
+ } else if (attributeObjectValue instanceof String) {
+ returnValue = evaluateString(attributeObjectValue);
+ } else {
+ throw new IllegalArgumentException("Unsupported attribute type in ComparisonPredicate. Attribute value = " + attributeObjectValue);
+ }
+
+ LOGGER.info("evaluate <= " + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ private boolean evaluateNull() {
+ LOGGER.info("=>");
+
+ Object literalValue = null;
+ if (literal instanceof BooleanLiteral) {
+ literalValue = ((BooleanLiteral) literal).isValue();
+ } else if (literal instanceof SignedIntegerLiteral) {
+ literalValue = ((SignedIntegerLiteral) literal).getValue();
+ } else if (literal instanceof StringLiteral) {
+ literalValue = ((StringLiteral) literal).getValue();
+ } else {
+ throw new IllegalArgumentException("Unsupported literal type in ComparisonPredicate. literal = " + literal);
+ }
+ boolean returnValue = false;
+
+ LOGGER.info("Applying: " + comparisonOperator + " on literalValue: " + literalValue);
+ switch (comparisonOperator) {
+ case EQUAL:
+ if (literalValue == null) {
+ returnValue = true;
+ }
+ break;
+
+ case GREATER_OR_EQUAL_THAN:
+ break;
+
+ case GREATER_THEN:
+ break;
+
+ case LESS_OR_EQUAL_THAN:
+ break;
+
+ case LESS_THAN:
+ break;
+
+ case NOT_EQUAL:
+ if (literalValue != null) {
+ returnValue = true;
+ }
+ break;
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ private boolean evaluateBoolean(Object attributeObjectValue) {
+ LOGGER.info("=>");
+
+ if (!(literal instanceof BooleanLiteral)) {
+ throw new IllegalArgumentException("Incompatible types in ComparisonPredicate. Attribute value is Boolean, while literal is not a Boolean. Literal = " + literal);
+ }
+
+ boolean attributeValue = (Boolean) attributeObjectValue;
+ boolean literalValue = ((BooleanLiteral) literal).isValue();
+ boolean returnValue = false;
+
+ switch (comparisonOperator) {
+ case EQUAL:
+ LOGGER.info("Applying EQUAL");
+ returnValue = (attributeValue == literalValue);
+ break;
+
+ case GREATER_OR_EQUAL_THAN:
+ case GREATER_THEN:
+ case LESS_OR_EQUAL_THAN:
+ case LESS_THAN:
+ throw new IllegalArgumentException("Illegal comparisonOperator in ComparisonPredicate. comparisonOperator = " + comparisonOperator);
+
+ case NOT_EQUAL:
+ LOGGER.info("Applying NOT_EQUAL");
+ returnValue = (attributeValue != literalValue);
+ break;
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ private boolean evaluateInteger(Object attributeObjectValue) {
+ LOGGER.info("=>");
+
+ if (!(literal instanceof SignedIntegerLiteral)) {
+ throw new IllegalArgumentException("Incompatible types in ComparisonPredicate. Attribute value is Integer, while literal is not a Integer. Literal = " + literal);
+ }
+
+ // TODO PRIO 2: Do we have to support null in expressions? I think so!
+ long attributeValue;
+ if (attributeObjectValue != null) {
+ if (attributeObjectValue instanceof Long) {
+ attributeValue = (Long) attributeObjectValue;
+ } else {
+ attributeValue = new Long(((Integer) attributeObjectValue).intValue());
+ }
+ } else {
+ throw new IllegalArgumentException("attributeObjectValue is null, which is currently not allowed");
+ }
+
+ long literalValue = ((SignedIntegerLiteral) literal).getValue();
+ boolean returnValue = false;
+
+ LOGGER.fine("Applying: " + comparisonOperator + " on attributevalue: " + attributeValue + ", and literalValue: " + literalValue);
+
+ switch (comparisonOperator) {
+ case EQUAL:
+ returnValue = (attributeValue == literalValue);
+ break;
+
+ case GREATER_OR_EQUAL_THAN:
+ returnValue = (attributeValue >= literalValue);
+ break;
+
+ case GREATER_THEN:
+ returnValue = (attributeValue > literalValue);
+ break;
+
+ case LESS_OR_EQUAL_THAN:
+ returnValue = (attributeValue <= literalValue);
+ break;
+
+ case LESS_THAN:
+ returnValue = (attributeValue < literalValue);
+ break;
+
+ case NOT_EQUAL:
+ returnValue = (attributeValue != literalValue);
+ break;
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ private boolean evaluateString(Object attributeObjectValue) {
+ LOGGER.info("=>");
+
+ if (!(literal instanceof StringLiteral)) {
+ throw new IllegalArgumentException("Incompatible types in ComparisonPredicate. Attribute value is String, while literal is not a String. Literal = " + literal);
+ }
+
+ String attributeValue = (String) attributeObjectValue; // TODO PRIO 2: Do we have to support null in expressions? I think so!
+ String literalValue = ((StringLiteral) literal).getValue();
+ boolean returnValue = false;
+
+ LOGGER.info("Applying: " + comparisonOperator);
+ switch (comparisonOperator) {
+ case EQUAL:
+ returnValue = attributeValue.equals(literalValue);
+ break;
+
+ case GREATER_OR_EQUAL_THAN:
+ case GREATER_THEN:
+ case LESS_OR_EQUAL_THAN:
+ case LESS_THAN:
+ throw new IllegalArgumentException("Illegal comparisonOperator in ComparisonPredicate. comparisonOperator = " + comparisonOperator);
+
+ case NOT_EQUAL:
+ returnValue = !attributeValue.equals(literalValue);
+ break;
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+} //ComparisonPredicateImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/DownCastPredicateImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/DownCastPredicateImpl.java
new file mode 100755
index 0000000..e3b57da
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/DownCastPredicateImpl.java
@@ -0,0 +1,412 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.genivi.booleanexpr.BooleanExpression;
+import org.genivi.booleanexpr.DownCastPredicate;
+import org.genivi.booleanexpr.FilterexprPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Down Cast Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.DownCastPredicateImpl#getClassName <em>Class Name</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.DownCastPredicateImpl#getExpression <em>Expression</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DownCastPredicateImpl extends PredicateImpl implements DownCastPredicate {
+ private final static Logger LOGGER = Logger.getLogger(DownCastPredicateImpl.class.getName());
+ private static final String NEW_LINE = System.getProperty("line.separator");
+
+ /**
+ * The default value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getClassName()
+ * @generated
+ * @ordered
+ */
+ protected static final String CLASS_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getClassName() <em>Class Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getClassName()
+ * @generated
+ * @ordered
+ */
+ protected String className = CLASS_NAME_EDEFAULT;
+
+ /**
+ * This is true if the Class Name attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean classNameESet;
+
+ /**
+ * The cached value of the '{@link #getExpression() <em>Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExpression()
+ * @generated
+ * @ordered
+ */
+ protected BooleanExpression expression;
+
+ /**
+ * This is true if the Expression containment reference has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean expressionESet;
+
+ static {
+ LOGGER.setLevel(Level.SEVERE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DownCastPredicateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.DOWN_CAST_PREDICATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getClassName() {
+ return className;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setClassName(String newClassName) {
+ String oldClassName = className;
+ className = newClassName;
+ boolean oldClassNameESet = classNameESet;
+ classNameESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.DOWN_CAST_PREDICATE__CLASS_NAME, oldClassName, className, !oldClassNameESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetClassName() {
+ String oldClassName = className;
+ boolean oldClassNameESet = classNameESet;
+ className = CLASS_NAME_EDEFAULT;
+ classNameESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.DOWN_CAST_PREDICATE__CLASS_NAME, oldClassName, CLASS_NAME_EDEFAULT, oldClassNameESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetClassName() {
+ return classNameESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BooleanExpression getExpression() {
+ return expression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetExpression(BooleanExpression newExpression, NotificationChain msgs) {
+ BooleanExpression oldExpression = expression;
+ expression = newExpression;
+ boolean oldExpressionESet = expressionESet;
+ expressionESet = true;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION, oldExpression, newExpression, !oldExpressionESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExpression(BooleanExpression newExpression) {
+ if (newExpression != expression) {
+ NotificationChain msgs = null;
+ if (expression != null)
+ msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION, null, msgs);
+ if (newExpression != null)
+ msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION, null, msgs);
+ msgs = basicSetExpression(newExpression, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldExpressionESet = expressionESet;
+ expressionESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION, newExpression, newExpression, !oldExpressionESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicUnsetExpression(NotificationChain msgs) {
+ BooleanExpression oldExpression = expression;
+ expression = null;
+ boolean oldExpressionESet = expressionESet;
+ expressionESet = false;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION, oldExpression, null, oldExpressionESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetExpression() {
+ if (expression != null) {
+ NotificationChain msgs = null;
+ msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION, null, msgs);
+ msgs = basicUnsetExpression(msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldExpressionESet = expressionESet;
+ expressionESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION, null, null, oldExpressionESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetExpression() {
+ return expressionESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION:
+ return basicUnsetExpression(msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.DOWN_CAST_PREDICATE__CLASS_NAME:
+ return getClassName();
+ case FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION:
+ return getExpression();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.DOWN_CAST_PREDICATE__CLASS_NAME:
+ setClassName((String)newValue);
+ return;
+ case FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION:
+ setExpression((BooleanExpression)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.DOWN_CAST_PREDICATE__CLASS_NAME:
+ unsetClassName();
+ return;
+ case FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION:
+ unsetExpression();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.DOWN_CAST_PREDICATE__CLASS_NAME:
+ return isSetClassName();
+ case FilterexprPackage.DOWN_CAST_PREDICATE__EXPRESSION:
+ return isSetExpression();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ // 'DownCast to' class between '[' and ']'
+ result.append("[");
+ if (classNameESet)
+ result.append(className);
+ else
+ result.append("<unset>");
+ result.append("]");
+
+ // Expression
+ result.append('(');
+ result.append(expression.toString());
+ result.append(')');
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String format(String indent, String indentSize) {
+ StringBuffer result = new StringBuffer();
+
+ result.append(indent);
+
+ // 'DownCast to' class between '[' and ']'
+ result.append("[");
+ if (classNameESet)
+ result.append(className);
+ else
+ result.append("<unset>");
+ result.append("]");
+
+ // Expression
+ result.append(" (");
+ result.append(NEW_LINE);
+
+ indent += indentSize;
+
+ result.append(expression.format(indent, indentSize));
+ result.append(NEW_LINE);
+
+ indent = indent.substring(0, indent.lastIndexOf(indentSize));
+
+ result.append(indent);
+ result.append(')');
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean evaluate(Object object) {
+ LOGGER.info("evaluate => " + toString());
+
+ boolean returnValue;
+
+ returnValue = expression.evaluate(object);
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+} //DownCastPredicateImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/DyadicExpressionImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/DyadicExpressionImpl.java
new file mode 100755
index 0000000..b725313
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/DyadicExpressionImpl.java
@@ -0,0 +1,593 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.genivi.booleanexpr.BooleanExpression;
+import org.genivi.booleanexpr.DyadicExpression;
+import org.genivi.booleanexpr.DyadicLogicalOperator;
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.util.FilterExprUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Dyadic Expression</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.DyadicExpressionImpl#getLogicalOperator <em>Logical Operator</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.DyadicExpressionImpl#getLeftHandTerm <em>Left Hand Term</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.DyadicExpressionImpl#getRightHandTerm <em>Right Hand Term</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DyadicExpressionImpl extends BooleanExpressionImpl implements DyadicExpression {
+ private final static Logger LOGGER = Logger.getLogger(DyadicExpressionImpl.class.getName());
+ private static final String NEW_LINE = System.getProperty("line.separator");
+
+ /**
+ * The default value of the '{@link #getLogicalOperator() <em>Logical Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLogicalOperator()
+ * @generated
+ * @ordered
+ */
+ protected static final DyadicLogicalOperator LOGICAL_OPERATOR_EDEFAULT = DyadicLogicalOperator.AND;
+
+ /**
+ * The cached value of the '{@link #getLogicalOperator() <em>Logical Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLogicalOperator()
+ * @generated
+ * @ordered
+ */
+ protected DyadicLogicalOperator logicalOperator = LOGICAL_OPERATOR_EDEFAULT;
+
+ /**
+ * This is true if the Logical Operator attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean logicalOperatorESet;
+
+ /**
+ * The cached value of the '{@link #getLeftHandTerm() <em>Left Hand Term</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLeftHandTerm()
+ * @generated
+ * @ordered
+ */
+ protected BooleanExpression leftHandTerm;
+
+ /**
+ * This is true if the Left Hand Term containment reference has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean leftHandTermESet;
+
+ /**
+ * The cached value of the '{@link #getRightHandTerm() <em>Right Hand Term</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRightHandTerm()
+ * @generated
+ * @ordered
+ */
+ protected BooleanExpression rightHandTerm;
+
+ /**
+ * This is true if the Right Hand Term containment reference has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean rightHandTermESet;
+
+ static {
+ LOGGER.setLevel(Level.SEVERE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DyadicExpressionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.DYADIC_EXPRESSION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DyadicLogicalOperator getLogicalOperator() {
+ return logicalOperator;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLogicalOperator(DyadicLogicalOperator newLogicalOperator) {
+ DyadicLogicalOperator oldLogicalOperator = logicalOperator;
+ logicalOperator = newLogicalOperator == null ? LOGICAL_OPERATOR_EDEFAULT : newLogicalOperator;
+ boolean oldLogicalOperatorESet = logicalOperatorESet;
+ logicalOperatorESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.DYADIC_EXPRESSION__LOGICAL_OPERATOR, oldLogicalOperator, logicalOperator, !oldLogicalOperatorESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetLogicalOperator() {
+ DyadicLogicalOperator oldLogicalOperator = logicalOperator;
+ boolean oldLogicalOperatorESet = logicalOperatorESet;
+ logicalOperator = LOGICAL_OPERATOR_EDEFAULT;
+ logicalOperatorESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.DYADIC_EXPRESSION__LOGICAL_OPERATOR, oldLogicalOperator, LOGICAL_OPERATOR_EDEFAULT, oldLogicalOperatorESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetLogicalOperator() {
+ return logicalOperatorESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BooleanExpression getLeftHandTerm() {
+ return leftHandTerm;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetLeftHandTerm(BooleanExpression newLeftHandTerm, NotificationChain msgs) {
+ BooleanExpression oldLeftHandTerm = leftHandTerm;
+ leftHandTerm = newLeftHandTerm;
+ boolean oldLeftHandTermESet = leftHandTermESet;
+ leftHandTermESet = true;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM, oldLeftHandTerm, newLeftHandTerm, !oldLeftHandTermESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setLeftHandTerm(BooleanExpression newLeftHandTerm) {
+ if (newLeftHandTerm != leftHandTerm) {
+ NotificationChain msgs = null;
+ if (leftHandTerm != null)
+ msgs = ((InternalEObject)leftHandTerm).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM, null, msgs);
+ if (newLeftHandTerm != null)
+ msgs = ((InternalEObject)newLeftHandTerm).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM, null, msgs);
+ msgs = basicSetLeftHandTerm(newLeftHandTerm, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldLeftHandTermESet = leftHandTermESet;
+ leftHandTermESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM, newLeftHandTerm, newLeftHandTerm, !oldLeftHandTermESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicUnsetLeftHandTerm(NotificationChain msgs) {
+ BooleanExpression oldLeftHandTerm = leftHandTerm;
+ leftHandTerm = null;
+ boolean oldLeftHandTermESet = leftHandTermESet;
+ leftHandTermESet = false;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM, oldLeftHandTerm, null, oldLeftHandTermESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetLeftHandTerm() {
+ if (leftHandTerm != null) {
+ NotificationChain msgs = null;
+ msgs = ((InternalEObject)leftHandTerm).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM, null, msgs);
+ msgs = basicUnsetLeftHandTerm(msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldLeftHandTermESet = leftHandTermESet;
+ leftHandTermESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM, null, null, oldLeftHandTermESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetLeftHandTerm() {
+ return leftHandTermESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BooleanExpression getRightHandTerm() {
+ return rightHandTerm;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetRightHandTerm(BooleanExpression newRightHandTerm, NotificationChain msgs) {
+ BooleanExpression oldRightHandTerm = rightHandTerm;
+ rightHandTerm = newRightHandTerm;
+ boolean oldRightHandTermESet = rightHandTermESet;
+ rightHandTermESet = true;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM, oldRightHandTerm, newRightHandTerm, !oldRightHandTermESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRightHandTerm(BooleanExpression newRightHandTerm) {
+ if (newRightHandTerm != rightHandTerm) {
+ NotificationChain msgs = null;
+ if (rightHandTerm != null)
+ msgs = ((InternalEObject)rightHandTerm).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM, null, msgs);
+ if (newRightHandTerm != null)
+ msgs = ((InternalEObject)newRightHandTerm).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM, null, msgs);
+ msgs = basicSetRightHandTerm(newRightHandTerm, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldRightHandTermESet = rightHandTermESet;
+ rightHandTermESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM, newRightHandTerm, newRightHandTerm, !oldRightHandTermESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicUnsetRightHandTerm(NotificationChain msgs) {
+ BooleanExpression oldRightHandTerm = rightHandTerm;
+ rightHandTerm = null;
+ boolean oldRightHandTermESet = rightHandTermESet;
+ rightHandTermESet = false;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM, oldRightHandTerm, null, oldRightHandTermESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetRightHandTerm() {
+ if (rightHandTerm != null) {
+ NotificationChain msgs = null;
+ msgs = ((InternalEObject)rightHandTerm).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM, null, msgs);
+ msgs = basicUnsetRightHandTerm(msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldRightHandTermESet = rightHandTermESet;
+ rightHandTermESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM, null, null, oldRightHandTermESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetRightHandTerm() {
+ return rightHandTermESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM:
+ return basicUnsetLeftHandTerm(msgs);
+ case FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM:
+ return basicUnsetRightHandTerm(msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.DYADIC_EXPRESSION__LOGICAL_OPERATOR:
+ return getLogicalOperator();
+ case FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM:
+ return getLeftHandTerm();
+ case FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM:
+ return getRightHandTerm();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.DYADIC_EXPRESSION__LOGICAL_OPERATOR:
+ setLogicalOperator((DyadicLogicalOperator)newValue);
+ return;
+ case FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM:
+ setLeftHandTerm((BooleanExpression)newValue);
+ return;
+ case FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM:
+ setRightHandTerm((BooleanExpression)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.DYADIC_EXPRESSION__LOGICAL_OPERATOR:
+ unsetLogicalOperator();
+ return;
+ case FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM:
+ unsetLeftHandTerm();
+ return;
+ case FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM:
+ unsetRightHandTerm();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.DYADIC_EXPRESSION__LOGICAL_OPERATOR:
+ return isSetLogicalOperator();
+ case FilterexprPackage.DYADIC_EXPRESSION__LEFT_HAND_TERM:
+ return isSetLeftHandTerm();
+ case FilterexprPackage.DYADIC_EXPRESSION__RIGHT_HAND_TERM:
+ return isSetRightHandTerm();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ // Left hand Expression
+ result.append('(');
+ if (leftHandTerm != null) {
+ result.append(leftHandTerm.toString());
+ } else {
+ result.append("null");
+ }
+ result.append(") ");
+
+ // DyadicLogicalOperator
+ if (logicalOperatorESet)
+ result.append(FilterExprUtil.dyadicLogicalOperatorToString(logicalOperator));
+ else
+ result.append("<unset>");
+
+ // Right hand Expression
+ result.append(" (");
+ if (rightHandTerm != null) {
+ result.append(rightHandTerm.toString());
+ } else {
+ result.append("null");
+ }
+ result.append(')');
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String format(String indent, String indentSize) {
+ StringBuffer result = new StringBuffer();
+
+ // Left hand Expression
+ result.append(indent);
+ result.append('(');
+ result.append(NEW_LINE);
+
+ indent += indentSize;
+
+ if (leftHandTerm != null) {
+ result.append(leftHandTerm.format(indent, indentSize));
+ } else {
+ result.append("null");
+ }
+ result.append(NEW_LINE);
+
+ indent = indent.substring(0, indent.lastIndexOf(indentSize));
+
+ result.append(indent);
+ result.append(") ");
+
+ // DyadicLogicalOperator
+ if (logicalOperatorESet)
+ result.append(FilterExprUtil.dyadicLogicalOperatorToString(logicalOperator));
+ else
+ result.append("<unset>");
+
+ // Right hand Expression
+ result.append(" (");
+ result.append(NEW_LINE);
+
+ indent += indentSize;
+
+ if (rightHandTerm != null) {
+ result.append(rightHandTerm.format(indent, indentSize));
+ } else {
+ result.append("null");
+ }
+ result.append(NEW_LINE);
+
+ indent = indent.substring(0, indent.lastIndexOf(indentSize));
+
+ result.append(indent);
+ result.append(')');
+
+ return result.toString();
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean evaluate(Object object) {
+ LOGGER.info("evaluate => " + toString());
+
+ LOGGER.info("Going to evaluate left hand side");
+ boolean result = false;
+ boolean leftHandResult = leftHandTerm.evaluate(object);
+ boolean rightHandResult;
+
+ switch (logicalOperator) {
+ case AND:
+ LOGGER.info("Operator is AND");
+ if (leftHandResult) {
+ LOGGER.info("Needed to evaluate right hand side");
+ rightHandResult = rightHandTerm.evaluate(object);
+ result = leftHandResult && rightHandResult;
+ }
+ break;
+
+ case OR:
+ LOGGER.info("Operator is OR");
+ if (leftHandResult) {
+ result = true;
+ } else {
+ LOGGER.info("Needed to evaluate right hand side");
+ rightHandResult = rightHandTerm.evaluate(object);
+ result = leftHandResult || rightHandResult;
+ }
+ }
+
+ LOGGER.info("evaluate <= " + result);
+ return result;
+ }
+} //DyadicExpressionImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/FilterexprFactoryImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/FilterexprFactoryImpl.java
new file mode 100755
index 0000000..e9b00e9
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/FilterexprFactoryImpl.java
@@ -0,0 +1,394 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.genivi.booleanexpr.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FilterexprFactoryImpl extends EFactoryImpl implements FilterexprFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static FilterexprFactory init() {
+ try {
+ FilterexprFactory theFilterexprFactory = (FilterexprFactory)EPackage.Registry.INSTANCE.getEFactory(FilterexprPackage.eNS_URI);
+ if (theFilterexprFactory != null) {
+ return theFilterexprFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new FilterexprFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FilterexprFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case FilterexprPackage.UNARY_EXPRESSION: return createUnaryExpression();
+ case FilterexprPackage.DYADIC_EXPRESSION: return createDyadicExpression();
+ case FilterexprPackage.COMPARISON_PREDICATE: return createComparisonPredicate();
+ case FilterexprPackage.IN_PREDICATE: return createInPredicate();
+ case FilterexprPackage.SIGNED_INTEGER_LITERAL: return createSignedIntegerLiteral();
+ case FilterexprPackage.STRING_LITERAL: return createStringLiteral();
+ case FilterexprPackage.BOOLEAN_LITERAL: return createBooleanLiteral();
+ case FilterexprPackage.SUB_CLASS_PREDICATE: return createSubClassPredicate();
+ case FilterexprPackage.CLASS_ATTRIBUTE: return createClassAttribute();
+ case FilterexprPackage.DOWN_CAST_PREDICATE: return createDownCastPredicate();
+ case FilterexprPackage.MULTIPLICITY_PREDICATE: return createMultiplicityPredicate();
+ case FilterexprPackage.IS_SET_PREDICATE: return createIsSetPredicate();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case FilterexprPackage.DYADIC_LOGICAL_OPERATOR:
+ return createDyadicLogicalOperatorFromString(eDataType, initialValue);
+ case FilterexprPackage.UNARY_LOGICAL_OPERATOR:
+ return createUnaryLogicalOperatorFromString(eDataType, initialValue);
+ case FilterexprPackage.COMPARISON_OPERATOR:
+ return createComparisonOperatorFromString(eDataType, initialValue);
+ case FilterexprPackage.LIST_OPERATOR:
+ return createListOperatorFromString(eDataType, initialValue);
+ case FilterexprPackage.IN_OPERATOR:
+ return createInOperatorFromString(eDataType, initialValue);
+ case FilterexprPackage.META_OPERATOR:
+ return createMetaOperatorFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case FilterexprPackage.DYADIC_LOGICAL_OPERATOR:
+ return convertDyadicLogicalOperatorToString(eDataType, instanceValue);
+ case FilterexprPackage.UNARY_LOGICAL_OPERATOR:
+ return convertUnaryLogicalOperatorToString(eDataType, instanceValue);
+ case FilterexprPackage.COMPARISON_OPERATOR:
+ return convertComparisonOperatorToString(eDataType, instanceValue);
+ case FilterexprPackage.LIST_OPERATOR:
+ return convertListOperatorToString(eDataType, instanceValue);
+ case FilterexprPackage.IN_OPERATOR:
+ return convertInOperatorToString(eDataType, instanceValue);
+ case FilterexprPackage.META_OPERATOR:
+ return convertMetaOperatorToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public UnaryExpression createUnaryExpression() {
+ UnaryExpressionImpl unaryExpression = new UnaryExpressionImpl();
+ return unaryExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DyadicExpression createDyadicExpression() {
+ DyadicExpressionImpl dyadicExpression = new DyadicExpressionImpl();
+ return dyadicExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComparisonPredicate createComparisonPredicate() {
+ ComparisonPredicateImpl comparisonPredicate = new ComparisonPredicateImpl();
+ return comparisonPredicate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InPredicate createInPredicate() {
+ InPredicateImpl inPredicate = new InPredicateImpl();
+ return inPredicate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SignedIntegerLiteral createSignedIntegerLiteral() {
+ SignedIntegerLiteralImpl signedIntegerLiteral = new SignedIntegerLiteralImpl();
+ return signedIntegerLiteral;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StringLiteral createStringLiteral() {
+ StringLiteralImpl stringLiteral = new StringLiteralImpl();
+ return stringLiteral;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BooleanLiteral createBooleanLiteral() {
+ BooleanLiteralImpl booleanLiteral = new BooleanLiteralImpl();
+ return booleanLiteral;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SubClassPredicate createSubClassPredicate() {
+ SubClassPredicateImpl subClassPredicate = new SubClassPredicateImpl();
+ return subClassPredicate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ClassAttribute createClassAttribute() {
+ ClassAttributeImpl classAttribute = new ClassAttributeImpl();
+ return classAttribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DownCastPredicate createDownCastPredicate() {
+ DownCastPredicateImpl downCastPredicate = new DownCastPredicateImpl();
+ return downCastPredicate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MultiplicityPredicate createMultiplicityPredicate() {
+ MultiplicityPredicateImpl multiplicityPredicate = new MultiplicityPredicateImpl();
+ return multiplicityPredicate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IsSetPredicate createIsSetPredicate() {
+ IsSetPredicateImpl isSetPredicate = new IsSetPredicateImpl();
+ return isSetPredicate;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DyadicLogicalOperator createDyadicLogicalOperatorFromString(EDataType eDataType, String initialValue) {
+ DyadicLogicalOperator result = DyadicLogicalOperator.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertDyadicLogicalOperatorToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public UnaryLogicalOperator createUnaryLogicalOperatorFromString(EDataType eDataType, String initialValue) {
+ UnaryLogicalOperator result = UnaryLogicalOperator.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertUnaryLogicalOperatorToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComparisonOperator createComparisonOperatorFromString(EDataType eDataType, String initialValue) {
+ ComparisonOperator result = ComparisonOperator.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertComparisonOperatorToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ListOperator createListOperatorFromString(EDataType eDataType, String initialValue) {
+ ListOperator result = ListOperator.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertListOperatorToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InOperator createInOperatorFromString(EDataType eDataType, String initialValue) {
+ InOperator result = InOperator.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertInOperatorToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MetaOperator createMetaOperatorFromString(EDataType eDataType, String initialValue) {
+ MetaOperator result = MetaOperator.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertMetaOperatorToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FilterexprPackage getFilterexprPackage() {
+ return (FilterexprPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static FilterexprPackage getPackage() {
+ return FilterexprPackage.eINSTANCE;
+ }
+
+} //FilterexprFactoryImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/FilterexprPackageImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/FilterexprPackageImpl.java
new file mode 100755
index 0000000..3eee31f
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/FilterexprPackageImpl.java
@@ -0,0 +1,934 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EGenericType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.genivi.booleanexpr.BooleanExpression;
+import org.genivi.booleanexpr.BooleanLiteral;
+import org.genivi.booleanexpr.ClassAttribute;
+import org.genivi.booleanexpr.ComparisonOperator;
+import org.genivi.booleanexpr.ComparisonPredicate;
+import org.genivi.booleanexpr.DownCastPredicate;
+import org.genivi.booleanexpr.DyadicExpression;
+import org.genivi.booleanexpr.DyadicLogicalOperator;
+import org.genivi.booleanexpr.FilterexprFactory;
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.InOperator;
+import org.genivi.booleanexpr.InPredicate;
+import org.genivi.booleanexpr.IsSetPredicate;
+import org.genivi.booleanexpr.ListOperator;
+import org.genivi.booleanexpr.Literal;
+import org.genivi.booleanexpr.MetaOperator;
+import org.genivi.booleanexpr.MultiplicityPredicate;
+import org.genivi.booleanexpr.Predicate;
+import org.genivi.booleanexpr.SignedIntegerLiteral;
+import org.genivi.booleanexpr.StringLiteral;
+import org.genivi.booleanexpr.SubClassPredicate;
+import org.genivi.booleanexpr.UnaryExpression;
+import org.genivi.booleanexpr.UnaryLogicalOperator;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FilterexprPackageImpl extends EPackageImpl implements FilterexprPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass booleanExpressionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass unaryExpressionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass predicateEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass dyadicExpressionEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass comparisonPredicateEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass inPredicateEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass literalEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass signedIntegerLiteralEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass stringLiteralEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass booleanLiteralEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass subClassPredicateEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass classAttributeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass downCastPredicateEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass multiplicityPredicateEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass isSetPredicateEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum dyadicLogicalOperatorEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum unaryLogicalOperatorEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum comparisonOperatorEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum listOperatorEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum inOperatorEEnum = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum metaOperatorEEnum = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.genivi.booleanexpr.FilterexprPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private FilterexprPackageImpl() {
+ super(eNS_URI, FilterexprFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link FilterexprPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static FilterexprPackage init() {
+ if (isInited) return (FilterexprPackage)EPackage.Registry.INSTANCE.getEPackage(FilterexprPackage.eNS_URI);
+
+ // Obtain or create and register package
+ FilterexprPackageImpl theFilterexprPackage = (FilterexprPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FilterexprPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FilterexprPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theFilterexprPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theFilterexprPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theFilterexprPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(FilterexprPackage.eNS_URI, theFilterexprPackage);
+ return theFilterexprPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBooleanExpression() {
+ return booleanExpressionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getUnaryExpression() {
+ return unaryExpressionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getUnaryExpression_UnaryOperator() {
+ return (EAttribute)unaryExpressionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getUnaryExpression_Expression() {
+ return (EReference)unaryExpressionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPredicate() {
+ return predicateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDyadicExpression() {
+ return dyadicExpressionEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDyadicExpression_LogicalOperator() {
+ return (EAttribute)dyadicExpressionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDyadicExpression_LeftHandTerm() {
+ return (EReference)dyadicExpressionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDyadicExpression_RightHandTerm() {
+ return (EReference)dyadicExpressionEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getComparisonPredicate() {
+ return comparisonPredicateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getComparisonPredicate_ComparisonOperator() {
+ return (EAttribute)comparisonPredicateEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getComparisonPredicate_Literal() {
+ return (EReference)comparisonPredicateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getComparisonPredicate_Attribute() {
+ return (EReference)comparisonPredicateEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getInPredicate() {
+ return inPredicateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInPredicate_Attribute() {
+ return (EReference)inPredicateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInPredicate_InOperator() {
+ return (EAttribute)inPredicateEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInPredicate_Literals() {
+ return (EReference)inPredicateEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getLiteral() {
+ return literalEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSignedIntegerLiteral() {
+ return signedIntegerLiteralEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSignedIntegerLiteral_Value() {
+ return (EAttribute)signedIntegerLiteralEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStringLiteral() {
+ return stringLiteralEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getStringLiteral_Value() {
+ return (EAttribute)stringLiteralEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBooleanLiteral() {
+ return booleanLiteralEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getBooleanLiteral_Value() {
+ return (EAttribute)booleanLiteralEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSubClassPredicate() {
+ return subClassPredicateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSubClassPredicate_SubClassExpression() {
+ return (EReference)subClassPredicateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSubClassPredicate_SubClassAttribute() {
+ return (EReference)subClassPredicateEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getClassAttribute() {
+ return classAttributeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getClassAttribute_AttributeName() {
+ return (EAttribute)classAttributeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getClassAttribute_MetaOperator() {
+ return (EAttribute)classAttributeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getClassAttribute_Index() {
+ return (EAttribute)classAttributeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDownCastPredicate() {
+ return downCastPredicateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDownCastPredicate_ClassName() {
+ return (EAttribute)downCastPredicateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDownCastPredicate_Expression() {
+ return (EReference)downCastPredicateEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMultiplicityPredicate() {
+ return multiplicityPredicateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getMultiplicityPredicate_Expression() {
+ return (EReference)multiplicityPredicateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMultiplicityPredicate_ListOperator() {
+ return (EAttribute)multiplicityPredicateEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getMultiplicityPredicate_Attribute() {
+ return (EReference)multiplicityPredicateEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getIsSetPredicate() {
+ return isSetPredicateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getIsSetPredicate_Attribute() {
+ return (EReference)isSetPredicateEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getDyadicLogicalOperator() {
+ return dyadicLogicalOperatorEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getUnaryLogicalOperator() {
+ return unaryLogicalOperatorEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getComparisonOperator() {
+ return comparisonOperatorEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getListOperator() {
+ return listOperatorEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getInOperator() {
+ return inOperatorEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getMetaOperator() {
+ return metaOperatorEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FilterexprFactory getFilterexprFactory() {
+ return (FilterexprFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ booleanExpressionEClass = createEClass(BOOLEAN_EXPRESSION);
+
+ unaryExpressionEClass = createEClass(UNARY_EXPRESSION);
+ createEAttribute(unaryExpressionEClass, UNARY_EXPRESSION__UNARY_OPERATOR);
+ createEReference(unaryExpressionEClass, UNARY_EXPRESSION__EXPRESSION);
+
+ predicateEClass = createEClass(PREDICATE);
+
+ dyadicExpressionEClass = createEClass(DYADIC_EXPRESSION);
+ createEAttribute(dyadicExpressionEClass, DYADIC_EXPRESSION__LOGICAL_OPERATOR);
+ createEReference(dyadicExpressionEClass, DYADIC_EXPRESSION__LEFT_HAND_TERM);
+ createEReference(dyadicExpressionEClass, DYADIC_EXPRESSION__RIGHT_HAND_TERM);
+
+ comparisonPredicateEClass = createEClass(COMPARISON_PREDICATE);
+ createEReference(comparisonPredicateEClass, COMPARISON_PREDICATE__LITERAL);
+ createEReference(comparisonPredicateEClass, COMPARISON_PREDICATE__ATTRIBUTE);
+ createEAttribute(comparisonPredicateEClass, COMPARISON_PREDICATE__COMPARISON_OPERATOR);
+
+ inPredicateEClass = createEClass(IN_PREDICATE);
+ createEReference(inPredicateEClass, IN_PREDICATE__ATTRIBUTE);
+ createEAttribute(inPredicateEClass, IN_PREDICATE__IN_OPERATOR);
+ createEReference(inPredicateEClass, IN_PREDICATE__LITERALS);
+
+ literalEClass = createEClass(LITERAL);
+
+ signedIntegerLiteralEClass = createEClass(SIGNED_INTEGER_LITERAL);
+ createEAttribute(signedIntegerLiteralEClass, SIGNED_INTEGER_LITERAL__VALUE);
+
+ stringLiteralEClass = createEClass(STRING_LITERAL);
+ createEAttribute(stringLiteralEClass, STRING_LITERAL__VALUE);
+
+ booleanLiteralEClass = createEClass(BOOLEAN_LITERAL);
+ createEAttribute(booleanLiteralEClass, BOOLEAN_LITERAL__VALUE);
+
+ subClassPredicateEClass = createEClass(SUB_CLASS_PREDICATE);
+ createEReference(subClassPredicateEClass, SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION);
+ createEReference(subClassPredicateEClass, SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE);
+
+ classAttributeEClass = createEClass(CLASS_ATTRIBUTE);
+ createEAttribute(classAttributeEClass, CLASS_ATTRIBUTE__ATTRIBUTE_NAME);
+ createEAttribute(classAttributeEClass, CLASS_ATTRIBUTE__META_OPERATOR);
+ createEAttribute(classAttributeEClass, CLASS_ATTRIBUTE__INDEX);
+
+ downCastPredicateEClass = createEClass(DOWN_CAST_PREDICATE);
+ createEAttribute(downCastPredicateEClass, DOWN_CAST_PREDICATE__CLASS_NAME);
+ createEReference(downCastPredicateEClass, DOWN_CAST_PREDICATE__EXPRESSION);
+
+ multiplicityPredicateEClass = createEClass(MULTIPLICITY_PREDICATE);
+ createEReference(multiplicityPredicateEClass, MULTIPLICITY_PREDICATE__EXPRESSION);
+ createEReference(multiplicityPredicateEClass, MULTIPLICITY_PREDICATE__ATTRIBUTE);
+ createEAttribute(multiplicityPredicateEClass, MULTIPLICITY_PREDICATE__LIST_OPERATOR);
+
+ isSetPredicateEClass = createEClass(IS_SET_PREDICATE);
+ createEReference(isSetPredicateEClass, IS_SET_PREDICATE__ATTRIBUTE);
+
+ // Create enums
+ dyadicLogicalOperatorEEnum = createEEnum(DYADIC_LOGICAL_OPERATOR);
+ unaryLogicalOperatorEEnum = createEEnum(UNARY_LOGICAL_OPERATOR);
+ comparisonOperatorEEnum = createEEnum(COMPARISON_OPERATOR);
+ listOperatorEEnum = createEEnum(LIST_OPERATOR);
+ inOperatorEEnum = createEEnum(IN_OPERATOR);
+ metaOperatorEEnum = createEEnum(META_OPERATOR);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ unaryExpressionEClass.getESuperTypes().add(this.getBooleanExpression());
+ predicateEClass.getESuperTypes().add(this.getBooleanExpression());
+ dyadicExpressionEClass.getESuperTypes().add(this.getBooleanExpression());
+ comparisonPredicateEClass.getESuperTypes().add(this.getPredicate());
+ inPredicateEClass.getESuperTypes().add(this.getPredicate());
+ signedIntegerLiteralEClass.getESuperTypes().add(this.getLiteral());
+ stringLiteralEClass.getESuperTypes().add(this.getLiteral());
+ booleanLiteralEClass.getESuperTypes().add(this.getLiteral());
+ subClassPredicateEClass.getESuperTypes().add(this.getPredicate());
+ downCastPredicateEClass.getESuperTypes().add(this.getPredicate());
+ multiplicityPredicateEClass.getESuperTypes().add(this.getPredicate());
+ isSetPredicateEClass.getESuperTypes().add(this.getPredicate());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(booleanExpressionEClass, BooleanExpression.class, "BooleanExpression", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ EOperation op = addEOperation(booleanExpressionEClass, ecorePackage.getEBoolean(), "evaluate", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, ecorePackage.getEJavaObject(), "object", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(booleanExpressionEClass, ecorePackage.getEString(), "format", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, ecorePackage.getEString(), "indent", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, ecorePackage.getEString(), "indentSize", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(unaryExpressionEClass, UnaryExpression.class, "UnaryExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getUnaryExpression_UnaryOperator(), this.getUnaryLogicalOperator(), "unaryOperator", "NOT", 1, 1, UnaryExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getUnaryExpression_Expression(), this.getBooleanExpression(), null, "expression", null, 1, 1, UnaryExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(predicateEClass, Predicate.class, "Predicate", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(dyadicExpressionEClass, DyadicExpression.class, "DyadicExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDyadicExpression_LogicalOperator(), this.getDyadicLogicalOperator(), "logicalOperator", "AND", 1, 1, DyadicExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDyadicExpression_LeftHandTerm(), this.getBooleanExpression(), null, "leftHandTerm", null, 1, 1, DyadicExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDyadicExpression_RightHandTerm(), this.getBooleanExpression(), null, "rightHandTerm", null, 1, 1, DyadicExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(comparisonPredicateEClass, ComparisonPredicate.class, "ComparisonPredicate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getComparisonPredicate_Literal(), this.getLiteral(), null, "literal", null, 1, 1, ComparisonPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getComparisonPredicate_Attribute(), this.getClassAttribute(), null, "attribute", null, 1, 1, ComparisonPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getComparisonPredicate_ComparisonOperator(), this.getComparisonOperator(), "comparisonOperator", null, 1, 1, ComparisonPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(inPredicateEClass, InPredicate.class, "InPredicate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getInPredicate_Attribute(), this.getClassAttribute(), null, "attribute", null, 1, 1, InPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInPredicate_InOperator(), this.getInOperator(), "inOperator", null, 1, 1, InPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getInPredicate_Literals(), this.getLiteral(), null, "literals", null, 0, -1, InPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(literalEClass, Literal.class, "Literal", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(signedIntegerLiteralEClass, SignedIntegerLiteral.class, "SignedIntegerLiteral", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSignedIntegerLiteral_Value(), ecorePackage.getELong(), "value", null, 1, 1, SignedIntegerLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(stringLiteralEClass, StringLiteral.class, "StringLiteral", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getStringLiteral_Value(), ecorePackage.getEString(), "value", null, 1, 1, StringLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(booleanLiteralEClass, BooleanLiteral.class, "BooleanLiteral", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getBooleanLiteral_Value(), ecorePackage.getEBoolean(), "value", null, 1, 1, BooleanLiteral.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(subClassPredicateEClass, SubClassPredicate.class, "SubClassPredicate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getSubClassPredicate_SubClassExpression(), this.getBooleanExpression(), null, "subClassExpression", null, 1, 1, SubClassPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSubClassPredicate_SubClassAttribute(), this.getClassAttribute(), null, "subClassAttribute", null, 1, 1, SubClassPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(classAttributeEClass, ClassAttribute.class, "ClassAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getClassAttribute_AttributeName(), ecorePackage.getEString(), "attributeName", null, 1, 1, ClassAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getClassAttribute_MetaOperator(), this.getMetaOperator(), "metaOperator", null, 0, 1, ClassAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getClassAttribute_Index(), ecorePackage.getEInt(), "index", null, 0, 1, ClassAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ op = addEOperation(classAttributeEClass, ecorePackage.getEBoolean(), "isSet", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, ecorePackage.getEObject(), "object", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(classAttributeEClass, null, "getListValue", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, ecorePackage.getEJavaObject(), "object", 0, 1, IS_UNIQUE, IS_ORDERED);
+ EGenericType g1 = createEGenericType(ecorePackage.getEEList());
+ EGenericType g2 = createEGenericType();
+ g1.getETypeArguments().add(g2);
+ initEOperation(op, g1);
+
+ op = addEOperation(classAttributeEClass, ecorePackage.getEJavaObject(), "getValue", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, ecorePackage.getEJavaObject(), "object", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(downCastPredicateEClass, DownCastPredicate.class, "DownCastPredicate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDownCastPredicate_ClassName(), ecorePackage.getEString(), "className", null, 1, 1, DownCastPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDownCastPredicate_Expression(), this.getBooleanExpression(), null, "expression", null, 1, 1, DownCastPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(multiplicityPredicateEClass, MultiplicityPredicate.class, "MultiplicityPredicate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getMultiplicityPredicate_Expression(), this.getBooleanExpression(), null, "expression", null, 1, 1, MultiplicityPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getMultiplicityPredicate_Attribute(), this.getClassAttribute(), null, "attribute", null, 1, 1, MultiplicityPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getMultiplicityPredicate_ListOperator(), this.getListOperator(), "listOperator", null, 1, 1, MultiplicityPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(isSetPredicateEClass, IsSetPredicate.class, "IsSetPredicate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getIsSetPredicate_Attribute(), this.getClassAttribute(), null, "attribute", null, 1, 1, IsSetPredicate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(dyadicLogicalOperatorEEnum, DyadicLogicalOperator.class, "DyadicLogicalOperator");
+ addEEnumLiteral(dyadicLogicalOperatorEEnum, DyadicLogicalOperator.AND);
+ addEEnumLiteral(dyadicLogicalOperatorEEnum, DyadicLogicalOperator.OR);
+
+ initEEnum(unaryLogicalOperatorEEnum, UnaryLogicalOperator.class, "UnaryLogicalOperator");
+ addEEnumLiteral(unaryLogicalOperatorEEnum, UnaryLogicalOperator.NOT);
+
+ initEEnum(comparisonOperatorEEnum, ComparisonOperator.class, "ComparisonOperator");
+ addEEnumLiteral(comparisonOperatorEEnum, ComparisonOperator.EQUAL);
+ addEEnumLiteral(comparisonOperatorEEnum, ComparisonOperator.NOT_EQUAL);
+ addEEnumLiteral(comparisonOperatorEEnum, ComparisonOperator.GREATER_THEN);
+ addEEnumLiteral(comparisonOperatorEEnum, ComparisonOperator.GREATER_OR_EQUAL_THAN);
+ addEEnumLiteral(comparisonOperatorEEnum, ComparisonOperator.LESS_THAN);
+ addEEnumLiteral(comparisonOperatorEEnum, ComparisonOperator.LESS_OR_EQUAL_THAN);
+
+ initEEnum(listOperatorEEnum, ListOperator.class, "ListOperator");
+ addEEnumLiteral(listOperatorEEnum, ListOperator.ANY);
+ addEEnumLiteral(listOperatorEEnum, ListOperator.ALL);
+ addEEnumLiteral(listOperatorEEnum, ListOperator.NONE);
+
+ initEEnum(inOperatorEEnum, InOperator.class, "InOperator");
+ addEEnumLiteral(inOperatorEEnum, InOperator.IN);
+ addEEnumLiteral(inOperatorEEnum, InOperator.NOT_IN);
+
+ initEEnum(metaOperatorEEnum, MetaOperator.class, "MetaOperator");
+ addEEnumLiteral(metaOperatorEEnum, MetaOperator.SIZE);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // GenModel
+ createGenModelAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>GenModel</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createGenModelAnnotations() {
+ String source = "GenModel";
+ addAnnotation
+ (this,
+ source,
+ new String[] {
+ "documentation", "Copyright (C) 2013 TomTom International B.V.\r\n\r\nThis Source Code Form is subject to the terms of the Mozilla Public\r\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\r\nfile, You can obtain one at http://mozilla.org/MPL/2.0/."
+ });
+ }
+
+} //FilterexprPackageImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/InPredicateImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/InPredicateImpl.java
new file mode 100755
index 0000000..06bf100
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/InPredicateImpl.java
@@ -0,0 +1,613 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.genivi.booleanexpr.BooleanLiteral;
+import org.genivi.booleanexpr.ClassAttribute;
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.InOperator;
+import org.genivi.booleanexpr.InPredicate;
+import org.genivi.booleanexpr.Literal;
+import org.genivi.booleanexpr.SignedIntegerLiteral;
+import org.genivi.booleanexpr.StringLiteral;
+import org.genivi.booleanexpr.util.FilterExprUtil;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>In Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.InPredicateImpl#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.InPredicateImpl#getInOperator <em>In Operator</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.InPredicateImpl#getLiterals <em>Literals</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class InPredicateImpl extends PredicateImpl implements InPredicate {
+ private final static Logger LOGGER = Logger.getLogger(ComparisonPredicateImpl.class.getName());
+
+ /**
+ * The cached value of the '{@link #getAttribute() <em>Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttribute()
+ * @generated
+ * @ordered
+ */
+ protected ClassAttribute attribute;
+ /**
+ * This is true if the Attribute containment reference has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean attributeESet;
+ /**
+ * The default value of the '{@link #getInOperator() <em>In Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInOperator()
+ * @generated
+ * @ordered
+ */
+ protected static final InOperator IN_OPERATOR_EDEFAULT = InOperator.IN;
+ /**
+ * The cached value of the '{@link #getInOperator() <em>In Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInOperator()
+ * @generated
+ * @ordered
+ */
+ protected InOperator inOperator = IN_OPERATOR_EDEFAULT;
+ /**
+ * This is true if the In Operator attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean inOperatorESet;
+ /**
+ * The cached value of the '{@link #getLiterals() <em>Literals</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLiterals()
+ * @generated
+ * @ordered
+ */
+ protected EList<Literal> literals;
+
+ static {
+ LOGGER.setLevel(Level.SEVERE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected InPredicateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.IN_PREDICATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ClassAttribute getAttribute() {
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetAttribute(ClassAttribute newAttribute, NotificationChain msgs) {
+ ClassAttribute oldAttribute = attribute;
+ attribute = newAttribute;
+ boolean oldAttributeESet = attributeESet;
+ attributeESet = true;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.IN_PREDICATE__ATTRIBUTE, oldAttribute, newAttribute, !oldAttributeESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAttribute(ClassAttribute newAttribute) {
+ if (newAttribute != attribute) {
+ NotificationChain msgs = null;
+ if (attribute != null)
+ msgs = ((InternalEObject)attribute).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.IN_PREDICATE__ATTRIBUTE, null, msgs);
+ if (newAttribute != null)
+ msgs = ((InternalEObject)newAttribute).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.IN_PREDICATE__ATTRIBUTE, null, msgs);
+ msgs = basicSetAttribute(newAttribute, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldAttributeESet = attributeESet;
+ attributeESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.IN_PREDICATE__ATTRIBUTE, newAttribute, newAttribute, !oldAttributeESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicUnsetAttribute(NotificationChain msgs) {
+ ClassAttribute oldAttribute = attribute;
+ attribute = null;
+ boolean oldAttributeESet = attributeESet;
+ attributeESet = false;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.IN_PREDICATE__ATTRIBUTE, oldAttribute, null, oldAttributeESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetAttribute() {
+ if (attribute != null) {
+ NotificationChain msgs = null;
+ msgs = ((InternalEObject)attribute).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.IN_PREDICATE__ATTRIBUTE, null, msgs);
+ msgs = basicUnsetAttribute(msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldAttributeESet = attributeESet;
+ attributeESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.IN_PREDICATE__ATTRIBUTE, null, null, oldAttributeESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetAttribute() {
+ return attributeESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InOperator getInOperator() {
+ return inOperator;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInOperator(InOperator newInOperator) {
+ InOperator oldInOperator = inOperator;
+ inOperator = newInOperator == null ? IN_OPERATOR_EDEFAULT : newInOperator;
+ boolean oldInOperatorESet = inOperatorESet;
+ inOperatorESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.IN_PREDICATE__IN_OPERATOR, oldInOperator, inOperator, !oldInOperatorESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetInOperator() {
+ InOperator oldInOperator = inOperator;
+ boolean oldInOperatorESet = inOperatorESet;
+ inOperator = IN_OPERATOR_EDEFAULT;
+ inOperatorESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.IN_PREDICATE__IN_OPERATOR, oldInOperator, IN_OPERATOR_EDEFAULT, oldInOperatorESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetInOperator() {
+ return inOperatorESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Literal> getLiterals() {
+ if (literals == null) {
+ literals = new EObjectContainmentEList.Unsettable<Literal>(Literal.class, this, FilterexprPackage.IN_PREDICATE__LITERALS);
+ }
+ return literals;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetLiterals() {
+ if (literals != null) ((InternalEList.Unsettable<?>)literals).unset();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetLiterals() {
+ return literals != null && ((InternalEList.Unsettable<?>)literals).isSet();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FilterexprPackage.IN_PREDICATE__ATTRIBUTE:
+ return basicUnsetAttribute(msgs);
+ case FilterexprPackage.IN_PREDICATE__LITERALS:
+ return ((InternalEList<?>)getLiterals()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.IN_PREDICATE__ATTRIBUTE:
+ return getAttribute();
+ case FilterexprPackage.IN_PREDICATE__IN_OPERATOR:
+ return getInOperator();
+ case FilterexprPackage.IN_PREDICATE__LITERALS:
+ return getLiterals();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.IN_PREDICATE__ATTRIBUTE:
+ setAttribute((ClassAttribute)newValue);
+ return;
+ case FilterexprPackage.IN_PREDICATE__IN_OPERATOR:
+ setInOperator((InOperator)newValue);
+ return;
+ case FilterexprPackage.IN_PREDICATE__LITERALS:
+ getLiterals().clear();
+ getLiterals().addAll((Collection<? extends Literal>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.IN_PREDICATE__ATTRIBUTE:
+ unsetAttribute();
+ return;
+ case FilterexprPackage.IN_PREDICATE__IN_OPERATOR:
+ unsetInOperator();
+ return;
+ case FilterexprPackage.IN_PREDICATE__LITERALS:
+ unsetLiterals();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.IN_PREDICATE__ATTRIBUTE:
+ return isSetAttribute();
+ case FilterexprPackage.IN_PREDICATE__IN_OPERATOR:
+ return isSetInOperator();
+ case FilterexprPackage.IN_PREDICATE__LITERALS:
+ return isSetLiterals();
+ }
+ return super.eIsSet(featureID);
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ if (attribute != null) {
+ result.append(attribute.toString());
+ } else {
+ result.append("@");
+ }
+ result.append(' ');
+ result.append(FilterExprUtil.inOperatorToString(inOperator));
+ result.append(" [");
+ boolean first = true;
+ for (Literal literal: literals) {
+ if (first) {
+ first = false;
+ } else {
+ result.append(", ");
+ }
+ result.append(literal.toString());
+ }
+ result.append("]");
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean evaluate(Object object) {
+ LOGGER.info("evaluate => " + toString());
+
+ boolean returnValue = false;
+ Object attributeObjectValue = null;
+ if (object instanceof EObject) {
+ attributeObjectValue = attribute.getValue((EObject) object);
+ } else {
+ attributeObjectValue = object;
+ }
+ if (attributeObjectValue == null) {
+ returnValue = evaluateNull();
+ } else if (attributeObjectValue instanceof Boolean) {
+ returnValue = evaluateBoolean(attributeObjectValue);
+ } else if (attributeObjectValue instanceof Integer) {
+ returnValue = evaluateInteger(attributeObjectValue);
+ } else if (attributeObjectValue instanceof Long) {
+ returnValue = evaluateInteger(attributeObjectValue);
+ } else if (attributeObjectValue instanceof String) {
+ returnValue = evaluateString(attributeObjectValue);
+ } else {
+ throw new IllegalArgumentException("Unsupported attribute type in InPredicate. Attribute value = " + attributeObjectValue);
+ }
+
+ LOGGER.info("evaluate <= " + returnValue);
+
+ return returnValue;
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ private boolean evaluateNull() {
+ LOGGER.info("=>");
+
+ boolean returnValue = false;
+
+ switch (inOperator) {
+
+ case NOT_IN:
+ returnValue = true;
+ break;
+
+ default:
+ break; // No action.
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ private boolean evaluateBoolean(Object attributeObjectValue) {
+ LOGGER.info("=>");
+ boolean attributeValue = (Boolean) attributeObjectValue;
+ List<Boolean> literalValues = new ArrayList<Boolean>();
+
+ for (Literal literal: literals) {
+ if (!(literal instanceof BooleanLiteral)) {
+ throw new IllegalArgumentException("Incompatible types in ComparisonPredicate. Attribute value is Boolean, while literal is not a Boolean. Literal = " + literal);
+ }
+
+ boolean literalValue = ((BooleanLiteral) literal).isValue();
+ literalValues.add(literalValue);
+ }
+
+ boolean returnValue = false;
+
+ switch (inOperator) {
+ case IN:
+ LOGGER.info("Applying IN");
+ returnValue = literalValues.contains(attributeValue);
+ break;
+
+ case NOT_IN:
+ LOGGER.info("Applying NOT_IN");
+ returnValue = !literalValues.contains(attributeValue);
+ break;
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ private boolean evaluateInteger(Object attributeObjectValue) {
+ LOGGER.info("=>");
+ Long attributeValue = null;
+ if (attributeObjectValue != null) {
+ if (attributeObjectValue instanceof Long) {
+ attributeValue = (Long) attributeObjectValue;
+ } else {
+ attributeValue = new Long(((Integer) attributeObjectValue).intValue());
+ }
+ }
+ List<Long> literalValues = new ArrayList<Long>();
+
+ for (Literal literal: literals) {
+ if (!(literal instanceof SignedIntegerLiteral)) {
+ throw new IllegalArgumentException("Incompatible types in ComparisonPredicate. Attribute value is Integer, while literal is not a Integer. Literal = " + literal);
+ }
+
+ Long literalValue = ((SignedIntegerLiteral) literal).getValue();
+ literalValues.add(literalValue);
+ }
+
+ boolean returnValue = false;
+
+ switch (inOperator) {
+ case IN:
+ LOGGER.info("Applying IN");
+ returnValue = literalValues.contains(attributeValue);
+ break;
+
+ case NOT_IN:
+ LOGGER.info("Applying NOT_IN");
+ returnValue = !literalValues.contains(attributeValue);
+ break;
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ private boolean evaluateString(Object attributeObjectValue) {
+ LOGGER.info("=>");
+ String attributeValue = (String) attributeObjectValue;
+ List<String> literalValues = new ArrayList<String>();
+
+ for (Literal literal: literals) {
+ if (!(literal instanceof StringLiteral)) {
+ throw new IllegalArgumentException("Incompatible types in ComparisonPredicate. Attribute value is String, while literal is not a String. Literal = " + literal);
+ }
+
+ String literalValue = ((StringLiteral) literal).getValue();
+ literalValues.add(literalValue);
+ }
+
+ boolean returnValue = false;
+
+ switch (inOperator) {
+ case IN:
+ LOGGER.info("Applying IN");
+ returnValue = literalValues.contains(attributeValue);
+ break;
+
+ case NOT_IN:
+ LOGGER.info("Applying NOT_IN");
+ returnValue = !literalValues.contains(attributeValue);
+ break;
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+} //InPredicateImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/IsSetPredicateImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/IsSetPredicateImpl.java
new file mode 100755
index 0000000..6c25c89
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/IsSetPredicateImpl.java
@@ -0,0 +1,245 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.genivi.booleanexpr.ClassAttribute;
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.IsSetPredicate;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Is Set Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.IsSetPredicateImpl#getAttribute <em>Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class IsSetPredicateImpl extends PredicateImpl implements IsSetPredicate {
+ private final static Logger LOGGER = Logger.getLogger(IsSetPredicateImpl.class.getName());
+
+ /**
+ * The cached value of the '{@link #getAttribute() <em>Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttribute()
+ * @generated
+ * @ordered
+ */
+ protected ClassAttribute attribute;
+
+ static {
+ LOGGER.setLevel(Level.SEVERE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IsSetPredicateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.IS_SET_PREDICATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ClassAttribute getAttribute() {
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetAttribute(ClassAttribute newAttribute, NotificationChain msgs) {
+ ClassAttribute oldAttribute = attribute;
+ attribute = newAttribute;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.IS_SET_PREDICATE__ATTRIBUTE, oldAttribute, newAttribute);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAttribute(ClassAttribute newAttribute) {
+ if (newAttribute != attribute) {
+ NotificationChain msgs = null;
+ if (attribute != null)
+ msgs = ((InternalEObject)attribute).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.IS_SET_PREDICATE__ATTRIBUTE, null, msgs);
+ if (newAttribute != null)
+ msgs = ((InternalEObject)newAttribute).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.IS_SET_PREDICATE__ATTRIBUTE, null, msgs);
+ msgs = basicSetAttribute(newAttribute, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.IS_SET_PREDICATE__ATTRIBUTE, newAttribute, newAttribute));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FilterexprPackage.IS_SET_PREDICATE__ATTRIBUTE:
+ return basicSetAttribute(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.IS_SET_PREDICATE__ATTRIBUTE:
+ return getAttribute();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.IS_SET_PREDICATE__ATTRIBUTE:
+ setAttribute((ClassAttribute)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.IS_SET_PREDICATE__ATTRIBUTE:
+ setAttribute((ClassAttribute)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.IS_SET_PREDICATE__ATTRIBUTE:
+ return attribute != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ // isSet operator
+ result.append("isSet ");
+
+ // ClassAttribute
+ if (attribute != null) {
+ result.append(attribute.toString());
+ } else {
+ result.append("<attribute is null>");
+ }
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String format(String indent, String indentSize) {
+ StringBuffer result = new StringBuffer();
+
+ result.append(indent);
+ result.append(toString());
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean evaluate(Object object) {
+ LOGGER.info("evaluate => " + toString());
+
+ boolean returnValue = false;
+ if (object instanceof EObject) {
+ returnValue = attribute.isSet((EObject) object);
+ } else {
+ throw new IllegalArgumentException("Unsupported attribute in IsSetPredicate. Attribute = " + object);
+ }
+
+ LOGGER.info("evaluate <= " + returnValue);
+
+ return returnValue;
+ }
+} //IsSetPredicateImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/LiteralImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/LiteralImpl.java
new file mode 100755
index 0000000..68b46a9
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/LiteralImpl.java
@@ -0,0 +1,57 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.Literal;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Literal</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class LiteralImpl extends EObjectImpl implements Literal {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected LiteralImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.LITERAL;
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String format(String indent, String indentSize) {
+ return toString();
+ }
+} //LiteralImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/MultiplicityPredicateImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/MultiplicityPredicateImpl.java
new file mode 100755
index 0000000..843f1d7
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/MultiplicityPredicateImpl.java
@@ -0,0 +1,638 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.genivi.booleanexpr.BooleanExpression;
+import org.genivi.booleanexpr.ClassAttribute;
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.ListOperator;
+import org.genivi.booleanexpr.MultiplicityPredicate;
+import org.genivi.booleanexpr.util.FilterExprUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Multiplicity Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.MultiplicityPredicateImpl#getExpression <em>Expression</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.MultiplicityPredicateImpl#getAttribute <em>Attribute</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.MultiplicityPredicateImpl#getListOperator <em>List Operator</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MultiplicityPredicateImpl extends PredicateImpl implements MultiplicityPredicate {
+ private final static Logger LOGGER = Logger.getLogger(SubClassPredicateImpl.class.getName());
+ private static final String NEW_LINE = System.getProperty("line.separator");
+
+ /**
+ * The cached value of the '{@link #getExpression() <em>Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExpression()
+ * @generated
+ * @ordered
+ */
+ protected BooleanExpression expression;
+
+ /**
+ * This is true if the Expression containment reference has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean expressionESet;
+
+ /**
+ * The cached value of the '{@link #getAttribute() <em>Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAttribute()
+ * @generated
+ * @ordered
+ */
+ protected ClassAttribute attribute;
+
+ /**
+ * This is true if the Attribute containment reference has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean attributeESet;
+
+ /**
+ * The default value of the '{@link #getListOperator() <em>List Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getListOperator()
+ * @generated
+ * @ordered
+ */
+ protected static final ListOperator LIST_OPERATOR_EDEFAULT = ListOperator.ANY;
+
+ /**
+ * The cached value of the '{@link #getListOperator() <em>List Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getListOperator()
+ * @generated
+ * @ordered
+ */
+ protected ListOperator listOperator = LIST_OPERATOR_EDEFAULT;
+
+ /**
+ * This is true if the List Operator attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean listOperatorESet;
+
+ static {
+ LOGGER.setLevel(Level.SEVERE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MultiplicityPredicateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.MULTIPLICITY_PREDICATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BooleanExpression getExpression() {
+ return expression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetExpression(BooleanExpression newExpression, NotificationChain msgs) {
+ BooleanExpression oldExpression = expression;
+ expression = newExpression;
+ boolean oldExpressionESet = expressionESet;
+ expressionESet = true;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION, oldExpression, newExpression, !oldExpressionESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExpression(BooleanExpression newExpression) {
+ if (newExpression != expression) {
+ NotificationChain msgs = null;
+ if (expression != null)
+ msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION, null, msgs);
+ if (newExpression != null)
+ msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION, null, msgs);
+ msgs = basicSetExpression(newExpression, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldExpressionESet = expressionESet;
+ expressionESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION, newExpression, newExpression, !oldExpressionESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicUnsetExpression(NotificationChain msgs) {
+ BooleanExpression oldExpression = expression;
+ expression = null;
+ boolean oldExpressionESet = expressionESet;
+ expressionESet = false;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION, oldExpression, null, oldExpressionESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetExpression() {
+ if (expression != null) {
+ NotificationChain msgs = null;
+ msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION, null, msgs);
+ msgs = basicUnsetExpression(msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldExpressionESet = expressionESet;
+ expressionESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION, null, null, oldExpressionESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetExpression() {
+ return expressionESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ListOperator getListOperator() {
+ return listOperator;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setListOperator(ListOperator newListOperator) {
+ ListOperator oldListOperator = listOperator;
+ listOperator = newListOperator == null ? LIST_OPERATOR_EDEFAULT : newListOperator;
+ boolean oldListOperatorESet = listOperatorESet;
+ listOperatorESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.MULTIPLICITY_PREDICATE__LIST_OPERATOR, oldListOperator, listOperator, !oldListOperatorESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetListOperator() {
+ ListOperator oldListOperator = listOperator;
+ boolean oldListOperatorESet = listOperatorESet;
+ listOperator = LIST_OPERATOR_EDEFAULT;
+ listOperatorESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.MULTIPLICITY_PREDICATE__LIST_OPERATOR, oldListOperator, LIST_OPERATOR_EDEFAULT, oldListOperatorESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetListOperator() {
+ return listOperatorESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ClassAttribute getAttribute() {
+ return attribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetAttribute(ClassAttribute newAttribute, NotificationChain msgs) {
+ ClassAttribute oldAttribute = attribute;
+ attribute = newAttribute;
+ boolean oldAttributeESet = attributeESet;
+ attributeESet = true;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE, oldAttribute, newAttribute, !oldAttributeESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAttribute(ClassAttribute newAttribute) {
+ if (newAttribute != attribute) {
+ NotificationChain msgs = null;
+ if (attribute != null)
+ msgs = ((InternalEObject)attribute).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE, null, msgs);
+ if (newAttribute != null)
+ msgs = ((InternalEObject)newAttribute).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE, null, msgs);
+ msgs = basicSetAttribute(newAttribute, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldAttributeESet = attributeESet;
+ attributeESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE, newAttribute, newAttribute, !oldAttributeESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicUnsetAttribute(NotificationChain msgs) {
+ ClassAttribute oldAttribute = attribute;
+ attribute = null;
+ boolean oldAttributeESet = attributeESet;
+ attributeESet = false;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE, oldAttribute, null, oldAttributeESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetAttribute() {
+ if (attribute != null) {
+ NotificationChain msgs = null;
+ msgs = ((InternalEObject)attribute).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE, null, msgs);
+ msgs = basicUnsetAttribute(msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldAttributeESet = attributeESet;
+ attributeESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE, null, null, oldAttributeESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetAttribute() {
+ return attributeESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION:
+ return basicUnsetExpression(msgs);
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE:
+ return basicUnsetAttribute(msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION:
+ return getExpression();
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE:
+ return getAttribute();
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__LIST_OPERATOR:
+ return getListOperator();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION:
+ setExpression((BooleanExpression)newValue);
+ return;
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE:
+ setAttribute((ClassAttribute)newValue);
+ return;
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__LIST_OPERATOR:
+ setListOperator((ListOperator)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION:
+ unsetExpression();
+ return;
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE:
+ unsetAttribute();
+ return;
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__LIST_OPERATOR:
+ unsetListOperator();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__EXPRESSION:
+ return isSetExpression();
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__ATTRIBUTE:
+ return isSetAttribute();
+ case FilterexprPackage.MULTIPLICITY_PREDICATE__LIST_OPERATOR:
+ return isSetListOperator();
+ }
+ return super.eIsSet(featureID);
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ // ListOperator
+ if (listOperatorESet)
+ result.append(FilterExprUtil.listOperatorToString(listOperator));
+ else
+ result.append("<unset>");
+
+ // ClassAttribute
+ result.append(' ');
+ if (attribute != null) {
+ result.append(attribute.toString());
+ } else {
+ result.append("<not set>");
+ }
+
+ // Expression
+ result.append(" (");
+ result.append(expression.toString());
+ result.append(')');
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String format(String indent, String indentSize) {
+ StringBuffer result = new StringBuffer();
+
+ result.append(indent);
+ // ListOperator
+ if (listOperatorESet)
+ result.append(FilterExprUtil.listOperatorToString(listOperator));
+ else
+ result.append("<unset>");
+
+ // ClassAttribute
+ result.append(' ');
+ if (attribute != null) {
+ result.append(attribute.toString());
+ } else {
+ result.append("<not set>");
+ }
+
+ // Expression
+ result.append(" (");
+ result.append(NEW_LINE);
+
+ indent += indentSize;
+
+ result.append(expression.format(indent, indentSize));
+ result.append(NEW_LINE);
+
+ indent = indent.substring(0, indent.lastIndexOf(indentSize));
+
+ result.append(indent);
+ result.append(')');
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean evaluate(Object object) {
+ LOGGER.info("evaluate => " + toString());
+
+ boolean returnValue = false;
+
+ Object attributeObject = attribute.getListValue((EObject) object);
+
+ // subClassObject can be
+ // a simple object, e.g. Integer
+ // a list of simple objects
+ // a subClass
+ // a list of subClasses.
+
+ if (attributeObject instanceof EList<?>) {
+ LOGGER.fine("EList, so many");
+ @SuppressWarnings("unchecked")
+ EList<EObject> eObjects = (EList<EObject>) attributeObject;
+
+ switch (listOperator) {
+ case ALL:
+ returnValue = evaluateForAllListOperator(eObjects);
+ break;
+
+ case ANY:
+ returnValue = evaluateForAnyListOperator(eObjects);
+ break;
+
+ case NONE:
+ returnValue = !evaluateForAnyListOperator(eObjects);
+ break;
+
+ default:
+ throw new IllegalArgumentException("Operator not supported: " + listOperator);
+ }
+ } else {
+ LOGGER.severe("No EList, so single subclass object");
+ throw new IllegalArgumentException("Attribute \'" + attribute.getAttributeName() + "\' is not a list.");
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ private boolean evaluateForAllListOperator(EList<EObject> eObjects) {
+ LOGGER.info("=>");
+
+ boolean returnValue = true;
+
+ for (EObject eObject: eObjects) {
+ boolean result = expression.evaluate(eObject);
+ if (result == false) {
+ returnValue = false;
+ break;
+ }
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ private boolean evaluateForAnyListOperator(EList<EObject> eObjects) {
+ LOGGER.info("=>");
+
+ boolean returnValue = false;
+
+ for (Object eObject: eObjects) {
+ LOGGER.info("Handling eObject in for loop");
+ boolean result = expression.evaluate(eObject);
+ if (result == true) {
+ returnValue = true;
+ break;
+ }
+ }
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+} //MultiplicityPredicateImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/PredicateImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/PredicateImpl.java
new file mode 100755
index 0000000..c8ed172
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/PredicateImpl.java
@@ -0,0 +1,60 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.Predicate;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class PredicateImpl extends BooleanExpressionImpl implements Predicate {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PredicateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.PREDICATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String format(String indent, String indentSize) {
+ StringBuffer result = new StringBuffer();
+
+ result.append(indent);
+ result.append(toString());
+
+ return result.toString();
+ }
+
+} //PredicateImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/SignedIntegerLiteralImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/SignedIntegerLiteralImpl.java
new file mode 100755
index 0000000..7b6577b
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/SignedIntegerLiteralImpl.java
@@ -0,0 +1,204 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.SignedIntegerLiteral;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Signed Integer Literal</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.SignedIntegerLiteralImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SignedIntegerLiteralImpl extends LiteralImpl implements SignedIntegerLiteral {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final long VALUE_EDEFAULT = 0L;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected long value = VALUE_EDEFAULT;
+
+ /**
+ * This is true if the Value attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean valueESet;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SignedIntegerLiteralImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.SIGNED_INTEGER_LITERAL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public long getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(long newValue) {
+ long oldValue = value;
+ value = newValue;
+ boolean oldValueESet = valueESet;
+ valueESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.SIGNED_INTEGER_LITERAL__VALUE, oldValue, value, !oldValueESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetValue() {
+ long oldValue = value;
+ boolean oldValueESet = valueESet;
+ value = VALUE_EDEFAULT;
+ valueESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.SIGNED_INTEGER_LITERAL__VALUE, oldValue, VALUE_EDEFAULT, oldValueESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetValue() {
+ return valueESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.SIGNED_INTEGER_LITERAL__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.SIGNED_INTEGER_LITERAL__VALUE:
+ setValue((Long)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.SIGNED_INTEGER_LITERAL__VALUE:
+ unsetValue();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.SIGNED_INTEGER_LITERAL__VALUE:
+ return isSetValue();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ if (valueESet)
+ result.append(value);
+ else
+ result.append("<unset>");
+
+ return result.toString();
+ }
+
+} //SignedIntegerLiteralImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/StringLiteralImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/StringLiteralImpl.java
new file mode 100755
index 0000000..7d7c626
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/StringLiteralImpl.java
@@ -0,0 +1,207 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.StringLiteral;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>String Literal</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.StringLiteralImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class StringLiteralImpl extends LiteralImpl implements StringLiteral {
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final String VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected String value = VALUE_EDEFAULT;
+
+ /**
+ * This is true if the Value attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean valueESet;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StringLiteralImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.STRING_LITERAL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(String newValue) {
+ String oldValue = value;
+ value = newValue;
+ boolean oldValueESet = valueESet;
+ valueESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.STRING_LITERAL__VALUE, oldValue, value, !oldValueESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetValue() {
+ String oldValue = value;
+ boolean oldValueESet = valueESet;
+ value = VALUE_EDEFAULT;
+ valueESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.STRING_LITERAL__VALUE, oldValue, VALUE_EDEFAULT, oldValueESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetValue() {
+ return valueESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.STRING_LITERAL__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.STRING_LITERAL__VALUE:
+ setValue((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.STRING_LITERAL__VALUE:
+ unsetValue();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.STRING_LITERAL__VALUE:
+ return isSetValue();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ if (valueESet) {
+ result.append("\"");
+ result.append(value);
+ result.append("\"");
+ } else {
+ result.append("<unset>");
+ }
+
+ return result.toString();
+ }
+
+} //StringLiteralImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/SubClassPredicateImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/SubClassPredicateImpl.java
new file mode 100755
index 0000000..359ce51
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/SubClassPredicateImpl.java
@@ -0,0 +1,462 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import java.util.logging.Logger;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.genivi.booleanexpr.BooleanExpression;
+import org.genivi.booleanexpr.ClassAttribute;
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.SubClassPredicate;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Sub Class Predicate</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.SubClassPredicateImpl#getSubClassExpression <em>Sub Class Expression</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.SubClassPredicateImpl#getSubClassAttribute <em>Sub Class Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SubClassPredicateImpl extends PredicateImpl implements SubClassPredicate {
+ private final static Logger LOGGER = Logger.getLogger(SubClassPredicateImpl.class.getName());
+ private static final String NEW_LINE = System.getProperty("line.separator");
+
+ /**
+ * The cached value of the '{@link #getSubClassExpression() <em>Sub Class Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubClassExpression()
+ * @generated
+ * @ordered
+ */
+ protected BooleanExpression subClassExpression;
+
+ /**
+ * This is true if the Sub Class Expression containment reference has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean subClassExpressionESet;
+
+ /**
+ * The cached value of the '{@link #getSubClassAttribute() <em>Sub Class Attribute</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubClassAttribute()
+ * @generated
+ * @ordered
+ */
+ protected ClassAttribute subClassAttribute;
+
+ /**
+ * This is true if the Sub Class Attribute containment reference has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean subClassAttributeESet;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SubClassPredicateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.SUB_CLASS_PREDICATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BooleanExpression getSubClassExpression() {
+ return subClassExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSubClassExpression(BooleanExpression newSubClassExpression, NotificationChain msgs) {
+ BooleanExpression oldSubClassExpression = subClassExpression;
+ subClassExpression = newSubClassExpression;
+ boolean oldSubClassExpressionESet = subClassExpressionESet;
+ subClassExpressionESet = true;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION, oldSubClassExpression, newSubClassExpression, !oldSubClassExpressionESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSubClassExpression(BooleanExpression newSubClassExpression) {
+ if (newSubClassExpression != subClassExpression) {
+ NotificationChain msgs = null;
+ if (subClassExpression != null)
+ msgs = ((InternalEObject)subClassExpression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION, null, msgs);
+ if (newSubClassExpression != null)
+ msgs = ((InternalEObject)newSubClassExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION, null, msgs);
+ msgs = basicSetSubClassExpression(newSubClassExpression, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldSubClassExpressionESet = subClassExpressionESet;
+ subClassExpressionESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION, newSubClassExpression, newSubClassExpression, !oldSubClassExpressionESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicUnsetSubClassExpression(NotificationChain msgs) {
+ BooleanExpression oldSubClassExpression = subClassExpression;
+ subClassExpression = null;
+ boolean oldSubClassExpressionESet = subClassExpressionESet;
+ subClassExpressionESet = false;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION, oldSubClassExpression, null, oldSubClassExpressionESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetSubClassExpression() {
+ if (subClassExpression != null) {
+ NotificationChain msgs = null;
+ msgs = ((InternalEObject)subClassExpression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION, null, msgs);
+ msgs = basicUnsetSubClassExpression(msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldSubClassExpressionESet = subClassExpressionESet;
+ subClassExpressionESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION, null, null, oldSubClassExpressionESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetSubClassExpression() {
+ return subClassExpressionESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ClassAttribute getSubClassAttribute() {
+ return subClassAttribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSubClassAttribute(ClassAttribute newSubClassAttribute, NotificationChain msgs) {
+ ClassAttribute oldSubClassAttribute = subClassAttribute;
+ subClassAttribute = newSubClassAttribute;
+ boolean oldSubClassAttributeESet = subClassAttributeESet;
+ subClassAttributeESet = true;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE, oldSubClassAttribute, newSubClassAttribute, !oldSubClassAttributeESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSubClassAttribute(ClassAttribute newSubClassAttribute) {
+ if (newSubClassAttribute != subClassAttribute) {
+ NotificationChain msgs = null;
+ if (subClassAttribute != null)
+ msgs = ((InternalEObject)subClassAttribute).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE, null, msgs);
+ if (newSubClassAttribute != null)
+ msgs = ((InternalEObject)newSubClassAttribute).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE, null, msgs);
+ msgs = basicSetSubClassAttribute(newSubClassAttribute, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldSubClassAttributeESet = subClassAttributeESet;
+ subClassAttributeESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE, newSubClassAttribute, newSubClassAttribute, !oldSubClassAttributeESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicUnsetSubClassAttribute(NotificationChain msgs) {
+ ClassAttribute oldSubClassAttribute = subClassAttribute;
+ subClassAttribute = null;
+ boolean oldSubClassAttributeESet = subClassAttributeESet;
+ subClassAttributeESet = false;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE, oldSubClassAttribute, null, oldSubClassAttributeESet);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetSubClassAttribute() {
+ if (subClassAttribute != null) {
+ NotificationChain msgs = null;
+ msgs = ((InternalEObject)subClassAttribute).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE, null, msgs);
+ msgs = basicUnsetSubClassAttribute(msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else {
+ boolean oldSubClassAttributeESet = subClassAttributeESet;
+ subClassAttributeESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE, null, null, oldSubClassAttributeESet));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetSubClassAttribute() {
+ return subClassAttributeESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION:
+ return basicUnsetSubClassExpression(msgs);
+ case FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE:
+ return basicUnsetSubClassAttribute(msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION:
+ return getSubClassExpression();
+ case FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE:
+ return getSubClassAttribute();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION:
+ setSubClassExpression((BooleanExpression)newValue);
+ return;
+ case FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE:
+ setSubClassAttribute((ClassAttribute)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION:
+ unsetSubClassExpression();
+ return;
+ case FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE:
+ unsetSubClassAttribute();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_EXPRESSION:
+ return isSetSubClassExpression();
+ case FilterexprPackage.SUB_CLASS_PREDICATE__SUB_CLASS_ATTRIBUTE:
+ return isSetSubClassAttribute();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+
+ // ClassAttribute
+ if (subClassAttribute != null) {
+ result.append(subClassAttribute.toString());
+ } else {
+ result.append("@");
+ }
+
+ // Expression
+ result.append(" (");
+ result.append(subClassExpression.toString());
+ result.append(')');
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String format(String indent, String indentSize) {
+ StringBuffer result = new StringBuffer();
+
+ result.append(indent);
+
+ // ClassAttribute
+ if (subClassAttribute != null) {
+ result.append(subClassAttribute.toString());
+ } else {
+ result.append("@");
+ }
+
+ // Expression
+ result.append(" (");
+ result.append(NEW_LINE);
+
+ indent += indentSize;
+
+ result.append(subClassExpression.format(indent, indentSize));
+ result.append(NEW_LINE);
+
+ indent = indent.substring(0, indent.lastIndexOf(indentSize));
+
+ result.append(indent);
+ result.append(')');
+ result.append(NEW_LINE);
+
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean evaluate(Object object) {
+ LOGGER.info("evaluate => " + toString());
+
+ String subClassAttributeName = "<null>";
+ if (subClassAttribute != null) {
+ subClassAttributeName =subClassAttribute.getAttributeName();
+ }
+ LOGGER.info("=> attributeName = " + subClassAttributeName);
+
+ boolean returnValue = false;
+
+ Object subClassObject;
+ if (subClassAttribute != null) {
+ subClassObject = subClassAttribute.getValue((EObject) object);
+ } else {
+ subClassObject = object; // TODO throw exception
+ }
+
+ returnValue = subClassExpression.evaluate(subClassObject);
+
+ LOGGER.info("<= " + returnValue);
+
+ return returnValue;
+ }
+} //SubClassPredicateImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/UnaryExpressionImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/UnaryExpressionImpl.java
new file mode 100755
index 0000000..ef2fd3f
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/impl/UnaryExpressionImpl.java
@@ -0,0 +1,306 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.impl;
+
+import java.util.logging.Logger;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.genivi.booleanexpr.BooleanExpression;
+import org.genivi.booleanexpr.FilterexprPackage;
+import org.genivi.booleanexpr.UnaryExpression;
+import org.genivi.booleanexpr.UnaryLogicalOperator;
+import org.genivi.booleanexpr.util.FilterExprUtil;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>unary Expression</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.genivi.booleanexpr.impl.UnaryExpressionImpl#getUnaryOperator <em>Unary Operator</em>}</li>
+ * <li>{@link org.genivi.booleanexpr.impl.UnaryExpressionImpl#getExpression <em>Expression</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class UnaryExpressionImpl extends BooleanExpressionImpl implements UnaryExpression {
+ private final static Logger LOGGER = Logger.getLogger(UnaryExpressionImpl.class.getName());
+ private static final String NEW_LINE = System.getProperty("line.separator");
+
+ /**
+ * The default value of the '{@link #getUnaryOperator() <em>Unary Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUnaryOperator()
+ * @generated
+ * @ordered
+ */
+ protected static final UnaryLogicalOperator UNARY_OPERATOR_EDEFAULT = UnaryLogicalOperator.NOT;
+
+ /**
+ * The cached value of the '{@link #getUnaryOperator() <em>Unary Operator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUnaryOperator()
+ * @generated
+ * @ordered
+ */
+ protected UnaryLogicalOperator unaryOperator = UNARY_OPERATOR_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getExpression() <em>Expression</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExpression()
+ * @generated
+ * @ordered
+ */
+ protected BooleanExpression expression;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected UnaryExpressionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FilterexprPackage.Literals.UNARY_EXPRESSION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public UnaryLogicalOperator getUnaryOperator() {
+ return unaryOperator;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setUnaryOperator(UnaryLogicalOperator newUnaryOperator) {
+ UnaryLogicalOperator oldUnaryOperator = unaryOperator;
+ unaryOperator = newUnaryOperator == null ? UNARY_OPERATOR_EDEFAULT : newUnaryOperator;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.UNARY_EXPRESSION__UNARY_OPERATOR, oldUnaryOperator, unaryOperator));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BooleanExpression getExpression() {
+ return expression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetExpression(BooleanExpression newExpression, NotificationChain msgs) {
+ BooleanExpression oldExpression = expression;
+ expression = newExpression;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FilterexprPackage.UNARY_EXPRESSION__EXPRESSION, oldExpression, newExpression);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExpression(BooleanExpression newExpression) {
+ if (newExpression != expression) {
+ NotificationChain msgs = null;
+ if (expression != null)
+ msgs = ((InternalEObject)expression).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.UNARY_EXPRESSION__EXPRESSION, null, msgs);
+ if (newExpression != null)
+ msgs = ((InternalEObject)newExpression).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FilterexprPackage.UNARY_EXPRESSION__EXPRESSION, null, msgs);
+ msgs = basicSetExpression(newExpression, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FilterexprPackage.UNARY_EXPRESSION__EXPRESSION, newExpression, newExpression));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FilterexprPackage.UNARY_EXPRESSION__EXPRESSION:
+ return basicSetExpression(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FilterexprPackage.UNARY_EXPRESSION__UNARY_OPERATOR:
+ return getUnaryOperator();
+ case FilterexprPackage.UNARY_EXPRESSION__EXPRESSION:
+ return getExpression();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FilterexprPackage.UNARY_EXPRESSION__UNARY_OPERATOR:
+ setUnaryOperator((UnaryLogicalOperator)newValue);
+ return;
+ case FilterexprPackage.UNARY_EXPRESSION__EXPRESSION:
+ setExpression((BooleanExpression)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.UNARY_EXPRESSION__UNARY_OPERATOR:
+ setUnaryOperator(UNARY_OPERATOR_EDEFAULT);
+ return;
+ case FilterexprPackage.UNARY_EXPRESSION__EXPRESSION:
+ setExpression((BooleanExpression)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FilterexprPackage.UNARY_EXPRESSION__UNARY_OPERATOR:
+ return unaryOperator != UNARY_OPERATOR_EDEFAULT;
+ case FilterexprPackage.UNARY_EXPRESSION__EXPRESSION:
+ return expression != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean evaluate(Object object) {
+ LOGGER.info("evaluate => " + toString());
+
+ LOGGER.info("Going to evaluate expression.");
+ boolean result = expression.evaluate(object);
+
+ switch (unaryOperator) {
+ case NOT:
+ LOGGER.fine("applying unary operator NOT.");
+ result = !result;
+ break;
+ }
+
+ LOGGER.info("evaluate <= " + result);
+ return result;
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public String toString() {
+ StringBuffer result = new StringBuffer();
+ result.append(FilterExprUtil.unaryLogicalOperatorToString(unaryOperator));
+ result.append(" (");
+
+ result.append(expression.toString());
+ result.append(")");
+
+ return result.toString();
+ }
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String format(String indent, String indentSize) {
+ StringBuffer result = new StringBuffer();
+ result.append(indent);
+ result.append(FilterExprUtil.unaryLogicalOperatorToString(unaryOperator));
+ result.append(" (");
+ result.append(NEW_LINE);
+
+ indent += indentSize;
+
+ result.append(expression.format(indent, indentSize));
+ indent = indent.substring(0, indent.lastIndexOf(indentSize));
+ result.append(NEW_LINE);
+
+ result.append(indent);
+ result.append(")");
+ result.append(NEW_LINE);
+
+ return result.toString();
+ }
+} //unaryExpressionImpl
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterExprUtil.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterExprUtil.java
new file mode 100755
index 0000000..0702f72
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterExprUtil.java
@@ -0,0 +1,714 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.util;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.genivi.booleanexpr.BooleanExpression;
+import org.genivi.booleanexpr.BooleanLiteral;
+import org.genivi.booleanexpr.ClassAttribute;
+import org.genivi.booleanexpr.ComparisonOperator;
+import org.genivi.booleanexpr.ComparisonPredicate;
+import org.genivi.booleanexpr.DownCastPredicate;
+import org.genivi.booleanexpr.DyadicExpression;
+import org.genivi.booleanexpr.DyadicLogicalOperator;
+import org.genivi.booleanexpr.FilterexprFactory;
+import org.genivi.booleanexpr.InOperator;
+import org.genivi.booleanexpr.InPredicate;
+import org.genivi.booleanexpr.IsSetPredicate;
+import org.genivi.booleanexpr.ListOperator;
+import org.genivi.booleanexpr.Literal;
+import org.genivi.booleanexpr.MetaOperator;
+import org.genivi.booleanexpr.MultiplicityPredicate;
+import org.genivi.booleanexpr.SignedIntegerLiteral;
+import org.genivi.booleanexpr.StringLiteral;
+import org.genivi.booleanexpr.SubClassPredicate;
+import org.genivi.booleanexpr.UnaryExpression;
+import org.genivi.booleanexpr.UnaryLogicalOperator;
+
+
+public class FilterExprUtil {
+ private final static Logger LOGGER = Logger.getLogger(FilterExprUtil.class.getName());
+ private final static FilterexprFactory FILTER_EXPR_FACTORY = FilterexprFactory.eINSTANCE;
+ private static Map<ComparisonOperator, String> comparisonOperatorToString = new HashMap<>();
+ private static Map<String, ComparisonOperator> stringToComparisonOperator = new HashMap<>();
+ private static Map<ListOperator, String> listOperatorToString = new HashMap<>();
+ private static Map<String, ListOperator> stringToListOperator = new HashMap<>();
+ private static Map<UnaryLogicalOperator, String> unaryLogicalOperatorToString = new HashMap<>();
+ private static Map<String, UnaryLogicalOperator> stringToUnaryLogicalOperator = new HashMap<>();
+ private static Map<DyadicLogicalOperator, String> dyadicLogicalOperatorToString = new HashMap<>();
+ private static Map<String, DyadicLogicalOperator> stringToDyadicLogicalOperator = new HashMap<>();
+ private static Map<MetaOperator, String> metaOperatorToString = new HashMap<>();
+ private static Map<String, MetaOperator> stringToMetaOperator = new HashMap<>();
+ private static Map<InOperator, String> inOperatorToString = new HashMap<>();
+ private static Map<String, InOperator> stringToInOperator = new HashMap<>();
+
+ static {
+ LOGGER.setLevel(Level.SEVERE);
+
+ comparisonOperatorToString.put(ComparisonOperator.EQUAL, "==");
+ comparisonOperatorToString.put(ComparisonOperator.NOT_EQUAL, "!=");
+ comparisonOperatorToString.put(ComparisonOperator.GREATER_THEN, ">");
+ comparisonOperatorToString.put(ComparisonOperator.GREATER_OR_EQUAL_THAN, ">=");
+ comparisonOperatorToString.put(ComparisonOperator.LESS_THAN, "<");
+ comparisonOperatorToString.put(ComparisonOperator.LESS_OR_EQUAL_THAN, "<=");
+
+ stringToComparisonOperator.put("==", ComparisonOperator.EQUAL);
+ stringToComparisonOperator.put("!=", ComparisonOperator.NOT_EQUAL);
+ stringToComparisonOperator.put(">", ComparisonOperator.GREATER_THEN);
+ stringToComparisonOperator.put(">=", ComparisonOperator.GREATER_OR_EQUAL_THAN);
+ stringToComparisonOperator.put("<", ComparisonOperator.LESS_THAN);
+ stringToComparisonOperator.put("<=", ComparisonOperator.LESS_OR_EQUAL_THAN);
+
+ listOperatorToString.put(ListOperator.ANY, "any");
+ listOperatorToString.put(ListOperator.ALL, "all");
+ listOperatorToString.put(ListOperator.NONE, "none");
+
+ stringToListOperator.put("any", ListOperator.ANY);
+ stringToListOperator.put("all", ListOperator.ALL);
+ stringToListOperator.put("none", ListOperator.NONE);
+
+ unaryLogicalOperatorToString.put(UnaryLogicalOperator.NOT, "not");
+
+ stringToUnaryLogicalOperator.put("not", UnaryLogicalOperator.NOT);
+
+ dyadicLogicalOperatorToString.put(DyadicLogicalOperator.AND, "and");
+ dyadicLogicalOperatorToString.put(DyadicLogicalOperator.OR, "or");
+
+ stringToDyadicLogicalOperator.put("and", DyadicLogicalOperator.AND);
+ stringToDyadicLogicalOperator.put("or", DyadicLogicalOperator.OR);
+
+ metaOperatorToString.put(MetaOperator.SIZE, "size");
+ stringToMetaOperator.put("size", MetaOperator.SIZE);
+
+ inOperatorToString.put(InOperator.IN, "in");
+ inOperatorToString.put(InOperator.NOT_IN, "not-in");
+
+ stringToInOperator.put("in", InOperator.IN);
+ stringToInOperator.put("not-in", InOperator.NOT_IN);
+ }
+
+ public static BooleanExpression parseFilterExpression(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ BooleanExpression booleanExpression = null;
+
+ expressionString = expressionString.trim();
+ if (!expressionString.isEmpty()) {
+
+ if (booleanExpression == null) {
+ try {
+ booleanExpression = parseComparisonPredicate(expressionString);
+ } catch (IllegalArgumentException e) {
+ LOGGER.info("expression is not ComparisonPredicate, continue ... (" + e.getMessage() + ")");
+ }
+ }
+
+ if (booleanExpression == null) {
+ try {
+ booleanExpression = parseDownCastPredicate(expressionString);
+ } catch (IllegalArgumentException e) {
+ LOGGER.info("expression is not DownCastPredicate, continue ... (" + e.getMessage() + ")");
+ }
+ }
+
+ if (booleanExpression == null) {
+ try {
+ booleanExpression = parseDyadicExpression(expressionString);
+ } catch (IllegalArgumentException e) {
+ LOGGER.info("expression is not DyadicExpression, continue ...");
+ }
+ }
+
+ if (booleanExpression == null) {
+ try {
+ booleanExpression = parseIsSetPredicate(expressionString);
+ } catch (IllegalArgumentException e) {
+ LOGGER.info("expression is not IsSetPredicate, continue ...");
+ }
+ }
+
+ if (booleanExpression == null) {
+ try {
+ booleanExpression = parseMultiplicityPredicate(expressionString);
+ } catch (IllegalArgumentException e) {
+ LOGGER.info("expression is not MultiplicityPredicate, continue ...");
+ }
+ }
+
+ if (booleanExpression == null) {
+ try {
+ booleanExpression = parseSubClassPredicate(expressionString);
+ } catch (IllegalArgumentException e) {
+ LOGGER.info("expression is not SubClassPredicate, continue ...");
+ }
+ }
+
+ if (booleanExpression == null) {
+ try {
+ booleanExpression = parseUnaryExpression(expressionString);
+ } catch (IllegalArgumentException e) {
+ LOGGER.info("expression is not UnaryExpression, continue ...");
+ }
+ }
+
+ if (booleanExpression == null) {
+ try {
+ booleanExpression = parseInPredicate(expressionString);
+ } catch (IllegalArgumentException e) {
+ LOGGER.info("expression is not InPredicate, continue ...");
+ }
+ }
+
+ if (booleanExpression == null) {
+ throw new IllegalArgumentException("Wrong expression format: " + expressionString);
+ }
+ }
+
+ LOGGER.info("<= " + booleanExpression);
+ return booleanExpression;
+
+ }
+
+ public static BooleanExpression parseUnaryExpression(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ UnaryExpression unaryExpression = FILTER_EXPR_FACTORY.createUnaryExpression();
+
+ expressionString = expressionString.trim();
+
+ // UnaryLogicalOperator
+ int spaceAfterOperatorIndex = expressionString.indexOf(" ");
+ if (spaceAfterOperatorIndex == -1) {
+ throw new IllegalArgumentException("Cannot find operator: " + expressionString);
+ }
+ String operatorString = expressionString.substring(0, spaceAfterOperatorIndex);
+ UnaryLogicalOperator operator = parseUnaryLogicalOperator(operatorString);
+ unaryExpression.setUnaryOperator(operator);
+
+ // Followed by expression between braces
+ expressionString = expressionString.substring(spaceAfterOperatorIndex);
+ expressionString = expressionString.trim();
+ if (!expressionString.startsWith("(")) {
+ throw new IllegalArgumentException("Term not starting with '(': " + expressionString);
+ }
+ int matchingClosingParenthesisIndex = findMatchingClosingParenthesis(expressionString);
+ if (matchingClosingParenthesisIndex == -1) {
+ throw new IllegalArgumentException("No matching parenthesis in term: " + expressionString);
+ }
+ String termString = expressionString.substring(1, matchingClosingParenthesisIndex);
+ BooleanExpression filterExpression = parseFilterExpression(termString);
+ unaryExpression.setExpression(filterExpression);
+
+ return unaryExpression;
+ }
+
+ public static DyadicExpression parseDyadicExpression(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ DyadicExpression dyadicExpression = FILTER_EXPR_FACTORY.createDyadicExpression();
+
+ expressionString = expressionString.trim();
+
+ // Left hand Expression
+ if (!expressionString.startsWith("(")) {
+ throw new IllegalArgumentException("Left hand term not starting with '(': " + expressionString);
+ }
+ int matchingClosingParenthesisIndex = findMatchingClosingParenthesis(expressionString);
+ if (matchingClosingParenthesisIndex == -1) {
+ throw new IllegalArgumentException("No matching parenthesis in left hand term: " + expressionString);
+ }
+ String termString = expressionString.substring(1, matchingClosingParenthesisIndex);
+ BooleanExpression filterExpression = parseFilterExpression(termString);
+ dyadicExpression.setLeftHandTerm(filterExpression);
+
+ expressionString = expressionString.substring(matchingClosingParenthesisIndex + 1);
+
+ // DyadicLogicalOperator
+ expressionString = expressionString.trim();
+ int spaceAfterOperatorIndex = expressionString.indexOf(" ");
+ if (spaceAfterOperatorIndex == -1) {
+ throw new IllegalArgumentException("Cannot find operator: " + expressionString);
+ }
+ String operatorString = expressionString.substring(0, spaceAfterOperatorIndex);
+ DyadicLogicalOperator operator = parseDyadicLogicalOperator(operatorString);
+ dyadicExpression.setLogicalOperator(operator);
+
+ expressionString = expressionString.substring(spaceAfterOperatorIndex);
+ expressionString = expressionString.trim();
+
+ // Right hand Expression
+ if (!expressionString.startsWith("(")) {
+ throw new IllegalArgumentException("Right hand term not starting with '(': " + expressionString);
+ }
+ matchingClosingParenthesisIndex = findMatchingClosingParenthesis(expressionString);
+ if (matchingClosingParenthesisIndex == -1) {
+ throw new IllegalArgumentException("No matching parenthesis in right hand term: " + expressionString);
+ }
+ termString = expressionString.substring(1, matchingClosingParenthesisIndex);
+ filterExpression = parseFilterExpression(termString);
+ dyadicExpression.setRightHandTerm(filterExpression);
+
+ return dyadicExpression;
+ }
+
+ private static int findMatchingClosingParenthesis(String expressionString) {
+ int bracesToMatch = 0;
+ int matchIndex = -1;
+
+ for (int i = 0; i < expressionString.length(); i++) {
+ char c = expressionString.charAt(i);
+ if (c == '(') {
+ bracesToMatch++;
+ } else if (c == ')') {
+ bracesToMatch--;
+ if (bracesToMatch == 0) {
+ matchIndex = i;
+ break;
+ }
+ }
+ }
+
+ return matchIndex;
+ }
+
+ public static ComparisonPredicate parseComparisonPredicate(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ ComparisonPredicate comparisonPredicate = FILTER_EXPR_FACTORY.createComparisonPredicate();
+
+ expressionString = expressionString.trim();
+
+ StringTokenizer tokens = new StringTokenizer(expressionString, " ");
+ if (tokens.countTokens() != 3) {
+ throw new IllegalArgumentException("wrong number of tokens in comparison predicate: " + expressionString);
+ }
+
+ // Attribute
+ ClassAttribute attribute = parseClassAttribute(tokens.nextToken());
+ comparisonPredicate.setAttribute(attribute);
+
+ // ComparisonOperator
+ ComparisonOperator comparisonOperator = parseComparisonOperator(tokens.nextToken());
+ comparisonPredicate.setComparisonOperator(comparisonOperator);
+
+ // Literal
+ Literal literal = parseLiteral(tokens.nextToken());
+ comparisonPredicate.setLiteral(literal);
+
+ LOGGER.info("<= " + comparisonPredicate);
+ return comparisonPredicate;
+ }
+
+ public static DownCastPredicate parseDownCastPredicate(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ DownCastPredicate downCastPredicate = FILTER_EXPR_FACTORY.createDownCastPredicate();
+
+ expressionString = expressionString.trim();
+
+ // 'DownCast to' class between '[' and ']'
+ if (!expressionString.startsWith("[")) {
+ throw new IllegalArgumentException("DownCastPredicate not starting with '[': " + expressionString);
+ }
+
+ int closingBracketIndex = expressionString.indexOf("]");
+ if (closingBracketIndex == -1) {
+ throw new IllegalArgumentException("DownCastPredicate is missing ']': " + expressionString);
+ }
+
+ String className = expressionString.substring(1, closingBracketIndex);
+ downCastPredicate.setClassName(className);
+
+ expressionString = expressionString.substring(closingBracketIndex + 1);
+ expressionString = expressionString.trim();
+
+ // Expression
+ if (!expressionString.startsWith("(")) {
+ throw new IllegalArgumentException("DownCastPredicate is missing '(': " + expressionString);
+ }
+
+ if (!expressionString.endsWith(")")) {
+ throw new IllegalArgumentException("DownCastPredicate is missing ')': " + expressionString);
+ }
+
+ expressionString = expressionString.substring(1, expressionString.length() - 1);
+ BooleanExpression filterExpression = parseFilterExpression(expressionString);
+ downCastPredicate.setExpression(filterExpression);
+
+ LOGGER.info("<= " + downCastPredicate);
+ return downCastPredicate;
+ }
+
+
+ public static IsSetPredicate parseIsSetPredicate(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ IsSetPredicate isSetPredicate = FILTER_EXPR_FACTORY.createIsSetPredicate();
+
+ expressionString = expressionString.trim();
+
+ // isSet operator
+ if (!expressionString.startsWith("isSet")) {
+ LOGGER.info("Not starting with isSet");
+ throw new IllegalArgumentException("IsSetPredicate not starting with 'isSet': " + expressionString);
+ }
+ LOGGER.info("Starting with isSet: " + expressionString);
+ expressionString = expressionString.substring(5);
+ expressionString = expressionString.trim();
+
+ // Expression
+// if (!expressionString.startsWith("(")) {
+// LOGGER.info("Not opening brace");
+// throw new IllegalArgumentException("IsSetPredicate is missing '(': " + expressionString);
+// }
+// if (!expressionString.endsWith(")")) {
+// LOGGER.info("Not closing brace");
+// throw new IllegalArgumentException("IsSetPredicate is missing ')': " + expressionString);
+// }
+
+// String className = expressionString.substring(1, expressionString.length() - 1);
+// ClassAttribute classAttribute = parseClassAttribute(className);
+
+ // ClassAttribute
+ ClassAttribute classAttribute = parseClassAttribute(expressionString);
+ isSetPredicate.setAttribute(classAttribute);
+
+ LOGGER.info("<= " + isSetPredicate);
+ return isSetPredicate;
+ }
+
+ public static MultiplicityPredicate parseMultiplicityPredicate(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ MultiplicityPredicate multiplicityPredicate = FILTER_EXPR_FACTORY.createMultiplicityPredicate();
+
+ expressionString = expressionString.trim();
+
+ // ListOperator
+ int spaceAfterOperator = expressionString.indexOf(" ");
+ if (spaceAfterOperator == -1) {
+ throw new IllegalArgumentException("No operator found: " + expressionString);
+ }
+ String operatorString = expressionString.substring(0, spaceAfterOperator);
+ ListOperator listOperator = parseListOperator(operatorString);
+ multiplicityPredicate.setListOperator(listOperator);
+
+
+ expressionString = expressionString.substring(spaceAfterOperator);
+ expressionString = expressionString.trim();
+
+ // ClassAttribute
+ int spaceAfterAttribute = expressionString.indexOf(" ");
+ String attributeString = expressionString.substring(0, spaceAfterAttribute);
+ ClassAttribute classAttribute = parseClassAttribute(attributeString);
+ multiplicityPredicate.setAttribute(classAttribute);
+
+ expressionString = expressionString.substring(spaceAfterAttribute);
+ expressionString = expressionString.trim();
+
+ // Expression
+ if (!expressionString.startsWith("(")) {
+ throw new IllegalArgumentException("'(' expected: " + expressionString);
+ }
+ if (!expressionString.endsWith(")")) {
+ throw new IllegalArgumentException("')' expected: " + expressionString);
+ }
+
+ expressionString = expressionString.substring(1, expressionString.length() - 1);
+ BooleanExpression filterExpression = parseFilterExpression(expressionString);
+ multiplicityPredicate.setExpression(filterExpression);
+
+ LOGGER.info("<= " + multiplicityPredicate);
+ return multiplicityPredicate;
+ }
+
+ public static SubClassPredicate parseSubClassPredicate(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ SubClassPredicate subClassPredicate = FILTER_EXPR_FACTORY.createSubClassPredicate();
+
+ expressionString = expressionString.trim();
+
+ // ClassAttribute
+ int spaceAfterAttribute = expressionString.indexOf(" ");
+ if (spaceAfterAttribute == -1) {
+ throw new IllegalArgumentException("No attribute found: " + expressionString);
+ }
+ String attributeString = expressionString.substring(0, spaceAfterAttribute);
+ if (attributeString.equals("@")) {
+ subClassPredicate.setSubClassAttribute(null);
+ } else {
+ ClassAttribute classAttribute = parseClassAttribute(attributeString);
+ subClassPredicate.setSubClassAttribute(classAttribute);
+ }
+
+ expressionString = expressionString.substring(spaceAfterAttribute);
+ expressionString = expressionString.trim();
+
+ // Expression
+ if (!expressionString.startsWith("(")) {
+ throw new IllegalArgumentException("'(' expected: " + expressionString);
+ }
+ if (!expressionString.endsWith(")")) {
+ throw new IllegalArgumentException("')' expected: " + expressionString);
+ }
+
+ expressionString = expressionString.substring(1, expressionString.length() - 1);
+ BooleanExpression filterExpression = parseFilterExpression(expressionString);
+ subClassPredicate.setSubClassExpression(filterExpression);
+
+ LOGGER.info("<= " + subClassPredicate);
+ return subClassPredicate;
+ }
+
+ public static InPredicate parseInPredicate(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ InPredicate inPredicate = FILTER_EXPR_FACTORY.createInPredicate();
+
+ expressionString = expressionString.trim();
+
+
+ // Attribute - text before the first space character
+ int index = expressionString.indexOf(" ");
+ if (index == -1) {
+ throw new IllegalArgumentException("no space after class attribute found: " + expressionString);
+ }
+ String token = expressionString.substring(0, index);
+ ClassAttribute attribute = parseClassAttribute(token);
+ inPredicate.setAttribute(attribute);
+
+ // in operator - text before the next space
+ String remainingExpressioString = expressionString.substring(index).trim();
+ index = remainingExpressioString.indexOf(" ");
+ if (index == -1) {
+ throw new IllegalArgumentException("no space after in operator found: " + remainingExpressioString);
+ }
+ token = remainingExpressioString.substring(0, index);
+ InOperator inOperator = parseInOperator(token);
+ inPredicate.setInOperator(inOperator);
+
+ // Set of Literals
+ remainingExpressioString = remainingExpressioString.substring(index).trim();
+ if (remainingExpressioString.startsWith("[") &&
+ remainingExpressioString.endsWith("]")) {
+ // TODO This simple implementation doesn't handle comma's in string literals.
+ remainingExpressioString = remainingExpressioString.substring(1, remainingExpressioString.length() - 1);
+ StringTokenizer tokens = new StringTokenizer(remainingExpressioString, ",");
+ while (tokens.hasMoreElements()) {
+ Literal literal = parseLiteral(tokens.nextToken());
+ inPredicate.getLiterals().add(literal);
+ }
+ } else {
+ throw new IllegalArgumentException("no brackets around literals found: " + remainingExpressioString);
+ }
+
+ LOGGER.info("<= " + inPredicate);
+ return inPredicate;
+ }
+
+ public static ClassAttribute parseClassAttribute(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+
+ expressionString = expressionString.trim();
+ if (!expressionString.startsWith("@")) {
+ throw new IllegalArgumentException("Class attribute is not starting with @:" + expressionString);
+ }
+ expressionString = expressionString.substring(1);
+
+ // Handle 'empty' attribute
+ if (expressionString.length() == 0) {
+ return null;
+ }
+
+ ClassAttribute classAttribute = FILTER_EXPR_FACTORY.createClassAttribute();
+
+ // Handle optional meta operator
+ int metaOperatorSeparatorIndex = expressionString.indexOf("^");
+ if (metaOperatorSeparatorIndex != -1) {
+ String metaOperatorString = expressionString.substring(metaOperatorSeparatorIndex + 1);
+ MetaOperator metaOperator = stringToMetaOperator.get(metaOperatorString);
+ if (metaOperator == null) {
+ LOGGER.severe("Unknown meta operator: " + metaOperatorString);
+ throw new IllegalArgumentException("Unknown meta operator: " + metaOperatorString);
+ }
+ classAttribute.setMetaOperator(metaOperator);
+
+ expressionString = expressionString.substring(0, metaOperatorSeparatorIndex);
+ }
+
+ // Handle optional index
+ int openBracketIndex = expressionString.indexOf("[");
+ if (openBracketIndex != -1) {
+ int closeBracketIndex = expressionString.indexOf("]");
+ if (closeBracketIndex == -1) {
+ throw new IllegalArgumentException("No matching \']\' found.");
+ }
+ String indexString = expressionString.substring(openBracketIndex + 1, closeBracketIndex);
+ indexString = indexString.trim();
+ int index = Integer.valueOf(indexString);
+ classAttribute.setIndex(index);
+
+ expressionString = expressionString.substring(0, openBracketIndex);
+ }
+
+ char firstChar = expressionString.charAt(0);
+ if (!Character.isLetter(firstChar)) {
+ throw new IllegalArgumentException("Attribute name is not starting with a letter: " + expressionString);
+ }
+ classAttribute.setAttributeName(expressionString);
+
+ LOGGER.info("<= " + classAttribute);
+ return classAttribute;
+ }
+
+ public static Literal parseLiteral(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ expressionString = expressionString.trim();
+
+ Literal literal;
+
+ char firstChar = expressionString.charAt(0);
+ if (firstChar == '+' || firstChar == '-' ||
+ (firstChar >= '0' && firstChar <= '9')) {
+ literal = parseSignedIntegerLiteral(expressionString);
+ } else if (firstChar == '\"') {
+ literal = parseStringLiteral(expressionString);
+ } else if (expressionString.equals("true") || expressionString.equals("false")) {
+ literal = parseBooleanLiteral(expressionString);
+ } else {
+ throw new IllegalArgumentException(expressionString);
+ }
+
+ LOGGER.info("<= " + literal);
+ return literal;
+ }
+
+ public static BooleanLiteral parseBooleanLiteral(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ BooleanLiteral booleanLiteral = FILTER_EXPR_FACTORY.createBooleanLiteral();
+
+ expressionString = expressionString.trim();
+ if (expressionString.equals("true")) {
+ booleanLiteral.setValue(true);
+ } else if (expressionString.equals("false")) {
+ booleanLiteral.setValue(false);
+ } else {
+ throw new IllegalArgumentException(expressionString);
+ }
+
+ LOGGER.info("<= " + booleanLiteral);
+ return booleanLiteral;
+ }
+
+ public static SignedIntegerLiteral parseSignedIntegerLiteral(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ SignedIntegerLiteral signedIntegerLiteral = FILTER_EXPR_FACTORY.createSignedIntegerLiteral();
+
+ expressionString = expressionString.trim();
+ signedIntegerLiteral.setValue(Long.parseLong(expressionString));
+
+ LOGGER.info("<= " + signedIntegerLiteral);
+ return signedIntegerLiteral;
+ }
+
+ public static StringLiteral parseStringLiteral(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ StringLiteral stringLiteral = FILTER_EXPR_FACTORY.createStringLiteral();
+
+ expressionString = expressionString.trim();
+ if (!expressionString.startsWith("\"")) {
+ throw new IllegalArgumentException("String not starting with quotes: " + expressionString);
+ }
+ if (!expressionString.endsWith("\"")) {
+ throw new IllegalArgumentException("String not ending with quotes: " + expressionString);
+ }
+
+ String value = expressionString.substring(1, expressionString.length() - 1);
+ stringLiteral.setValue(value);
+
+ LOGGER.info("<= " + stringLiteral);
+ return stringLiteral;
+ }
+
+ public static ComparisonOperator parseComparisonOperator(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ expressionString = expressionString.trim();
+
+ ComparisonOperator comparisonOperator = stringToComparisonOperator.get(expressionString);
+
+ LOGGER.info("<= " + comparisonOperator);
+ return comparisonOperator;
+ }
+
+ public static String comparisonOperatorToString(ComparisonOperator comparisonOperator) {
+ return comparisonOperatorToString.get(comparisonOperator);
+ }
+
+ public static UnaryLogicalOperator parseUnaryLogicalOperator(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ expressionString = expressionString.trim();
+
+ UnaryLogicalOperator unaryLogicalOperator = stringToUnaryLogicalOperator.get(expressionString);
+
+ LOGGER.info("<= " + unaryLogicalOperator);
+ return unaryLogicalOperator;
+ }
+
+ public static String unaryLogicalOperatorToString(UnaryLogicalOperator unaryLogicalOperator) {
+ return unaryLogicalOperatorToString.get(unaryLogicalOperator);
+ }
+
+ public static DyadicLogicalOperator parseDyadicLogicalOperator(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ expressionString = expressionString.trim();
+
+ DyadicLogicalOperator dyadicLogicalOperator = stringToDyadicLogicalOperator.get(expressionString);
+
+ LOGGER.info("<= " + dyadicLogicalOperator);
+ return dyadicLogicalOperator;
+ }
+
+ public static String dyadicLogicalOperatorToString(DyadicLogicalOperator dyadicLogicalOperator) {
+ return dyadicLogicalOperatorToString.get(dyadicLogicalOperator);
+ }
+
+ public static ListOperator parseListOperator(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ expressionString = expressionString.trim();
+
+ if (!expressionString.startsWith("#")) {
+ throw new IllegalArgumentException("List operator not starting with '#': " + expressionString);
+ }
+ expressionString = expressionString.substring(1);
+ ListOperator listOperator = stringToListOperator.get(expressionString);
+
+ LOGGER.info("<= " + listOperator);
+ return listOperator;
+ }
+
+ public static String listOperatorToString(ListOperator listOperator) {
+ return "#" + listOperatorToString.get(listOperator);
+ }
+
+ public static String metaOperatorToString(MetaOperator metaOperator) {
+ return metaOperatorToString.get(metaOperator);
+ }
+
+ public static InOperator parseInOperator(String expressionString) {
+ LOGGER.info("=> " + expressionString);
+ expressionString = expressionString.trim();
+
+ InOperator inOperator = stringToInOperator.get(expressionString);
+
+ LOGGER.info("<= " + inOperator);
+ return inOperator;
+ }
+
+ public static String inOperatorToString(InOperator inOperator) {
+ return inOperatorToString.get(inOperator);
+ }
+}
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterexprAdapterFactory.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterexprAdapterFactory.java
new file mode 100755
index 0000000..43b5594
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterexprAdapterFactory.java
@@ -0,0 +1,379 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.genivi.booleanexpr.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.FilterexprPackage
+ * @generated
+ */
+public class FilterexprAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static FilterexprPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FilterexprAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = FilterexprPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FilterexprSwitch<Adapter> modelSwitch =
+ new FilterexprSwitch<Adapter>() {
+ @Override
+ public Adapter caseBooleanExpression(BooleanExpression object) {
+ return createBooleanExpressionAdapter();
+ }
+ @Override
+ public Adapter caseUnaryExpression(UnaryExpression object) {
+ return createUnaryExpressionAdapter();
+ }
+ @Override
+ public Adapter casePredicate(Predicate object) {
+ return createPredicateAdapter();
+ }
+ @Override
+ public Adapter caseDyadicExpression(DyadicExpression object) {
+ return createDyadicExpressionAdapter();
+ }
+ @Override
+ public Adapter caseComparisonPredicate(ComparisonPredicate object) {
+ return createComparisonPredicateAdapter();
+ }
+ @Override
+ public Adapter caseInPredicate(InPredicate object) {
+ return createInPredicateAdapter();
+ }
+ @Override
+ public Adapter caseLiteral(Literal object) {
+ return createLiteralAdapter();
+ }
+ @Override
+ public Adapter caseSignedIntegerLiteral(SignedIntegerLiteral object) {
+ return createSignedIntegerLiteralAdapter();
+ }
+ @Override
+ public Adapter caseStringLiteral(StringLiteral object) {
+ return createStringLiteralAdapter();
+ }
+ @Override
+ public Adapter caseBooleanLiteral(BooleanLiteral object) {
+ return createBooleanLiteralAdapter();
+ }
+ @Override
+ public Adapter caseSubClassPredicate(SubClassPredicate object) {
+ return createSubClassPredicateAdapter();
+ }
+ @Override
+ public Adapter caseClassAttribute(ClassAttribute object) {
+ return createClassAttributeAdapter();
+ }
+ @Override
+ public Adapter caseDownCastPredicate(DownCastPredicate object) {
+ return createDownCastPredicateAdapter();
+ }
+ @Override
+ public Adapter caseMultiplicityPredicate(MultiplicityPredicate object) {
+ return createMultiplicityPredicateAdapter();
+ }
+ @Override
+ public Adapter caseIsSetPredicate(IsSetPredicate object) {
+ return createIsSetPredicateAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.BooleanExpression <em>Boolean Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.BooleanExpression
+ * @generated
+ */
+ public Adapter createBooleanExpressionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.UnaryExpression <em>Unary Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.UnaryExpression
+ * @generated
+ */
+ public Adapter createUnaryExpressionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.Predicate <em>Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.Predicate
+ * @generated
+ */
+ public Adapter createPredicateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.DyadicExpression <em>Dyadic Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.DyadicExpression
+ * @generated
+ */
+ public Adapter createDyadicExpressionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.ComparisonPredicate <em>Comparison Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.ComparisonPredicate
+ * @generated
+ */
+ public Adapter createComparisonPredicateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.InPredicate <em>In Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.InPredicate
+ * @generated
+ */
+ public Adapter createInPredicateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.Literal <em>Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.Literal
+ * @generated
+ */
+ public Adapter createLiteralAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.SignedIntegerLiteral <em>Signed Integer Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.SignedIntegerLiteral
+ * @generated
+ */
+ public Adapter createSignedIntegerLiteralAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.StringLiteral <em>String Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.StringLiteral
+ * @generated
+ */
+ public Adapter createStringLiteralAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.BooleanLiteral <em>Boolean Literal</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.BooleanLiteral
+ * @generated
+ */
+ public Adapter createBooleanLiteralAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.SubClassPredicate <em>Sub Class Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.SubClassPredicate
+ * @generated
+ */
+ public Adapter createSubClassPredicateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.ClassAttribute <em>Class Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.ClassAttribute
+ * @generated
+ */
+ public Adapter createClassAttributeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.DownCastPredicate <em>Down Cast Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.DownCastPredicate
+ * @generated
+ */
+ public Adapter createDownCastPredicateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.MultiplicityPredicate <em>Multiplicity Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.MultiplicityPredicate
+ * @generated
+ */
+ public Adapter createMultiplicityPredicateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.booleanexpr.IsSetPredicate <em>Is Set Predicate</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.IsSetPredicate
+ * @generated
+ */
+ public Adapter createIsSetPredicateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //FilterexprAdapterFactory
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterexprSwitch.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterexprSwitch.java
new file mode 100755
index 0000000..8db9edd
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/main/java/org/genivi/booleanexpr/util/FilterexprSwitch.java
@@ -0,0 +1,429 @@
+/**
+ *
+ * Copyright (C) 2013 TomTom International B.V.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+package org.genivi.booleanexpr.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.genivi.booleanexpr.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.genivi.booleanexpr.FilterexprPackage
+ * @generated
+ */
+public class FilterexprSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static FilterexprPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FilterexprSwitch() {
+ if (modelPackage == null) {
+ modelPackage = FilterexprPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case FilterexprPackage.BOOLEAN_EXPRESSION: {
+ BooleanExpression booleanExpression = (BooleanExpression)theEObject;
+ T result = caseBooleanExpression(booleanExpression);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.UNARY_EXPRESSION: {
+ UnaryExpression unaryExpression = (UnaryExpression)theEObject;
+ T result = caseUnaryExpression(unaryExpression);
+ if (result == null) result = caseBooleanExpression(unaryExpression);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.PREDICATE: {
+ Predicate predicate = (Predicate)theEObject;
+ T result = casePredicate(predicate);
+ if (result == null) result = caseBooleanExpression(predicate);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.DYADIC_EXPRESSION: {
+ DyadicExpression dyadicExpression = (DyadicExpression)theEObject;
+ T result = caseDyadicExpression(dyadicExpression);
+ if (result == null) result = caseBooleanExpression(dyadicExpression);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.COMPARISON_PREDICATE: {
+ ComparisonPredicate comparisonPredicate = (ComparisonPredicate)theEObject;
+ T result = caseComparisonPredicate(comparisonPredicate);
+ if (result == null) result = casePredicate(comparisonPredicate);
+ if (result == null) result = caseBooleanExpression(comparisonPredicate);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.IN_PREDICATE: {
+ InPredicate inPredicate = (InPredicate)theEObject;
+ T result = caseInPredicate(inPredicate);
+ if (result == null) result = casePredicate(inPredicate);
+ if (result == null) result = caseBooleanExpression(inPredicate);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.LITERAL: {
+ Literal literal = (Literal)theEObject;
+ T result = caseLiteral(literal);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.SIGNED_INTEGER_LITERAL: {
+ SignedIntegerLiteral signedIntegerLiteral = (SignedIntegerLiteral)theEObject;
+ T result = caseSignedIntegerLiteral(signedIntegerLiteral);
+ if (result == null) result = caseLiteral(signedIntegerLiteral);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.STRING_LITERAL: {
+ StringLiteral stringLiteral = (StringLiteral)theEObject;
+ T result = caseStringLiteral(stringLiteral);
+ if (result == null) result = caseLiteral(stringLiteral);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.BOOLEAN_LITERAL: {
+ BooleanLiteral booleanLiteral = (BooleanLiteral)theEObject;
+ T result = caseBooleanLiteral(booleanLiteral);
+ if (result == null) result = caseLiteral(booleanLiteral);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.SUB_CLASS_PREDICATE: {
+ SubClassPredicate subClassPredicate = (SubClassPredicate)theEObject;
+ T result = caseSubClassPredicate(subClassPredicate);
+ if (result == null) result = casePredicate(subClassPredicate);
+ if (result == null) result = caseBooleanExpression(subClassPredicate);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.CLASS_ATTRIBUTE: {
+ ClassAttribute classAttribute = (ClassAttribute)theEObject;
+ T result = caseClassAttribute(classAttribute);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.DOWN_CAST_PREDICATE: {
+ DownCastPredicate downCastPredicate = (DownCastPredicate)theEObject;
+ T result = caseDownCastPredicate(downCastPredicate);
+ if (result == null) result = casePredicate(downCastPredicate);
+ if (result == null) result = caseBooleanExpression(downCastPredicate);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.MULTIPLICITY_PREDICATE: {
+ MultiplicityPredicate multiplicityPredicate = (MultiplicityPredicate)theEObject;
+ T result = caseMultiplicityPredicate(multiplicityPredicate);
+ if (result == null) result = casePredicate(multiplicityPredicate);
+ if (result == null) result = caseBooleanExpression(multiplicityPredicate);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FilterexprPackage.IS_SET_PREDICATE: {
+ IsSetPredicate isSetPredicate = (IsSetPredicate)theEObject;
+ T result = caseIsSetPredicate(isSetPredicate);
+ if (result == null) result = casePredicate(isSetPredicate);
+ if (result == null) result = caseBooleanExpression(isSetPredicate);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Boolean Expression</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Boolean Expression</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBooleanExpression(BooleanExpression object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Unary Expression</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Unary Expression</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseUnaryExpression(UnaryExpression object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Predicate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePredicate(Predicate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Dyadic Expression</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Dyadic Expression</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDyadicExpression(DyadicExpression object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Comparison Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Comparison Predicate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseComparisonPredicate(ComparisonPredicate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>In Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>In Predicate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseInPredicate(InPredicate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Literal</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Literal</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLiteral(Literal object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Signed Integer Literal</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Signed Integer Literal</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSignedIntegerLiteral(SignedIntegerLiteral object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>String Literal</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>String Literal</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStringLiteral(StringLiteral object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Boolean Literal</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Boolean Literal</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBooleanLiteral(BooleanLiteral object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Sub Class Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Sub Class Predicate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSubClassPredicate(SubClassPredicate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Class Attribute</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Class Attribute</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseClassAttribute(ClassAttribute object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Down Cast Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Down Cast Predicate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDownCastPredicate(DownCastPredicate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Multiplicity Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Multiplicity Predicate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMultiplicityPredicate(MultiplicityPredicate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Is Set Predicate</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Is Set Predicate</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIsSetPredicate(IsSetPredicate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //FilterexprSwitch