From 0263c6b40d4cc843efa34baf05d4d7d77b8ce53e Mon Sep 17 00:00:00 2001
From: "U-TTG\\pego"
+ * The following features are supported:
+ *
+ *
+ *
+ * @see org.genivi.common.CommonFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface CommonPackage extends EPackage {
+ /**
+ * The package name.
+ *
+ *
+ * @generated
+ */
+ String eNAME = "common";
+
+ /**
+ * The package namespace URI.
+ *
+ *
+ * @generated
+ */
+ String eNS_URI = "http://org.genivi.common";
+
+ /**
+ * The package namespace name.
+ *
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "model";
+
+ /**
+ * The singleton instance of the package.
+ *
+ *
+ * @generated
+ */
+ CommonPackage eINSTANCE = org.genivi.common.impl.CommonPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.genivi.common.impl.CoordinateImpl Coordinate}' class.
+ *
+ *
+ * @see org.genivi.common.impl.CoordinateImpl
+ * @see org.genivi.common.impl.CommonPackageImpl#getCoordinate()
+ * @generated
+ */
+ int COORDINATE = 0;
+
+ /**
+ * The feature id for the 'Latitude' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int COORDINATE__LATITUDE = 0;
+
+ /**
+ * The feature id for the 'Longitude' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int COORDINATE__LONGITUDE = 1;
+
+ /**
+ * The feature id for the 'Altitude' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int COORDINATE__ALTITUDE = 2;
+
+ /**
+ * The number of structural features of the 'Coordinate' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int COORDINATE_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.genivi.common.impl.RectangularAreaImpl Rectangular Area}' class.
+ *
+ *
+ * @see org.genivi.common.impl.RectangularAreaImpl
+ * @see org.genivi.common.impl.CommonPackageImpl#getRectangularArea()
+ * @generated
+ */
+ int RECTANGULAR_AREA = 1;
+
+ /**
+ * The feature id for the 'Bottom Left' containment reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int RECTANGULAR_AREA__BOTTOM_LEFT = 0;
+
+ /**
+ * The feature id for the 'Top Right' containment reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int RECTANGULAR_AREA__TOP_RIGHT = 1;
+
+ /**
+ * The number of structural features of the 'Rectangular Area' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int RECTANGULAR_AREA_FEATURE_COUNT = 2;
+
+
+ /**
+ * The meta object id for the '{@link org.genivi.common.impl.VersionImpl Version}' class.
+ *
+ *
+ * @see org.genivi.common.impl.VersionImpl
+ * @see org.genivi.common.impl.CommonPackageImpl#getVersion()
+ * @generated
+ */
+ int VERSION = 2;
+
+ /**
+ * The feature id for the 'Major' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int VERSION__MAJOR = 0;
+
+ /**
+ * The feature id for the 'Minor' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int VERSION__MINOR = 1;
+
+ /**
+ * The feature id for the 'Micro' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int VERSION__MICRO = 2;
+
+ /**
+ * The feature id for the 'Date' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int VERSION__DATE = 3;
+
+ /**
+ * The number of structural features of the 'Version' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int VERSION_FEATURE_COUNT = 4;
+
+
+ /**
+ * The meta object id for the '{@link org.genivi.common.impl.LocalizedStringImpl Localized String}' class.
+ *
+ *
+ * @see org.genivi.common.impl.LocalizedStringImpl
+ * @see org.genivi.common.impl.CommonPackageImpl#getLocalizedString()
+ * @generated
+ */
+ int LOCALIZED_STRING = 3;
+
+ /**
+ * The feature id for the 'Language Code' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int LOCALIZED_STRING__LANGUAGE_CODE = 0;
+
+ /**
+ * The feature id for the 'Country Code' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int LOCALIZED_STRING__COUNTRY_CODE = 1;
+
+ /**
+ * The feature id for the 'String' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int LOCALIZED_STRING__STRING = 2;
+
+ /**
+ * The number of structural features of the 'Localized String' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int LOCALIZED_STRING_FEATURE_COUNT = 3;
+
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.common.Coordinate Coordinate}'.
+ *
+ *
+ * @return the meta object for class 'Coordinate'.
+ * @see org.genivi.common.Coordinate
+ * @generated
+ */
+ EClass getCoordinate();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.common.Coordinate#getLatitude Latitude}'.
+ *
+ *
+ * @return the meta object for the attribute 'Latitude'.
+ * @see org.genivi.common.Coordinate#getLatitude()
+ * @see #getCoordinate()
+ * @generated
+ */
+ EAttribute getCoordinate_Latitude();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.common.Coordinate#getLongitude Longitude}'.
+ *
+ *
+ * @return the meta object for the attribute 'Longitude'.
+ * @see org.genivi.common.Coordinate#getLongitude()
+ * @see #getCoordinate()
+ * @generated
+ */
+ EAttribute getCoordinate_Longitude();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.common.Coordinate#getAltitude Altitude}'.
+ *
+ *
+ * @return the meta object for the attribute 'Altitude'.
+ * @see org.genivi.common.Coordinate#getAltitude()
+ * @see #getCoordinate()
+ * @generated
+ */
+ EAttribute getCoordinate_Altitude();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.common.RectangularArea Rectangular Area}'.
+ *
+ *
+ * @return the meta object for class 'Rectangular Area'.
+ * @see org.genivi.common.RectangularArea
+ * @generated
+ */
+ EClass getRectangularArea();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.common.RectangularArea#getBottomLeft Bottom Left}'.
+ *
+ *
+ * @return the meta object for the containment reference 'Bottom Left'.
+ * @see org.genivi.common.RectangularArea#getBottomLeft()
+ * @see #getRectangularArea()
+ * @generated
+ */
+ EReference getRectangularArea_BottomLeft();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.genivi.common.RectangularArea#getTopRight Top Right}'.
+ *
+ *
+ * @return the meta object for the containment reference 'Top Right'.
+ * @see org.genivi.common.RectangularArea#getTopRight()
+ * @see #getRectangularArea()
+ * @generated
+ */
+ EReference getRectangularArea_TopRight();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.common.Version Version}'.
+ *
+ *
+ * @return the meta object for class 'Version'.
+ * @see org.genivi.common.Version
+ * @generated
+ */
+ EClass getVersion();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.common.Version#getMajor Major}'.
+ *
+ *
+ * @return the meta object for the attribute 'Major'.
+ * @see org.genivi.common.Version#getMajor()
+ * @see #getVersion()
+ * @generated
+ */
+ EAttribute getVersion_Major();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.common.Version#getMinor Minor}'.
+ *
+ *
+ * @return the meta object for the attribute 'Minor'.
+ * @see org.genivi.common.Version#getMinor()
+ * @see #getVersion()
+ * @generated
+ */
+ EAttribute getVersion_Minor();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.common.Version#getMicro Micro}'.
+ *
+ *
+ * @return the meta object for the attribute 'Micro'.
+ * @see org.genivi.common.Version#getMicro()
+ * @see #getVersion()
+ * @generated
+ */
+ EAttribute getVersion_Micro();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.common.Version#getDate Date}'.
+ *
+ *
+ * @return the meta object for the attribute 'Date'.
+ * @see org.genivi.common.Version#getDate()
+ * @see #getVersion()
+ * @generated
+ */
+ EAttribute getVersion_Date();
+
+ /**
+ * Returns the meta object for class '{@link org.genivi.common.LocalizedString Localized String}'.
+ *
+ *
+ * @return the meta object for class 'Localized String'.
+ * @see org.genivi.common.LocalizedString
+ * @generated
+ */
+ EClass getLocalizedString();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.common.LocalizedString#getLanguageCode Language Code}'.
+ *
+ *
+ * @return the meta object for the attribute 'Language Code'.
+ * @see org.genivi.common.LocalizedString#getLanguageCode()
+ * @see #getLocalizedString()
+ * @generated
+ */
+ EAttribute getLocalizedString_LanguageCode();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.common.LocalizedString#getCountryCode Country Code}'.
+ *
+ *
+ * @return the meta object for the attribute 'Country Code'.
+ * @see org.genivi.common.LocalizedString#getCountryCode()
+ * @see #getLocalizedString()
+ * @generated
+ */
+ EAttribute getLocalizedString_CountryCode();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.genivi.common.LocalizedString#getString String}'.
+ *
+ *
+ * @return the meta object for the attribute 'String'.
+ * @see org.genivi.common.LocalizedString#getString()
+ * @see #getLocalizedString()
+ * @generated
+ */
+ EAttribute getLocalizedString_String();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ *
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ CommonFactory getCommonFactory();
+
+ /**
+ *
+ * Defines literals for the meta objects that represent
+ *
+ *
+ *
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.genivi.common.impl.CoordinateImpl Coordinate}' class.
+ *
+ *
+ * @see org.genivi.common.impl.CoordinateImpl
+ * @see org.genivi.common.impl.CommonPackageImpl#getCoordinate()
+ * @generated
+ */
+ EClass COORDINATE = eINSTANCE.getCoordinate();
+
+ /**
+ * The meta object literal for the 'Latitude' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute COORDINATE__LATITUDE = eINSTANCE.getCoordinate_Latitude();
+
+ /**
+ * The meta object literal for the 'Longitude' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute COORDINATE__LONGITUDE = eINSTANCE.getCoordinate_Longitude();
+
+ /**
+ * The meta object literal for the 'Altitude' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute COORDINATE__ALTITUDE = eINSTANCE.getCoordinate_Altitude();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.common.impl.RectangularAreaImpl Rectangular Area}' class.
+ *
+ *
+ * @see org.genivi.common.impl.RectangularAreaImpl
+ * @see org.genivi.common.impl.CommonPackageImpl#getRectangularArea()
+ * @generated
+ */
+ EClass RECTANGULAR_AREA = eINSTANCE.getRectangularArea();
+
+ /**
+ * The meta object literal for the 'Bottom Left' containment reference feature.
+ *
+ *
+ * @generated
+ */
+ EReference RECTANGULAR_AREA__BOTTOM_LEFT = eINSTANCE.getRectangularArea_BottomLeft();
+
+ /**
+ * The meta object literal for the 'Top Right' containment reference feature.
+ *
+ *
+ * @generated
+ */
+ EReference RECTANGULAR_AREA__TOP_RIGHT = eINSTANCE.getRectangularArea_TopRight();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.common.impl.VersionImpl Version}' class.
+ *
+ *
+ * @see org.genivi.common.impl.VersionImpl
+ * @see org.genivi.common.impl.CommonPackageImpl#getVersion()
+ * @generated
+ */
+ EClass VERSION = eINSTANCE.getVersion();
+
+ /**
+ * The meta object literal for the 'Major' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute VERSION__MAJOR = eINSTANCE.getVersion_Major();
+
+ /**
+ * The meta object literal for the 'Minor' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute VERSION__MINOR = eINSTANCE.getVersion_Minor();
+
+ /**
+ * The meta object literal for the 'Micro' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute VERSION__MICRO = eINSTANCE.getVersion_Micro();
+
+ /**
+ * The meta object literal for the 'Date' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute VERSION__DATE = eINSTANCE.getVersion_Date();
+
+ /**
+ * The meta object literal for the '{@link org.genivi.common.impl.LocalizedStringImpl Localized String}' class.
+ *
+ *
+ * @see org.genivi.common.impl.LocalizedStringImpl
+ * @see org.genivi.common.impl.CommonPackageImpl#getLocalizedString()
+ * @generated
+ */
+ EClass LOCALIZED_STRING = eINSTANCE.getLocalizedString();
+
+ /**
+ * The meta object literal for the 'Language Code' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute LOCALIZED_STRING__LANGUAGE_CODE = eINSTANCE.getLocalizedString_LanguageCode();
+
+ /**
+ * The meta object literal for the 'Country Code' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute LOCALIZED_STRING__COUNTRY_CODE = eINSTANCE.getLocalizedString_CountryCode();
+
+ /**
+ * The meta object literal for the 'String' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute LOCALIZED_STRING__STRING = eINSTANCE.getLocalizedString_String();
+
+ }
+
+} //CommonPackage
diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/Coordinate.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/Coordinate.java
new file mode 100755
index 0000000..7bed8d4
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/Coordinate.java
@@ -0,0 +1,110 @@
+/**
+ * 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.common;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ *
+ * A representation of the model object 'Coordinate'.
+ *
+ *
+ *
+ * This data type represents a 3D WGS84 coordinate.
+ *
+ *
+ *
+ *
+ *
+ * The following features are supported: + *
+ * If the meaning of the 'Language Code' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Language Code' attribute. + * @see #isSetLanguageCode() + * @see #unsetLanguageCode() + * @see #setLanguageCode(String) + * @see org.genivi.common.CommonPackage#getLocalizedString_LanguageCode() + * @model unsettable="true" required="true" + * @generated + */ + String getLanguageCode(); + + /** + * Sets the value of the '{@link org.genivi.common.LocalizedString#getLanguageCode Language Code}' attribute. + * + * + * @param value the new value of the 'Language Code' attribute. + * @see #isSetLanguageCode() + * @see #unsetLanguageCode() + * @see #getLanguageCode() + * @generated + */ + void setLanguageCode(String value); + + /** + * Unsets the value of the '{@link org.genivi.common.LocalizedString#getLanguageCode Language Code}' attribute. + * + * + * @see #isSetLanguageCode() + * @see #getLanguageCode() + * @see #setLanguageCode(String) + * @generated + */ + void unsetLanguageCode(); + + /** + * Returns whether the value of the '{@link org.genivi.common.LocalizedString#getLanguageCode Language Code}' attribute is set. + * + * + * @return whether the value of the 'Language Code' attribute is set. + * @see #unsetLanguageCode() + * @see #getLanguageCode() + * @see #setLanguageCode(String) + * @generated + */ + boolean isSetLanguageCode(); + + /** + * Returns the value of the 'Country Code' attribute. + * + *+ * If the meaning of the 'Country Code' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Country Code' attribute. + * @see #isSetCountryCode() + * @see #unsetCountryCode() + * @see #setCountryCode(String) + * @see org.genivi.common.CommonPackage#getLocalizedString_CountryCode() + * @model unsettable="true" + * @generated + */ + String getCountryCode(); + + /** + * Sets the value of the '{@link org.genivi.common.LocalizedString#getCountryCode Country Code}' attribute. + * + * + * @param value the new value of the 'Country Code' attribute. + * @see #isSetCountryCode() + * @see #unsetCountryCode() + * @see #getCountryCode() + * @generated + */ + void setCountryCode(String value); + + /** + * Unsets the value of the '{@link org.genivi.common.LocalizedString#getCountryCode Country Code}' attribute. + * + * + * @see #isSetCountryCode() + * @see #getCountryCode() + * @see #setCountryCode(String) + * @generated + */ + void unsetCountryCode(); + + /** + * Returns whether the value of the '{@link org.genivi.common.LocalizedString#getCountryCode Country Code}' attribute is set. + * + * + * @return whether the value of the 'Country Code' attribute is set. + * @see #unsetCountryCode() + * @see #getCountryCode() + * @see #setCountryCode(String) + * @generated + */ + boolean isSetCountryCode(); + + /** + * Returns the value of the 'String' attribute. + * + *+ * If the meaning of the 'String' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'String' attribute. + * @see #isSetString() + * @see #unsetString() + * @see #setString(String) + * @see org.genivi.common.CommonPackage#getLocalizedString_String() + * @model unsettable="true" required="true" + * @generated + */ + String getString(); + + /** + * Sets the value of the '{@link org.genivi.common.LocalizedString#getString String}' attribute. + * + * + * @param value the new value of the 'String' attribute. + * @see #isSetString() + * @see #unsetString() + * @see #getString() + * @generated + */ + void setString(String value); + + /** + * Unsets the value of the '{@link org.genivi.common.LocalizedString#getString String}' attribute. + * + * + * @see #isSetString() + * @see #getString() + * @see #setString(String) + * @generated + */ + void unsetString(); + + /** + * Returns whether the value of the '{@link org.genivi.common.LocalizedString#getString String}' attribute is set. + * + * + * @return whether the value of the 'String' attribute is set. + * @see #unsetString() + * @see #getString() + * @see #setString(String) + * @generated + */ + boolean isSetString(); + +} // LocalizedString diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/RectangularArea.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/RectangularArea.java new file mode 100755 index 0000000..1a09d6b --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/RectangularArea.java @@ -0,0 +1,92 @@ +/** + * 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.common; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Rectangular Area'. + * + * + * + * This datatype represents a rectangular area. The area is defined by the WGS84 coordinates of its bottomLeft and topRight corners. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Bottom Left' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * + * The bottom-left corner of the area. + * + * @return the value of the 'Bottom Left' containment reference. + * @see #setBottomLeft(Coordinate) + * @see org.genivi.common.CommonPackage#getRectangularArea_BottomLeft() + * @model containment="true" required="true" + * @generated + */ + Coordinate getBottomLeft(); + + /** + * Sets the value of the '{@link org.genivi.common.RectangularArea#getBottomLeft Bottom Left}' containment reference. + * + * + * @param value the new value of the 'Bottom Left' containment reference. + * @see #getBottomLeft() + * @generated + */ + void setBottomLeft(Coordinate value); + + /** + * Returns the value of the 'Top Right' containment reference. + * + *+ * If the meaning of the 'Top Right' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * + * The top-right corner of the area. + * + * @return the value of the 'Top Right' containment reference. + * @see #setTopRight(Coordinate) + * @see org.genivi.common.CommonPackage#getRectangularArea_TopRight() + * @model containment="true" required="true" + * @generated + */ + Coordinate getTopRight(); + + /** + * Sets the value of the '{@link org.genivi.common.RectangularArea#getTopRight Top Right}' containment reference. + * + * + * @param value the new value of the 'Top Right' containment reference. + * @see #getTopRight() + * @generated + */ + void setTopRight(Coordinate value); +} // RectangularArea diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/Version.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/Version.java new file mode 100755 index 0000000..32adcc5 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/Version.java @@ -0,0 +1,263 @@ +/** + * 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.common; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Version'. + * + * + * + * This datatype is used to provide version information. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Major' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * + * The major version number. + * + * @return the value of the 'Major' attribute. + * @see #isSetMajor() + * @see #unsetMajor() + * @see #setMajor(int) + * @see org.genivi.common.CommonPackage#getVersion_Major() + * @model unsettable="true" required="true" + * annotation="http://www.tomtom.com/emfidl/2012/GenModel valueMin='0' valueMax='32767'" + * @generated + */ + int getMajor(); + + /** + * Sets the value of the '{@link org.genivi.common.Version#getMajor Major}' attribute. + * + * + * @param value the new value of the 'Major' attribute. + * @see #isSetMajor() + * @see #unsetMajor() + * @see #getMajor() + * @generated + */ + void setMajor(int value); + + /** + * Unsets the value of the '{@link org.genivi.common.Version#getMajor Major}' attribute. + * + * + * @see #isSetMajor() + * @see #getMajor() + * @see #setMajor(int) + * @generated + */ + void unsetMajor(); + + /** + * Returns whether the value of the '{@link org.genivi.common.Version#getMajor Major}' attribute is set. + * + * + * @return whether the value of the 'Major' attribute is set. + * @see #unsetMajor() + * @see #getMajor() + * @see #setMajor(int) + * @generated + */ + boolean isSetMajor(); + + /** + * Returns the value of the 'Minor' attribute. + * + *+ * If the meaning of the 'Minor' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * + * The minor version number. + * + * @return the value of the 'Minor' attribute. + * @see #isSetMinor() + * @see #unsetMinor() + * @see #setMinor(int) + * @see org.genivi.common.CommonPackage#getVersion_Minor() + * @model unsettable="true" required="true" + * annotation="http://www.tomtom.com/emfidl/2012/GenModel valueMin='0' valueMax='32767'" + * @generated + */ + int getMinor(); + + /** + * Sets the value of the '{@link org.genivi.common.Version#getMinor Minor}' attribute. + * + * + * @param value the new value of the 'Minor' attribute. + * @see #isSetMinor() + * @see #unsetMinor() + * @see #getMinor() + * @generated + */ + void setMinor(int value); + + /** + * Unsets the value of the '{@link org.genivi.common.Version#getMinor Minor}' attribute. + * + * + * @see #isSetMinor() + * @see #getMinor() + * @see #setMinor(int) + * @generated + */ + void unsetMinor(); + + /** + * Returns whether the value of the '{@link org.genivi.common.Version#getMinor Minor}' attribute is set. + * + * + * @return whether the value of the 'Minor' attribute is set. + * @see #unsetMinor() + * @see #getMinor() + * @see #setMinor(int) + * @generated + */ + boolean isSetMinor(); + + /** + * Returns the value of the 'Micro' attribute. + * + *+ * If the meaning of the 'Micro' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * + * The micro version number. + * + * @return the value of the 'Micro' attribute. + * @see #isSetMicro() + * @see #unsetMicro() + * @see #setMicro(int) + * @see org.genivi.common.CommonPackage#getVersion_Micro() + * @model unsettable="true" required="true" + * annotation="http://www.tomtom.com/emfidl/2012/GenModel valueMin='0' valueMax='32767'" + * @generated + */ + int getMicro(); + + /** + * Sets the value of the '{@link org.genivi.common.Version#getMicro Micro}' attribute. + * + * + * @param value the new value of the 'Micro' attribute. + * @see #isSetMicro() + * @see #unsetMicro() + * @see #getMicro() + * @generated + */ + void setMicro(int value); + + /** + * Unsets the value of the '{@link org.genivi.common.Version#getMicro Micro}' attribute. + * + * + * @see #isSetMicro() + * @see #getMicro() + * @see #setMicro(int) + * @generated + */ + void unsetMicro(); + + /** + * Returns whether the value of the '{@link org.genivi.common.Version#getMicro Micro}' attribute is set. + * + * + * @return whether the value of the 'Micro' attribute is set. + * @see #unsetMicro() + * @see #getMicro() + * @see #setMicro(int) + * @generated + */ + boolean isSetMicro(); + + /** + * Returns the value of the 'Date' attribute. + * + *+ * If the meaning of the 'Date' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * + * The date of this version. + * + * @return the value of the 'Date' attribute. + * @see #isSetDate() + * @see #unsetDate() + * @see #setDate(String) + * @see org.genivi.common.CommonPackage#getVersion_Date() + * @model unsettable="true" required="true" + * @generated + */ + String getDate(); + + /** + * Sets the value of the '{@link org.genivi.common.Version#getDate Date}' attribute. + * + * + * @param value the new value of the 'Date' attribute. + * @see #isSetDate() + * @see #unsetDate() + * @see #getDate() + * @generated + */ + void setDate(String value); + + /** + * Unsets the value of the '{@link org.genivi.common.Version#getDate Date}' attribute. + * + * + * @see #isSetDate() + * @see #getDate() + * @see #setDate(String) + * @generated + */ + void unsetDate(); + + /** + * Returns whether the value of the '{@link org.genivi.common.Version#getDate Date}' attribute is set. + * + * + * @return whether the value of the 'Date' attribute is set. + * @see #unsetDate() + * @see #getDate() + * @see #setDate(String) + * @generated + */ + boolean isSetDate(); + +} // Version diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/impl/CommonFactoryImpl.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/impl/CommonFactoryImpl.java new file mode 100755 index 0000000..a1760d9 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/impl/CommonFactoryImpl.java @@ -0,0 +1,135 @@ +/** + * + * 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.common.impl; + +import org.eclipse.emf.ecore.EClass; +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.common.*; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class CommonFactoryImpl extends EFactoryImpl implements CommonFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static CommonFactory init() { + try { + CommonFactory theCommonFactory = (CommonFactory)EPackage.Registry.INSTANCE.getEFactory(CommonPackage.eNS_URI); + if (theCommonFactory != null) { + return theCommonFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new CommonFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public CommonFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CommonPackage.COORDINATE: return createCoordinate(); + case CommonPackage.RECTANGULAR_AREA: return createRectangularArea(); + case CommonPackage.VERSION: return createVersion(); + case CommonPackage.LOCALIZED_STRING: return createLocalizedString(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Coordinate createCoordinate() { + CoordinateImpl coordinate = new CoordinateImpl(); + return coordinate; + } + + /** + * + * + * @generated + */ + public RectangularArea createRectangularArea() { + RectangularAreaImpl rectangularArea = new RectangularAreaImpl(); + return rectangularArea; + } + + /** + * + * + * @generated + */ + public Version createVersion() { + VersionImpl version = new VersionImpl(); + return version; + } + + /** + * + * + * @generated + */ + public LocalizedString createLocalizedString() { + LocalizedStringImpl localizedString = new LocalizedStringImpl(); + return localizedString; + } + + /** + * + * + * @generated + */ + public CommonPackage getCommonPackage() { + return (CommonPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static CommonPackage getPackage() { + return CommonPackage.eINSTANCE; + } + +} //CommonFactoryImpl diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/impl/CommonPackageImpl.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/impl/CommonPackageImpl.java new file mode 100755 index 0000000..f8f8ecc --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/impl/CommonPackageImpl.java @@ -0,0 +1,413 @@ +/** + * + * 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.common.impl; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +import org.genivi.common.CommonFactory; +import org.genivi.common.CommonPackage; +import org.genivi.common.Coordinate; +import org.genivi.common.LocalizedString; +import org.genivi.common.RectangularArea; + +import org.genivi.common.Version; +import org.genivi.location.LocationPackage; + +import org.genivi.location.impl.LocationPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class CommonPackageImpl extends EPackageImpl implements CommonPackage { + /** + * + * + * @generated + */ + private EClass coordinateEClass = null; + + /** + * + * + * @generated + */ + private EClass rectangularAreaEClass = null; + + /** + * + * + * @generated + */ + private EClass versionEClass = null; + + /** + * + * + * @generated + */ + private EClass localizedStringEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *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. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.genivi.common.CommonPackage#eNS_URI + * @see #init() + * @generated + */ + private CommonPackageImpl() { + super(eNS_URI, CommonFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *
This method is used to initialize {@link CommonPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static CommonPackage init() { + if (isInited) return (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + + // Obtain or create and register package + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CommonPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CommonPackageImpl()); + + isInited = true; + + // Obtain or create and register interdependencies + LocationPackageImpl theLocationPackage = (LocationPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(LocationPackage.eNS_URI) instanceof LocationPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LocationPackage.eNS_URI) : LocationPackage.eINSTANCE); + + // Create package meta-data objects + theCommonPackage.createPackageContents(); + theLocationPackage.createPackageContents(); + + // Initialize created meta-data + theCommonPackage.initializePackageContents(); + theLocationPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCommonPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CommonPackage.eNS_URI, theCommonPackage); + return theCommonPackage; + } + + /** + * + * + * @generated + */ + public EClass getCoordinate() { + return coordinateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCoordinate_Latitude() { + return (EAttribute)coordinateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getCoordinate_Longitude() { + return (EAttribute)coordinateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCoordinate_Altitude() { + return (EAttribute)coordinateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getRectangularArea() { + return rectangularAreaEClass; + } + + /** + * + * + * @generated + */ + public EReference getRectangularArea_BottomLeft() { + return (EReference)rectangularAreaEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getRectangularArea_TopRight() { + return (EReference)rectangularAreaEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getVersion() { + return versionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getVersion_Major() { + return (EAttribute)versionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getVersion_Minor() { + return (EAttribute)versionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getVersion_Micro() { + return (EAttribute)versionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getVersion_Date() { + return (EAttribute)versionEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getLocalizedString() { + return localizedStringEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLocalizedString_LanguageCode() { + return (EAttribute)localizedStringEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLocalizedString_CountryCode() { + return (EAttribute)localizedStringEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getLocalizedString_String() { + return (EAttribute)localizedStringEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public CommonFactory getCommonFactory() { + return (CommonFactory)getEFactoryInstance(); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + coordinateEClass = createEClass(COORDINATE); + createEAttribute(coordinateEClass, COORDINATE__LATITUDE); + createEAttribute(coordinateEClass, COORDINATE__LONGITUDE); + createEAttribute(coordinateEClass, COORDINATE__ALTITUDE); + + rectangularAreaEClass = createEClass(RECTANGULAR_AREA); + createEReference(rectangularAreaEClass, RECTANGULAR_AREA__BOTTOM_LEFT); + createEReference(rectangularAreaEClass, RECTANGULAR_AREA__TOP_RIGHT); + + versionEClass = createEClass(VERSION); + createEAttribute(versionEClass, VERSION__MAJOR); + createEAttribute(versionEClass, VERSION__MINOR); + createEAttribute(versionEClass, VERSION__MICRO); + createEAttribute(versionEClass, VERSION__DATE); + + localizedStringEClass = createEClass(LOCALIZED_STRING); + createEAttribute(localizedStringEClass, LOCALIZED_STRING__LANGUAGE_CODE); + createEAttribute(localizedStringEClass, LOCALIZED_STRING__COUNTRY_CODE); + createEAttribute(localizedStringEClass, LOCALIZED_STRING__STRING); + } + + /** + * + * + * @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. + * + * + * @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 + + // Initialize classes and features; add operations and parameters + initEClass(coordinateEClass, Coordinate.class, "Coordinate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCoordinate_Latitude(), ecorePackage.getEDouble(), "latitude", null, 1, 1, Coordinate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCoordinate_Longitude(), ecorePackage.getEDouble(), "longitude", null, 1, 1, Coordinate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCoordinate_Altitude(), ecorePackage.getEInt(), "altitude", null, 0, 1, Coordinate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(rectangularAreaEClass, RectangularArea.class, "RectangularArea", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRectangularArea_BottomLeft(), this.getCoordinate(), null, "bottomLeft", null, 1, 1, RectangularArea.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getRectangularArea_TopRight(), this.getCoordinate(), null, "topRight", null, 1, 1, RectangularArea.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(versionEClass, Version.class, "Version", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getVersion_Major(), ecorePackage.getEInt(), "major", null, 1, 1, Version.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVersion_Minor(), ecorePackage.getEInt(), "minor", null, 1, 1, Version.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVersion_Micro(), ecorePackage.getEInt(), "micro", null, 1, 1, Version.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getVersion_Date(), ecorePackage.getEString(), "date", null, 1, 1, Version.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(localizedStringEClass, LocalizedString.class, "LocalizedString", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLocalizedString_LanguageCode(), ecorePackage.getEString(), "languageCode", null, 1, 1, LocalizedString.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLocalizedString_CountryCode(), ecorePackage.getEString(), "countryCode", null, 0, 1, LocalizedString.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLocalizedString_String(), ecorePackage.getEString(), "string", null, 1, 1, LocalizedString.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.tomtom.com/emfidl/2012/GenModel + createGenModel_1Annotations(); + } + + /** + * Initializes the annotations for http://www.tomtom.com/emfidl/2012/GenModel. + * + * + * @generated + */ + protected void createGenModel_1Annotations() { + String source = "http://www.tomtom.com/emfidl/2012/GenModel"; + addAnnotation + (getVersion_Major(), + source, + new String[] { + "valueMin", "0", + "valueMax", "32767" + }); + addAnnotation + (getVersion_Minor(), + source, + new String[] { + "valueMin", "0", + "valueMax", "32767" + }); + addAnnotation + (getVersion_Micro(), + source, + new String[] { + "valueMin", "0", + "valueMax", "32767" + }); + } + +} //CommonPackageImpl diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/impl/CoordinateImpl.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/impl/CoordinateImpl.java new file mode 100755 index 0000000..38caa05 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/impl/CoordinateImpl.java @@ -0,0 +1,272 @@ +/** + * + * 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.common.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.genivi.common.CommonPackage; +import org.genivi.common.Coordinate; + +/** + * + * An implementation of the model object 'Coordinate'. + * + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
createXXX
method for each class of the model.
+ *
+ * @see org.genivi.common.CommonPackage
+ * @generated
+ */
+public class CommonAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static CommonPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public CommonAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = CommonPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ *
+ * This implementation returns true
if the object is either the model's package or is an instance object of the model.
+ *
+ * @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 createXXX
methods.
+ *
+ *
+ * @generated
+ */
+ protected CommonSwitchtarget
.
+ *
+ *
+ * @param target the object to adapt.
+ * @return the adapter for the target
.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.common.Coordinate Coordinate}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.common.Coordinate
+ * @generated
+ */
+ public Adapter createCoordinateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.common.RectangularArea Rectangular Area}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.common.RectangularArea
+ * @generated
+ */
+ public Adapter createRectangularAreaAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.common.Version Version}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.common.Version
+ * @generated
+ */
+ public Adapter createVersionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.common.LocalizedString Localized String}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.common.LocalizedString
+ * @generated
+ */
+ public Adapter createLocalizedStringAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ *
+ * This default implementation returns null.
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //CommonAdapterFactory
diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/util/CommonSwitch.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/util/CommonSwitch.java
new file mode 100755
index 0000000..2d06273
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/common/util/CommonSwitch.java
@@ -0,0 +1,182 @@
+/**
+ *
+ * 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.common.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.genivi.common.CommonPackage;
+import org.genivi.common.Coordinate;
+import org.genivi.common.LocalizedString;
+import org.genivi.common.RectangularArea;
+import org.genivi.common.Version;
+
+/**
+ *
+ * The Switch for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the caseXXX
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.
+ *
+ * @see org.genivi.common.CommonPackage
+ * @generated
+ */
+public class CommonSwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case CommonPackage.COORDINATE: {
+ Coordinate coordinate = (Coordinate)theEObject;
+ T result = caseCoordinate(coordinate);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CommonPackage.RECTANGULAR_AREA: {
+ RectangularArea rectangularArea = (RectangularArea)theEObject;
+ T result = caseRectangularArea(rectangularArea);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CommonPackage.VERSION: {
+ Version version = (Version)theEObject;
+ T result = caseVersion(version);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CommonPackage.LOCALIZED_STRING: {
+ LocalizedString localizedString = (LocalizedString)theEObject;
+ T result = caseLocalizedString(localizedString);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Coordinate'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Coordinate'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCoordinate(Coordinate object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Rectangular Area'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Rectangular Area'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRectangularArea(RectangularArea object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Version'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Version'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseVersion(Version object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Localized String'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Localized String'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLocalizedString(LocalizedString object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'EObject'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'EObject'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //CommonSwitch
diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/AreaLocation.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/AreaLocation.java
new file mode 100755
index 0000000..88db67d
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/AreaLocation.java
@@ -0,0 +1,29 @@
+/**
+ *
+ * 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.location;
+
+
+/**
+ *
+ * A representation of the model object 'Area Location'.
+ *
+ *
+ *
+ * The location is an area, e.g. an area with fog.
+ * TODO Work out the AreaLocation class
+ *
+ *
+ *
+ * @see org.genivi.location.LocationPackage#getAreaLocation()
+ * @model
+ * @generated
+ */
+public interface AreaLocation extends Location {
+} // AreaLocation
diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/AreaLocationInfo.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/AreaLocationInfo.java
new file mode 100755
index 0000000..4bead9d
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/AreaLocationInfo.java
@@ -0,0 +1,24 @@
+/**
+ *
+ * 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.location;
+
+
+/**
+ *
+ * A representation of the model object 'Area Location Info'.
+ *
+ *
+ *
+ * @see org.genivi.location.LocationPackage#getAreaLocationInfo()
+ * @model
+ * @generated
+ */
+public interface AreaLocationInfo extends LocationInfo {
+} // AreaLocationInfo
diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/LinearLocation.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/LinearLocation.java
new file mode 100755
index 0000000..ea5bcd6
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/LinearLocation.java
@@ -0,0 +1,161 @@
+/**
+ *
+ * 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.location;
+
+import org.eclipse.emf.common.util.EList;
+
+
+/**
+ *
+ * A representation of the model object 'Linear Location'.
+ *
+ *
+ *
+ * The location is a road stretch, e.g. the road stretch where there is a traffic jam.
+ *
+ *
+ * + * The following features are supported: + *
+ * If the meaning of the 'Segments' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * + * The database segments of the location. + * + * @return the value of the 'Segments' attribute list. + * @see org.genivi.location.LocationPackage#getLinearLocation_Segments() + * @model required="true" + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'From Location Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'From Location Name' attribute. + * @see #setFromLocationName(String) + * @see org.genivi.location.LocationPackage#getLinearLocationInfo_FromLocationName() + * @model + * @generated + */ + String getFromLocationName(); + + /** + * Sets the value of the '{@link org.genivi.location.LinearLocationInfo#getFromLocationName From Location Name}' attribute. + * + * + * @param value the new value of the 'From Location Name' attribute. + * @see #getFromLocationName() + * @generated + */ + void setFromLocationName(String value); + + /** + * Returns the value of the 'From Location Parent Name' attribute. + * + *+ * If the meaning of the 'From Location Parent Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'From Location Parent Name' attribute. + * @see #setFromLocationParentName(String) + * @see org.genivi.location.LocationPackage#getLinearLocationInfo_FromLocationParentName() + * @model + * @generated + */ + String getFromLocationParentName(); + + /** + * Sets the value of the '{@link org.genivi.location.LinearLocationInfo#getFromLocationParentName From Location Parent Name}' attribute. + * + * + * @param value the new value of the 'From Location Parent Name' attribute. + * @see #getFromLocationParentName() + * @generated + */ + void setFromLocationParentName(String value); + + /** + * Returns the value of the 'To Location Name' attribute. + * + *+ * If the meaning of the 'To Location Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'To Location Name' attribute. + * @see #setToLocationName(String) + * @see org.genivi.location.LocationPackage#getLinearLocationInfo_ToLocationName() + * @model + * @generated + */ + String getToLocationName(); + + /** + * Sets the value of the '{@link org.genivi.location.LinearLocationInfo#getToLocationName To Location Name}' attribute. + * + * + * @param value the new value of the 'To Location Name' attribute. + * @see #getToLocationName() + * @generated + */ + void setToLocationName(String value); + + /** + * Returns the value of the 'To Location Parent Name' attribute. + * + *+ * If the meaning of the 'To Location Parent Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'To Location Parent Name' attribute. + * @see #setToLocationParentName(String) + * @see org.genivi.location.LocationPackage#getLinearLocationInfo_ToLocationParentName() + * @model + * @generated + */ + String getToLocationParentName(); + + /** + * Sets the value of the '{@link org.genivi.location.LinearLocationInfo#getToLocationParentName To Location Parent Name}' attribute. + * + * + * @param value the new value of the 'To Location Parent Name' attribute. + * @see #getToLocationParentName() + * @generated + */ + void setToLocationParentName(String value); + + /** + * Returns the value of the 'Coordinates' containment reference list. + * The list contents are of type {@link org.genivi.common.Coordinate}. + * + *+ * If the meaning of the 'Coordinates' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Coordinates' containment reference list. + * @see org.genivi.location.LocationPackage#getLinearLocationInfo_Coordinates() + * @model containment="true" + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.genivi.location.LocationPackage#getLocationInfo_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.genivi.location.LocationInfo#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Main Location' containment reference. + * + *+ * If the meaning of the 'Main Location' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Main Location' containment reference. + * @see #setMainLocation(Coordinate) + * @see org.genivi.location.LocationPackage#getLocationInfo_MainLocation() + * @model containment="true" + * @generated + */ + Coordinate getMainLocation(); + + /** + * Sets the value of the '{@link org.genivi.location.LocationInfo#getMainLocation Main Location}' containment reference. + * + * + * @param value the new value of the 'Main Location' containment reference. + * @see #getMainLocation() + * @generated + */ + void setMainLocation(Coordinate value); + +} // LocationInfo diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/LocationPackage.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/LocationPackage.java new file mode 100755 index 0000000..fe6e3df --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/LocationPackage.java @@ -0,0 +1,796 @@ +/** + * + * 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.location; + +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; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *+ * The following features are supported: + *
+ * If the meaning of the 'Location Type' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Location Type' attribute. + * @see org.genivi.location.PointLocationType + * @see #setLocationType(PointLocationType) + * @see org.genivi.location.LocationPackage#getPointLocationInfo_LocationType() + * @model + * @generated + */ + PointLocationType getLocationType(); + + /** + * Sets the value of the '{@link org.genivi.location.PointLocationInfo#getLocationType Location Type}' attribute. + * + * + * @param value the new value of the 'Location Type' attribute. + * @see org.genivi.location.PointLocationType + * @see #getLocationType() + * @generated + */ + void setLocationType(PointLocationType value); + +} // PointLocationInfo diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/PointLocationType.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/PointLocationType.java new file mode 100755 index 0000000..cadb417 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/PointLocationType.java @@ -0,0 +1,269 @@ +/** + * + * 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.location; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Point Location Type', + * and utility methods for working with them. + * + * @see org.genivi.location.LocationPackage#getPointLocationType() + * @model + * @generated + */ +public enum PointLocationType implements Enumerator { + /** + * The 'MOTORWAY EXIT' literal object. + * + * + * @see #MOTORWAY_EXIT_VALUE + * @generated + * @ordered + */ + MOTORWAY_EXIT(0, "MOTORWAY_EXIT", "MOTORWAY_EXIT"), + + /** + * The 'MOTORWAY TRIANGLE' literal object. + * + * + * @see #MOTORWAY_TRIANGLE_VALUE + * @generated + * @ordered + */ + MOTORWAY_TRIANGLE(1, "MOTORWAY_TRIANGLE", "MOTORWAY_TRIANGLE"), + + /** + * The 'MOTORWAY CROSSING' literal object. + * + * + * @see #MOTORWAY_CROSSING_VALUE + * @generated + * @ordered + */ + MOTORWAY_CROSSING(2, "MOTORWAY_CROSSING", "MOTORWAY_CROSSING"), + + /** + * The 'MOTORWAY ENTRY' literal object. + * + * + * @see #MOTORWAY_ENTRY_VALUE + * @generated + * @ordered + */ + MOTORWAY_ENTRY(3, "MOTORWAY_ENTRY", "MOTORWAY_ENTRY"); + + /** + * The 'MOTORWAY EXIT' literal value. + * + *+ * If the meaning of 'MOTORWAY EXIT' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #MOTORWAY_EXIT + * @model + * @generated + * @ordered + */ + public static final int MOTORWAY_EXIT_VALUE = 0; + + /** + * The 'MOTORWAY TRIANGLE' literal value. + * + *+ * If the meaning of 'MOTORWAY TRIANGLE' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #MOTORWAY_TRIANGLE + * @model + * @generated + * @ordered + */ + public static final int MOTORWAY_TRIANGLE_VALUE = 1; + + /** + * The 'MOTORWAY CROSSING' literal value. + * + *+ * If the meaning of 'MOTORWAY CROSSING' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #MOTORWAY_CROSSING + * @model + * @generated + * @ordered + */ + public static final int MOTORWAY_CROSSING_VALUE = 2; + + /** + * The 'MOTORWAY ENTRY' literal value. + * + *+ * If the meaning of 'MOTORWAY ENTRY' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #MOTORWAY_ENTRY + * @model + * @generated + * @ordered + */ + public static final int MOTORWAY_ENTRY_VALUE = 3; + + /** + * An array of all the 'Point Location Type' enumerators. + * + * + * @generated + */ + private static final PointLocationType[] VALUES_ARRAY = + new PointLocationType[] { + MOTORWAY_EXIT, + MOTORWAY_TRIANGLE, + MOTORWAY_CROSSING, + MOTORWAY_ENTRY, + }; + + /** + * A public read-only list of all the 'Point Location Type' enumerators. + * + * + * @generated + */ + public static final List+ *
+ * + * @generated + */ +public class AreaLocationImpl extends LocationImpl implements AreaLocation { + /** + * + * + * @generated + */ + protected AreaLocationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LocationPackage.Literals.AREA_LOCATION; + } + +} //AreaLocationImpl diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/AreaLocationInfoImpl.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/AreaLocationInfoImpl.java new file mode 100755 index 0000000..5d2ae54 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/AreaLocationInfoImpl.java @@ -0,0 +1,46 @@ +/** + * + * 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.location.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.genivi.location.AreaLocationInfo; +import org.genivi.location.LocationPackage; + +/** + * + * An implementation of the model object 'Area Location Info'. + * + *+ *
+ * + * @generated + */ +public class AreaLocationInfoImpl extends LocationInfoImpl implements AreaLocationInfo { + /** + * + * + * @generated + */ + protected AreaLocationInfoImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LocationPackage.Literals.AREA_LOCATION_INFO; + } + +} //AreaLocationInfoImpl diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/LinearLocationImpl.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/LinearLocationImpl.java new file mode 100755 index 0000000..bc9a435 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/LinearLocationImpl.java @@ -0,0 +1,332 @@ +/** + * + * 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.location.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.genivi.location.LinearLocation; +import org.genivi.location.LocationPackage; + +/** + * + * An implementation of the model object 'Linear Location'. + * + *+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ *
+ * + * @generated + */ +public class LocationImpl extends EObjectImpl implements Location { + /** + * + * + * @generated + */ + protected LocationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LocationPackage.Literals.LOCATION; + } + +} //LocationImpl diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/LocationInfoImpl.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/LocationInfoImpl.java new file mode 100755 index 0000000..9675527 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/LocationInfoImpl.java @@ -0,0 +1,252 @@ +/** + * + * 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.location.impl; + +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.eclipse.emf.ecore.impl.EObjectImpl; + +import org.genivi.common.Coordinate; + +import org.genivi.location.LocationInfo; +import org.genivi.location.LocationPackage; + +/** + * + * An implementation of the model object 'Info'. + * + *+ * The following features are implemented: + *
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. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.genivi.location.LocationPackage#eNS_URI + * @see #init() + * @generated + */ + private LocationPackageImpl() { + super(eNS_URI, LocationFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *
This method is used to initialize {@link LocationPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static LocationPackage init() { + if (isInited) return (LocationPackage)EPackage.Registry.INSTANCE.getEPackage(LocationPackage.eNS_URI); + + // Obtain or create and register package + LocationPackageImpl theLocationPackage = (LocationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof LocationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new LocationPackageImpl()); + + isInited = true; + + // Obtain or create and register interdependencies + CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); + + // Create package meta-data objects + theLocationPackage.createPackageContents(); + theCommonPackage.createPackageContents(); + + // Initialize created meta-data + theLocationPackage.initializePackageContents(); + theCommonPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theLocationPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(LocationPackage.eNS_URI, theLocationPackage); + return theLocationPackage; + } + + /** + * + * + * @generated + */ + public EClass getLocation() { + return locationEClass; + } + + /** + * + * + * @generated + */ + public EClass getPointLocation() { + return pointLocationEClass; + } + + /** + * + * + * @generated + */ + public EClass getAreaLocation() { + return areaLocationEClass; + } + + /** + * + * + * @generated + */ + public EClass getLinearLocation() { + return linearLocationEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLinearLocation_Segments() { + return (EAttribute)linearLocationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLinearLocation_PositiveOffset() { + return (EAttribute)linearLocationEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getLinearLocation_NegativeOffset() { + return (EAttribute)linearLocationEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getLocationInfo() { + return locationInfoEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLocationInfo_Name() { + return (EAttribute)locationInfoEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getLocationInfo_MainLocation() { + return (EReference)locationInfoEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getPointLocationInfo() { + return pointLocationInfoEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPointLocationInfo_LocationType() { + return (EAttribute)pointLocationInfoEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getLinearLocationInfo() { + return linearLocationInfoEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLinearLocationInfo_FromLocationName() { + return (EAttribute)linearLocationInfoEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLinearLocationInfo_FromLocationParentName() { + return (EAttribute)linearLocationInfoEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getLinearLocationInfo_ToLocationName() { + return (EAttribute)linearLocationInfoEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getLinearLocationInfo_ToLocationParentName() { + return (EAttribute)linearLocationInfoEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getLinearLocationInfo_Coordinates() { + return (EReference)linearLocationInfoEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getAreaLocationInfo() { + return areaLocationInfoEClass; + } + + /** + * + * + * @generated + */ + public EEnum getPointLocationType() { + return pointLocationTypeEEnum; + } + + /** + * + * + * @generated + */ + public LocationFactory getLocationFactory() { + return (LocationFactory)getEFactoryInstance(); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + locationEClass = createEClass(LOCATION); + + pointLocationEClass = createEClass(POINT_LOCATION); + + areaLocationEClass = createEClass(AREA_LOCATION); + + linearLocationEClass = createEClass(LINEAR_LOCATION); + createEAttribute(linearLocationEClass, LINEAR_LOCATION__SEGMENTS); + createEAttribute(linearLocationEClass, LINEAR_LOCATION__POSITIVE_OFFSET); + createEAttribute(linearLocationEClass, LINEAR_LOCATION__NEGATIVE_OFFSET); + + locationInfoEClass = createEClass(LOCATION_INFO); + createEAttribute(locationInfoEClass, LOCATION_INFO__NAME); + createEReference(locationInfoEClass, LOCATION_INFO__MAIN_LOCATION); + + pointLocationInfoEClass = createEClass(POINT_LOCATION_INFO); + createEAttribute(pointLocationInfoEClass, POINT_LOCATION_INFO__LOCATION_TYPE); + + linearLocationInfoEClass = createEClass(LINEAR_LOCATION_INFO); + createEAttribute(linearLocationInfoEClass, LINEAR_LOCATION_INFO__FROM_LOCATION_NAME); + createEAttribute(linearLocationInfoEClass, LINEAR_LOCATION_INFO__FROM_LOCATION_PARENT_NAME); + createEAttribute(linearLocationInfoEClass, LINEAR_LOCATION_INFO__TO_LOCATION_NAME); + createEAttribute(linearLocationInfoEClass, LINEAR_LOCATION_INFO__TO_LOCATION_PARENT_NAME); + createEReference(linearLocationInfoEClass, LINEAR_LOCATION_INFO__COORDINATES); + + areaLocationInfoEClass = createEClass(AREA_LOCATION_INFO); + + // Create enums + pointLocationTypeEEnum = createEEnum(POINT_LOCATION_TYPE); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CommonPackage theCommonPackage = (CommonPackage)EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + pointLocationEClass.getESuperTypes().add(this.getLocation()); + areaLocationEClass.getESuperTypes().add(this.getLocation()); + linearLocationEClass.getESuperTypes().add(this.getLocation()); + pointLocationInfoEClass.getESuperTypes().add(this.getLocationInfo()); + linearLocationInfoEClass.getESuperTypes().add(this.getLocationInfo()); + areaLocationInfoEClass.getESuperTypes().add(this.getLocationInfo()); + + // Initialize classes and features; add operations and parameters + initEClass(locationEClass, Location.class, "Location", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(pointLocationEClass, PointLocation.class, "PointLocation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(areaLocationEClass, AreaLocation.class, "AreaLocation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(linearLocationEClass, LinearLocation.class, "LinearLocation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLinearLocation_Segments(), ecorePackage.getELong(), "segments", null, 1, -1, LinearLocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLinearLocation_PositiveOffset(), ecorePackage.getELong(), "positiveOffset", null, 0, 1, LinearLocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLinearLocation_NegativeOffset(), ecorePackage.getELong(), "negativeOffset", null, 0, 1, LinearLocation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(locationInfoEClass, LocationInfo.class, "LocationInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLocationInfo_Name(), ecorePackage.getEString(), "name", null, 0, 1, LocationInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLocationInfo_MainLocation(), theCommonPackage.getCoordinate(), null, "mainLocation", null, 0, 1, LocationInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(pointLocationInfoEClass, PointLocationInfo.class, "PointLocationInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPointLocationInfo_LocationType(), this.getPointLocationType(), "locationType", null, 0, 1, PointLocationInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(linearLocationInfoEClass, LinearLocationInfo.class, "LinearLocationInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLinearLocationInfo_FromLocationName(), ecorePackage.getEString(), "fromLocationName", null, 0, 1, LinearLocationInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLinearLocationInfo_FromLocationParentName(), ecorePackage.getEString(), "fromLocationParentName", null, 0, 1, LinearLocationInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLinearLocationInfo_ToLocationName(), ecorePackage.getEString(), "toLocationName", null, 0, 1, LinearLocationInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLinearLocationInfo_ToLocationParentName(), ecorePackage.getEString(), "toLocationParentName", null, 0, 1, LinearLocationInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLinearLocationInfo_Coordinates(), theCommonPackage.getCoordinate(), null, "coordinates", null, 0, -1, LinearLocationInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(areaLocationInfoEClass, AreaLocationInfo.class, "AreaLocationInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Initialize enums and add enum literals + initEEnum(pointLocationTypeEEnum, PointLocationType.class, "PointLocationType"); + addEEnumLiteral(pointLocationTypeEEnum, PointLocationType.MOTORWAY_EXIT); + addEEnumLiteral(pointLocationTypeEEnum, PointLocationType.MOTORWAY_TRIANGLE); + addEEnumLiteral(pointLocationTypeEEnum, PointLocationType.MOTORWAY_CROSSING); + addEEnumLiteral(pointLocationTypeEEnum, PointLocationType.MOTORWAY_ENTRY); + + // Create resource + createResource(eNS_URI); + } + +} //LocationPackageImpl diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/PointLocationImpl.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/PointLocationImpl.java new file mode 100755 index 0000000..226eb33 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/PointLocationImpl.java @@ -0,0 +1,46 @@ +/** + * + * 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.location.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.genivi.location.LocationPackage; +import org.genivi.location.PointLocation; + +/** + * + * An implementation of the model object 'Point Location'. + * + *
+ *
+ * + * @generated + */ +public class PointLocationImpl extends LocationImpl implements PointLocation { + /** + * + * + * @generated + */ + protected PointLocationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LocationPackage.Literals.POINT_LOCATION; + } + +} //PointLocationImpl diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/PointLocationInfoImpl.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/PointLocationInfoImpl.java new file mode 100755 index 0000000..6648e28 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/impl/PointLocationInfoImpl.java @@ -0,0 +1,170 @@ +/** + * + * 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.location.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.genivi.location.LocationPackage; +import org.genivi.location.PointLocationInfo; +import org.genivi.location.PointLocationType; + +/** + * + * An implementation of the model object 'Point Location Info'. + * + *+ * The following features are implemented: + *
createXXX
method for each class of the model.
+ *
+ * @see org.genivi.location.LocationPackage
+ * @generated
+ */
+public class LocationAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static LocationPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public LocationAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = LocationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ *
+ * This implementation returns true
if the object is either the model's package or is an instance object of the model.
+ *
+ * @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 createXXX
methods.
+ *
+ *
+ * @generated
+ */
+ protected LocationSwitchtarget
.
+ *
+ *
+ * @param target the object to adapt.
+ * @return the adapter for the target
.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.location.Location Location}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.location.Location
+ * @generated
+ */
+ public Adapter createLocationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.location.PointLocation Point Location}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.location.PointLocation
+ * @generated
+ */
+ public Adapter createPointLocationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.location.AreaLocation Area Location}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.location.AreaLocation
+ * @generated
+ */
+ public Adapter createAreaLocationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.location.LinearLocation Linear Location}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.location.LinearLocation
+ * @generated
+ */
+ public Adapter createLinearLocationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.location.LocationInfo Info}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.location.LocationInfo
+ * @generated
+ */
+ public Adapter createLocationInfoAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.location.PointLocationInfo Point Location Info}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.location.PointLocationInfo
+ * @generated
+ */
+ public Adapter createPointLocationInfoAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.location.LinearLocationInfo Linear Location Info}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.location.LinearLocationInfo
+ * @generated
+ */
+ public Adapter createLinearLocationInfoAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.location.AreaLocationInfo Area Location Info}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.location.AreaLocationInfo
+ * @generated
+ */
+ public Adapter createAreaLocationInfoAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ *
+ * This default implementation returns null.
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //LocationAdapterFactory
diff --git a/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/util/LocationSwitch.java b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/util/LocationSwitch.java
new file mode 100755
index 0000000..0608191
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.basetypes-model/src/org/genivi/location/util/LocationSwitch.java
@@ -0,0 +1,276 @@
+/**
+ *
+ * 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.location.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.genivi.location.AreaLocation;
+import org.genivi.location.AreaLocationInfo;
+import org.genivi.location.LinearLocation;
+import org.genivi.location.LinearLocationInfo;
+import org.genivi.location.Location;
+import org.genivi.location.LocationInfo;
+import org.genivi.location.LocationPackage;
+import org.genivi.location.PointLocation;
+import org.genivi.location.PointLocationInfo;
+
+/**
+ *
+ * The Switch for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the caseXXX
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.
+ *
+ * @see org.genivi.location.LocationPackage
+ * @generated
+ */
+public class LocationSwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case LocationPackage.LOCATION: {
+ Location location = (Location)theEObject;
+ T result = caseLocation(location);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case LocationPackage.POINT_LOCATION: {
+ PointLocation pointLocation = (PointLocation)theEObject;
+ T result = casePointLocation(pointLocation);
+ if (result == null) result = caseLocation(pointLocation);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case LocationPackage.AREA_LOCATION: {
+ AreaLocation areaLocation = (AreaLocation)theEObject;
+ T result = caseAreaLocation(areaLocation);
+ if (result == null) result = caseLocation(areaLocation);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case LocationPackage.LINEAR_LOCATION: {
+ LinearLocation linearLocation = (LinearLocation)theEObject;
+ T result = caseLinearLocation(linearLocation);
+ if (result == null) result = caseLocation(linearLocation);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case LocationPackage.LOCATION_INFO: {
+ LocationInfo locationInfo = (LocationInfo)theEObject;
+ T result = caseLocationInfo(locationInfo);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case LocationPackage.POINT_LOCATION_INFO: {
+ PointLocationInfo pointLocationInfo = (PointLocationInfo)theEObject;
+ T result = casePointLocationInfo(pointLocationInfo);
+ if (result == null) result = caseLocationInfo(pointLocationInfo);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case LocationPackage.LINEAR_LOCATION_INFO: {
+ LinearLocationInfo linearLocationInfo = (LinearLocationInfo)theEObject;
+ T result = caseLinearLocationInfo(linearLocationInfo);
+ if (result == null) result = caseLocationInfo(linearLocationInfo);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case LocationPackage.AREA_LOCATION_INFO: {
+ AreaLocationInfo areaLocationInfo = (AreaLocationInfo)theEObject;
+ T result = caseAreaLocationInfo(areaLocationInfo);
+ if (result == null) result = caseLocationInfo(areaLocationInfo);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Location'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Location'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLocation(Location object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Point Location'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Point Location'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePointLocation(PointLocation object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Area Location'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Area Location'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAreaLocation(AreaLocation object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Linear Location'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Linear Location'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLinearLocation(LinearLocation object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Info'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Info'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLocationInfo(LocationInfo object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Point Location Info'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Point Location Info'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePointLocationInfo(PointLocationInfo object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Linear Location Info'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Linear Location Info'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLinearLocationInfo(LinearLocationInfo object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Area Location Info'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Area Location Info'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAreaLocationInfo(AreaLocationInfo object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'EObject'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'EObject'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //LocationSwitch
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/.classpath b/src/traffic-incidents-service/org.genivi.booleanexpr-model/.classpath
new file mode 100755
index 0000000..90776db
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/.classpath
@@ -0,0 +1,16 @@
+
++ * The following features are supported: + *
+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Value' 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 Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #isSetValue() + * @see #unsetValue() + * @see #isValue() + * @generated + */ + void setValue(boolean value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.BooleanLiteral#isValue Value}' attribute. + * + * + * @see #isSetValue() + * @see #isValue() + * @see #setValue(boolean) + * @generated + */ + void unsetValue(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.BooleanLiteral#isValue Value}' attribute is set. + * + * + * @return whether the value of the 'Value' 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; + + +/** + * + * A representation of the model object 'Class Attribute'. + * + * + * + * This class represents an attribute of a class of a data model. The attribute is identified by its name. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Attribute Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Attribute Name' 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 Attribute Name}' attribute. + * + * + * @param value the new value of the 'Attribute Name' attribute. + * @see #isSetAttributeName() + * @see #unsetAttributeName() + * @see #getAttributeName() + * @generated + */ + void setAttributeName(String value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getAttributeName Attribute Name}' attribute. + * + * + * @see #isSetAttributeName() + * @see #getAttributeName() + * @see #setAttributeName(String) + * @generated + */ + void unsetAttributeName(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getAttributeName Attribute Name}' attribute is set. + * + * + * @return whether the value of the 'Attribute Name' attribute is set. + * @see #unsetAttributeName() + * @see #getAttributeName() + * @see #setAttributeName(String) + * @generated + */ + boolean isSetAttributeName(); + + /** + * Returns the value of the 'Meta Operator' attribute. + * The literals are from the enumeration {@link org.genivi.booleanexpr.MetaOperator}. + * + *+ * If the meaning of the 'Meta Operator' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Meta Operator' 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 Meta Operator}' attribute. + * + * + * @param value the new value of the 'Meta Operator' 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 Meta Operator}' attribute. + * + * + * @see #isSetMetaOperator() + * @see #getMetaOperator() + * @see #setMetaOperator(MetaOperator) + * @generated + */ + void unsetMetaOperator(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getMetaOperator Meta Operator}' attribute is set. + * + * + * @return whether the value of the 'Meta Operator' attribute is set. + * @see #unsetMetaOperator() + * @see #getMetaOperator() + * @see #setMetaOperator(MetaOperator) + * @generated + */ + boolean isSetMetaOperator(); + + /** + * Returns the value of the 'Index' attribute. + * + *+ * If the meaning of the 'Index' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Index' 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 Index}' attribute. + * + * + * @param value the new value of the 'Index' attribute. + * @see #isSetIndex() + * @see #unsetIndex() + * @see #getIndex() + * @generated + */ + void setIndex(int value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getIndex Index}' attribute. + * + * + * @see #isSetIndex() + * @see #getIndex() + * @see #setIndex(int) + * @generated + */ + void unsetIndex(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.ClassAttribute#getIndex Index}' attribute is set. + * + * + * @return whether the value of the 'Index' attribute is set. + * @see #unsetIndex() + * @see #getIndex() + * @see #setIndex(int) + * @generated + */ + boolean isSetIndex(); + + /** + * + * + * @model + * @generated + */ + boolean isSet(EObject object); + + /** + * + * + * @model many="false" + * @generated + */ + EList> getListValue(Object object); + + /** + * + * + * @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; + +/** + * + * A representation of the literals of the enumeration 'Comparison Operator', + * and utility methods for working with them. + * + * + * This enumeration defines the operators for comparison. + * + * @see org.genivi.booleanexpr.FilterexprPackage#getComparisonOperator() + * @model + * @generated + */ +public enum ComparisonOperator implements Enumerator { + /** + * The 'EQUAL' literal object. + * + * + * @see #EQUAL_VALUE + * @generated + * @ordered + */ + EQUAL(0, "EQUAL", "EQUAL"), + + /** + * The 'NOT EQUAL' literal object. + * + * + * @see #NOT_EQUAL_VALUE + * @generated + * @ordered + */ + NOT_EQUAL(1, "NOT_EQUAL", "NOT_EQUAL"), + + /** + * The 'GREATER THEN' literal object. + * + * + * @see #GREATER_THEN_VALUE + * @generated + * @ordered + */ + GREATER_THEN(2, "GREATER_THEN", "GREATER_THEN"), + + /** + * The 'GREATER OR EQUAL THAN' literal object. + * + * + * @see #GREATER_OR_EQUAL_THAN_VALUE + * @generated + * @ordered + */ + GREATER_OR_EQUAL_THAN(3, "GREATER_OR_EQUAL_THAN", "GREATER_OR_EQUAL_THAN"), + + /** + * The 'LESS THAN' literal object. + * + * + * @see #LESS_THAN_VALUE + * @generated + * @ordered + */ + LESS_THAN(4, "LESS_THAN", "LESS_THAN"), + + /** + * The 'LESS OR EQUAL THAN' literal object. + * + * + * @see #LESS_OR_EQUAL_THAN_VALUE + * @generated + * @ordered + */ + LESS_OR_EQUAL_THAN(5, "LESS_OR_EQUAL_THAN", "LESS_OR_EQUAL_THAN"); + + /** + * The 'EQUAL' literal value. + * + *+ * If the meaning of 'EQUAL' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #EQUAL + * @model + * @generated + * @ordered + */ + public static final int EQUAL_VALUE = 0; + + /** + * The 'NOT EQUAL' literal value. + * + *+ * If the meaning of 'NOT EQUAL' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #NOT_EQUAL + * @model + * @generated + * @ordered + */ + public static final int NOT_EQUAL_VALUE = 1; + + /** + * The 'GREATER THEN' literal value. + * + *+ * If the meaning of 'GREATER THEN' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #GREATER_THEN + * @model + * @generated + * @ordered + */ + public static final int GREATER_THEN_VALUE = 2; + + /** + * The 'GREATER OR EQUAL THAN' literal value. + * + *+ * If the meaning of 'GREATER OR EQUAL THAN' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #GREATER_OR_EQUAL_THAN + * @model + * @generated + * @ordered + */ + public static final int GREATER_OR_EQUAL_THAN_VALUE = 3; + + /** + * The 'LESS THAN' literal value. + * + *+ * If the meaning of 'LESS THAN' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #LESS_THAN + * @model + * @generated + * @ordered + */ + public static final int LESS_THAN_VALUE = 4; + + /** + * The 'LESS OR EQUAL THAN' literal value. + * + *+ * If the meaning of 'LESS OR EQUAL THAN' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #LESS_OR_EQUAL_THAN + * @model + * @generated + * @ordered + */ + public static final int LESS_OR_EQUAL_THAN_VALUE = 5; + + /** + * An array of all the 'Comparison Operator' enumerators. + * + * + * @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 'Comparison Operator' enumerators. + * + * + * @generated + */ + public static final List+ * The following features are supported: + *
+ * If the meaning of the 'Comparison Operator' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Comparison Operator' 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 Comparison Operator}' attribute. + * + * + * @param value the new value of the 'Comparison Operator' attribute. + * @see org.genivi.booleanexpr.ComparisonOperator + * @see #getComparisonOperator() + * @generated + */ + void setComparisonOperator(ComparisonOperator value); + + /** + * Returns the value of the 'Literal' containment reference. + * + *+ * If the meaning of the 'Literal' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Literal' 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 Literal}' containment reference. + * + * + * @param value the new value of the 'Literal' containment reference. + * @see #getLiteral() + * @generated + */ + void setLiteral(Literal value); + + /** + * Returns the value of the 'Attribute' containment reference. + * + *+ * If the meaning of the 'Attribute' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Attribute' 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 Attribute}' containment reference. + * + * + * @param value the new value of the 'Attribute' 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; + + +/** + * + * A representation of the model object 'Down Cast Predicate'. + * + * + * + * 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. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Class Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Class Name' 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 Class Name}' attribute. + * + * + * @param value the new value of the 'Class Name' attribute. + * @see #isSetClassName() + * @see #unsetClassName() + * @see #getClassName() + * @generated + */ + void setClassName(String value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.DownCastPredicate#getClassName Class Name}' attribute. + * + * + * @see #isSetClassName() + * @see #getClassName() + * @see #setClassName(String) + * @generated + */ + void unsetClassName(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.DownCastPredicate#getClassName Class Name}' attribute is set. + * + * + * @return whether the value of the 'Class Name' attribute is set. + * @see #unsetClassName() + * @see #getClassName() + * @see #setClassName(String) + * @generated + */ + boolean isSetClassName(); + + /** + * Returns the value of the 'Expression' containment reference. + * + *+ * If the meaning of the 'Expression' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Expression' 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 Expression}' containment reference. + * + * + * @param value the new value of the 'Expression' containment reference. + * @see #isSetExpression() + * @see #unsetExpression() + * @see #getExpression() + * @generated + */ + void setExpression(BooleanExpression value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.DownCastPredicate#getExpression Expression}' containment reference. + * + * + * @see #isSetExpression() + * @see #getExpression() + * @see #setExpression(BooleanExpression) + * @generated + */ + void unsetExpression(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.DownCastPredicate#getExpression Expression}' containment reference is set. + * + * + * @return whether the value of the 'Expression' 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; + + +/** + * + * A representation of the model object 'Dyadic Expression'. + * + * + * + * This is an expression of the form 'expression' DyadicLogicalOperator 'expression', like 'expression' AND 'expression'. + * + * + *+ * The following features are supported: + *
"AND"
.
+ * The literals are from the enumeration {@link org.genivi.booleanexpr.DyadicLogicalOperator}.
+ *
+ * + * If the meaning of the 'Logical Operator' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Logical Operator' 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 Logical Operator}' attribute. + * + * + * @param value the new value of the 'Logical Operator' 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 Logical Operator}' attribute. + * + * + * @see #isSetLogicalOperator() + * @see #getLogicalOperator() + * @see #setLogicalOperator(DyadicLogicalOperator) + * @generated + */ + void unsetLogicalOperator(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getLogicalOperator Logical Operator}' attribute is set. + * + * + * @return whether the value of the 'Logical Operator' attribute is set. + * @see #unsetLogicalOperator() + * @see #getLogicalOperator() + * @see #setLogicalOperator(DyadicLogicalOperator) + * @generated + */ + boolean isSetLogicalOperator(); + + /** + * Returns the value of the 'Left Hand Term' containment reference. + * + *+ * If the meaning of the 'Left Hand Term' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Left Hand Term' 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 Left Hand Term}' containment reference. + * + * + * @param value the new value of the 'Left Hand Term' containment reference. + * @see #isSetLeftHandTerm() + * @see #unsetLeftHandTerm() + * @see #getLeftHandTerm() + * @generated + */ + void setLeftHandTerm(BooleanExpression value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getLeftHandTerm Left Hand Term}' containment reference. + * + * + * @see #isSetLeftHandTerm() + * @see #getLeftHandTerm() + * @see #setLeftHandTerm(BooleanExpression) + * @generated + */ + void unsetLeftHandTerm(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getLeftHandTerm Left Hand Term}' containment reference is set. + * + * + * @return whether the value of the 'Left Hand Term' containment reference is set. + * @see #unsetLeftHandTerm() + * @see #getLeftHandTerm() + * @see #setLeftHandTerm(BooleanExpression) + * @generated + */ + boolean isSetLeftHandTerm(); + + /** + * Returns the value of the 'Right Hand Term' containment reference. + * + *+ * If the meaning of the 'Right Hand Term' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Right Hand Term' 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 Right Hand Term}' containment reference. + * + * + * @param value the new value of the 'Right Hand Term' containment reference. + * @see #isSetRightHandTerm() + * @see #unsetRightHandTerm() + * @see #getRightHandTerm() + * @generated + */ + void setRightHandTerm(BooleanExpression value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getRightHandTerm Right Hand Term}' containment reference. + * + * + * @see #isSetRightHandTerm() + * @see #getRightHandTerm() + * @see #setRightHandTerm(BooleanExpression) + * @generated + */ + void unsetRightHandTerm(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.DyadicExpression#getRightHandTerm Right Hand Term}' containment reference is set. + * + * + * @return whether the value of the 'Right Hand Term' 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; + +/** + * + * A representation of the literals of the enumeration 'Dyadic Logical Operator', + * and utility methods for working with them. + * + * + * This enumeration defines the operators for DyadicExpressions. + * AND has a higher precedence than OR. + * + * @see org.genivi.booleanexpr.FilterexprPackage#getDyadicLogicalOperator() + * @model + * @generated + */ +public enum DyadicLogicalOperator implements Enumerator { + /** + * The 'AND' literal object. + * + * + * @see #AND_VALUE + * @generated + * @ordered + */ + AND(0, "AND", "AND"), + + /** + * The 'OR' literal object. + * + * + * @see #OR_VALUE + * @generated + * @ordered + */ + OR(1, "OR", "OR"); + + /** + * The 'AND' literal value. + * + *+ * If the meaning of 'AND' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #AND + * @model + * @generated + * @ordered + */ + public static final int AND_VALUE = 0; + + /** + * The 'OR' literal value. + * + *+ * If the meaning of 'OR' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #OR + * @model + * @generated + * @ordered + */ + public static final int OR_VALUE = 1; + + /** + * An array of all the 'Dyadic Logical Operator' enumerators. + * + * + * @generated + */ + private static final DyadicLogicalOperator[] VALUES_ARRAY = + new DyadicLogicalOperator[] { + AND, + OR, + }; + + /** + * A public read-only list of all the 'Dyadic Logical Operator' enumerators. + * + * + * @generated + */ + public static final List+ * If the meaning of 'IN' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #IN + * @model + * @generated + * @ordered + */ + public static final int IN_VALUE = 0; + + /** + * The 'NOT IN' literal value. + * + *+ * If the meaning of 'NOT IN' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #NOT_IN + * @model + * @generated + * @ordered + */ + public static final int NOT_IN_VALUE = 1; + + /** + * An array of all the 'In Operator' enumerators. + * + * + * @generated + */ + private static final InOperator[] VALUES_ARRAY = + new InOperator[] { + IN, + NOT_IN, + }; + + /** + * A public read-only list of all the 'In Operator' enumerators. + * + * + * @generated + */ + public static final List+ * The following features are supported: + *
+ * If the meaning of the 'Attribute' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Attribute' 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 Attribute}' containment reference. + * + * + * @param value the new value of the 'Attribute' containment reference. + * @see #isSetAttribute() + * @see #unsetAttribute() + * @see #getAttribute() + * @generated + */ + void setAttribute(ClassAttribute value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.InPredicate#getAttribute Attribute}' containment reference. + * + * + * @see #isSetAttribute() + * @see #getAttribute() + * @see #setAttribute(ClassAttribute) + * @generated + */ + void unsetAttribute(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.InPredicate#getAttribute Attribute}' containment reference is set. + * + * + * @return whether the value of the 'Attribute' containment reference is set. + * @see #unsetAttribute() + * @see #getAttribute() + * @see #setAttribute(ClassAttribute) + * @generated + */ + boolean isSetAttribute(); + + /** + * Returns the value of the 'In Operator' attribute. + * The literals are from the enumeration {@link org.genivi.booleanexpr.InOperator}. + * + *+ * If the meaning of the 'In Operator' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'In Operator' 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 In Operator}' attribute. + * + * + * @param value the new value of the 'In Operator' 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 In Operator}' attribute. + * + * + * @see #isSetInOperator() + * @see #getInOperator() + * @see #setInOperator(InOperator) + * @generated + */ + void unsetInOperator(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.InPredicate#getInOperator In Operator}' attribute is set. + * + * + * @return whether the value of the 'In Operator' attribute is set. + * @see #unsetInOperator() + * @see #getInOperator() + * @see #setInOperator(InOperator) + * @generated + */ + boolean isSetInOperator(); + + /** + * Returns the value of the 'Literals' containment reference list. + * The list contents are of type {@link org.genivi.booleanexpr.Literal}. + * + *+ * If the meaning of the 'Literals' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Literals' containment reference list. + * @see #isSetLiterals() + * @see #unsetLiterals() + * @see org.genivi.booleanexpr.FilterexprPackage#getInPredicate_Literals() + * @model containment="true" unsettable="true" + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'Attribute' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Attribute' 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 Attribute}' containment reference. + * + * + * @param value the new value of the 'Attribute' 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; + +/** + * + * A representation of the literals of the enumeration 'List Operator', + * and utility methods for working with them. + * + * + * This enumeration defines the operators for a MultiplicityPredicate. + * + * @see org.genivi.booleanexpr.FilterexprPackage#getListOperator() + * @model + * @generated + */ +public enum ListOperator implements Enumerator { + /** + * The 'ANY' literal object. + * + * + * @see #ANY_VALUE + * @generated + * @ordered + */ + ANY(0, "ANY", "ANY"), + + /** + * The 'ALL' literal object. + * + * + * @see #ALL_VALUE + * @generated + * @ordered + */ + ALL(1, "ALL", "ALL"), /** + * The 'NONE' literal object. + * + * + * @see #NONE_VALUE + * @generated + * @ordered + */ + NONE(2, "NONE", "NONE"); + + /** + * The 'ANY' literal value. + * + *+ * If the meaning of 'ANY' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #ANY + * @model + * @generated + * @ordered + */ + public static final int ANY_VALUE = 0; + + /** + * The 'ALL' literal value. + * + *+ * If the meaning of 'ALL' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #ALL + * @model + * @generated + * @ordered + */ + public static final int ALL_VALUE = 1; + + /** + * The 'NONE' literal value. + * + *+ * If the meaning of 'NONE' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #NONE + * @model + * @generated + * @ordered + */ + public static final int NONE_VALUE = 2; + + /** + * An array of all the 'List Operator' enumerators. + * + * + * @generated + */ + private static final ListOperator[] VALUES_ARRAY = + new ListOperator[] { + ANY, + ALL, + NONE, + }; + + /** + * A public read-only list of all the 'List Operator' enumerators. + * + * + * @generated + */ + public static final List+ * If the meaning of 'SIZE' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #SIZE + * @model + * @generated + * @ordered + */ + public static final int SIZE_VALUE = 0; + + /** + * An array of all the 'Meta Operator' enumerators. + * + * + * @generated + */ + private static final MetaOperator[] VALUES_ARRAY = + new MetaOperator[] { + SIZE, + }; + + /** + * A public read-only list of all the 'Meta Operator' enumerators. + * + * + * @generated + */ + public static final List+ * The following features are supported: + *
+ * If the meaning of the 'Expression' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Expression' 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 Expression}' containment reference. + * + * + * @param value the new value of the 'Expression' containment reference. + * @see #isSetExpression() + * @see #unsetExpression() + * @see #getExpression() + * @generated + */ + void setExpression(BooleanExpression value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getExpression Expression}' containment reference. + * + * + * @see #isSetExpression() + * @see #getExpression() + * @see #setExpression(BooleanExpression) + * @generated + */ + void unsetExpression(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getExpression Expression}' containment reference is set. + * + * + * @return whether the value of the 'Expression' containment reference is set. + * @see #unsetExpression() + * @see #getExpression() + * @see #setExpression(BooleanExpression) + * @generated + */ + boolean isSetExpression(); + + /** + * Returns the value of the 'List Operator' attribute. + * The literals are from the enumeration {@link org.genivi.booleanexpr.ListOperator}. + * + *+ * If the meaning of the 'List Operator' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'List Operator' 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 List Operator}' attribute. + * + * + * @param value the new value of the 'List Operator' 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 List Operator}' attribute. + * + * + * @see #isSetListOperator() + * @see #getListOperator() + * @see #setListOperator(ListOperator) + * @generated + */ + void unsetListOperator(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getListOperator List Operator}' attribute is set. + * + * + * @return whether the value of the 'List Operator' attribute is set. + * @see #unsetListOperator() + * @see #getListOperator() + * @see #setListOperator(ListOperator) + * @generated + */ + boolean isSetListOperator(); + + /** + * Returns the value of the 'Attribute' containment reference. + * + *+ * If the meaning of the 'Attribute' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Attribute' 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 Attribute}' containment reference. + * + * + * @param value the new value of the 'Attribute' containment reference. + * @see #isSetAttribute() + * @see #unsetAttribute() + * @see #getAttribute() + * @generated + */ + void setAttribute(ClassAttribute value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getAttribute Attribute}' containment reference. + * + * + * @see #isSetAttribute() + * @see #getAttribute() + * @see #setAttribute(ClassAttribute) + * @generated + */ + void unsetAttribute(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.MultiplicityPredicate#getAttribute Attribute}' containment reference is set. + * + * + * @return whether the value of the 'Attribute' 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; + + +/** + * + * A representation of the model object 'Predicate'. + * + * + * + * This is the top level class for predicates. + * + * + * + * @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; + + +/** + * + * A representation of the model object 'Signed Integer Literal'. + * + * + * + * An optionally signed integer values. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Value' 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 Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #isSetValue() + * @see #unsetValue() + * @see #getValue() + * @generated + */ + void setValue(long value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.SignedIntegerLiteral#getValue Value}' attribute. + * + * + * @see #isSetValue() + * @see #getValue() + * @see #setValue(long) + * @generated + */ + void unsetValue(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.SignedIntegerLiteral#getValue Value}' attribute is set. + * + * + * @return whether the value of the 'Value' 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; + + +/** + * + * A representation of the model object 'String Literal'. + * + * + * + * A String value. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Value' 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 Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #isSetValue() + * @see #unsetValue() + * @see #getValue() + * @generated + */ + void setValue(String value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.StringLiteral#getValue Value}' attribute. + * + * + * @see #isSetValue() + * @see #getValue() + * @see #setValue(String) + * @generated + */ + void unsetValue(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.StringLiteral#getValue Value}' attribute is set. + * + * + * @return whether the value of the 'Value' 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; + + +/** + * + * A representation of the model object 'Sub Class Predicate'. + * + * + * + * This predicate is used to evaluate an expression on a subclass of the current class. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Sub Class Expression' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Sub Class Expression' 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 Sub Class Expression}' containment reference. + * + * + * @param value the new value of the 'Sub Class Expression' containment reference. + * @see #isSetSubClassExpression() + * @see #unsetSubClassExpression() + * @see #getSubClassExpression() + * @generated + */ + void setSubClassExpression(BooleanExpression value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassExpression Sub Class Expression}' containment reference. + * + * + * @see #isSetSubClassExpression() + * @see #getSubClassExpression() + * @see #setSubClassExpression(BooleanExpression) + * @generated + */ + void unsetSubClassExpression(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassExpression Sub Class Expression}' containment reference is set. + * + * + * @return whether the value of the 'Sub Class Expression' containment reference is set. + * @see #unsetSubClassExpression() + * @see #getSubClassExpression() + * @see #setSubClassExpression(BooleanExpression) + * @generated + */ + boolean isSetSubClassExpression(); + + /** + * Returns the value of the 'Sub Class Attribute' containment reference. + * + *+ * If the meaning of the 'Sub Class Attribute' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Sub Class Attribute' 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 Sub Class Attribute}' containment reference. + * + * + * @param value the new value of the 'Sub Class Attribute' containment reference. + * @see #isSetSubClassAttribute() + * @see #unsetSubClassAttribute() + * @see #getSubClassAttribute() + * @generated + */ + void setSubClassAttribute(ClassAttribute value); + + /** + * Unsets the value of the '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassAttribute Sub Class Attribute}' containment reference. + * + * + * @see #isSetSubClassAttribute() + * @see #getSubClassAttribute() + * @see #setSubClassAttribute(ClassAttribute) + * @generated + */ + void unsetSubClassAttribute(); + + /** + * Returns whether the value of the '{@link org.genivi.booleanexpr.SubClassPredicate#getSubClassAttribute Sub Class Attribute}' containment reference is set. + * + * + * @return whether the value of the 'Sub Class Attribute' 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; + + +/** + * + * A representation of the model object 'unary Expression'. + * + * + * + * This is an expression of the form UnaryLogicalOperator 'expression', like: NOT 'expression'. + * + * + *+ * The following features are supported: + *
"NOT"
.
+ * The literals are from the enumeration {@link org.genivi.booleanexpr.UnaryLogicalOperator}.
+ *
+ * + * If the meaning of the 'Unary Operator' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Unary Operator' 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 Unary Operator}' attribute. + * + * + * @param value the new value of the 'Unary Operator' attribute. + * @see org.genivi.booleanexpr.UnaryLogicalOperator + * @see #getUnaryOperator() + * @generated + */ + void setUnaryOperator(UnaryLogicalOperator value); + + /** + * Returns the value of the 'Expression' containment reference. + * + *+ * If the meaning of the 'Expression' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Expression' 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 Expression}' containment reference. + * + * + * @param value the new value of the 'Expression' 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; + +/** + * + * A representation of the literals of the enumeration 'Unary Logical Operator', + * and utility methods for working with them. + * + * + * This enumeration defines the operators for UnaryExpressions. + * + * @see org.genivi.booleanexpr.FilterexprPackage#getUnaryLogicalOperator() + * @model + * @generated + */ +public enum UnaryLogicalOperator implements Enumerator { + /** + * The 'NOT' literal object. + * + * + * @see #NOT_VALUE + * @generated + * @ordered + */ + NOT(0, "NOT", "NOT"); + + /** + * The 'NOT' literal value. + * + *+ * If the meaning of 'NOT' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #NOT + * @model + * @generated + * @ordered + */ + public static final int NOT_VALUE = 0; + + /** + * An array of all the 'Unary Logical Operator' enumerators. + * + * + * @generated + */ + private static final UnaryLogicalOperator[] VALUES_ARRAY = + new UnaryLogicalOperator[] { + NOT, + }; + + /** + * A public read-only list of all the 'Unary Logical Operator' enumerators. + * + * + * @generated + */ + public static final List+ *
+ * + * @generated + */ +public abstract class BooleanExpressionImpl extends EObjectImpl implements BooleanExpression { + /** + * + * + * @generated + */ + protected BooleanExpressionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FilterexprPackage.Literals.BOOLEAN_EXPRESSION; + } + + /** + * + * Actually there should be no implementation at all here. + * + * @generated NOT + */ + public boolean evaluate(Object object) { + throw new UnsupportedOperationException(); + } + + /** + * + * + * @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; + +/** + * + * An implementation of the model object 'Boolean Literal'. + * + *+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
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. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.genivi.booleanexpr.FilterexprPackage#eNS_URI + * @see #init() + * @generated + */ + private FilterexprPackageImpl() { + super(eNS_URI, FilterexprFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *
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. + * + * + * @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; + } + + /** + * + * + * @generated + */ + public EClass getBooleanExpression() { + return booleanExpressionEClass; + } + + /** + * + * + * @generated + */ + public EClass getUnaryExpression() { + return unaryExpressionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getUnaryExpression_UnaryOperator() { + return (EAttribute)unaryExpressionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getUnaryExpression_Expression() { + return (EReference)unaryExpressionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getPredicate() { + return predicateEClass; + } + + /** + * + * + * @generated + */ + public EClass getDyadicExpression() { + return dyadicExpressionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDyadicExpression_LogicalOperator() { + return (EAttribute)dyadicExpressionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getDyadicExpression_LeftHandTerm() { + return (EReference)dyadicExpressionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getDyadicExpression_RightHandTerm() { + return (EReference)dyadicExpressionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getComparisonPredicate() { + return comparisonPredicateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getComparisonPredicate_ComparisonOperator() { + return (EAttribute)comparisonPredicateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getComparisonPredicate_Literal() { + return (EReference)comparisonPredicateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getComparisonPredicate_Attribute() { + return (EReference)comparisonPredicateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getInPredicate() { + return inPredicateEClass; + } + + /** + * + * + * @generated + */ + public EReference getInPredicate_Attribute() { + return (EReference)inPredicateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getInPredicate_InOperator() { + return (EAttribute)inPredicateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getInPredicate_Literals() { + return (EReference)inPredicateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getLiteral() { + return literalEClass; + } + + /** + * + * + * @generated + */ + public EClass getSignedIntegerLiteral() { + return signedIntegerLiteralEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSignedIntegerLiteral_Value() { + return (EAttribute)signedIntegerLiteralEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getStringLiteral() { + return stringLiteralEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getStringLiteral_Value() { + return (EAttribute)stringLiteralEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getBooleanLiteral() { + return booleanLiteralEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getBooleanLiteral_Value() { + return (EAttribute)booleanLiteralEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSubClassPredicate() { + return subClassPredicateEClass; + } + + /** + * + * + * @generated + */ + public EReference getSubClassPredicate_SubClassExpression() { + return (EReference)subClassPredicateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getSubClassPredicate_SubClassAttribute() { + return (EReference)subClassPredicateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getClassAttribute() { + return classAttributeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getClassAttribute_AttributeName() { + return (EAttribute)classAttributeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getClassAttribute_MetaOperator() { + return (EAttribute)classAttributeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getClassAttribute_Index() { + return (EAttribute)classAttributeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getDownCastPredicate() { + return downCastPredicateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDownCastPredicate_ClassName() { + return (EAttribute)downCastPredicateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getDownCastPredicate_Expression() { + return (EReference)downCastPredicateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getMultiplicityPredicate() { + return multiplicityPredicateEClass; + } + + /** + * + * + * @generated + */ + public EReference getMultiplicityPredicate_Expression() { + return (EReference)multiplicityPredicateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getMultiplicityPredicate_ListOperator() { + return (EAttribute)multiplicityPredicateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getMultiplicityPredicate_Attribute() { + return (EReference)multiplicityPredicateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getIsSetPredicate() { + return isSetPredicateEClass; + } + + /** + * + * + * @generated + */ + public EReference getIsSetPredicate_Attribute() { + return (EReference)isSetPredicateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EEnum getDyadicLogicalOperator() { + return dyadicLogicalOperatorEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getUnaryLogicalOperator() { + return unaryLogicalOperatorEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getComparisonOperator() { + return comparisonOperatorEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getListOperator() { + return listOperatorEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getInOperator() { + return inOperatorEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getMetaOperator() { + return metaOperatorEEnum; + } + + /** + * + * + * @generated + */ + public FilterexprFactory getFilterexprFactory() { + return (FilterexprFactory)getEFactoryInstance(); + } + + /** + * + * + * @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. + * + * + * @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); + } + + /** + * + * + * @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. + * + * + * @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 GenModel. + * + * + * @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; + + +/** + * + * An implementation of the model object 'In Predicate'. + * + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ *
+ * + * @generated + */ +public abstract class LiteralImpl extends EObjectImpl implements Literal { + /** + * + * + * @generated + */ + protected LiteralImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FilterexprPackage.Literals.LITERAL; + } + + + /** + * + * + * @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; + +/** + * + * An implementation of the model object 'Multiplicity Predicate'. + * + *+ * The following features are implemented: + *
+ *
+ * + * @generated + */ +public abstract class PredicateImpl extends BooleanExpressionImpl implements Predicate { + + /** + * + * + * @generated + */ + protected PredicateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FilterexprPackage.Literals.PREDICATE; + } + + /** + * + * + * @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; + +/** + * + * An implementation of the model object 'Signed Integer Literal'. + * + *+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
createXXX
method for each class of the model.
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage
+ * @generated
+ */
+public class FilterexprAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static FilterexprPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public FilterexprAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = FilterexprPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ *
+ * This implementation returns true
if the object is either the model's package or is an instance object of the model.
+ *
+ * @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 createXXX
methods.
+ *
+ *
+ * @generated
+ */
+ protected FilterexprSwitchtarget
.
+ *
+ *
+ * @param target the object to adapt.
+ * @return the adapter for the target
.
+ * @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 Boolean Expression}'.
+ *
+ * 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.
+ *
+ * @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 Unary Expression}'.
+ *
+ * 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.
+ *
+ * @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 Predicate}'.
+ *
+ * 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.
+ *
+ * @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 Dyadic Expression}'.
+ *
+ * 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.
+ *
+ * @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 Comparison Predicate}'.
+ *
+ * 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.
+ *
+ * @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 In Predicate}'.
+ *
+ * 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.
+ *
+ * @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 Literal}'.
+ *
+ * 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.
+ *
+ * @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 Signed Integer Literal}'.
+ *
+ * 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.
+ *
+ * @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 String Literal}'.
+ *
+ * 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.
+ *
+ * @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 Boolean Literal}'.
+ *
+ * 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.
+ *
+ * @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 Sub Class Predicate}'.
+ *
+ * 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.
+ *
+ * @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 Class Attribute}'.
+ *
+ * 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.
+ *
+ * @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 Down Cast Predicate}'.
+ *
+ * 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.
+ *
+ * @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 Multiplicity Predicate}'.
+ *
+ * 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.
+ *
+ * @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 Is Set Predicate}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.booleanexpr.IsSetPredicate
+ * @generated
+ */
+ public Adapter createIsSetPredicateAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ *
+ * This default implementation returns null.
+ *
+ * @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.*;
+
+/**
+ *
+ * The Switch for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the caseXXX
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.
+ *
+ * @see org.genivi.booleanexpr.FilterexprPackage
+ * @generated
+ */
+public class FilterexprSwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
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 'Boolean Expression'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Boolean Expression'.
+ * @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 'Unary Expression'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Unary Expression'.
+ * @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 'Predicate'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Predicate'.
+ * @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 'Dyadic Expression'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Dyadic Expression'.
+ * @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 'Comparison Predicate'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Comparison Predicate'.
+ * @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 'In Predicate'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'In Predicate'.
+ * @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 'Literal'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Literal'.
+ * @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 'Signed Integer Literal'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Signed Integer Literal'.
+ * @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 'String Literal'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'String Literal'.
+ * @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 'Boolean Literal'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Boolean Literal'.
+ * @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 'Sub Class Predicate'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Sub Class Predicate'.
+ * @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 'Class Attribute'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Class Attribute'.
+ * @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 'Down Cast Predicate'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Down Cast Predicate'.
+ * @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 'Multiplicity Predicate'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Multiplicity Predicate'.
+ * @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 'Is Set Predicate'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Is Set Predicate'.
+ * @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 'EObject'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'EObject'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //FilterexprSwitch
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/booleanexpr/BooleanExprTests.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/booleanexpr/BooleanExprTests.java
new file mode 100755
index 0000000..60ca14d
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/booleanexpr/BooleanExprTests.java
@@ -0,0 +1,439 @@
+/**
+ *
+ * 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 static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.genivi.booleanexpr.util.FilterExprUtil;
+import org.genivi.family.Address;
+import org.genivi.family.Family;
+import org.genivi.family.FamilyFactory;
+import org.genivi.family.Person;
+import org.genivi.family.Sexe;
+import org.genivi.family.WealthyFamily;
+import org.genivi.trafficinfo.demo.logging.EclipseConsoleFormatter;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * About the tests:
+ * - Literals and attributes are implicitly tested in predicate tests
+ */
+public class BooleanExprTests {
+ private final static Logger LOGGER = Logger.getLogger(BooleanExprTests.class.getName());
+ private static final FamilyFactory FAMILY_FACTORY = FamilyFactory.eINSTANCE;
+
+ private static final String FAMILY_SURNAME = "Smith";
+ private static final int FAMILY_NUMBER_OF_PETS = 2;
+ private static final boolean FAMILY_HAS_SWIMMINGPOOL = false;
+ private static final String FAMILY_PERSON_1_FIRSTNAME = "Jim";
+ private static final Sexe FAMILY_PERSON_1_SEXE = Sexe.MALE;
+ private static final String FAMILY_PERSON_2_FIRSTNAME = "John";
+ private static final Sexe FAMILY_PERSON_2_SEXE = Sexe.MALE;
+ private static final String FAMILY_ADDRESS_STREET = "PacificHwy";
+ private static final String[] FAMILY_FAVORITE_HOLIDAY_DESTINATIONS = {
+ "Egypt", "Austria"
+ };
+
+ private static final String WEALTHY_FAMILY_SURNAME = "Slim";
+ private static final boolean WEALTHY_FAMILY_HAS_SWIMMINGPOOL = true;
+ private static final int WEALTHY_FAMILY_FORBES_RANKING = 1;
+
+ private static Family family;
+ private static Family wealthyFamily;
+ private final static Level logLevel = Level.SEVERE;
+
+ @BeforeClass
+ public static void setUp() {
+ logSetup();
+
+ family = createFamily();
+ wealthyFamily = createWealthyFamily();
+ LOGGER.info("family = " + family);
+ }
+
+ @Test
+ public void testUnaryExpression() {
+ String expressionString;
+ BooleanExpression expression;
+
+ expressionString = "not (@surname != \"" + FAMILY_SURNAME + "\")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "not (@surname != \"Adams\")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+ }
+
+ @Test
+ public void testDyadicExpression() {
+ String expressionString;
+ BooleanExpression expression;
+
+ expressionString = "(@surname == \"" + FAMILY_SURNAME + "\") and (@numberOfPets == " + FAMILY_NUMBER_OF_PETS + ")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "(@surname != \"" + FAMILY_SURNAME + "\") and (@numberOfPets == " + FAMILY_NUMBER_OF_PETS + ")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "(@surname != \"" + FAMILY_SURNAME + "\") or (@numberOfPets == " + FAMILY_NUMBER_OF_PETS + ")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+ }
+
+ @Test
+ public void testComparisonPredicate() {
+ String expressionString;
+ BooleanExpression expression;
+
+ // Test all supported operations for type String (only EQUAL, NOT_EQUAL)
+ expressionString = "@surname == \"" + FAMILY_SURNAME + "\"";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+
+ expressionString = "@surname == \"Adams\"";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@surname != \"" + FAMILY_SURNAME + "\"";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@surname != \"Adams\"";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ // Test all supported operations for type Integer (all operations)
+ expressionString = "@numberOfPets == " + FAMILY_NUMBER_OF_PETS;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets == " + 99;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets != " + 99;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets != " + FAMILY_NUMBER_OF_PETS;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets > " + -1;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets > " + FAMILY_NUMBER_OF_PETS;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets >= " + -1;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets >= " + (FAMILY_NUMBER_OF_PETS + 1);
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets < " + 1000;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets < " + FAMILY_NUMBER_OF_PETS;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets <= " + FAMILY_NUMBER_OF_PETS;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets <= " + (FAMILY_NUMBER_OF_PETS - 1);
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ // Test all supported operations for type boolean (only EQUAL, NOT_EQUAL)
+ expressionString = "@hasASwimmingPool == " + FAMILY_HAS_SWIMMINGPOOL;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@hasASwimmingPool == " + !FAMILY_HAS_SWIMMINGPOOL;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@hasASwimmingPool != " + !FAMILY_HAS_SWIMMINGPOOL;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@hasASwimmingPool != " + FAMILY_HAS_SWIMMINGPOOL;
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ }
+
+ @Test
+ public void testSubClassPredicate() {
+ String expressionString;
+ BooleanExpression expression;
+
+ expressionString = "@address (@street == \"" + FAMILY_ADDRESS_STREET + "\")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@address (@street != \"" + FAMILY_ADDRESS_STREET + "\")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+ }
+
+ @Test
+ public void testDownCastPredicate() {
+ String expressionString;
+ BooleanExpression expression;
+
+ expressionString = "[@WealthyFamily](@forbesRanking < 100)";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(wealthyFamily));
+
+
+ expressionString = "[@WealthyFamily](@forbesRanking != 1)";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(wealthyFamily));
+ }
+
+ @Test
+ public void testIsSetPredicate() {
+ String expressionString;
+ BooleanExpression expression;
+
+ expressionString = "isSet @numberOfPets";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+ assertFalse("Wrong evaluation result", expression.evaluate(wealthyFamily));
+ }
+
+ @Test
+ public void testInPredicate() {
+ String expressionString;
+ BooleanExpression expression;
+
+ expressionString = "@surname in [\"Dummy\", \"Smith\", \"Dummy2\"]";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@surname in [\"Dummy\", \"Dummy3\", \"Dummy2\"]";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@surname not-in [\"Dummy\", \"Smith\", \"Dummy2\"]";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@surname not-in [\"Dummy\", \"Dummy3\", \"Dummy2\"]";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets in [2, 3, 4]";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets in [4, 3, 2]";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets in [4, 3, 12]";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets not-in [2, 3, 4]";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets not-in [4, 3, 2]";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@numberOfPets not-in [4, 3, 12]";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+ }
+
+ @Test
+ public void testMultiplicityPredicate() {
+ String expressionString;
+ BooleanExpression expression;
+
+ // ANY
+ expressionString = "#any @members (@firstName == \"" + FAMILY_PERSON_1_FIRSTNAME + "\")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "#any @members (@firstName == \"Susan\")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "#any @favoriteHolidayDestinations (@ in [\"Netherlands\", \"Egypt\"])";
+ System.out.println(expressionString);
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ // ALL
+ expressionString = "#all @members (@sexe == " + Sexe.MALE.getValue() + ")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "#all @members (@firstName == \"" + FAMILY_PERSON_1_FIRSTNAME + "\")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ // NONE
+ expressionString = "#none @members (@sexe == " + Sexe.FEMALE.getValue() + ")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "#none @members (@sexe == " + Sexe.MALE.getValue() + ")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ // MetaOperator
+ expressionString = "@members^size == 2";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@members^size == 4";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+
+ // index
+ expressionString = "@members[1] (@firstName == \"" + FAMILY_PERSON_2_FIRSTNAME + "\")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertTrue("Wrong evaluation result", expression.evaluate(family));
+
+ expressionString = "@members[0] (@firstName == \"" + FAMILY_PERSON_2_FIRSTNAME + "\")";
+ expression = FilterExprUtil.parseFilterExpression(expressionString);
+ assertEquals("Error in expression translation", expressionString, expression.toString());
+ assertFalse("Wrong evaluation result", expression.evaluate(family));
+ }
+
+ private static void logSetup() {
+ // Create Logger
+ Logger logger = Logger.getLogger("");
+ logger.setLevel(logLevel);
+
+ Handler consoleHandler = null;
+ for (Handler handler: logger.getHandlers()) {
+ if (handler.getClass().getName().equals("java.util.logging.ConsoleHandler")) {
+ consoleHandler = handler;
+ break;
+ }
+ }
+ consoleHandler.setFormatter(new EclipseConsoleFormatter());
+ consoleHandler.setLevel(Level.INFO);
+ }
+
+ private static Family createFamily() {
+ Family family = FAMILY_FACTORY.createFamily();
+
+ family.setSurname(FAMILY_SURNAME);
+ family.setNumberOfPets(FAMILY_NUMBER_OF_PETS);
+ family.setHasASwimmingPool(FAMILY_HAS_SWIMMINGPOOL);
+
+ Person person;
+
+ person = FAMILY_FACTORY.createPerson();
+ person.setFirstName(FAMILY_PERSON_1_FIRSTNAME);
+ person.setSexe(FAMILY_PERSON_1_SEXE);
+ family.getMembers().add(person);
+
+ person = FAMILY_FACTORY.createPerson();
+ person.setFirstName(FAMILY_PERSON_2_FIRSTNAME);
+ person.setSexe(FAMILY_PERSON_2_SEXE);
+ family.getMembers().add(person);
+
+ Address address = FAMILY_FACTORY.createAddress();
+ address.setStreet(FAMILY_ADDRESS_STREET);
+ family.setAddress(address);
+
+ for (String destination: FAMILY_FAVORITE_HOLIDAY_DESTINATIONS) {
+ family.getFavoriteHolidayDestinations().add(destination);
+ }
+
+ return family;
+ }
+
+ private static Family createWealthyFamily() {
+ WealthyFamily family = FAMILY_FACTORY.createWealthyFamily();
+
+ family.setSurname(WEALTHY_FAMILY_SURNAME);
+ family.setHasASwimmingPool(WEALTHY_FAMILY_HAS_SWIMMINGPOOL);
+ family.setForbesRanking(WEALTHY_FAMILY_FORBES_RANKING);
+
+ return family;
+ }
+}
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/Address.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/Address.java
new file mode 100755
index 0000000..e004ca8
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/Address.java
@@ -0,0 +1,84 @@
+/**
+ *
+ * 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.family;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ *
+ * A representation of the model object 'Address'.
+ *
+ *
+ * + * The following features are supported: + *
+ * If the meaning of the 'Street' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Street' attribute. + * @see #isSetStreet() + * @see #unsetStreet() + * @see #setStreet(String) + * @see org.genivi.family.FamilyPackage#getAddress_Street() + * @model unsettable="true" + * @generated + */ + String getStreet(); + + /** + * Sets the value of the '{@link org.genivi.family.Address#getStreet Street}' attribute. + * + * + * @param value the new value of the 'Street' attribute. + * @see #isSetStreet() + * @see #unsetStreet() + * @see #getStreet() + * @generated + */ + void setStreet(String value); + + /** + * Unsets the value of the '{@link org.genivi.family.Address#getStreet Street}' attribute. + * + * + * @see #isSetStreet() + * @see #getStreet() + * @see #setStreet(String) + * @generated + */ + void unsetStreet(); + + /** + * Returns whether the value of the '{@link org.genivi.family.Address#getStreet Street}' attribute is set. + * + * + * @return whether the value of the 'Street' attribute is set. + * @see #unsetStreet() + * @see #getStreet() + * @see #setStreet(String) + * @generated + */ + boolean isSetStreet(); + +} // Address diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/Car.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/Car.java new file mode 100755 index 0000000..09c82fc --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/Car.java @@ -0,0 +1,84 @@ +/** + * + * 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.family; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Car'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Number Of Seats' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Number Of Seats' attribute. + * @see #isSetNumberOfSeats() + * @see #unsetNumberOfSeats() + * @see #setNumberOfSeats(Integer) + * @see org.genivi.family.FamilyPackage#getCar_NumberOfSeats() + * @model unsettable="true" + * @generated + */ + Integer getNumberOfSeats(); + + /** + * Sets the value of the '{@link org.genivi.family.Car#getNumberOfSeats Number Of Seats}' attribute. + * + * + * @param value the new value of the 'Number Of Seats' attribute. + * @see #isSetNumberOfSeats() + * @see #unsetNumberOfSeats() + * @see #getNumberOfSeats() + * @generated + */ + void setNumberOfSeats(Integer value); + + /** + * Unsets the value of the '{@link org.genivi.family.Car#getNumberOfSeats Number Of Seats}' attribute. + * + * + * @see #isSetNumberOfSeats() + * @see #getNumberOfSeats() + * @see #setNumberOfSeats(Integer) + * @generated + */ + void unsetNumberOfSeats(); + + /** + * Returns whether the value of the '{@link org.genivi.family.Car#getNumberOfSeats Number Of Seats}' attribute is set. + * + * + * @return whether the value of the 'Number Of Seats' attribute is set. + * @see #unsetNumberOfSeats() + * @see #getNumberOfSeats() + * @see #setNumberOfSeats(Integer) + * @generated + */ + boolean isSetNumberOfSeats(); + +} // Car diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/Family.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/Family.java new file mode 100755 index 0000000..021fdcc --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/Family.java @@ -0,0 +1,282 @@ +/** + * + * 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.family; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Family'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Members' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Members' containment reference list. + * @see org.genivi.family.FamilyPackage#getFamily_Members() + * @model containment="true" required="true" + * @generated + */ + EList+ * If the meaning of the 'Surname' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Surname' attribute. + * @see #isSetSurname() + * @see #unsetSurname() + * @see #setSurname(String) + * @see org.genivi.family.FamilyPackage#getFamily_Surname() + * @model unsettable="true" required="true" + * @generated + */ + String getSurname(); + + /** + * Sets the value of the '{@link org.genivi.family.Family#getSurname Surname}' attribute. + * + * + * @param value the new value of the 'Surname' attribute. + * @see #isSetSurname() + * @see #unsetSurname() + * @see #getSurname() + * @generated + */ + void setSurname(String value); + + /** + * Unsets the value of the '{@link org.genivi.family.Family#getSurname Surname}' attribute. + * + * + * @see #isSetSurname() + * @see #getSurname() + * @see #setSurname(String) + * @generated + */ + void unsetSurname(); + + /** + * Returns whether the value of the '{@link org.genivi.family.Family#getSurname Surname}' attribute is set. + * + * + * @return whether the value of the 'Surname' attribute is set. + * @see #unsetSurname() + * @see #getSurname() + * @see #setSurname(String) + * @generated + */ + boolean isSetSurname(); + + /** + * Returns the value of the 'Number Of Pets' attribute. + * + *+ * If the meaning of the 'Number Of Pets' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Number Of Pets' attribute. + * @see #isSetNumberOfPets() + * @see #unsetNumberOfPets() + * @see #setNumberOfPets(int) + * @see org.genivi.family.FamilyPackage#getFamily_NumberOfPets() + * @model unsettable="true" + * @generated + */ + int getNumberOfPets(); + + /** + * Sets the value of the '{@link org.genivi.family.Family#getNumberOfPets Number Of Pets}' attribute. + * + * + * @param value the new value of the 'Number Of Pets' attribute. + * @see #isSetNumberOfPets() + * @see #unsetNumberOfPets() + * @see #getNumberOfPets() + * @generated + */ + void setNumberOfPets(int value); + + /** + * Unsets the value of the '{@link org.genivi.family.Family#getNumberOfPets Number Of Pets}' attribute. + * + * + * @see #isSetNumberOfPets() + * @see #getNumberOfPets() + * @see #setNumberOfPets(int) + * @generated + */ + void unsetNumberOfPets(); + + /** + * Returns whether the value of the '{@link org.genivi.family.Family#getNumberOfPets Number Of Pets}' attribute is set. + * + * + * @return whether the value of the 'Number Of Pets' attribute is set. + * @see #unsetNumberOfPets() + * @see #getNumberOfPets() + * @see #setNumberOfPets(int) + * @generated + */ + boolean isSetNumberOfPets(); + + /** + * Returns the value of the 'Has ASwimming Pool' attribute. + * + *+ * If the meaning of the 'Has ASwimming Pool' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Has ASwimming Pool' attribute. + * @see #isSetHasASwimmingPool() + * @see #unsetHasASwimmingPool() + * @see #setHasASwimmingPool(boolean) + * @see org.genivi.family.FamilyPackage#getFamily_HasASwimmingPool() + * @model unsettable="true" + * @generated + */ + boolean isHasASwimmingPool(); + + /** + * Sets the value of the '{@link org.genivi.family.Family#isHasASwimmingPool Has ASwimming Pool}' attribute. + * + * + * @param value the new value of the 'Has ASwimming Pool' attribute. + * @see #isSetHasASwimmingPool() + * @see #unsetHasASwimmingPool() + * @see #isHasASwimmingPool() + * @generated + */ + void setHasASwimmingPool(boolean value); + + /** + * Unsets the value of the '{@link org.genivi.family.Family#isHasASwimmingPool Has ASwimming Pool}' attribute. + * + * + * @see #isSetHasASwimmingPool() + * @see #isHasASwimmingPool() + * @see #setHasASwimmingPool(boolean) + * @generated + */ + void unsetHasASwimmingPool(); + + /** + * Returns whether the value of the '{@link org.genivi.family.Family#isHasASwimmingPool Has ASwimming Pool}' attribute is set. + * + * + * @return whether the value of the 'Has ASwimming Pool' attribute is set. + * @see #unsetHasASwimmingPool() + * @see #isHasASwimmingPool() + * @see #setHasASwimmingPool(boolean) + * @generated + */ + boolean isSetHasASwimmingPool(); + + /** + * Returns the value of the 'Address' containment reference. + * + *+ * If the meaning of the 'Address' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Address' containment reference. + * @see #isSetAddress() + * @see #unsetAddress() + * @see #setAddress(Address) + * @see org.genivi.family.FamilyPackage#getFamily_Address() + * @model containment="true" unsettable="true" + * @generated + */ + Address getAddress(); + + /** + * Sets the value of the '{@link org.genivi.family.Family#getAddress Address}' containment reference. + * + * + * @param value the new value of the 'Address' containment reference. + * @see #isSetAddress() + * @see #unsetAddress() + * @see #getAddress() + * @generated + */ + void setAddress(Address value); + + /** + * Unsets the value of the '{@link org.genivi.family.Family#getAddress Address}' containment reference. + * + * + * @see #isSetAddress() + * @see #getAddress() + * @see #setAddress(Address) + * @generated + */ + void unsetAddress(); + + /** + * Returns whether the value of the '{@link org.genivi.family.Family#getAddress Address}' containment reference is set. + * + * + * @return whether the value of the 'Address' containment reference is set. + * @see #unsetAddress() + * @see #getAddress() + * @see #setAddress(Address) + * @generated + */ + boolean isSetAddress(); + + /** + * Returns the value of the 'Favorite Holiday Destinations' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *+ * If the meaning of the 'Favorite Holiday Destinations' attribute list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Favorite Holiday Destinations' attribute list. + * @see org.genivi.family.FamilyPackage#getFamily_FavoriteHolidayDestinations() + * @model + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'First Name' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'First Name' attribute. + * @see #isSetFirstName() + * @see #unsetFirstName() + * @see #setFirstName(String) + * @see org.genivi.family.FamilyPackage#getPerson_FirstName() + * @model unsettable="true" required="true" + * @generated + */ + String getFirstName(); + + /** + * Sets the value of the '{@link org.genivi.family.Person#getFirstName First Name}' attribute. + * + * + * @param value the new value of the 'First Name' attribute. + * @see #isSetFirstName() + * @see #unsetFirstName() + * @see #getFirstName() + * @generated + */ + void setFirstName(String value); + + /** + * Unsets the value of the '{@link org.genivi.family.Person#getFirstName First Name}' attribute. + * + * + * @see #isSetFirstName() + * @see #getFirstName() + * @see #setFirstName(String) + * @generated + */ + void unsetFirstName(); + + /** + * Returns whether the value of the '{@link org.genivi.family.Person#getFirstName First Name}' attribute is set. + * + * + * @return whether the value of the 'First Name' attribute is set. + * @see #unsetFirstName() + * @see #getFirstName() + * @see #setFirstName(String) + * @generated + */ + boolean isSetFirstName(); + + /** + * Returns the value of the 'Sexe' attribute. + * The literals are from the enumeration {@link org.genivi.family.Sexe}. + * + *+ * If the meaning of the 'Sexe' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Sexe' attribute. + * @see org.genivi.family.Sexe + * @see #isSetSexe() + * @see #unsetSexe() + * @see #setSexe(Sexe) + * @see org.genivi.family.FamilyPackage#getPerson_Sexe() + * @model unsettable="true" required="true" + * @generated + */ + Sexe getSexe(); + + /** + * Sets the value of the '{@link org.genivi.family.Person#getSexe Sexe}' attribute. + * + * + * @param value the new value of the 'Sexe' attribute. + * @see org.genivi.family.Sexe + * @see #isSetSexe() + * @see #unsetSexe() + * @see #getSexe() + * @generated + */ + void setSexe(Sexe value); + + /** + * Unsets the value of the '{@link org.genivi.family.Person#getSexe Sexe}' attribute. + * + * + * @see #isSetSexe() + * @see #getSexe() + * @see #setSexe(Sexe) + * @generated + */ + void unsetSexe(); + + /** + * Returns whether the value of the '{@link org.genivi.family.Person#getSexe Sexe}' attribute is set. + * + * + * @return whether the value of the 'Sexe' attribute is set. + * @see #unsetSexe() + * @see #getSexe() + * @see #setSexe(Sexe) + * @generated + */ + boolean isSetSexe(); + + /** + * Returns the value of the 'Owned Cars' containment reference list. + * The list contents are of type {@link org.genivi.family.Car}. + * + *+ * If the meaning of the 'Owned Cars' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Owned Cars' containment reference list. + * @see org.genivi.family.FamilyPackage#getPerson_OwnedCars() + * @model containment="true" + * @generated + */ + EList+ * If the meaning of 'MALE' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #MALE + * @model + * @generated + * @ordered + */ + public static final int MALE_VALUE = 0; + + /** + * The 'FEMALE' literal value. + * + *+ * If the meaning of 'FEMALE' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #FEMALE + * @model + * @generated + * @ordered + */ + public static final int FEMALE_VALUE = 1; + + /** + * An array of all the 'Sexe' enumerators. + * + * + * @generated + */ + private static final Sexe[] VALUES_ARRAY = + new Sexe[] { + MALE, + FEMALE, + }; + + /** + * A public read-only list of all the 'Sexe' enumerators. + * + * + * @generated + */ + public static final List+ * The following features are supported: + *
+ * If the meaning of the 'Forbes Ranking' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Forbes Ranking' attribute. + * @see #isSetForbesRanking() + * @see #unsetForbesRanking() + * @see #setForbesRanking(int) + * @see org.genivi.family.FamilyPackage#getWealthyFamily_ForbesRanking() + * @model unsettable="true" + * @generated + */ + int getForbesRanking(); + + /** + * Sets the value of the '{@link org.genivi.family.WealthyFamily#getForbesRanking Forbes Ranking}' attribute. + * + * + * @param value the new value of the 'Forbes Ranking' attribute. + * @see #isSetForbesRanking() + * @see #unsetForbesRanking() + * @see #getForbesRanking() + * @generated + */ + void setForbesRanking(int value); + + /** + * Unsets the value of the '{@link org.genivi.family.WealthyFamily#getForbesRanking Forbes Ranking}' attribute. + * + * + * @see #isSetForbesRanking() + * @see #getForbesRanking() + * @see #setForbesRanking(int) + * @generated + */ + void unsetForbesRanking(); + + /** + * Returns whether the value of the '{@link org.genivi.family.WealthyFamily#getForbesRanking Forbes Ranking}' attribute is set. + * + * + * @return whether the value of the 'Forbes Ranking' attribute is set. + * @see #unsetForbesRanking() + * @see #getForbesRanking() + * @see #setForbesRanking(int) + * @generated + */ + boolean isSetForbesRanking(); + +} // WealthyFamily diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/impl/AddressImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/impl/AddressImpl.java new file mode 100755 index 0000000..8b1e40e --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/impl/AddressImpl.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.family.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.genivi.family.Address; +import org.genivi.family.FamilyPackage; + +/** + * + * An implementation of the model object 'Address'. + * + *+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
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. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.genivi.family.FamilyPackage#eNS_URI + * @see #init() + * @generated + */ + private FamilyPackageImpl() { + super(eNS_URI, FamilyFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *
This method is used to initialize {@link FamilyPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static FamilyPackage init() { + if (isInited) return (FamilyPackage)EPackage.Registry.INSTANCE.getEPackage(FamilyPackage.eNS_URI); + + // Obtain or create and register package + FamilyPackageImpl theFamilyPackage = (FamilyPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FamilyPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FamilyPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theFamilyPackage.createPackageContents(); + + // Initialize created meta-data + theFamilyPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theFamilyPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(FamilyPackage.eNS_URI, theFamilyPackage); + return theFamilyPackage; + } + + /** + * + * + * @generated + */ + public EClass getFamily() { + return familyEClass; + } + + /** + * + * + * @generated + */ + public EReference getFamily_Members() { + return (EReference)familyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getFamily_Surname() { + return (EAttribute)familyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getFamily_NumberOfPets() { + return (EAttribute)familyEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getFamily_HasASwimmingPool() { + return (EAttribute)familyEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getFamily_Address() { + return (EReference)familyEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getFamily_FavoriteHolidayDestinations() { + return (EAttribute)familyEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EClass getPerson() { + return personEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPerson_FirstName() { + return (EAttribute)personEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getPerson_Sexe() { + return (EAttribute)personEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getPerson_OwnedCars() { + return (EReference)personEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getCar() { + return carEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCar_NumberOfSeats() { + return (EAttribute)carEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getAddress() { + return addressEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getAddress_Street() { + return (EAttribute)addressEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getWealthyFamily() { + return wealthyFamilyEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getWealthyFamily_ForbesRanking() { + return (EAttribute)wealthyFamilyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EEnum getSexe() { + return sexeEEnum; + } + + /** + * + * + * @generated + */ + public FamilyFactory getFamilyFactory() { + return (FamilyFactory)getEFactoryInstance(); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + familyEClass = createEClass(FAMILY); + createEReference(familyEClass, FAMILY__MEMBERS); + createEAttribute(familyEClass, FAMILY__SURNAME); + createEAttribute(familyEClass, FAMILY__NUMBER_OF_PETS); + createEAttribute(familyEClass, FAMILY__HAS_ASWIMMING_POOL); + createEReference(familyEClass, FAMILY__ADDRESS); + createEAttribute(familyEClass, FAMILY__FAVORITE_HOLIDAY_DESTINATIONS); + + personEClass = createEClass(PERSON); + createEAttribute(personEClass, PERSON__FIRST_NAME); + createEAttribute(personEClass, PERSON__SEXE); + createEReference(personEClass, PERSON__OWNED_CARS); + + carEClass = createEClass(CAR); + createEAttribute(carEClass, CAR__NUMBER_OF_SEATS); + + addressEClass = createEClass(ADDRESS); + createEAttribute(addressEClass, ADDRESS__STREET); + + wealthyFamilyEClass = createEClass(WEALTHY_FAMILY); + createEAttribute(wealthyFamilyEClass, WEALTHY_FAMILY__FORBES_RANKING); + + // Create enums + sexeEEnum = createEEnum(SEXE); + } + + /** + * + * + * @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. + * + * + * @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 + wealthyFamilyEClass.getESuperTypes().add(this.getFamily()); + + // Initialize classes and features; add operations and parameters + initEClass(familyEClass, Family.class, "Family", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFamily_Members(), this.getPerson(), null, "members", null, 1, -1, Family.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFamily_Surname(), ecorePackage.getEString(), "surname", null, 1, 1, Family.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFamily_NumberOfPets(), ecorePackage.getEInt(), "numberOfPets", null, 0, 1, Family.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFamily_HasASwimmingPool(), ecorePackage.getEBoolean(), "hasASwimmingPool", null, 0, 1, Family.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFamily_Address(), this.getAddress(), null, "address", null, 0, 1, Family.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFamily_FavoriteHolidayDestinations(), ecorePackage.getEString(), "favoriteHolidayDestinations", null, 0, -1, Family.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(personEClass, Person.class, "Person", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPerson_FirstName(), ecorePackage.getEString(), "firstName", null, 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPerson_Sexe(), this.getSexe(), "sexe", null, 1, 1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPerson_OwnedCars(), this.getCar(), null, "ownedCars", null, 0, -1, Person.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(carEClass, Car.class, "Car", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCar_NumberOfSeats(), ecorePackage.getEIntegerObject(), "numberOfSeats", null, 0, 1, Car.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(addressEClass, Address.class, "Address", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAddress_Street(), ecorePackage.getEString(), "street", null, 0, 1, Address.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(wealthyFamilyEClass, WealthyFamily.class, "WealthyFamily", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getWealthyFamily_ForbesRanking(), ecorePackage.getEInt(), "forbesRanking", null, 0, 1, WealthyFamily.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(sexeEEnum, Sexe.class, "Sexe"); + addEEnumLiteral(sexeEEnum, Sexe.MALE); + addEEnumLiteral(sexeEEnum, Sexe.FEMALE); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // GenModel + createGenModelAnnotations(); + } + + /** + * Initializes the annotations for GenModel. + * + * + * @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/." + }); + } + +} //FamilyPackageImpl diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/impl/PersonImpl.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/impl/PersonImpl.java new file mode 100755 index 0000000..66002c6 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/impl/PersonImpl.java @@ -0,0 +1,352 @@ +/** + * + * 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.family.impl; + +import java.util.Collection; + +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.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import org.genivi.family.Car; +import org.genivi.family.FamilyPackage; +import org.genivi.family.Person; +import org.genivi.family.Sexe; + +/** + * + * An implementation of the model object 'Person'. + * + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
createXXX
method for each class of the model.
+ *
+ * @see org.genivi.family.FamilyPackage
+ * @generated
+ */
+public class FamilyAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static FamilyPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public FamilyAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = FamilyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ *
+ * This implementation returns true
if the object is either the model's package or is an instance object of the model.
+ *
+ * @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 createXXX
methods.
+ *
+ *
+ * @generated
+ */
+ protected FamilySwitchtarget
.
+ *
+ *
+ * @param target the object to adapt.
+ * @return the adapter for the target
.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.family.Family Family}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.family.Family
+ * @generated
+ */
+ public Adapter createFamilyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.family.Person Person}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.family.Person
+ * @generated
+ */
+ public Adapter createPersonAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.family.Car Car}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.family.Car
+ * @generated
+ */
+ public Adapter createCarAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.family.Address Address}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.family.Address
+ * @generated
+ */
+ public Adapter createAddressAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.family.WealthyFamily Wealthy Family}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.family.WealthyFamily
+ * @generated
+ */
+ public Adapter createWealthyFamilyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ *
+ * This default implementation returns null.
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //FamilyAdapterFactory
diff --git a/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/util/FamilySwitch.java b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/util/FamilySwitch.java
new file mode 100755
index 0000000..46a6949
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.booleanexpr-model/src/test/java/org/genivi/family/util/FamilySwitch.java
@@ -0,0 +1,202 @@
+/**
+ *
+ * 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.family.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.genivi.family.*;
+
+/**
+ *
+ * The Switch for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the caseXXX
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.
+ *
+ * @see org.genivi.family.FamilyPackage
+ * @generated
+ */
+public class FamilySwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case FamilyPackage.FAMILY: {
+ Family family = (Family)theEObject;
+ T result = caseFamily(family);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FamilyPackage.PERSON: {
+ Person person = (Person)theEObject;
+ T result = casePerson(person);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FamilyPackage.CAR: {
+ Car car = (Car)theEObject;
+ T result = caseCar(car);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FamilyPackage.ADDRESS: {
+ Address address = (Address)theEObject;
+ T result = caseAddress(address);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FamilyPackage.WEALTHY_FAMILY: {
+ WealthyFamily wealthyFamily = (WealthyFamily)theEObject;
+ T result = caseWealthyFamily(wealthyFamily);
+ if (result == null) result = caseFamily(wealthyFamily);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Family'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Family'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFamily(Family object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Person'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Person'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePerson(Person object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Car'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Car'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCar(Car object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Address'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Address'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAddress(Address object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Wealthy Family'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Wealthy Family'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseWealthyFamily(WealthyFamily object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'EObject'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'EObject'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //FamilySwitch
diff --git a/src/traffic-incidents-service/org.genivi.iconset-model/.classpath b/src/traffic-incidents-service/org.genivi.iconset-model/.classpath
new file mode 100755
index 0000000..1bf6a1d
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.iconset-model/.classpath
@@ -0,0 +1,9 @@
+
++ * If the meaning of 'BLACK AND WHITE' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #BLACK_AND_WHITE + * @model + * @generated + * @ordered + */ + public static final int BLACK_AND_WHITE_VALUE = 1; + + /** + * The 'GRAY 4' literal value. + * + *+ * If the meaning of 'GRAY 4' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #GRAY_4 + * @model + * @generated + * @ordered + */ + public static final int GRAY_4_VALUE = 2; + + /** + * The 'GRAY 8' literal value. + * + *+ * If the meaning of 'GRAY 8' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #GRAY_8 + * @model + * @generated + * @ordered + */ + public static final int GRAY_8_VALUE = 3; + + /** + * The 'RGB555' literal value. + * + *+ * If the meaning of 'RGB555' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #RGB555 + * @model + * @generated + * @ordered + */ + public static final int RGB555_VALUE = 4; + + /** + * The 'RGB565' literal value. + * + *+ * If the meaning of 'RGB565' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #RGB565 + * @model + * @generated + * @ordered + */ + public static final int RGB565_VALUE = 5; + + /** + * The 'RGB888' literal value. + * + *+ * If the meaning of 'RGB888' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #RGB888 + * @model + * @generated + * @ordered + */ + public static final int RGB888_VALUE = 6; + + /** + * An array of all the 'Color Type' enumerators. + * + * + * @generated + */ + private static final ColorType[] VALUES_ARRAY = + new ColorType[] { + BLACK_AND_WHITE, + GRAY_4, + GRAY_8, + RGB555, + RGB565, + RGB888, + }; + + /** + * A public read-only list of all the 'Color Type' enumerators. + * + * + * @generated + */ + public static final List+ * The following features are supported: + *
+ * If the meaning of the 'Data' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Data' attribute. + * @see #isSetData() + * @see #unsetData() + * @see #setData(byte[]) + * @see org.genivi.iconset.IconsetPackage#getIconData_Data() + * @model unsettable="true" + * @generated + */ + byte[] getData(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconData#getData Data}' attribute. + * + * + * @param value the new value of the 'Data' attribute. + * @see #isSetData() + * @see #unsetData() + * @see #getData() + * @generated + */ + void setData(byte[] value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconData#getData Data}' attribute. + * + * + * @see #isSetData() + * @see #getData() + * @see #setData(byte[]) + * @generated + */ + void unsetData(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconData#getData Data}' attribute is set. + * + * + * @return whether the value of the 'Data' attribute is set. + * @see #unsetData() + * @see #getData() + * @see #setData(byte[]) + * @generated + */ + boolean isSetData(); + +} // IconData diff --git a/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconDefinition.java b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconDefinition.java new file mode 100755 index 0000000..7b98447 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconDefinition.java @@ -0,0 +1,138 @@ +/** + * + * 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.iconset; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Icon Definition'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Icon Info' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Icon Info' containment reference. + * @see #isSetIconInfo() + * @see #unsetIconInfo() + * @see #setIconInfo(IconInfo) + * @see org.genivi.iconset.IconsetPackage#getIconDefinition_IconInfo() + * @model containment="true" unsettable="true" required="true" + * @generated + */ + IconInfo getIconInfo(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconDefinition#getIconInfo Icon Info}' containment reference. + * + * + * @param value the new value of the 'Icon Info' containment reference. + * @see #isSetIconInfo() + * @see #unsetIconInfo() + * @see #getIconInfo() + * @generated + */ + void setIconInfo(IconInfo value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconDefinition#getIconInfo Icon Info}' containment reference. + * + * + * @see #isSetIconInfo() + * @see #getIconInfo() + * @see #setIconInfo(IconInfo) + * @generated + */ + void unsetIconInfo(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconDefinition#getIconInfo Icon Info}' containment reference is set. + * + * + * @return whether the value of the 'Icon Info' containment reference is set. + * @see #unsetIconInfo() + * @see #getIconInfo() + * @see #setIconInfo(IconInfo) + * @generated + */ + boolean isSetIconInfo(); + + /** + * Returns the value of the 'Icon Data' containment reference. + * + *+ * If the meaning of the 'Icon Data' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Icon Data' containment reference. + * @see #isSetIconData() + * @see #unsetIconData() + * @see #setIconData(IconData) + * @see org.genivi.iconset.IconsetPackage#getIconDefinition_IconData() + * @model containment="true" unsettable="true" required="true" + * @generated + */ + IconData getIconData(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconDefinition#getIconData Icon Data}' containment reference. + * + * + * @param value the new value of the 'Icon Data' containment reference. + * @see #isSetIconData() + * @see #unsetIconData() + * @see #getIconData() + * @generated + */ + void setIconData(IconData value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconDefinition#getIconData Icon Data}' containment reference. + * + * + * @see #isSetIconData() + * @see #getIconData() + * @see #setIconData(IconData) + * @generated + */ + void unsetIconData(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconDefinition#getIconData Icon Data}' containment reference is set. + * + * + * @return whether the value of the 'Icon Data' containment reference is set. + * @see #unsetIconData() + * @see #getIconData() + * @see #setIconData(IconData) + * @generated + */ + boolean isSetIconData(); + +} // IconDefinition diff --git a/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconDescriptor.java b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconDescriptor.java new file mode 100755 index 0000000..e028118 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconDescriptor.java @@ -0,0 +1,138 @@ +/** + * + * 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.iconset; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Icon Descriptor'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Url' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Url' attribute. + * @see #isSetUrl() + * @see #unsetUrl() + * @see #setUrl(String) + * @see org.genivi.iconset.IconsetPackage#getIconDescriptor_Url() + * @model unsettable="true" + * @generated + */ + String getUrl(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconDescriptor#getUrl Url}' attribute. + * + * + * @param value the new value of the 'Url' attribute. + * @see #isSetUrl() + * @see #unsetUrl() + * @see #getUrl() + * @generated + */ + void setUrl(String value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconDescriptor#getUrl Url}' attribute. + * + * + * @see #isSetUrl() + * @see #getUrl() + * @see #setUrl(String) + * @generated + */ + void unsetUrl(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconDescriptor#getUrl Url}' attribute is set. + * + * + * @return whether the value of the 'Url' attribute is set. + * @see #unsetUrl() + * @see #getUrl() + * @see #setUrl(String) + * @generated + */ + boolean isSetUrl(); + + /** + * Returns the value of the 'Icon Id' attribute. + * + *+ * If the meaning of the 'Icon Id' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Icon Id' attribute. + * @see #isSetIconId() + * @see #unsetIconId() + * @see #setIconId(int) + * @see org.genivi.iconset.IconsetPackage#getIconDescriptor_IconId() + * @model unsettable="true" required="true" + * @generated + */ + int getIconId(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconDescriptor#getIconId Icon Id}' attribute. + * + * + * @param value the new value of the 'Icon Id' attribute. + * @see #isSetIconId() + * @see #unsetIconId() + * @see #getIconId() + * @generated + */ + void setIconId(int value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconDescriptor#getIconId Icon Id}' attribute. + * + * + * @see #isSetIconId() + * @see #getIconId() + * @see #setIconId(int) + * @generated + */ + void unsetIconId(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconDescriptor#getIconId Icon Id}' attribute is set. + * + * + * @return whether the value of the 'Icon Id' attribute is set. + * @see #unsetIconId() + * @see #getIconId() + * @see #setIconId(int) + * @generated + */ + boolean isSetIconId(); + +} // IconDescriptor diff --git a/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconDimension.java b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconDimension.java new file mode 100755 index 0000000..567a13e --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconDimension.java @@ -0,0 +1,215 @@ +/** + * + * 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.iconset; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Icon Dimension', + * and utility methods for working with them. + * + * @see org.genivi.iconset.IconsetPackage#getIconDimension() + * @model + * @generated + */ +public enum IconDimension implements Enumerator { + /** + * The 'D2D' literal object. + * + * + * @see #D2D_VALUE + * @generated + * @ordered + */ + D2D(1, "D_2D", "D_2D"), + + /** + * The 'D25D' literal object. + * + * + * @see #D25D_VALUE + * @generated + * @ordered + */ + D25D(2, "D_2_5D", "D_2_5D"); + + /** + * The 'D2D' literal value. + * + *+ * If the meaning of 'D2D' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #D2D + * @model name="D_2D" + * @generated + * @ordered + */ + public static final int D2D_VALUE = 1; + + /** + * The 'D25D' literal value. + * + *+ * If the meaning of 'D25D' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #D25D + * @model name="D_2_5D" + * @generated + * @ordered + */ + public static final int D25D_VALUE = 2; + + /** + * An array of all the 'Icon Dimension' enumerators. + * + * + * @generated + */ + private static final IconDimension[] VALUES_ARRAY = + new IconDimension[] { + D2D, + D25D, + }; + + /** + * A public read-only list of all the 'Icon Dimension' enumerators. + * + * + * @generated + */ + public static final List+ * The following features are supported: + *
+ * If the meaning of the 'Icon Set Id' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Icon Set Id' attribute. + * @see #isSetIconSetId() + * @see #unsetIconSetId() + * @see #setIconSetId(int) + * @see org.genivi.iconset.IconsetPackage#getIconInfo_IconSetId() + * @model unsettable="true" required="true" + * @generated + */ + int getIconSetId(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconInfo#getIconSetId Icon Set Id}' attribute. + * + * + * @param value the new value of the 'Icon Set Id' attribute. + * @see #isSetIconSetId() + * @see #unsetIconSetId() + * @see #getIconSetId() + * @generated + */ + void setIconSetId(int value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconInfo#getIconSetId Icon Set Id}' attribute. + * + * + * @see #isSetIconSetId() + * @see #getIconSetId() + * @see #setIconSetId(int) + * @generated + */ + void unsetIconSetId(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconInfo#getIconSetId Icon Set Id}' attribute is set. + * + * + * @return whether the value of the 'Icon Set Id' attribute is set. + * @see #unsetIconSetId() + * @see #getIconSetId() + * @see #setIconSetId(int) + * @generated + */ + boolean isSetIconSetId(); + + /** + * Returns the value of the 'Icon Id' attribute. + * + *+ * If the meaning of the 'Icon Id' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Icon Id' attribute. + * @see #isSetIconId() + * @see #unsetIconId() + * @see #setIconId(int) + * @see org.genivi.iconset.IconsetPackage#getIconInfo_IconId() + * @model unsettable="true" required="true" + * @generated + */ + int getIconId(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconInfo#getIconId Icon Id}' attribute. + * + * + * @param value the new value of the 'Icon Id' attribute. + * @see #isSetIconId() + * @see #unsetIconId() + * @see #getIconId() + * @generated + */ + void setIconId(int value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconInfo#getIconId Icon Id}' attribute. + * + * + * @see #isSetIconId() + * @see #getIconId() + * @see #setIconId(int) + * @generated + */ + void unsetIconId(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconInfo#getIconId Icon Id}' attribute is set. + * + * + * @return whether the value of the 'Icon Id' attribute is set. + * @see #unsetIconId() + * @see #getIconId() + * @see #setIconId(int) + * @generated + */ + boolean isSetIconId(); + +} // IconInfo diff --git a/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconSet.java b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconSet.java new file mode 100755 index 0000000..6cc5741 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconSet.java @@ -0,0 +1,456 @@ +/** + * + * 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.iconset; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Icon Set'. + * + * + *+ * The following features are supported: + *
+ * If the meaning of the 'Icon Set Id' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Icon Set Id' attribute. + * @see #isSetIconSetId() + * @see #unsetIconSetId() + * @see #setIconSetId(int) + * @see org.genivi.iconset.IconsetPackage#getIconSet_IconSetId() + * @model unsettable="true" required="true" + * @generated + */ + int getIconSetId(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconSet#getIconSetId Icon Set Id}' attribute. + * + * + * @param value the new value of the 'Icon Set Id' attribute. + * @see #isSetIconSetId() + * @see #unsetIconSetId() + * @see #getIconSetId() + * @generated + */ + void setIconSetId(int value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconSet#getIconSetId Icon Set Id}' attribute. + * + * + * @see #isSetIconSetId() + * @see #getIconSetId() + * @see #setIconSetId(int) + * @generated + */ + void unsetIconSetId(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconSet#getIconSetId Icon Set Id}' attribute is set. + * + * + * @return whether the value of the 'Icon Set Id' attribute is set. + * @see #unsetIconSetId() + * @see #getIconSetId() + * @see #setIconSetId(int) + * @generated + */ + boolean isSetIconSetId(); + + /** + * Returns the value of the 'Color Type' attribute. + * The literals are from the enumeration {@link org.genivi.iconset.ColorType}. + * + *+ * If the meaning of the 'Color Type' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Color Type' attribute. + * @see org.genivi.iconset.ColorType + * @see #isSetColorType() + * @see #unsetColorType() + * @see #setColorType(ColorType) + * @see org.genivi.iconset.IconsetPackage#getIconSet_ColorType() + * @model unsettable="true" required="true" + * @generated + */ + ColorType getColorType(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconSet#getColorType Color Type}' attribute. + * + * + * @param value the new value of the 'Color Type' attribute. + * @see org.genivi.iconset.ColorType + * @see #isSetColorType() + * @see #unsetColorType() + * @see #getColorType() + * @generated + */ + void setColorType(ColorType value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconSet#getColorType Color Type}' attribute. + * + * + * @see #isSetColorType() + * @see #getColorType() + * @see #setColorType(ColorType) + * @generated + */ + void unsetColorType(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconSet#getColorType Color Type}' attribute is set. + * + * + * @return whether the value of the 'Color Type' attribute is set. + * @see #unsetColorType() + * @see #getColorType() + * @see #setColorType(ColorType) + * @generated + */ + boolean isSetColorType(); + + /** + * Returns the value of the 'Dimension' attribute. + * The literals are from the enumeration {@link org.genivi.iconset.IconDimension}. + * + *+ * If the meaning of the 'Dimension' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Dimension' attribute. + * @see org.genivi.iconset.IconDimension + * @see #isSetDimension() + * @see #unsetDimension() + * @see #setDimension(IconDimension) + * @see org.genivi.iconset.IconsetPackage#getIconSet_Dimension() + * @model unsettable="true" + * @generated + */ + IconDimension getDimension(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconSet#getDimension Dimension}' attribute. + * + * + * @param value the new value of the 'Dimension' attribute. + * @see org.genivi.iconset.IconDimension + * @see #isSetDimension() + * @see #unsetDimension() + * @see #getDimension() + * @generated + */ + void setDimension(IconDimension value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconSet#getDimension Dimension}' attribute. + * + * + * @see #isSetDimension() + * @see #getDimension() + * @see #setDimension(IconDimension) + * @generated + */ + void unsetDimension(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconSet#getDimension Dimension}' attribute is set. + * + * + * @return whether the value of the 'Dimension' attribute is set. + * @see #unsetDimension() + * @see #getDimension() + * @see #setDimension(IconDimension) + * @generated + */ + boolean isSetDimension(); + + /** + * Returns the value of the 'Size' containment reference. + * + *+ * If the meaning of the 'Size' containment reference isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Size' containment reference. + * @see #isSetSize() + * @see #unsetSize() + * @see #setSize(IconSize) + * @see org.genivi.iconset.IconsetPackage#getIconSet_Size() + * @model containment="true" unsettable="true" required="true" + * @generated + */ + IconSize getSize(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconSet#getSize Size}' containment reference. + * + * + * @param value the new value of the 'Size' containment reference. + * @see #isSetSize() + * @see #unsetSize() + * @see #getSize() + * @generated + */ + void setSize(IconSize value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconSet#getSize Size}' containment reference. + * + * + * @see #isSetSize() + * @see #getSize() + * @see #setSize(IconSize) + * @generated + */ + void unsetSize(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconSet#getSize Size}' containment reference is set. + * + * + * @return whether the value of the 'Size' containment reference is set. + * @see #unsetSize() + * @see #getSize() + * @see #setSize(IconSize) + * @generated + */ + boolean isSetSize(); + + /** + * Returns the value of the 'Day Time Icon' attribute. + * + *+ * If the meaning of the 'Day Time Icon' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Day Time Icon' attribute. + * @see #isSetDayTimeIcon() + * @see #unsetDayTimeIcon() + * @see #setDayTimeIcon(boolean) + * @see org.genivi.iconset.IconsetPackage#getIconSet_DayTimeIcon() + * @model unsettable="true" required="true" + * @generated + */ + boolean isDayTimeIcon(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconSet#isDayTimeIcon Day Time Icon}' attribute. + * + * + * @param value the new value of the 'Day Time Icon' attribute. + * @see #isSetDayTimeIcon() + * @see #unsetDayTimeIcon() + * @see #isDayTimeIcon() + * @generated + */ + void setDayTimeIcon(boolean value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconSet#isDayTimeIcon Day Time Icon}' attribute. + * + * + * @see #isSetDayTimeIcon() + * @see #isDayTimeIcon() + * @see #setDayTimeIcon(boolean) + * @generated + */ + void unsetDayTimeIcon(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconSet#isDayTimeIcon Day Time Icon}' attribute is set. + * + * + * @return whether the value of the 'Day Time Icon' attribute is set. + * @see #unsetDayTimeIcon() + * @see #isDayTimeIcon() + * @see #setDayTimeIcon(boolean) + * @generated + */ + boolean isSetDayTimeIcon(); + + /** + * Returns the value of the 'Theme Id' attribute. + * + *+ * If the meaning of the 'Theme Id' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Theme Id' attribute. + * @see #isSetThemeId() + * @see #unsetThemeId() + * @see #setThemeId(int) + * @see org.genivi.iconset.IconsetPackage#getIconSet_ThemeId() + * @model unsettable="true" + * @generated + */ + int getThemeId(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconSet#getThemeId Theme Id}' attribute. + * + * + * @param value the new value of the 'Theme Id' attribute. + * @see #isSetThemeId() + * @see #unsetThemeId() + * @see #getThemeId() + * @generated + */ + void setThemeId(int value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconSet#getThemeId Theme Id}' attribute. + * + * + * @see #isSetThemeId() + * @see #getThemeId() + * @see #setThemeId(int) + * @generated + */ + void unsetThemeId(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconSet#getThemeId Theme Id}' attribute is set. + * + * + * @return whether the value of the 'Theme Id' attribute is set. + * @see #unsetThemeId() + * @see #getThemeId() + * @see #setThemeId(int) + * @generated + */ + boolean isSetThemeId(); + + /** + * Returns the value of the 'Medium Type' attribute. + * + *+ * If the meaning of the 'Medium Type' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Medium Type' attribute. + * @see #isSetMediumType() + * @see #unsetMediumType() + * @see #setMediumType(String) + * @see org.genivi.iconset.IconsetPackage#getIconSet_MediumType() + * @model unsettable="true" required="true" + * @generated + */ + String getMediumType(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconSet#getMediumType Medium Type}' attribute. + * + * + * @param value the new value of the 'Medium Type' attribute. + * @see #isSetMediumType() + * @see #unsetMediumType() + * @see #getMediumType() + * @generated + */ + void setMediumType(String value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconSet#getMediumType Medium Type}' attribute. + * + * + * @see #isSetMediumType() + * @see #getMediumType() + * @see #setMediumType(String) + * @generated + */ + void unsetMediumType(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconSet#getMediumType Medium Type}' attribute is set. + * + * + * @return whether the value of the 'Medium Type' attribute is set. + * @see #unsetMediumType() + * @see #getMediumType() + * @see #setMediumType(String) + * @generated + */ + boolean isSetMediumType(); + + /** + * Returns the value of the 'Icon Descriptors' containment reference list. + * The list contents are of type {@link org.genivi.iconset.IconDescriptor}. + * + *+ * If the meaning of the 'Icon Descriptors' containment reference list isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Icon Descriptors' containment reference list. + * @see #isSetIconDescriptors() + * @see #unsetIconDescriptors() + * @see org.genivi.iconset.IconsetPackage#getIconSet_IconDescriptors() + * @model containment="true" unsettable="true" + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'Width' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Width' attribute. + * @see #isSetWidth() + * @see #unsetWidth() + * @see #setWidth(int) + * @see org.genivi.iconset.IconsetPackage#getIconSize_Width() + * @model unsettable="true" required="true" + * @generated + */ + int getWidth(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconSize#getWidth Width}' attribute. + * + * + * @param value the new value of the 'Width' attribute. + * @see #isSetWidth() + * @see #unsetWidth() + * @see #getWidth() + * @generated + */ + void setWidth(int value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconSize#getWidth Width}' attribute. + * + * + * @see #isSetWidth() + * @see #getWidth() + * @see #setWidth(int) + * @generated + */ + void unsetWidth(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconSize#getWidth Width}' attribute is set. + * + * + * @return whether the value of the 'Width' attribute is set. + * @see #unsetWidth() + * @see #getWidth() + * @see #setWidth(int) + * @generated + */ + boolean isSetWidth(); + + /** + * Returns the value of the 'Height' attribute. + * + *+ * If the meaning of the 'Height' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Height' attribute. + * @see #isSetHeight() + * @see #unsetHeight() + * @see #setHeight(int) + * @see org.genivi.iconset.IconsetPackage#getIconSize_Height() + * @model unsettable="true" required="true" + * @generated + */ + int getHeight(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconSize#getHeight Height}' attribute. + * + * + * @param value the new value of the 'Height' attribute. + * @see #isSetHeight() + * @see #unsetHeight() + * @see #getHeight() + * @generated + */ + void setHeight(int value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconSize#getHeight Height}' attribute. + * + * + * @see #isSetHeight() + * @see #getHeight() + * @see #setHeight(int) + * @generated + */ + void unsetHeight(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconSize#getHeight Height}' attribute is set. + * + * + * @return whether the value of the 'Height' attribute is set. + * @see #unsetHeight() + * @see #getHeight() + * @see #setHeight(int) + * @generated + */ + boolean isSetHeight(); + + /** + * Returns the value of the 'Dpi' attribute. + * + *+ * If the meaning of the 'Dpi' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Dpi' attribute. + * @see #isSetDpi() + * @see #unsetDpi() + * @see #setDpi(int) + * @see org.genivi.iconset.IconsetPackage#getIconSize_Dpi() + * @model unsettable="true" + * @generated + */ + int getDpi(); + + /** + * Sets the value of the '{@link org.genivi.iconset.IconSize#getDpi Dpi}' attribute. + * + * + * @param value the new value of the 'Dpi' attribute. + * @see #isSetDpi() + * @see #unsetDpi() + * @see #getDpi() + * @generated + */ + void setDpi(int value); + + /** + * Unsets the value of the '{@link org.genivi.iconset.IconSize#getDpi Dpi}' attribute. + * + * + * @see #isSetDpi() + * @see #getDpi() + * @see #setDpi(int) + * @generated + */ + void unsetDpi(); + + /** + * Returns whether the value of the '{@link org.genivi.iconset.IconSize#getDpi Dpi}' attribute is set. + * + * + * @return whether the value of the 'Dpi' attribute is set. + * @see #unsetDpi() + * @see #getDpi() + * @see #setDpi(int) + * @generated + */ + boolean isSetDpi(); + +} // IconSize diff --git a/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconsetFactory.java b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconsetFactory.java new file mode 100755 index 0000000..5941e3c --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconsetFactory.java @@ -0,0 +1,94 @@ +/** + * + * 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.iconset; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.genivi.iconset.IconsetPackage + * @generated + */ +public interface IconsetFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + IconsetFactory eINSTANCE = org.genivi.iconset.impl.IconsetFactoryImpl.init(); + + /** + * Returns a new object of class 'Icon Set'. + * + * + * @return a new object of class 'Icon Set'. + * @generated + */ + IconSet createIconSet(); + + /** + * Returns a new object of class 'Icon Size'. + * + * + * @return a new object of class 'Icon Size'. + * @generated + */ + IconSize createIconSize(); + + /** + * Returns a new object of class 'Icon Descriptor'. + * + * + * @return a new object of class 'Icon Descriptor'. + * @generated + */ + IconDescriptor createIconDescriptor(); + + /** + * Returns a new object of class 'Icon Data'. + * + * + * @return a new object of class 'Icon Data'. + * @generated + */ + IconData createIconData(); + + /** + * Returns a new object of class 'Icon Info'. + * + * + * @return a new object of class 'Icon Info'. + * @generated + */ + IconInfo createIconInfo(); + + /** + * Returns a new object of class 'Icon Definition'. + * + * + * @return a new object of class 'Icon Definition'. + * @generated + */ + IconDefinition createIconDefinition(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + IconsetPackage getIconsetPackage(); + +} //IconsetFactory diff --git a/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconsetPackage.java b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconsetPackage.java new file mode 100755 index 0000000..4e74c3b --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/IconsetPackage.java @@ -0,0 +1,890 @@ +/** + * + * 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.iconset; + +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; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
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. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.genivi.iconset.IconsetPackage#eNS_URI + * @see #init() + * @generated + */ + private IconsetPackageImpl() { + super(eNS_URI, IconsetFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *
This method is used to initialize {@link IconsetPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ *
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static IconsetPackage init() {
+ if (isInited) return (IconsetPackage)EPackage.Registry.INSTANCE.getEPackage(IconsetPackage.eNS_URI);
+
+ // Obtain or create and register package
+ IconsetPackageImpl theIconsetPackage = (IconsetPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof IconsetPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new IconsetPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theIconsetPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theIconsetPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theIconsetPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(IconsetPackage.eNS_URI, theIconsetPackage);
+ return theIconsetPackage;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getIconSet() {
+ return iconSetEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconSet_IconSetId() {
+ return (EAttribute)iconSetEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconSet_ColorType() {
+ return (EAttribute)iconSetEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconSet_Dimension() {
+ return (EAttribute)iconSetEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getIconSet_Size() {
+ return (EReference)iconSetEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconSet_DayTimeIcon() {
+ return (EAttribute)iconSetEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconSet_ThemeId() {
+ return (EAttribute)iconSetEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconSet_MediumType() {
+ return (EAttribute)iconSetEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getIconSet_IconDescriptors() {
+ return (EReference)iconSetEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getIconSize() {
+ return iconSizeEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconSize_Width() {
+ return (EAttribute)iconSizeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconSize_Height() {
+ return (EAttribute)iconSizeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconSize_Dpi() {
+ return (EAttribute)iconSizeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getIconDescriptor() {
+ return iconDescriptorEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconDescriptor_Url() {
+ return (EAttribute)iconDescriptorEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconDescriptor_IconId() {
+ return (EAttribute)iconDescriptorEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getIconData() {
+ return iconDataEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconData_Data() {
+ return (EAttribute)iconDataEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getIconInfo() {
+ return iconInfoEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconInfo_IconSetId() {
+ return (EAttribute)iconInfoEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getIconInfo_IconId() {
+ return (EAttribute)iconInfoEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getIconDefinition() {
+ return iconDefinitionEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getIconDefinition_IconInfo() {
+ return (EReference)iconDefinitionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getIconDefinition_IconData() {
+ return (EReference)iconDefinitionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EEnum getColorType() {
+ return colorTypeEEnum;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EEnum getIconDimension() {
+ return iconDimensionEEnum;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public IconsetFactory getIconsetFactory() {
+ return (IconsetFactory)getEFactoryInstance();
+ }
+
+ /**
+ *
+ *
+ * @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.
+ *
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ iconSetEClass = createEClass(ICON_SET);
+ createEAttribute(iconSetEClass, ICON_SET__ICON_SET_ID);
+ createEAttribute(iconSetEClass, ICON_SET__COLOR_TYPE);
+ createEAttribute(iconSetEClass, ICON_SET__DIMENSION);
+ createEReference(iconSetEClass, ICON_SET__SIZE);
+ createEAttribute(iconSetEClass, ICON_SET__DAY_TIME_ICON);
+ createEAttribute(iconSetEClass, ICON_SET__THEME_ID);
+ createEAttribute(iconSetEClass, ICON_SET__MEDIUM_TYPE);
+ createEReference(iconSetEClass, ICON_SET__ICON_DESCRIPTORS);
+
+ iconSizeEClass = createEClass(ICON_SIZE);
+ createEAttribute(iconSizeEClass, ICON_SIZE__WIDTH);
+ createEAttribute(iconSizeEClass, ICON_SIZE__HEIGHT);
+ createEAttribute(iconSizeEClass, ICON_SIZE__DPI);
+
+ iconDescriptorEClass = createEClass(ICON_DESCRIPTOR);
+ createEAttribute(iconDescriptorEClass, ICON_DESCRIPTOR__URL);
+ createEAttribute(iconDescriptorEClass, ICON_DESCRIPTOR__ICON_ID);
+
+ iconDataEClass = createEClass(ICON_DATA);
+ createEAttribute(iconDataEClass, ICON_DATA__DATA);
+
+ iconInfoEClass = createEClass(ICON_INFO);
+ createEAttribute(iconInfoEClass, ICON_INFO__ICON_SET_ID);
+ createEAttribute(iconInfoEClass, ICON_INFO__ICON_ID);
+
+ iconDefinitionEClass = createEClass(ICON_DEFINITION);
+ createEReference(iconDefinitionEClass, ICON_DEFINITION__ICON_INFO);
+ createEReference(iconDefinitionEClass, ICON_DEFINITION__ICON_DATA);
+
+ // Create enums
+ colorTypeEEnum = createEEnum(COLOR_TYPE);
+ iconDimensionEEnum = createEEnum(ICON_DIMENSION);
+ }
+
+ /**
+ *
+ *
+ * @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.
+ *
+ *
+ * @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
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(iconSetEClass, IconSet.class, "IconSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getIconSet_IconSetId(), ecorePackage.getEInt(), "iconSetId", null, 1, 1, IconSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getIconSet_ColorType(), this.getColorType(), "colorType", null, 1, 1, IconSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getIconSet_Dimension(), this.getIconDimension(), "dimension", null, 0, 1, IconSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getIconSet_Size(), this.getIconSize(), null, "size", null, 1, 1, IconSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getIconSet_DayTimeIcon(), ecorePackage.getEBoolean(), "dayTimeIcon", null, 1, 1, IconSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getIconSet_ThemeId(), ecorePackage.getEInt(), "themeId", null, 0, 1, IconSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getIconSet_MediumType(), ecorePackage.getEString(), "mediumType", null, 1, 1, IconSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getIconSet_IconDescriptors(), this.getIconDescriptor(), null, "iconDescriptors", null, 0, -1, IconSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(iconSizeEClass, IconSize.class, "IconSize", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getIconSize_Width(), ecorePackage.getEInt(), "width", null, 1, 1, IconSize.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getIconSize_Height(), ecorePackage.getEInt(), "height", null, 1, 1, IconSize.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getIconSize_Dpi(), ecorePackage.getEInt(), "dpi", null, 0, 1, IconSize.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(iconDescriptorEClass, IconDescriptor.class, "IconDescriptor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getIconDescriptor_Url(), ecorePackage.getEString(), "url", null, 0, 1, IconDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getIconDescriptor_IconId(), ecorePackage.getEInt(), "iconId", null, 1, 1, IconDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(iconDataEClass, IconData.class, "IconData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getIconData_Data(), ecorePackage.getEByteArray(), "data", null, 0, 1, IconData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(iconInfoEClass, IconInfo.class, "IconInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getIconInfo_IconSetId(), ecorePackage.getEInt(), "iconSetId", null, 1, 1, IconInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getIconInfo_IconId(), ecorePackage.getEInt(), "iconId", null, 1, 1, IconInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(iconDefinitionEClass, IconDefinition.class, "IconDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getIconDefinition_IconInfo(), this.getIconInfo(), null, "iconInfo", null, 1, 1, IconDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getIconDefinition_IconData(), this.getIconData(), null, "iconData", null, 1, 1, IconDefinition.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(colorTypeEEnum, ColorType.class, "ColorType");
+ addEEnumLiteral(colorTypeEEnum, ColorType.BLACK_AND_WHITE);
+ addEEnumLiteral(colorTypeEEnum, ColorType.GRAY_4);
+ addEEnumLiteral(colorTypeEEnum, ColorType.GRAY_8);
+ addEEnumLiteral(colorTypeEEnum, ColorType.RGB555);
+ addEEnumLiteral(colorTypeEEnum, ColorType.RGB565);
+ addEEnumLiteral(colorTypeEEnum, ColorType.RGB888);
+
+ initEEnum(iconDimensionEEnum, IconDimension.class, "IconDimension");
+ addEEnumLiteral(iconDimensionEEnum, IconDimension.D2D);
+ addEEnumLiteral(iconDimensionEEnum, IconDimension.D25D);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // GenModel
+ createGenModelAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for GenModel.
+ *
+ *
+ * @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/."
+ });
+ }
+
+} //IconsetPackageImpl
diff --git a/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/util/IconsetAdapterFactory.java b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/util/IconsetAdapterFactory.java
new file mode 100755
index 0000000..edc3f92
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/util/IconsetAdapterFactory.java
@@ -0,0 +1,217 @@
+/**
+ *
+ * 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.iconset.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.iconset.*;
+
+/**
+ *
+ * The Adapter Factory for the model.
+ * It provides an adapter
+ * The following features are supported:
+ * createXXX
method for each class of the model.
+ *
+ * @see org.genivi.iconset.IconsetPackage
+ * @generated
+ */
+public class IconsetAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static IconsetPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public IconsetAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = IconsetPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ *
+ * This implementation returns true
if the object is either the model's package or is an instance object of the model.
+ *
+ * @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 createXXX
methods.
+ *
+ *
+ * @generated
+ */
+ protected IconsetSwitchtarget
.
+ *
+ *
+ * @param target the object to adapt.
+ * @return the adapter for the target
.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.iconset.IconSet Icon Set}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.iconset.IconSet
+ * @generated
+ */
+ public Adapter createIconSetAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.iconset.IconSize Icon Size}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.iconset.IconSize
+ * @generated
+ */
+ public Adapter createIconSizeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.iconset.IconDescriptor Icon Descriptor}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.iconset.IconDescriptor
+ * @generated
+ */
+ public Adapter createIconDescriptorAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.iconset.IconData Icon Data}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.iconset.IconData
+ * @generated
+ */
+ public Adapter createIconDataAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.iconset.IconInfo Icon Info}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.iconset.IconInfo
+ * @generated
+ */
+ public Adapter createIconInfoAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.iconset.IconDefinition Icon Definition}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.iconset.IconDefinition
+ * @generated
+ */
+ public Adapter createIconDefinitionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ *
+ * This default implementation returns null.
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //IconsetAdapterFactory
diff --git a/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/util/IconsetSwitch.java b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/util/IconsetSwitch.java
new file mode 100755
index 0000000..8d5a550
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.iconset-model/src/org/genivi/iconset/util/IconsetSwitch.java
@@ -0,0 +1,222 @@
+/**
+ *
+ * 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.iconset.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.genivi.iconset.*;
+
+/**
+ *
+ * The Switch for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the caseXXX
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.
+ *
+ * @see org.genivi.iconset.IconsetPackage
+ * @generated
+ */
+public class IconsetSwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case IconsetPackage.ICON_SET: {
+ IconSet iconSet = (IconSet)theEObject;
+ T result = caseIconSet(iconSet);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IconsetPackage.ICON_SIZE: {
+ IconSize iconSize = (IconSize)theEObject;
+ T result = caseIconSize(iconSize);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IconsetPackage.ICON_DESCRIPTOR: {
+ IconDescriptor iconDescriptor = (IconDescriptor)theEObject;
+ T result = caseIconDescriptor(iconDescriptor);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IconsetPackage.ICON_DATA: {
+ IconData iconData = (IconData)theEObject;
+ T result = caseIconData(iconData);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IconsetPackage.ICON_INFO: {
+ IconInfo iconInfo = (IconInfo)theEObject;
+ T result = caseIconInfo(iconInfo);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case IconsetPackage.ICON_DEFINITION: {
+ IconDefinition iconDefinition = (IconDefinition)theEObject;
+ T result = caseIconDefinition(iconDefinition);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Icon Set'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Icon Set'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIconSet(IconSet object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Icon Size'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Icon Size'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIconSize(IconSize object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Icon Descriptor'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Icon Descriptor'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIconDescriptor(IconDescriptor object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Icon Data'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Icon Data'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIconData(IconData object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Icon Info'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Icon Info'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIconInfo(IconInfo object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Icon Definition'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Icon Definition'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIconDefinition(IconDefinition object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'EObject'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'EObject'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //IconsetSwitch
diff --git a/src/traffic-incidents-service/org.genivi.locref-model/.classpath b/src/traffic-incidents-service/org.genivi.locref-model/.classpath
new file mode 100755
index 0000000..1af8d0d
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.locref-model/.classpath
@@ -0,0 +1,10 @@
+
+
+ *
+ *
+ * If the meaning of the 'Location Reference Type' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Location Reference Type' attribute. + * @see #isSetLocationReferenceType() + * @see #unsetLocationReferenceType() + * @see #setLocationReferenceType(byte) + * @see org.genivi.locref.locrefPackage#getLocationReference_LocationReferenceType() + * @model unsettable="true" required="true" + * @generated + */ + byte getLocationReferenceType(); + + /** + * Sets the value of the '{@link org.genivi.locref.LocationReference#getLocationReferenceType Location Reference Type}' attribute. + * + * + * @param value the new value of the 'Location Reference Type' attribute. + * @see #isSetLocationReferenceType() + * @see #unsetLocationReferenceType() + * @see #getLocationReferenceType() + * @generated + */ + void setLocationReferenceType(byte value); + + /** + * Unsets the value of the '{@link org.genivi.locref.LocationReference#getLocationReferenceType Location Reference Type}' attribute. + * + * + * @see #isSetLocationReferenceType() + * @see #getLocationReferenceType() + * @see #setLocationReferenceType(byte) + * @generated + */ + void unsetLocationReferenceType(); + + /** + * Returns whether the value of the '{@link org.genivi.locref.LocationReference#getLocationReferenceType Location Reference Type}' attribute is set. + * + * + * @return whether the value of the 'Location Reference Type' attribute is set. + * @see #unsetLocationReferenceType() + * @see #getLocationReferenceType() + * @see #setLocationReferenceType(byte) + * @generated + */ + boolean isSetLocationReferenceType(); + + /** + * Returns the value of the 'Data' attribute. + * + *+ * If the meaning of the 'Data' attribute isn't clear, + * there really should be more of a description here... + *
+ * + * @return the value of the 'Data' attribute. + * @see #isSetData() + * @see #unsetData() + * @see #setData(Object) + * @see org.genivi.locref.locrefPackage#getLocationReference_Data() + * @model unsettable="true" required="true" + * @generated + */ + Object getData(); + + /** + * Sets the value of the '{@link org.genivi.locref.LocationReference#getData Data}' attribute. + * + * + * @param value the new value of the 'Data' attribute. + * @see #isSetData() + * @see #unsetData() + * @see #getData() + * @generated + */ + void setData(Object value); + + /** + * Unsets the value of the '{@link org.genivi.locref.LocationReference#getData Data}' attribute. + * + * + * @see #isSetData() + * @see #getData() + * @see #setData(Object) + * @generated + */ + void unsetData(); + + /** + * Returns whether the value of the '{@link org.genivi.locref.LocationReference#getData Data}' attribute is set. + * + * + * @return whether the value of the 'Data' attribute is set. + * @see #unsetData() + * @see #getData() + * @see #setData(Object) + * @generated + */ + boolean isSetData(); + +} // LocationReference diff --git a/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/LocationReferenceDecodingService.java b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/LocationReferenceDecodingService.java new file mode 100755 index 0000000..4d65cb5 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/LocationReferenceDecodingService.java @@ -0,0 +1,49 @@ +/** + * + * 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.locref; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Location Reference Decoding Service'. + * + * + * + * @see org.genivi.locref.locrefPackage#getLocationReferenceDecodingService() + * @model + * @generated + */ +public interface LocationReferenceDecodingService extends EObject { + /** + * + * + * @model listenerRequired="true" locationReferenceRequired="true" + * @generated + */ + void decode(LocationReferenceDecodingServiceListener listener, LocationReference locationReference); + + /** + * + * + * @model + * @generated + */ + void setLanguage(String languageCode, String countryCode); + + /** + * + * + * @model + * @generated + */ + void getLanguage(LocationReferenceDecodingServiceListener listener); + +} // LocationReferenceDecodingService diff --git a/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/LocationReferenceDecodingServiceListener.java b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/LocationReferenceDecodingServiceListener.java new file mode 100755 index 0000000..ccb8967 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/LocationReferenceDecodingServiceListener.java @@ -0,0 +1,43 @@ +/** + * + * 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.locref; + +import org.eclipse.emf.ecore.EObject; +import org.genivi.location.Location; +import org.genivi.location.LocationInfo; + +/** + * + * A representation of the model object 'Location Reference Decoding Service Listener'. + * + * + * + * @see org.genivi.locref.locrefPackage#getLocationReferenceDecodingServiceListener() + * @model + * @generated + */ +public interface LocationReferenceDecodingServiceListener extends EObject { + /** + * + * + * @model locationRequired="true" + * @generated + */ + void decodeReply(Location location, LocationInfo locationInfo); + + /** + * + * + * @model + * @generated + */ + void getLanguageReply(String languageCode, String countryCode); + +} // LocationReferenceDecodingServiceListener diff --git a/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/LocationReferenceType.java b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/LocationReferenceType.java new file mode 100755 index 0000000..418f2a0 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/LocationReferenceType.java @@ -0,0 +1,215 @@ +/** + * + * 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.locref; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Location Reference Type', + * and utility methods for working with them. + * + * @see org.genivi.locref.locrefPackage#getLocationReferenceType() + * @model + * @generated + */ +public enum LocationReferenceType implements Enumerator { + /** + * The 'TMC LOC' literal object. + * + * + * @see #TMC_LOC_VALUE + * @generated + * @ordered + */ + TMC_LOC(1, "TMC_LOC", "TMC_LOC"), + + /** + * The 'OPEN LR' literal object. + * + * + * @see #OPEN_LR_VALUE + * @generated + * @ordered + */ + OPEN_LR(2, "OPEN_LR", "OPEN_LR"); + + /** + * The 'TMC LOC' literal value. + * + *+ * If the meaning of 'TMC LOC' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #TMC_LOC + * @model + * @generated + * @ordered + */ + public static final int TMC_LOC_VALUE = 1; + + /** + * The 'OPEN LR' literal value. + * + *+ * If the meaning of 'OPEN LR' literal object isn't clear, + * there really should be more of a description here... + *
+ * + * @see #OPEN_LR + * @model + * @generated + * @ordered + */ + public static final int OPEN_LR_VALUE = 2; + + /** + * An array of all the 'Location Reference Type' enumerators. + * + * + * @generated + */ + private static final LocationReferenceType[] VALUES_ARRAY = + new LocationReferenceType[] { + TMC_LOC, + OPEN_LR, + }; + + /** + * A public read-only list of all the 'Location Reference Type' enumerators. + * + * + * @generated + */ + public static final List+ *
+ * + * @generated + */ +public class LocationReferenceDecodingServiceImpl extends EObjectImpl implements LocationReferenceDecodingService { + /** + * + * + * @generated + */ + protected LocationReferenceDecodingServiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return locrefPackage.Literals.LOCATION_REFERENCE_DECODING_SERVICE; + } + + /** + * + * + * @generated + */ + public void decode(LocationReferenceDecodingServiceListener listener, LocationReference locationReference) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void setLanguage(String languageCode, String countryCode) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void getLanguage(LocationReferenceDecodingServiceListener listener) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + +} //LocationReferenceDecodingServiceImpl diff --git a/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/impl/LocationReferenceDecodingServiceListenerImpl.java b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/impl/LocationReferenceDecodingServiceListenerImpl.java new file mode 100755 index 0000000..eeb31f3 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/impl/LocationReferenceDecodingServiceListenerImpl.java @@ -0,0 +1,73 @@ +/** + * + * 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.locref.impl; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.genivi.location.Location; + +import org.genivi.location.LocationInfo; +import org.genivi.locref.LocationReferenceDecodingServiceListener; +import org.genivi.locref.locrefPackage; + +/** + * + * An implementation of the model object 'Location Reference Decoding Service Listener'. + * + *+ *
+ * + * @generated + */ +public class LocationReferenceDecodingServiceListenerImpl extends EObjectImpl implements LocationReferenceDecodingServiceListener { + /** + * + * + * @generated + */ + protected LocationReferenceDecodingServiceListenerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return locrefPackage.Literals.LOCATION_REFERENCE_DECODING_SERVICE_LISTENER; + } + + /** + * + * + * @generated + */ + public void decodeReply(Location location, LocationInfo locationInfo) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + public void getLanguageReply(String languageCode, String countryCode) { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + +} //LocationReferenceDecodingServiceListenerImpl diff --git a/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/impl/LocationReferenceImpl.java b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/impl/LocationReferenceImpl.java new file mode 100755 index 0000000..f5f7411 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/impl/LocationReferenceImpl.java @@ -0,0 +1,292 @@ +/** + * + * 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.locref.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.genivi.locref.LocationReference; +import org.genivi.locref.locrefPackage; + +/** + * + * An implementation of the model object 'Location Reference'. + * + *+ * The following features are implemented: + *
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. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.genivi.locref.locrefPackage#eNS_URI + * @see #init() + * @generated + */ + private locrefPackageImpl() { + super(eNS_URI, locrefFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *
This method is used to initialize {@link locrefPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static locrefPackage init() { + if (isInited) return (locrefPackage)EPackage.Registry.INSTANCE.getEPackage(locrefPackage.eNS_URI); + + // Obtain or create and register package + locrefPackageImpl thelocrefPackage = (locrefPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof locrefPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new locrefPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + LocationPackage.eINSTANCE.eClass(); + CommonPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + thelocrefPackage.createPackageContents(); + + // Initialize created meta-data + thelocrefPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + thelocrefPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(locrefPackage.eNS_URI, thelocrefPackage); + return thelocrefPackage; + } + + /** + * + * + * @generated + */ + public EClass getLocationReference() { + return locationReferenceEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLocationReference_Data() { + return (EAttribute)locationReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLocationReference_LocationReferenceType() { + return (EAttribute)locationReferenceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getLocationReferenceDecodingService() { + return locationReferenceDecodingServiceEClass; + } + + /** + * + * + * @generated + */ + public EClass getLocationReferenceDecodingServiceListener() { + return locationReferenceDecodingServiceListenerEClass; + } + + /** + * + * + * @generated + */ + public EEnum getLocationReferenceType() { + return locationReferenceTypeEEnum; + } + + /** + * + * + * @generated + */ + public locrefFactory getlocrefFactory() { + return (locrefFactory)getEFactoryInstance(); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + locationReferenceEClass = createEClass(LOCATION_REFERENCE); + createEAttribute(locationReferenceEClass, LOCATION_REFERENCE__DATA); + createEAttribute(locationReferenceEClass, LOCATION_REFERENCE__LOCATION_REFERENCE_TYPE); + + locationReferenceDecodingServiceEClass = createEClass(LOCATION_REFERENCE_DECODING_SERVICE); + + locationReferenceDecodingServiceListenerEClass = createEClass(LOCATION_REFERENCE_DECODING_SERVICE_LISTENER); + + // Create enums + locationReferenceTypeEEnum = createEEnum(LOCATION_REFERENCE_TYPE); + } + + /** + * + * + * @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. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + LocationPackage theLocationPackage = (LocationPackage)EPackage.Registry.INSTANCE.getEPackage(LocationPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + + // Initialize classes and features; add operations and parameters + initEClass(locationReferenceEClass, LocationReference.class, "LocationReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLocationReference_Data(), ecorePackage.getEJavaObject(), "data", null, 1, 1, LocationReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLocationReference_LocationReferenceType(), ecorePackage.getEByte(), "locationReferenceType", null, 1, 1, LocationReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(locationReferenceDecodingServiceEClass, LocationReferenceDecodingService.class, "LocationReferenceDecodingService", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + EOperation op = addEOperation(locationReferenceDecodingServiceEClass, null, "decode", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, this.getLocationReferenceDecodingServiceListener(), "listener", 1, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, this.getLocationReference(), "locationReference", 1, 1, IS_UNIQUE, IS_ORDERED); + + op = addEOperation(locationReferenceDecodingServiceEClass, null, "setLanguage", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "languageCode", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "countryCode", 0, 1, IS_UNIQUE, IS_ORDERED); + + op = addEOperation(locationReferenceDecodingServiceEClass, null, "getLanguage", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, this.getLocationReferenceDecodingServiceListener(), "listener", 0, 1, IS_UNIQUE, IS_ORDERED); + + initEClass(locationReferenceDecodingServiceListenerEClass, LocationReferenceDecodingServiceListener.class, "LocationReferenceDecodingServiceListener", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + op = addEOperation(locationReferenceDecodingServiceListenerEClass, null, "decodeReply", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, theLocationPackage.getLocation(), "location", 1, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, theLocationPackage.getLocationInfo(), "locationInfo", 0, 1, IS_UNIQUE, IS_ORDERED); + + op = addEOperation(locationReferenceDecodingServiceListenerEClass, null, "getLanguageReply", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "languageCode", 0, 1, IS_UNIQUE, IS_ORDERED); + addEParameter(op, ecorePackage.getEString(), "countryCode", 0, 1, IS_UNIQUE, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(locationReferenceTypeEEnum, LocationReferenceType.class, "LocationReferenceType"); + addEEnumLiteral(locationReferenceTypeEEnum, LocationReferenceType.TMC_LOC); + addEEnumLiteral(locationReferenceTypeEEnum, LocationReferenceType.OPEN_LR); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // GenModel + createGenModelAnnotations(); + } + + /** + * Initializes the annotations for GenModel. + * + * + * @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/." + }); + } + +} //locrefPackageImpl diff --git a/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/locrefFactory.java b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/locrefFactory.java new file mode 100755 index 0000000..d473fb6 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/locrefFactory.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.locref; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.genivi.locref.locrefPackage + * @generated + */ +public interface locrefFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + locrefFactory eINSTANCE = org.genivi.locref.impl.locrefFactoryImpl.init(); + + /** + * Returns a new object of class 'Location Reference'. + * + * + * @return a new object of class 'Location Reference'. + * @generated + */ + LocationReference createLocationReference(); + + /** + * Returns a new object of class 'Location Reference Decoding Service'. + * + * + * @return a new object of class 'Location Reference Decoding Service'. + * @generated + */ + LocationReferenceDecodingService createLocationReferenceDecodingService(); + + /** + * Returns a new object of class 'Location Reference Decoding Service Listener'. + * + * + * @return a new object of class 'Location Reference Decoding Service Listener'. + * @generated + */ + LocationReferenceDecodingServiceListener createLocationReferenceDecodingServiceListener(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + locrefPackage getlocrefPackage(); + +} //locrefFactory diff --git a/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/locrefPackage.java b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/locrefPackage.java new file mode 100755 index 0000000..16c5e93 --- /dev/null +++ b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/locrefPackage.java @@ -0,0 +1,295 @@ +/** + * + * 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.locref; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
createXXX
method for each class of the model.
+ *
+ * @see org.genivi.locref.locrefPackage
+ * @generated
+ */
+public class locrefAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static locrefPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public locrefAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = locrefPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ *
+ * This implementation returns true
if the object is either the model's package or is an instance object of the model.
+ *
+ * @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 createXXX
methods.
+ *
+ *
+ * @generated
+ */
+ protected locrefSwitchtarget
.
+ *
+ *
+ * @param target the object to adapt.
+ * @return the adapter for the target
.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.locref.LocationReference Location Reference}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.locref.LocationReference
+ * @generated
+ */
+ public Adapter createLocationReferenceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.locref.LocationReferenceDecodingService Location Reference Decoding Service}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.locref.LocationReferenceDecodingService
+ * @generated
+ */
+ public Adapter createLocationReferenceDecodingServiceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.genivi.locref.LocationReferenceDecodingServiceListener Location Reference Decoding Service Listener}'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.genivi.locref.LocationReferenceDecodingServiceListener
+ * @generated
+ */
+ public Adapter createLocationReferenceDecodingServiceListenerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ *
+ * This default implementation returns null.
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //locrefAdapterFactory
diff --git a/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/util/locrefSwitch.java b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/util/locrefSwitch.java
new file mode 100755
index 0000000..7bbd7f1
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.locref-model/src/org/genivi/locref/util/locrefSwitch.java
@@ -0,0 +1,159 @@
+/**
+ *
+ * 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.locref.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.genivi.locref.*;
+
+/**
+ *
+ * The Switch for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the caseXXX
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.
+ *
+ * @see org.genivi.locref.locrefPackage
+ * @generated
+ */
+public class locrefSwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case locrefPackage.LOCATION_REFERENCE: {
+ LocationReference locationReference = (LocationReference)theEObject;
+ T result = caseLocationReference(locationReference);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case locrefPackage.LOCATION_REFERENCE_DECODING_SERVICE: {
+ LocationReferenceDecodingService locationReferenceDecodingService = (LocationReferenceDecodingService)theEObject;
+ T result = caseLocationReferenceDecodingService(locationReferenceDecodingService);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case locrefPackage.LOCATION_REFERENCE_DECODING_SERVICE_LISTENER: {
+ LocationReferenceDecodingServiceListener locationReferenceDecodingServiceListener = (LocationReferenceDecodingServiceListener)theEObject;
+ T result = caseLocationReferenceDecodingServiceListener(locationReferenceDecodingServiceListener);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Location Reference'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Location Reference'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLocationReference(LocationReference object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Location Reference Decoding Service'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Location Reference Decoding Service'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLocationReferenceDecodingService(LocationReferenceDecodingService object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Location Reference Decoding Service Listener'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Location Reference Decoding Service Listener'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLocationReferenceDecodingServiceListener(LocationReferenceDecodingServiceListener object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'EObject'.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'EObject'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //locrefSwitch
diff --git a/src/traffic-incidents-service/org.genivi.trafficincidentsservice.dbus.impl/.classpath b/src/traffic-incidents-service/org.genivi.trafficincidentsservice.dbus.impl/.classpath
new file mode 100755
index 0000000..f6a3397
--- /dev/null
+++ b/src/traffic-incidents-service/org.genivi.trafficincidentsservice.dbus.impl/.classpath
@@ -0,0 +1,30 @@
+
+