From a8f636b2586314abde7bab7bf348a91acdfde436 Mon Sep 17 00:00:00 2001 From: BOLLE Sebastien Date: Mon, 8 Oct 2018 17:54:11 +0200 Subject: Squash of Orange's commit. This commit contains: - sonar: perform sonar checking during build phase - commons, all: modified custom attributes (added type & long name). - commons: new FlexContainer classes for devices & modules, SDT V3.7. - ipe.sdt, sample.sdt: adapted SDT data model to SDT version 3.7 - SDT: New modules & devices. - commons: fix issue regarding CustomAttribute - sdt.ipe: log out in case of unknown custom attributes - datamapping.jaxb: add some unitary tests. - app.home.monitoring: fix issue with camera url. - sdt.api: fix Array issue. - sdt.ipe: code cleanup - resourcebrowser.json: handle list of dacis - home.application.authentication.service: initial import. - home.monitoring.app: use external identity provider. - binding.http: handle Authorization header (basic & bearer) - core, commons: handle Tokens with DAS. - home.monitoring.app: retrieve end user info. - sdt.home.monitoring: add new features. - sdt.home.driver: update apache log4j logger - sdt.lifx: fix issue with set colors methods. - sdt.home.app.auth.service: update AuthenticationService api. - commons: add DasInfo & DynAuthTokenReqInfo class - datamapping.jaxb: add unitary test for DynAuthTokenReqInfo. - core: return a DynAuthTokenReqInfo if DynAuth failed - core: adapt result list with the caller access rights. - binding.http: introduce X-M2M-Token header. - sdt.homemonitoring.app: use servlet HttpSession to manage session. - all: deletion of .classpath and .project files from repository - sdt.homemonitoring.auth.service: add sessionId parameter - all: update .gitignore file - Manage several IdP services. - core: avoid duplicate key violation on FlexContainer-DAC association - sdt.home.application: use grey background color for non-granted devices - Code cleanup and simplification - Fixed Bug 539351 - Wrong short names for mgmtObj attributes - Bug fix: missing handling of objectIDs & objectPaths in MgmtObj, listOfNeighbors in AreaNwkDeviceInfo and listOfDevices in AreaNwkInfo. - Bug fixes: mapping labels / Annc resources. - Allow adding new labels when updating flex containers. - Code cleanup. - More flexible user information. Signed-off-by: BOLLE Sebastien --- .gitignore | 5 +- .gitlab-ci.yml | 9 +- .project | 17 - com.orange.om2m.p2.repo/.project | 17 - com.orange.om2m.p2.repo/category.xml | 3 + org.eclipse.om2m.android.dashboard/.classpath | 34 - org.eclipse.om2m.android.dashboard/.project | 46 - org.eclipse.om2m.binding.coap/.classpath | 9 - org.eclipse.om2m.binding.coap/.project | 34 - org.eclipse.om2m.binding.http/.classpath | 7 - org.eclipse.om2m.binding.http/.project | 34 - .../eclipse/om2m/binding/http/RestHttpServlet.java | 41 +- .../om2m/binding/http/constants/HttpHeaders.java | 90 +- org.eclipse.om2m.binding.mqtt/.classpath | 8 - org.eclipse.om2m.binding.mqtt/.project | 34 - org.eclipse.om2m.binding.service/.classpath | 7 - org.eclipse.om2m.binding.service/.project | 34 - org.eclipse.om2m.commons.logging/.classpath | 7 - org.eclipse.om2m.commons.logging/.project | 34 - org.eclipse.om2m.commons/.classpath | 8 - org.eclipse.om2m.commons/.project | 34 - .../eclipse/om2m/commons/constants/ShortName.java | 34 +- .../om2m/commons/entities/CSEBaseEntity.java | 2 +- .../om2m/commons/entities/ContainerEntity.java | 894 ++++++------- .../commons/entities/CustomAttributeEntity.java | 43 +- .../om2m/commons/entities/FlexContainerEntity.java | 10 +- .../om2m/commons/entities/RemoteCSEEntity.java | 2 +- .../om2m/commons/entities/ResourceEntity.java | 27 +- .../commons/exceptions/AccessDeniedException.java | 106 +- .../java/org/eclipse/om2m/commons/resource/AE.java | 337 +++-- .../org/eclipse/om2m/commons/resource/AEAnnc.java | 335 +++-- .../commons/resource/AbstractFlexContainer.java | 169 ++- .../resource/AbstractFlexContainerAnnc.java | 249 ++-- .../eclipse/om2m/commons/resource/Container.java | 166 ++- .../om2m/commons/resource/CustomAttribute.java | 40 +- .../commons/resource/CustomAttributeAdapter.java | 70 +- .../org/eclipse/om2m/commons/resource/DasInfo.java | 38 + .../om2m/commons/resource/DynAuthDasRequest.java | 18 +- .../om2m/commons/resource/DynAuthTokenReqInfo.java | 37 + .../om2m/commons/resource/RequestPrimitive.java | 13 +- .../om2m/commons/resource/ResponsePrimitive.java | 12 + .../AcousticSensorFlexContainer.java | 58 + .../AcousticSensorFlexContainerAnnc.java | 47 + .../ActivateClockTimerFlexContainer.java | 13 +- .../ActivateClockTimerFlexContainerAnnc.java | 15 +- .../AirConJobModeFlexContainer.java | 63 + .../AirConJobModeFlexContainerAnnc.java | 47 + .../flexcontainerspec/AirFlowFlexContainer.java | 88 ++ .../AirFlowFlexContainerAnnc.java | 47 + .../AirPurifierJobModeFlexContainer.java | 63 + .../AirPurifierJobModeFlexContainerAnnc.java | 47 + .../AirQualitySensorFlexContainer.java | 98 ++ .../AirQualitySensorFlexContainerAnnc.java | 47 + .../AlarmSpeakerFlexContainer.java | 33 +- .../AlarmSpeakerFlexContainerAnnc.java | 15 +- .../flexcontainerspec/AnemometerFlexContainer.java | 53 + .../AnemometerFlexContainerAnnc.java | 47 + .../flexcontainerspec/AnswerFlexContainer.java | 46 + .../flexcontainerspec/AnswerFlexContainerAnnc.java | 46 + .../AudioVolumeFlexContainer.java | 85 +- .../AudioVolumeFlexContainerAnnc.java | 32 +- .../AutoDocumentFeederFlexContainer.java | 58 + .../AutoDocumentFeederFlexContainerAnnc.java | 47 + .../flexcontainerspec/BarometerFlexContainer.java | 68 + .../BarometerFlexContainerAnnc.java | 47 + .../flexcontainerspec/BatteryFlexContainer.java | 65 +- .../BatteryFlexContainerAnnc.java | 17 +- .../BinaryObjectFlexContainer.java | 68 + .../BinaryObjectFlexContainerAnnc.java | 47 + .../BinarySwitchFlexContainer.java | 49 +- .../BinarySwitchFlexContainerAnnc.java | 22 +- ...ioElectricalImpedanceAnalysisFlexContainer.java | 53 +- ...ectricalImpedanceAnalysisFlexContainerAnnc.java | 15 +- .../BodyCompositionAnalyserFlexContainer.java | 83 ++ .../BodyCompositionAnalyserFlexContainerAnnc.java | 47 + .../flexcontainerspec/BoilerFlexContainer.java | 23 +- .../flexcontainerspec/BoilerFlexContainerAnnc.java | 15 +- .../flexcontainerspec/BrewingFlexContainer.java | 28 +- .../BrewingFlexContainerAnnc.java | 15 +- .../flexcontainerspec/BrightnessFlexContainer.java | 23 +- .../BrightnessFlexContainerAnnc.java | 15 +- .../flexcontainerspec/CallFlexContainer.java | 46 + .../flexcontainerspec/CallFlexContainerAnnc.java | 46 + .../flexcontainerspec/ClockFlexContainer.java | 33 +- .../flexcontainerspec/ClockFlexContainerAnnc.java | 15 +- .../flexcontainerspec/CloseFlexContainer.java | 46 + .../flexcontainerspec/CloseFlexContainerAnnc.java | 46 + .../ClothesDryerJobModeFlexContainer.java | 58 + .../ClothesDryerJobModeFlexContainerAnnc.java | 47 + .../ClothesWasherDryerJobModeFlexContainer.java | 63 + ...ClothesWasherDryerJobModeFlexContainerAnnc.java | 47 + .../ClothesWasherJobModeFlexContainer.java | 63 + .../ClothesWasherJobModeFlexContainerAnnc.java | 47 + .../ClothesWasherJobModeOptionFlexContainer.java | 88 ++ ...lothesWasherJobModeOptionFlexContainerAnnc.java | 47 + .../flexcontainerspec/ColourFlexContainer.java | 33 +- .../flexcontainerspec/ColourFlexContainerAnnc.java | 15 +- .../ColourSaturationFlexContainer.java | 23 +- .../ColourSaturationFlexContainerAnnc.java | 15 +- .../ContactSensorFlexContainer.java | 23 +- .../ContactSensorFlexContainerAnnc.java | 15 +- .../CookerHoodJobModeFlexContainer.java | 63 + .../CookerHoodJobModeFlexContainerAnnc.java | 47 + .../CredentialsFlexContainer.java | 63 + .../CredentialsFlexContainerAnnc.java | 47 + .../DeactivateClockTimerFlexContainer.java | 13 +- .../DeactivateClockTimerFlexContainerAnnc.java | 15 +- .../DecrementNumberValueFlexContainer.java | 13 +- .../DecrementNumberValueFlexContainerAnnc.java | 15 +- .../DehumidifierJobModeFlexContainer.java | 63 + .../DehumidifierJobModeFlexContainerAnnc.java | 47 + .../DeviceAirConditionerFlexContainer.java | 190 ++- .../DeviceAirConditionerFlexContainerAnnc.java | 292 +++-- .../DeviceAirPurifierFlexContainer.java | 183 +++ .../DeviceAirPurifierFlexContainerAnnc.java | 286 +++++ .../DeviceAirQualityMonitorFlexContainer.java | 64 + .../DeviceAirQualityMonitorFlexContainerAnnc.java | 82 ++ .../DeviceAudioReceiverFlexContainer.java | 115 ++ .../DeviceAudioReceiverFlexContainerAnnc.java | 116 ++ .../DeviceBloodPressureMonitorFlexContainer.java | 81 ++ ...eviceBloodPressureMonitorFlexContainerAnnc.java | 116 ++ .../DeviceCameraFlexContainer.java | 86 +- .../DeviceCameraFlexContainerAnnc.java | 161 ++- .../DeviceClothesDryerFlexContainer.java | 115 ++ .../DeviceClothesDryerFlexContainerAnnc.java | 150 +++ .../DeviceClothesWasherDryerFlexContainer.java | 166 +++ .../DeviceClothesWasherDryerFlexContainerAnnc.java | 252 ++++ .../DeviceClothesWasherFlexContainer.java | 184 ++- .../DeviceClothesWasherFlexContainerAnnc.java | 358 ++---- .../DeviceCoffeeMachineFlexContainer.java | 172 ++- .../DeviceCoffeeMachineFlexContainerAnnc.java | 350 +---- .../DeviceContactDetectorFlexContainer.java | 22 +- .../DeviceContactDetectorFlexContainerAnnc.java | 31 +- .../DeviceCookerHoodFlexContainer.java | 115 ++ .../DeviceCookerHoodFlexContainerAnnc.java | 184 +++ .../DeviceCooktopFlexContainer.java | 149 +++ .../DeviceCooktopFlexContainerAnnc.java | 48 + .../DeviceDehumidifierFlexContainer.java | 166 +++ .../DeviceDehumidifierFlexContainerAnnc.java | 252 ++++ .../DeviceDishWasherFlexContainer.java | 98 ++ .../DeviceDishWasherFlexContainerAnnc.java | 150 +++ .../flexcontainerspec/DeviceDoorFlexContainer.java | 78 +- .../DeviceDoorFlexContainerAnnc.java | 119 +- .../DeviceDoorLockFlexContainer.java | 98 ++ .../DeviceDoorLockFlexContainerAnnc.java | 116 ++ .../DeviceElectricVehicleChargerFlexContainer.java | 58 +- ...iceElectricVehicleChargerFlexContainerAnnc.java | 119 +- .../flexcontainerspec/DeviceFanFlexContainer.java | 64 + .../DeviceFanFlexContainerAnnc.java | 82 ++ .../DeviceFloodDetectorFlexContainer.java | 20 +- .../DeviceFloodDetectorFlexContainerAnnc.java | 29 +- .../DeviceFoodProbeFlexContainer.java | 64 + .../DeviceFoodProbeFlexContainerAnnc.java | 82 ++ .../DeviceFreezerFlexContainer.java | 64 + .../DeviceFreezerFlexContainerAnnc.java | 82 ++ .../DeviceGasValveFlexContainer.java | 58 +- .../DeviceGasValveFlexContainerAnnc.java | 104 +- .../DeviceGlucosemeterFlexContainer.java | 81 ++ .../DeviceGlucosemeterFlexContainerAnnc.java | 116 ++ .../DeviceHeartRateMonitorFlexContainer.java | 81 ++ .../DeviceHeartRateMonitorFlexContainerAnnc.java | 116 ++ .../DeviceHomeCCTVFlexContainer.java | 251 ++++ .../DeviceHomeCCTVFlexContainerAnnc.java | 456 +++++++ .../DeviceHumidifierFlexContainer.java | 64 + .../DeviceHumidifierFlexContainerAnnc.java | 82 ++ .../DeviceKettleFlexContainer.java | 132 ++ .../DeviceKettleFlexContainerAnnc.java | 150 +++ .../DeviceLightFlexContainer.java | 65 +- .../DeviceLightFlexContainerAnnc.java | 134 +- .../DeviceMicrogenerationFlexContainer.java | 55 +- .../DeviceMicrogenerationFlexContainerAnnc.java | 108 +- .../DeviceMotionDetectorFlexContainer.java | 20 +- .../DeviceMotionDetectorFlexContainerAnnc.java | 29 +- .../DeviceMultiFunctionPrinterFlexContainer.java | 132 ++ ...eviceMultiFunctionPrinterFlexContainerAnnc.java | 150 +++ .../DeviceNumberDeviceFlexContainer.java | 66 - .../DeviceNumberDeviceFlexContainerAnnc.java | 85 -- .../DeviceOutdoorLampFlexContainer.java | 166 +++ .../DeviceOutdoorLampFlexContainerAnnc.java | 286 +++++ .../flexcontainerspec/DeviceOvenFlexContainer.java | 53 +- .../DeviceOvenFlexContainerAnnc.java | 106 +- .../DevicePrinterFlexContainer.java | 98 ++ .../DevicePrinterFlexContainerAnnc.java | 150 +++ .../DevicePulseOximeterFlexContainer.java | 98 ++ .../DevicePulseOximeterFlexContainerAnnc.java | 150 +++ .../DeviceRefrigeratorFlexContainer.java | 116 +- .../DeviceRefrigeratorFlexContainerAnnc.java | 66 +- .../DeviceRobotCleanerFlexContainer.java | 81 +- .../DeviceRobotCleanerFlexContainerAnnc.java | 132 +- .../DeviceScannerFlexContainer.java | 98 ++ .../DeviceScannerFlexContainerAnnc.java | 150 +++ .../DeviceSecurityPanelFlexContainer.java | 64 + .../DeviceSecurityPanelFlexContainerAnnc.java | 82 ++ .../DeviceSetTopBoxFlexContainer.java | 132 ++ .../DeviceSetTopBoxFlexContainerAnnc.java | 116 ++ .../DeviceSmartElectricMeterFlexContainer.java | 63 +- .../DeviceSmartElectricMeterFlexContainerAnnc.java | 132 +- .../DeviceSmartPlugFlexContainer.java | 98 ++ .../DeviceSmartPlugFlexContainerAnnc.java | 150 +++ .../DeviceSmokeDetectorFlexContainer.java | 20 +- .../DeviceSmokeDetectorFlexContainerAnnc.java | 29 +- .../DeviceSteamClosetFlexContainer.java | 115 ++ .../DeviceSteamClosetFlexContainerAnnc.java | 150 +++ .../DeviceStorageBatteryFlexContainer.java | 55 +- .../DeviceStorageBatteryFlexContainerAnnc.java | 108 +- .../DeviceSwitchFlexContainer.java | 64 + .../DeviceSwitchFlexContainerAnnc.java | 82 ++ .../DeviceTelevisionFlexContainer.java | 85 +- .../DeviceTelevisionFlexContainerAnnc.java | 108 +- .../DeviceTemperatureDetectorFlexContainer.java | 38 +- ...DeviceTemperatureDetectorFlexContainerAnnc.java | 66 +- .../DeviceThermometerFlexContainer.java | 81 ++ .../DeviceThermometerFlexContainerAnnc.java | 116 ++ .../DeviceThermostatFlexContainer.java | 50 +- .../DeviceThermostatFlexContainerAnnc.java | 95 +- .../DeviceThreeDPrinterFlexContainer.java | 149 +++ .../DeviceThreeDPrinterFlexContainerAnnc.java | 252 ++++ .../DeviceWarningFlexContainer.java | 81 ++ .../DeviceWarningFlexContainerAnnc.java | 116 ++ .../DeviceWaterHeaterFlexContainer.java | 63 +- .../DeviceWaterHeaterFlexContainerAnnc.java | 132 +- .../DeviceWaterValveFlexContainer.java | 40 +- .../DeviceWaterValveFlexContainerAnnc.java | 69 +- .../DeviceWeatherStationFlexContainer.java | 166 ++- .../DeviceWeatherStationFlexContainerAnnc.java | 281 ++-- ...aleAndBodyCompositionAnalyserFlexContainer.java | 115 ++ ...ndBodyCompositionAnalyserFlexContainerAnnc.java | 184 +++ .../DeviceWindowShadeFlexContainer.java | 81 ++ .../DeviceWindowShadeFlexContainerAnnc.java | 116 ++ .../DishWasherJobModeFlexContainer.java | 63 + .../DishWasherJobModeFlexContainerAnnc.java | 47 + .../flexcontainerspec/DoorStatusFlexContainer.java | 33 +- .../DoorStatusFlexContainerAnnc.java | 15 +- .../DownChannelFlexContainer.java | 15 +- .../DownChannelFlexContainerAnnc.java | 17 +- .../flexcontainerspec/DownVolumeFlexContainer.java | 13 +- .../DownVolumeFlexContainerAnnc.java | 15 +- .../ElectricVehicleConnectorFlexContainer.java | 33 +- .../ElectricVehicleConnectorFlexContainerAnnc.java | 15 +- .../EnergyConsumptionFlexContainer.java | 63 +- .../EnergyConsumptionFlexContainerAnnc.java | 15 +- .../EnergyGenerationFlexContainer.java | 43 +- .../EnergyGenerationFlexContainerAnnc.java | 15 +- .../FaultDetectionFlexContainer.java | 33 +- .../FaultDetectionFlexContainerAnnc.java | 15 +- .../flexcontainerspec/FilterInfoFlexContainer.java | 63 + .../FilterInfoFlexContainerAnnc.java | 47 + .../flexcontainerspec/FlexContainerFactory.java | 398 +----- .../flexcontainerspec/FoamingFlexContainer.java | 23 +- .../FoamingFlexContainerAnnc.java | 15 +- .../GeoLocationFlexContainer.java | 98 ++ .../GeoLocationFlexContainerAnnc.java | 47 + .../flexcontainerspec/GlucometerFlexContainer.java | 98 ++ .../GlucometerFlexContainerAnnc.java | 47 + .../flexcontainerspec/GrinderFlexContainer.java | 33 +- .../GrinderFlexContainerAnnc.java | 15 +- .../flexcontainerspec/HangupFlexContainer.java | 46 + .../flexcontainerspec/HangupFlexContainerAnnc.java | 46 + .../HeatingZoneFlexContainer.java | 58 + .../HeatingZoneFlexContainerAnnc.java | 47 + .../flexcontainerspec/HeightFlexContainer.java | 23 +- .../flexcontainerspec/HeightFlexContainerAnnc.java | 15 +- .../HotWaterSupplyFlexContainer.java | 23 +- .../HotWaterSupplyFlexContainerAnnc.java | 15 +- .../ImpactSensorFlexContainer.java | 68 + .../ImpactSensorFlexContainerAnnc.java | 47 + .../IncrementNumberValueFlexContainer.java | 13 +- .../IncrementNumberValueFlexContainerAnnc.java | 15 +- .../flexcontainerspec/KeepWarmFlexContainer.java | 23 +- .../KeepWarmFlexContainerAnnc.java | 15 +- .../flexcontainerspec/KeypadFlexContainer.java | 23 +- .../flexcontainerspec/KeypadFlexContainerAnnc.java | 15 +- .../LiquidLevelFlexContainer.java | 23 +- .../LiquidLevelFlexContainerAnnc.java | 15 +- .../LiquidRemainingFlexContainer.java | 53 + .../LiquidRemainingFlexContainerAnnc.java | 47 + .../flexcontainerspec/LockFlexContainer.java | 23 +- .../flexcontainerspec/LockFlexContainerAnnc.java | 15 +- .../MediaSelectFlexContainer.java | 73 ++ .../MediaSelectFlexContainerAnnc.java | 47 + .../MotionSensorFlexContainer.java | 33 +- .../MotionSensorFlexContainerAnnc.java | 15 +- .../flexcontainerspec/NextTrackFlexContainer.java | 46 + .../NextTrackFlexContainerAnnc.java | 46 + .../NumberValueFlexContainer.java | 115 +- .../NumberValueFlexContainerAnnc.java | 48 +- .../resource/flexcontainerspec/ObjectFactory.java | 1335 +++++++++++++++----- .../flexcontainerspec/OpenFlexContainer.java | 46 + .../flexcontainerspec/OpenFlexContainerAnnc.java | 46 + .../flexcontainerspec/OpenLevelFlexContainer.java | 103 ++ .../OpenLevelFlexContainerAnnc.java | 80 ++ .../OperationModeFlexContainer.java | 53 + .../OperationModeFlexContainerAnnc.java | 47 + .../OvercurrentSensorFlexContainer.java | 63 + .../OvercurrentSensorFlexContainerAnnc.java | 47 + .../flexcontainerspec/OximeterFlexContainer.java | 23 +- .../OximeterFlexContainerAnnc.java | 15 +- .../flexcontainerspec/OzoneMeterFlexContainer.java | 68 + .../OzoneMeterFlexContainerAnnc.java | 47 + .../PersonSensorFlexContainer.java | 23 +- .../PersonSensorFlexContainerAnnc.java | 15 +- .../flexcontainerspec/PhoneCallFlexContainer.java | 115 ++ .../PhoneCallFlexContainerAnnc.java | 96 ++ .../PlayerControlFlexContainer.java | 103 ++ .../PlayerControlFlexContainerAnnc.java | 80 ++ .../flexcontainerspec/PowerSaveFlexContainer.java | 25 +- .../PowerSaveFlexContainerAnnc.java | 17 +- .../PreviousTrackFlexContainer.java | 46 + .../PreviousTrackFlexContainerAnnc.java | 46 + .../flexcontainerspec/PrintQueueFlexContainer.java | 58 + .../PrintQueueFlexContainerAnnc.java | 47 + .../flexcontainerspec/PulsemeterFlexContainer.java | 68 + .../PulsemeterFlexContainerAnnc.java | 47 + .../flexcontainerspec/PushButtonFlexContainer.java | 23 +- .../PushButtonFlexContainerAnnc.java | 15 +- .../flexcontainerspec/RecorderFlexContainer.java | 23 +- .../RecorderFlexContainerAnnc.java | 15 +- .../RefrigerationFlexContainer.java | 33 +- .../RefrigerationFlexContainerAnnc.java | 15 +- .../RelativeHumidityFlexContainer.java | 28 +- .../RelativeHumidityFlexContainerAnnc.java | 15 +- .../RemoteControlEnableFlexContainer.java | 53 + .../RemoteControlEnableFlexContainerAnnc.java | 47 + .../ResetNumberValueFlexContainer.java | 13 +- .../ResetNumberValueFlexContainerAnnc.java | 15 +- .../ResetTextMessageFlexContainer.java | 46 + .../ResetTextMessageFlexContainerAnnc.java | 46 + .../RobotCleanerJobModeFlexContainer.java | 63 + .../RobotCleanerJobModeFlexContainerAnnc.java | 47 + .../flexcontainerspec/RunStateFlexContainer.java | 73 ++ .../RunStateFlexContainerAnnc.java | 47 + .../SecurityModeFlexContainer.java | 58 + .../SecurityModeFlexContainerAnnc.java | 47 + .../SessionDescriptionFlexContainer.java | 58 + .../SessionDescriptionFlexContainerAnnc.java | 47 + .../SignalStrengthFlexContainer.java | 28 +- .../SignalStrengthFlexContainerAnnc.java | 15 +- .../SmokeSensorFlexContainer.java | 38 +- .../SmokeSensorFlexContainerAnnc.java | 15 +- .../SphygmomanometerFlexContainer.java | 63 + .../SphygmomanometerFlexContainerAnnc.java | 47 + .../flexcontainerspec/SpinLevelFlexContainer.java | 23 +- .../SpinLevelFlexContainerAnnc.java | 15 +- .../Start3DprintFlexContainer.java | 46 + .../Start3DprintFlexContainerAnnc.java | 46 + .../SteamClosetJobModeFlexContainer.java | 63 + .../SteamClosetJobModeFlexContainerAnnc.java | 47 + .../Stop3DprintFlexContainer.java | 46 + .../Stop3DprintFlexContainerAnnc.java | 46 + .../TelevisionChannelFlexContainer.java | 85 +- .../TelevisionChannelFlexContainerAnnc.java | 32 +- .../TemperatureAlarmFlexContainer.java | 33 +- .../TemperatureAlarmFlexContainerAnnc.java | 15 +- .../TemperatureFlexContainer.java | 48 +- .../TemperatureFlexContainerAnnc.java | 15 +- .../TextMessageFlexContainer.java | 96 ++ .../TextMessageFlexContainerAnnc.java | 64 + .../ThreeDPrinterFlexContainer.java | 113 ++ .../ThreeDPrinterFlexContainerAnnc.java | 80 ++ .../flexcontainerspec/TimerFlexContainer.java | 105 +- .../flexcontainerspec/TimerFlexContainerAnnc.java | 32 +- .../flexcontainerspec/ToggleFlexContainer.java | 13 +- .../flexcontainerspec/ToggleFlexContainerAnnc.java | 15 +- .../flexcontainerspec/TurboFlexContainer.java | 23 +- .../flexcontainerspec/TurboFlexContainerAnnc.java | 15 +- .../flexcontainerspec/UpChannelFlexContainer.java | 15 +- .../UpChannelFlexContainerAnnc.java | 17 +- .../flexcontainerspec/UpVolumeFlexContainer.java | 15 +- .../UpVolumeFlexContainerAnnc.java | 17 +- .../flexcontainerspec/UvSensorFlexContainer.java | 58 + .../UvSensorFlexContainerAnnc.java | 47 + .../flexcontainerspec/WaterFlowFlexContainer.java | 23 +- .../WaterFlowFlexContainerAnnc.java | 15 +- .../WaterSensorFlexContainer.java | 23 +- .../WaterSensorFlexContainerAnnc.java | 15 +- .../flexcontainerspec/WeightFlexContainer.java | 23 +- .../flexcontainerspec/WeightFlexContainerAnnc.java | 15 +- .../om2m/commons/utils/CustomAttributList.java | 42 + org.eclipse.om2m.core.service/.classpath | 7 - org.eclipse.om2m.core.service/.project | 34 - org.eclipse.om2m.core/.classpath | 7 - org.eclipse.om2m.core/.project | 34 - .../om2m/core/controller/DiscoveryController.java | 34 +- .../core/controller/FlexContainerController.java | 52 +- .../DynamicAuthorizationSelector.java | 121 +- .../om2m/core/entitymapper/ContainerMapper.java | 8 +- .../core/entitymapper/FlexContainerMapper.java | 26 +- .../om2m/core/entitymapper/MgmtObjMapper.java | 44 +- .../java/org/eclipse/om2m/core/router/Router.java | 200 +-- org.eclipse.om2m.dal.driver.sample/.classpath | 7 - org.eclipse.om2m.dal.driver.sample/.project | 39 - org.eclipse.om2m.dal/.classpath | 7 - org.eclipse.om2m.dal/.project | 34 - org.eclipse.om2m.das.service/.classpath | 7 - org.eclipse.om2m.das.service/.project | 34 - org.eclipse.om2m.das.testsuite/.classpath | 7 - org.eclipse.om2m.das.testsuite/.project | 34 - .../testsuite/ae/DASServiceTest_FlexContainer.java | 4 +- .../ae/DASServiceTest_FlexContainerAnnc.java | 4 +- org.eclipse.om2m.datamapping.jaxb/.classpath | 8 - org.eclipse.om2m.datamapping.jaxb/.project | 34 - org.eclipse.om2m.datamapping.jaxb/pom.xml | 59 + .../src/main/resources/json-binding.json | 132 ++ .../src/main/resources/xml-binding.xml | 22 +- .../jaxb/MapperTestDeviceLightFlexContainer.java | 123 ++ .../jaxb/MapperTestDynAuthTokenReqInfo.java | 65 + .../om2m/datamapping/jaxb/MapperTestUrilList.java | 8 +- .../deviceLightDatashareFlexContainer.json | 84 ++ org.eclipse.om2m.datamapping.service/.classpath | 7 - org.eclipse.om2m.datamapping.service/.project | 34 - .../service/FlexContainerService.java | 2 +- org.eclipse.om2m.interworking.service/.classpath | 7 - org.eclipse.om2m.interworking.service/.project | 34 - org.eclipse.om2m.ipe.dal/.classpath | 7 - org.eclipse.om2m.ipe.dal/.project | 34 - org.eclipse.om2m.ipe.sample.sdt/.classpath | 7 - org.eclipse.om2m.ipe.sample.sdt/.project | 34 - .../eclipse/om2m/ipe/sample/sdt/model/Lamp.java | 2 +- org.eclipse.om2m.ipe.sample/.classpath | 7 - org.eclipse.om2m.ipe.sample/.project | 34 - org.eclipse.om2m.ipe.sdt.testsuite/.classpath | 7 - org.eclipse.om2m.ipe.sdt.testsuite/.project | 34 - .../eclipse/om2m/ipe/sdt/testsuite/CSEUtil.java | 3 - .../sdt/testsuite/DeviceDiscoveryTestSuite.java | 33 +- .../om2m/ipe/sdt/testsuite/SDTModuleTestSuite.java | 8 +- .../sdt/testsuite/module/AbstractModuleTest.java | 1 - .../testsuite/module/AlarmSpeakerModuleTest.java | 42 +- .../testsuite/module/BinarySwitchModuleTest.java | 6 +- .../ipe/sdt/testsuite/module/ColourModuleTest.java | 18 +- .../module/ColourSaturationModuleTest.java | 15 +- .../testsuite/module/FaultDetectionModuleTest.java | 20 +- .../sdt/testsuite/module/RunModeModuleTest.java | 307 ----- .../testsuite/module/SmokeSensorModuleTest.java | 6 +- .../sdt/testsuite/module/WaterLevelModuleTest.java | 19 +- .../testsuite/module/WaterSensorModuleTest.java | 12 +- .../subscription/SubscriptionHttpServlet.java | 1 - .../subscription/SubscriptionTestSuite.java | 13 +- .../eclipse/om2m/ipe/sdt/ModuleSDTListener.java | 4 +- .../org/eclipse/om2m/ipe/sdt/SDTActionAdaptor.java | 2 +- .../org/eclipse/om2m/ipe/sdt/SDTDeviceAdaptor.java | 11 +- .../org/eclipse/om2m/ipe/sdt/SDTModuleAdaptor.java | 36 +- .../java/org/eclipse/om2m/ipe/sdt/SDTUtil.java | 93 -- .../ActionFlexContainerService.java | 21 +- .../ModuleFlexContainerService.java | 33 +- .../.classpath | 9 - org.eclipse.om2m.persistence.eclipselink/.project | 34 - .../eclipselink/internal/dao/AeAnncDAO.java | 4 +- .../eclipselink/internal/dao/AeDAO.java | 4 +- .../internal/dao/FlexContainerAnncDAO.java | 5 +- org.eclipse.om2m.persistence.mongodb/.classpath | 9 - org.eclipse.om2m.persistence.mongodb/.project | 34 - org.eclipse.om2m.persistence.service/.classpath | 7 - org.eclipse.om2m.persistence.service/.project | 34 - org.eclipse.om2m.sdt.comparator.xml/.classpath | 7 - org.eclipse.om2m.sdt.comparator.xml/.project | 34 - org.eclipse.om2m.sdt/.project | 17 - .../main/java/org/eclipse/om2m/sdt/DataPoint.java | 25 +- .../java/org/eclipse/om2m/sdt/Identifiers.java | 6 + .../java/org/eclipse/om2m/sdt/ModuleClass.java | 14 +- .../om2m/sdt/datapoints/ArrayDataPoint.java | 4 +- .../eclipse/om2m/sdt/datapoints/EnumDataPoint.java | 2 +- .../om2m/sdt/datapoints/ValuedDataPoint.java | 4 + .../java/org/eclipse/om2m/sdt/types/Array.java | 43 +- .../java/org/eclipse/om2m/sdt/types/BasicType.java | 79 +- .../java/org/eclipse/om2m/sdt/types/DataType.java | 46 +- .../org/eclipse/om2m/sdt/types/SimpleType.java | 12 +- .../java/org/eclipse/om2m/sdt/types/Struct.java | 10 + .../.project | 17 - .../META-INF/MANIFEST.MF | 8 + .../build.properties | 23 + .../pom.xml | 26 + .../authentication/service/AuthenticationInfo.java | 31 + .../service/AuthenticationService.java | 29 + .../authentication/service/UserInfo.java | 43 + .../META-INF/MANIFEST.MF | 65 +- .../OSGI-INF/home.monitoring.application.xml | 7 + .../build.properties | 49 +- .../om2m/sdt/home/monitoring/Activator.java | 277 ++-- .../servlet/AuthenticationServiceServlet.java | 67 + .../monitoring/servlet/CredentialsServlet.java | 117 +- .../sdt/home/monitoring/servlet/HomeServlet.java | 133 +- .../monitoring/servlet/InCseContextServlet.java | 12 +- .../sdt/home/monitoring/servlet/LoginServlet.java | 116 +- .../sdt/home/monitoring/servlet/LogoutServlet.java | 80 +- .../sdt/home/monitoring/servlet/MyHttpContext.java | 80 ++ .../home/monitoring/servlet/SessionManager.java | 89 -- .../sdt/home/monitoring/util/AeRegistration.java | 7 +- .../om2m/sdt/home/monitoring/util/AuthFillter.java | 173 ++- .../om2m/sdt/home/monitoring/util/Constants.java | 62 +- .../home/monitoring/util/HttpSessionHelper.java | 69 + .../main/resources/webapps/css/color_picker.css | 86 ++ .../src/main/resources/webapps/css/style.css | 4 + .../src/main/resources/webapps/images/marker.png | Bin 652 -> 0 bytes .../src/main/resources/webapps/images/pointer.png | Bin 0 -> 652 bytes .../src/main/resources/webapps/images/ringM2M.png | Bin 0 -> 6693 bytes .../src/main/resources/webapps/js/app.js | 240 ++-- .../src/main/resources/webapps/js/color_picker.js | 268 ++++ .../src/main/resources/webapps/js/color_tools.js | 77 ++ .../src/main/resources/webapps/js/farbtastic.js | 465 ------- .../src/main/resources/webapps/login.html | 165 +-- .../src/main/resources/webapps/monitor.html | 31 +- .../org.eclipse.om2m.sdt.home.applications/pom.xml | 78 +- .../om2m/sdt/home/cloud/ResourceDiscovery.java | 64 +- .../org/eclipse/om2m/sdt/home/cloud/SDTUtil.java | 16 +- .../META-INF/MANIFEST.MF | 3 +- .../org/eclipse/om2m/sdt/home/driver/Logger.java | 68 +- .../om2m/sdt/home/enocean/EOFloodDetector.java | 4 +- .../org/eclipse/om2m/sdt/home/enocean/EOLight.java | 71 +- .../om2m/sdt/home/enocean/EOLightBlindControl.java | 34 +- .../om2m/sdt/home/enocean/EOWaterValve.java | 33 +- .../org/eclipse/om2m/sdt/home/hue/HomeLight.java | 114 +- .../org.eclipse.om2m.sdt.home.lifx/.classpath | 8 - .../org.eclipse.om2m.sdt.home.lifx/.project | 34 - .../org/eclipse/om2m/sdt/home/lifx/LIFXDevice.java | 1 + .../sdt/home/lifx/impl/cloud/DiscoveryCloud.java | 62 +- .../sdt/home/lifx/impl/cloud/LIFXDeviceCloud.java | 14 +- .../om2m/sdt/home/lifx/impl/lan/LIFXDeviceLan.java | 4 + .../om2m/sdt/home/lifx/sdt/LIFXSDTDevice.java | 25 +- .../om2m/sdt/home/mocked/devices/Activator.java | 23 +- .../om2m/sdt/home/mocked/devices/MockedCamera.java | 53 +- .../mocked/devices/MockedDeviceNumberDevice.java | 49 - .../om2m/sdt/home/mocked/devices/MockedKettle.java | 82 ++ .../om2m/sdt/home/mocked/devices/MockedLight.java | 7 +- .../mocked/devices/MockedSmartElectricMeter.java | 5 +- .../om2m/sdt/home/mocked/devices/MockedSwitch.java | 84 ++ .../home/mocked/devices/MockedSwitchButton.java | 84 -- .../sdt/home/mocked/devices/MockedThermometer.java | 4 +- .../home/mocked/devices/MockedWarningDevice.java | 4 +- .../sdt/home/mocked/devices/MockedWaterValve.java | 13 +- .../home/mocked/devices/MockedWeatherStation.java | 60 +- .../home/mocked/modules/MockedAlarmSpeaker.java | 11 +- .../sdt/home/mocked/modules/MockedDoorStatus.java | 9 +- .../om2m/sdt/home/mocked/modules/MockedLock.java | 2 +- .../home/mocked/modules/MockedPlayerControl.java | 41 + .../sdt/home/mocked/modules/MockedRunMode.java | 47 - .../sdt/home/mocked/modules/MockedRunState.java | 66 + .../mocked/modules/MockedSessionDescription.java | 42 + .../sdt/home/mocked/modules/MockedStreaming.java | 47 - .../sdt/home/mocked/modules/MockedTemperature.java | 33 +- .../org.eclipse.om2m.sdt.home.netatmo/.classpath | 9 - .../org.eclipse.om2m.sdt.home.netatmo/.project | 39 - .../eclipse/om2m/sdt/home/netatmo/model/Home.java | 3 +- .../om2m/sdt/home/netatmo/model/WelcomeCamera.java | 16 +- .../sdt/home/netatmo/sdt/SDTWeatherStation.java | 70 +- .../home/netatmo/sdt/SDTWelcomeCameraDevice.java | 76 +- .../sdt/SDTWelcomeCameraDeviceTestCase.java | 28 +- .../.classpath | 7 - .../.project | 34 - .../om2m/sdt/home/smartercoffee/Activator.java | 4 +- .../home/smartercoffee/SmarterCoffeeMachine.java | 27 +- .../communication/SmarterCoffeeCommunication.java | 9 +- .../communication/SmarterCoffeeStatus.java | 24 +- .../META-INF/MANIFEST.MF | 2 +- .../pom.xml | 2 +- .../om2m/sdt/home/smarterkettle/Activator.java | 80 +- .../om2m/sdt/home/smarterkettle/SmarterKettle.java | 36 +- .../communication/SmarterKettleCommunication.java | 8 +- .../communication/SmarterKettleMain.java | 8 +- .../communication/SmarterKettleStatus.java | 80 +- .../smarterkettle/communication/TCPConnection.java | 25 +- .../eclipse/om2m/sdt/home/tester/Activator.java | 28 +- .../eclipse/om2m/sdt/home/utils/SDTDiscovery.java | 68 +- .../org/eclipse/om2m/sdt/home/utils/SDTUtil.java | 16 +- .../org.eclipse.om2m.sdt.home/META-INF/MANIFEST.MF | 15 +- .../eclipse/om2m/sdt/home/actions/NextTrack.java | 34 + .../om2m/sdt/home/actions/PreviousTrack.java | 34 + .../om2m/sdt/home/devices/AirQualityMonitor.java | 39 + .../org/eclipse/om2m/sdt/home/devices/Camera.java | 52 +- .../om2m/sdt/home/devices/CoffeeMachine.java | 18 +- .../om2m/sdt/home/devices/DeviceNumberDevice.java | 39 - .../om2m/sdt/home/devices/GenericDevice.java | 8 +- .../om2m/sdt/home/devices/GenericSensor.java | 10 - .../eclipse/om2m/sdt/home/devices/HomeCCTV.java | 187 +++ .../org/eclipse/om2m/sdt/home/devices/Kettle.java | 91 +- .../org/eclipse/om2m/sdt/home/devices/Light.java | 18 +- .../om2m/sdt/home/devices/MotionDetector.java | 3 +- .../om2m/sdt/home/devices/SmartElectricMeter.java | 18 +- .../om2m/sdt/home/devices/SmokeExtractor.java | 19 - .../org/eclipse/om2m/sdt/home/devices/Switch.java | 39 + .../om2m/sdt/home/devices/SwitchButton.java | 40 - .../eclipse/om2m/sdt/home/devices/Thermostat.java | 18 +- .../org/eclipse/om2m/sdt/home/devices/Warning.java | 52 + .../om2m/sdt/home/devices/WarningDevice.java | 52 - .../eclipse/om2m/sdt/home/devices/WaterHeater.java | 18 +- .../om2m/sdt/home/devices/WeatherStation.java | 129 +- .../om2m/sdt/home/modules/AbstractAlarmSensor.java | 8 +- .../om2m/sdt/home/modules/AcousticSensor.java | 66 + .../om2m/sdt/home/modules/AirQualitySensor.java | 229 ++++ .../om2m/sdt/home/modules/AlarmSpeaker.java | 10 +- .../eclipse/om2m/sdt/home/modules/Anemometer.java | 47 + .../home/modules/AtmosphericPressureSensor.java | 50 - .../eclipse/om2m/sdt/home/modules/AudioVolume.java | 4 +- .../eclipse/om2m/sdt/home/modules/Barometer.java | 118 ++ .../org/eclipse/om2m/sdt/home/modules/Battery.java | 2 +- .../om2m/sdt/home/modules/BinarySwitch.java | 2 +- .../org/eclipse/om2m/sdt/home/modules/Boiler.java | 2 +- .../org/eclipse/om2m/sdt/home/modules/Boiling.java | 63 - .../org/eclipse/om2m/sdt/home/modules/Brewing.java | 8 +- .../eclipse/om2m/sdt/home/modules/Brightness.java | 2 +- .../om2m/sdt/home/modules/CarbonDioxideSensor.java | 34 - .../sdt/home/modules/CarbonMonoxideSensor.java | 29 - .../org/eclipse/om2m/sdt/home/modules/Clock.java | 4 +- .../org/eclipse/om2m/sdt/home/modules/Colour.java | 6 +- .../om2m/sdt/home/modules/ColourSaturation.java | 6 +- .../om2m/sdt/home/modules/ContactSensor.java | 7 +- .../eclipse/om2m/sdt/home/modules/Credentials.java | 90 ++ .../eclipse/om2m/sdt/home/modules/DoorStatus.java | 4 +- .../om2m/sdt/home/modules/EnergyConsumption.java | 2 +- .../home/modules/EnergyOverloadCircuitBreaker.java | 29 - .../home/modules/ExtendedCarbonDioxideSensor.java | 53 - .../om2m/sdt/home/modules/FaultDetection.java | 2 +- .../org/eclipse/om2m/sdt/home/modules/Foaming.java | 6 +- .../om2m/sdt/home/modules/GenericSensor.java | 8 +- .../om2m/sdt/home/modules/GlassBreakSensor.java | 29 - .../org/eclipse/om2m/sdt/home/modules/Grinder.java | 4 +- .../om2m/sdt/home/modules/HotWaterSupply.java | 2 +- .../eclipse/om2m/sdt/home/modules/LiquidLevel.java | 7 +- .../org/eclipse/om2m/sdt/home/modules/Lock.java | 4 +- .../org/eclipse/om2m/sdt/home/modules/Noise.java | 45 - .../eclipse/om2m/sdt/home/modules/NumberValue.java | 10 +- .../om2m/sdt/home/modules/PersonSensor.java | 2 +- .../om2m/sdt/home/modules/PlayerControl.java | 155 +++ .../om2m/sdt/home/modules/PresenceSensor.java | 28 - .../eclipse/om2m/sdt/home/modules/PushButton.java | 2 +- .../om2m/sdt/home/modules/RelativeHumidity.java | 2 +- .../org/eclipse/om2m/sdt/home/modules/RunMode.java | 88 -- .../eclipse/om2m/sdt/home/modules/RunState.java | 51 +- .../om2m/sdt/home/modules/SessionDescription.java | 70 + .../eclipse/om2m/sdt/home/modules/SmokeSensor.java | 49 +- .../eclipse/om2m/sdt/home/modules/Streaming.java | 92 -- .../eclipse/om2m/sdt/home/modules/Temperature.java | 2 +- .../eclipse/om2m/sdt/home/modules/TouchSensor.java | 29 - .../eclipse/om2m/sdt/home/modules/UvSensor.java | 66 + .../eclipse/om2m/sdt/home/types/ActionType.java | 58 +- .../om2m/sdt/home/types/AlertColourCode.java | 26 +- .../eclipse/om2m/sdt/home/types/DatapointType.java | 272 ++-- .../eclipse/om2m/sdt/home/types/DeviceType.java | 111 +- .../org/eclipse/om2m/sdt/home/types/DoorState.java | 29 +- .../om2m/sdt/home/types/FlexContainers.java | 62 + .../eclipse/om2m/sdt/home/types/FoamStrength.java | 29 +- .../eclipse/om2m/sdt/home/types/GrainsLevel.java | 27 + .../om2m/sdt/home/types/GrindCoarseness.java | 27 + .../eclipse/om2m/sdt/home/types/HomeBasicType.java | 84 +- .../eclipse/om2m/sdt/home/types/HomeDataType.java | 61 +- .../om2m/sdt/home/types/HomeSimpleType.java | 39 +- .../org/eclipse/om2m/sdt/home/types/JobState.java | 27 + .../org/eclipse/om2m/sdt/home/types/JobStates.java | 104 -- .../eclipse/om2m/sdt/home/types/LiquidLevel.java | 29 +- .../eclipse/om2m/sdt/home/types/MachineState.java | 48 +- .../eclipse/om2m/sdt/home/types/ModuleType.java | 167 +-- .../eclipse/om2m/sdt/home/types/PlayerMode.java | 27 + .../org/eclipse/om2m/sdt/home/types/SpinLevel.java | 27 + .../om2m/sdt/home/types/SupportedMediaSources.java | 27 + .../eclipse/om2m/sdt/home/types/TasteStrength.java | 33 +- .../java/org/eclipse/om2m/sdt/home/types/Tone.java | 32 +- .../org/eclipse/om2m/sdt/home/types/UvStatus.java | 27 + org.eclipse.om2m.sdt/pom.xml | 1 + org.eclipse.om2m.site.asn-cse/.project | 17 - org.eclipse.om2m.site.in-cse/.project | 17 - org.eclipse.om2m.site.in-cse/log4j.configuration | 2 +- org.eclipse.om2m.site.in-cse/om2m.product | 14 +- .../pax-confman-propsloader-0.2.2.jar | Bin 0 -> 28158 bytes org.eclipse.om2m.site.in-cse/pom.xml | 12 +- org.eclipse.om2m.site.mn-cse/.project | 17 - .../services/hue.basedriver.properties | 8 + org.eclipse.om2m.site.mn-cse/om2m.product | 6 + .../.classpath | 7 - org.eclipse.om2m.testsuite.flexcontainer/.project | 34 - .../flexcontainer/AccessControlPolicyTest.java | 12 +- .../om2m/testsuite/flexcontainer/Activator.java | 2 +- .../AlarmSpeakerFlexContainerTest.java | 38 +- .../BinarySwitchFlexContainerTest.java | 22 +- .../om2m/testsuite/flexcontainer/CallbackTest.java | 30 +- .../EnergyConsumptionFlexContainerTest.java | 110 +- .../FaultDetectionFlexContainerTest.java | 42 +- .../flexcontainer/FlexContainerTestSuite.java | 16 +- .../FloodDetectorFlexContainerTest.java | 40 +- .../flexcontainer/GasValveFlexContainerTest.java | 40 +- .../LightDeviceFlexContainerTest.java | 40 +- .../flexcontainer/LightFlexContainerTest.java | 62 +- .../flexcontainer/LocationFlexContainerTest.java | 8 +- .../flexcontainer/RunModeFlexContainerTest.java | 297 ----- .../flexcontainer/RunStateFlexContainerTest.java | 297 +++++ .../SmartElectricMeterFlexContainerTest.java | 48 +- .../SmokeDetectorFlexContainerTest.java | 40 +- .../testsuite/flexcontainer/SubscriptionTest.java | 26 +- .../WarningDeviceFlexContainerTest.java | 52 +- .../WaterSensorFlexContainerTest.java | 26 +- .../flexcontainer/WaterValveFlexContainerTest.java | 40 +- .../.classpath | 7 - .../.project | 34 - .../src/main/resources/webapps/om2m.js | 600 ++++----- .../.classpath | 7 - .../.project | 34 - protocols/.project | 17 - protocols/org.eclipse.om2m.protocols.hue/.project | 17 - 696 files changed, 28648 insertions(+), 12922 deletions(-) delete mode 100644 .project delete mode 100644 com.orange.om2m.p2.repo/.project delete mode 100644 org.eclipse.om2m.android.dashboard/.classpath delete mode 100644 org.eclipse.om2m.android.dashboard/.project delete mode 100644 org.eclipse.om2m.binding.coap/.classpath delete mode 100644 org.eclipse.om2m.binding.coap/.project delete mode 100644 org.eclipse.om2m.binding.http/.classpath delete mode 100644 org.eclipse.om2m.binding.http/.project delete mode 100644 org.eclipse.om2m.binding.mqtt/.classpath delete mode 100644 org.eclipse.om2m.binding.mqtt/.project delete mode 100644 org.eclipse.om2m.binding.service/.classpath delete mode 100644 org.eclipse.om2m.binding.service/.project delete mode 100644 org.eclipse.om2m.commons.logging/.classpath delete mode 100644 org.eclipse.om2m.commons.logging/.project delete mode 100644 org.eclipse.om2m.commons/.classpath delete mode 100644 org.eclipse.om2m.commons/.project create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DasInfo.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DynAuthTokenReqInfo.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AcousticSensorFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AcousticSensorFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirConJobModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirConJobModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirFlowFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirFlowFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirPurifierJobModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirPurifierJobModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirQualitySensorFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirQualitySensorFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnemometerFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnemometerFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnswerFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnswerFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AutoDocumentFeederFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AutoDocumentFeederFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BarometerFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BarometerFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinaryObjectFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinaryObjectFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BodyCompositionAnalyserFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BodyCompositionAnalyserFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CallFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CallFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CloseFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CloseFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesDryerJobModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesDryerJobModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherDryerJobModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherDryerJobModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeOptionFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeOptionFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CookerHoodJobModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CookerHoodJobModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CredentialsFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CredentialsFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DehumidifierJobModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DehumidifierJobModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirPurifierFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirPurifierFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirQualityMonitorFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirQualityMonitorFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAudioReceiverFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAudioReceiverFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceBloodPressureMonitorFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceBloodPressureMonitorFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesDryerFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesDryerFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherDryerFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherDryerFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCookerHoodFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCookerHoodFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCooktopFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCooktopFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDehumidifierFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDehumidifierFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDishWasherFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDishWasherFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorLockFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorLockFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFanFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFanFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFoodProbeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFoodProbeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFreezerFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFreezerFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGlucosemeterFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGlucosemeterFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHeartRateMonitorFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHeartRateMonitorFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHomeCCTVFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHomeCCTVFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHumidifierFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHumidifierFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceKettleFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceKettleFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMultiFunctionPrinterFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMultiFunctionPrinterFlexContainerAnnc.java delete mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceNumberDeviceFlexContainer.java delete mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceNumberDeviceFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOutdoorLampFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOutdoorLampFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePrinterFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePrinterFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePulseOximeterFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePulseOximeterFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceScannerFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceScannerFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSecurityPanelFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSecurityPanelFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSetTopBoxFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSetTopBoxFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartPlugFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartPlugFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSteamClosetFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSteamClosetFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSwitchFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSwitchFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermometerFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermometerFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThreeDPrinterFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThreeDPrinterFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWarningFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWarningFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWindowShadeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWindowShadeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DishWasherJobModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DishWasherJobModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FilterInfoFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FilterInfoFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GeoLocationFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GeoLocationFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GlucometerFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GlucometerFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HangupFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HangupFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeatingZoneFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeatingZoneFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ImpactSensorFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ImpactSensorFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidRemainingFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidRemainingFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MediaSelectFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MediaSelectFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NextTrackFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NextTrackFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenLevelFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenLevelFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OperationModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OperationModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OvercurrentSensorFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OvercurrentSensorFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OzoneMeterFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OzoneMeterFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PhoneCallFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PhoneCallFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PlayerControlFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PlayerControlFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PreviousTrackFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PreviousTrackFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PrintQueueFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PrintQueueFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PulsemeterFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PulsemeterFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RemoteControlEnableFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RemoteControlEnableFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetTextMessageFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetTextMessageFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RobotCleanerJobModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RobotCleanerJobModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RunStateFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RunStateFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SecurityModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SecurityModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SessionDescriptionFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SessionDescriptionFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SphygmomanometerFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SphygmomanometerFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Start3DprintFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Start3DprintFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SteamClosetJobModeFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SteamClosetJobModeFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Stop3DprintFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Stop3DprintFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TextMessageFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TextMessageFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ThreeDPrinterFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ThreeDPrinterFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UvSensorFlexContainer.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UvSensorFlexContainerAnnc.java create mode 100644 org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/utils/CustomAttributList.java delete mode 100644 org.eclipse.om2m.core.service/.classpath delete mode 100644 org.eclipse.om2m.core.service/.project delete mode 100644 org.eclipse.om2m.core/.classpath delete mode 100644 org.eclipse.om2m.core/.project delete mode 100644 org.eclipse.om2m.dal.driver.sample/.classpath delete mode 100644 org.eclipse.om2m.dal.driver.sample/.project delete mode 100644 org.eclipse.om2m.dal/.classpath delete mode 100644 org.eclipse.om2m.dal/.project delete mode 100644 org.eclipse.om2m.das.service/.classpath delete mode 100644 org.eclipse.om2m.das.service/.project delete mode 100644 org.eclipse.om2m.das.testsuite/.classpath delete mode 100644 org.eclipse.om2m.das.testsuite/.project delete mode 100644 org.eclipse.om2m.datamapping.jaxb/.classpath delete mode 100644 org.eclipse.om2m.datamapping.jaxb/.project create mode 100644 org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestDynAuthTokenReqInfo.java create mode 100644 org.eclipse.om2m.datamapping.jaxb/src/test/resources/deviceLightDatashareFlexContainer.json delete mode 100644 org.eclipse.om2m.datamapping.service/.classpath delete mode 100644 org.eclipse.om2m.datamapping.service/.project delete mode 100644 org.eclipse.om2m.interworking.service/.classpath delete mode 100644 org.eclipse.om2m.interworking.service/.project delete mode 100644 org.eclipse.om2m.ipe.dal/.classpath delete mode 100644 org.eclipse.om2m.ipe.dal/.project delete mode 100644 org.eclipse.om2m.ipe.sample.sdt/.classpath delete mode 100644 org.eclipse.om2m.ipe.sample.sdt/.project delete mode 100644 org.eclipse.om2m.ipe.sample/.classpath delete mode 100644 org.eclipse.om2m.ipe.sample/.project delete mode 100644 org.eclipse.om2m.ipe.sdt.testsuite/.classpath delete mode 100644 org.eclipse.om2m.ipe.sdt.testsuite/.project delete mode 100644 org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/RunModeModuleTest.java delete mode 100644 org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTUtil.java delete mode 100644 org.eclipse.om2m.persistence.eclipselink/.classpath delete mode 100644 org.eclipse.om2m.persistence.eclipselink/.project delete mode 100644 org.eclipse.om2m.persistence.mongodb/.classpath delete mode 100644 org.eclipse.om2m.persistence.mongodb/.project delete mode 100644 org.eclipse.om2m.persistence.service/.classpath delete mode 100644 org.eclipse.om2m.persistence.service/.project delete mode 100644 org.eclipse.om2m.sdt.comparator.xml/.classpath delete mode 100644 org.eclipse.om2m.sdt.comparator.xml/.project delete mode 100644 org.eclipse.om2m.sdt/.project delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/.project create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/META-INF/MANIFEST.MF create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/build.properties create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/pom.xml create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/AuthenticationInfo.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/AuthenticationService.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/UserInfo.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/OSGI-INF/home.monitoring.application.xml create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/AuthenticationServiceServlet.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/MyHttpContext.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/SessionManager.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/HttpSessionHelper.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/css/color_picker.css delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/marker.png create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/pointer.png create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/ringM2M.png create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/color_picker.js create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/color_tools.js delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/farbtastic.js delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/.classpath delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/.project delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedDeviceNumberDevice.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedKettle.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSwitch.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSwitchButton.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedPlayerControl.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedRunMode.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedRunState.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedSessionDescription.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedStreaming.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/.classpath delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/.project delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/.classpath delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/.project create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/actions/NextTrack.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/actions/PreviousTrack.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/AirQualityMonitor.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/DeviceNumberDevice.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/HomeCCTV.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SmokeExtractor.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Switch.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SwitchButton.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Warning.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WarningDevice.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AcousticSensor.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AirQualitySensor.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Anemometer.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AtmosphericPressureSensor.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Barometer.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Boiling.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/CarbonDioxideSensor.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/CarbonMonoxideSensor.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Credentials.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/EnergyOverloadCircuitBreaker.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ExtendedCarbonDioxideSensor.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/GlassBreakSensor.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Noise.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PlayerControl.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PresenceSensor.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RunMode.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/SessionDescription.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Streaming.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/TouchSensor.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/UvSensor.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/FlexContainers.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/GrainsLevel.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/GrindCoarseness.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/JobState.java delete mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/JobStates.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/PlayerMode.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/SpinLevel.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/SupportedMediaSources.java create mode 100644 org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/UvStatus.java delete mode 100644 org.eclipse.om2m.site.asn-cse/.project delete mode 100644 org.eclipse.om2m.site.in-cse/.project create mode 100644 org.eclipse.om2m.site.in-cse/pax-confman-propsloader-0.2.2.jar delete mode 100644 org.eclipse.om2m.site.mn-cse/.project create mode 100644 org.eclipse.om2m.site.mn-cse/configurations/services/hue.basedriver.properties delete mode 100644 org.eclipse.om2m.testsuite.flexcontainer/.classpath delete mode 100644 org.eclipse.om2m.testsuite.flexcontainer/.project delete mode 100644 org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/RunModeFlexContainerTest.java create mode 100644 org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/RunStateFlexContainerTest.java delete mode 100644 org.eclipse.om2m.webapp.resourcesbrowser.json/.classpath delete mode 100644 org.eclipse.om2m.webapp.resourcesbrowser.json/.project delete mode 100644 org.eclipse.om2m.webapp.resourcesbrowser.xml/.classpath delete mode 100644 org.eclipse.om2m.webapp.resourcesbrowser.xml/.project delete mode 100644 protocols/.project delete mode 100644 protocols/org.eclipse.om2m.protocols.hue/.project diff --git a/.gitignore b/.gitignore index 8d5a6057..4729d750 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ target data .DS_Store -.settings \ No newline at end of file +.settings +.classpath +.project +bin \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aaedff16..9c4bed34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,9 @@ -image: registry.forge.orange-labs.fr/org.eclipse.om2m/om2m/com.orange.om2m.docker.builder:0.0.5 +image: registry.forge.orange-labs.fr/org.eclipse.om2m/om2m/com.orange.om2m.docker.builder:0.0.6 +variables: + MAVEN_OPTS: "-Xms4000m -Xmx6000m" + + cache: paths: - .m2 @@ -15,6 +19,7 @@ build: script: - "nohup dockerd&" - "mvn clean install -Dmaven.repo.local=./.m2/repository -B -s /root/.m2/settings.xml" + - "mvn sonar:sonar -Dsonar.host.url=http://10.192.37.63/sonar" tags: - docker-privileged - rsc @@ -24,7 +29,7 @@ deploy: stage: deploy script: - "nohup dockerd&" - - "mvn deploy -B -Dmaven.repo.local=./.m2/repository -s /root/.m2/settings.xml -DaltDeploymentRepository=inhouse.snapshot::default::http://maven2.rd.francetelecom.fr/proxy/repository/inhouse.snapshot -Drepo=${CI_COMMIT_REF_NAME} -Pdocker" + - "mvn deploy -B -Dmaven.test.skip=true -Dmaven.repo.local=./.m2/repository -s /root/.m2/settings.xml -DaltDeploymentRepository=inhouse.snapshot::default::http://maven2.rd.francetelecom.fr/proxy/repository/inhouse.snapshot -Drepo=${CI_COMMIT_REF_NAME} -Pdocker" - "rm -fr .m2" tags: - docker-privileged diff --git a/.project b/.project deleted file mode 100644 index 1cd62f30..00000000 --- a/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.om2m - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/com.orange.om2m.p2.repo/.project b/com.orange.om2m.p2.repo/.project deleted file mode 100644 index 7f9e244e..00000000 --- a/com.orange.om2m.p2.repo/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - com.orange.om2m.p2.repo - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/com.orange.om2m.p2.repo/category.xml b/com.orange.om2m.p2.repo/category.xml index b19aad18..3047497f 100644 --- a/com.orange.om2m.p2.repo/category.xml +++ b/com.orange.om2m.p2.repo/category.xml @@ -123,6 +123,9 @@ + + + om2m p2 repository diff --git a/org.eclipse.om2m.android.dashboard/.classpath b/org.eclipse.om2m.android.dashboard/.classpath deleted file mode 100644 index 4becec1e..00000000 --- a/org.eclipse.om2m.android.dashboard/.classpath +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.eclipse.om2m.android.dashboard/.project b/org.eclipse.om2m.android.dashboard/.project deleted file mode 100644 index 57a4e827..00000000 --- a/org.eclipse.om2m.android.dashboard/.project +++ /dev/null @@ -1,46 +0,0 @@ - - - dashboard.sdt - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - - - AndroidManifest.xml - 1 - PROJECT_LOC/src/main/AndroidManifest.xml - - - diff --git a/org.eclipse.om2m.binding.coap/.classpath b/org.eclipse.om2m.binding.coap/.classpath deleted file mode 100644 index 2a7df70d..00000000 --- a/org.eclipse.om2m.binding.coap/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/org.eclipse.om2m.binding.coap/.project b/org.eclipse.om2m.binding.coap/.project deleted file mode 100644 index 22688b79..00000000 --- a/org.eclipse.om2m.binding.coap/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.binding.coap - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.binding.http/.classpath b/org.eclipse.om2m.binding.http/.classpath deleted file mode 100644 index 56b865eb..00000000 --- a/org.eclipse.om2m.binding.http/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.binding.http/.project b/org.eclipse.om2m.binding.http/.project deleted file mode 100644 index e9d02a5a..00000000 --- a/org.eclipse.om2m.binding.http/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.binding.http - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.binding.http/src/main/java/org/eclipse/om2m/binding/http/RestHttpServlet.java b/org.eclipse.om2m.binding.http/src/main/java/org/eclipse/om2m/binding/http/RestHttpServlet.java index 0809f6de..0c8909f0 100644 --- a/org.eclipse.om2m.binding.http/src/main/java/org/eclipse/om2m/binding/http/RestHttpServlet.java +++ b/org.eclipse.om2m.binding.http/src/main/java/org/eclipse/om2m/binding/http/RestHttpServlet.java @@ -25,6 +25,7 @@ import java.math.BigInteger; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; +import java.util.Base64; import java.util.Enumeration; import java.util.HashMap; import java.util.List; @@ -62,6 +63,12 @@ public class RestHttpServlet extends HttpServlet { private static Log LOGGER = LogFactory.getLog(RestHttpServlet.class); /** Serial Version UID */ private static final long serialVersionUID = 1L; + /** Bearer Auth Type */ + private static final String BEARER_AUTH_TYPE = "Bearer"; + /** Basic Auth Type */ + private static final String BASIC_AUTH_TYPE = "Basic"; + /** Authorization header */ + private static final String AUTHORIZATION_HEADER = "Authorization"; /** Discovered CSE service */ private static CseService cse; @@ -335,10 +342,13 @@ public class RestHttpServlet extends HttpServlet { // Get the originator from the X-M2M-Origin header - String authorization = httpServletRequest.getHeader(HttpHeaders.ORIGINATOR); - if (authorization != null) { - request.setFrom(authorization); + String originator = httpServletRequest.getHeader(HttpHeaders.ORIGINATOR); + if (originator != null) { + request.setFrom(originator); } + + // authorization + parseAuthorizationHeader(request, httpServletRequest.getHeader(AUTHORIZATION_HEADER)); // Get the request identifier String requestIdentifier = httpServletRequest.getHeader(HttpHeaders.REQUEST_IDENTIFIER) ; @@ -413,6 +423,31 @@ public class RestHttpServlet extends HttpServlet { } + private void parseAuthorizationHeader(RequestPrimitive request, String authorizationHeader) { + LOGGER.info("parseAuthorizationHeader(authorizationHeader:" + authorizationHeader + ")" ); + if ((authorizationHeader == null) || (authorizationHeader.isEmpty())) { + return; + } + + if (authorizationHeader.startsWith(BASIC_AUTH_TYPE)) { + // basic type + LOGGER.debug("request with basic http auth"); + + String base64UsernameAndPassword = authorizationHeader.substring(BASIC_AUTH_TYPE.length() + 1).trim(); + String usernameAndPassword = new String(Base64.getDecoder().decode(base64UsernameAndPassword)); + + request.setFrom(usernameAndPassword); + } + + if (authorizationHeader.startsWith(BEARER_AUTH_TYPE)) { + // bearer type + String accessToken = authorizationHeader.substring(BEARER_AUTH_TYPE.length() + 1); + + request.getTokens().add(accessToken); + } + + } + public static String httpRequestToString(HttpServletRequest request, String content){ String heads = "{\n"; Enumeration headerNames = request.getHeaderNames(); diff --git a/org.eclipse.om2m.binding.http/src/main/java/org/eclipse/om2m/binding/http/constants/HttpHeaders.java b/org.eclipse.om2m.binding.http/src/main/java/org/eclipse/om2m/binding/http/constants/HttpHeaders.java index 36c8def0..20697bdb 100644 --- a/org.eclipse.om2m.binding.http/src/main/java/org/eclipse/om2m/binding/http/constants/HttpHeaders.java +++ b/org.eclipse.om2m.binding.http/src/main/java/org/eclipse/om2m/binding/http/constants/HttpHeaders.java @@ -1,44 +1,46 @@ -/******************************************************************************* - * Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) - * 7 Colonel Roche 31077 Toulouse - France - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * Thierry Monteil : Project manager, technical co-manager - * Mahdi Ben Alaya : Technical co-manager - * Samir Medjiah : Technical co-manager - * Khalil Drira : Strategy expert - * Guillaume Garzone : Developer - * François Aïssaoui : Developer - * - * New contributors : - *******************************************************************************/ -package org.eclipse.om2m.binding.http.constants; - -public class HttpHeaders { - - /** Private constructor */ - private HttpHeaders(){ - } - - public static final String REQUEST_IDENTIFIER = "X-M2M-RI"; - public static final String ACCEPT = "Accept"; - public static final String CONTENT_TYPE = "Content-Type"; - public static final String CONTENT_LOCATION = "Content-Location"; - public static final String ETAG = "Etag"; - public static final String ORIGINATOR = "X-M2M-Origin"; - public static final String GROUP_REQUEST_IDENTIFIER = "X-M2M-GID"; - public static final String RESPONSE_TYPE = "X-M2M-RTU"; - public static final String HOST = "Host"; - public static final String ORIGINATING_TIMESTAMP = "X-M2M-OT"; - public static final String RESULT_EXPIRATION_TIMESTAMP = "X-M2M-RST"; - public static final String REQUEST_EXPIRATION_TIMESTAMP = "X-M2M-RET"; - public static final String OPERATION_EXECUTION_TIME = "X-M2M-OET"; - public static final String EVENT_CATEGORY = "X-M2M-EC"; - public static final String RESPONSE_STATUS_CODE = "X-M2M-RSC"; - -} +/******************************************************************************* + * Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) + * 7 Colonel Roche 31077 Toulouse - France + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Initial Contributors: + * Thierry Monteil : Project manager, technical co-manager + * Mahdi Ben Alaya : Technical co-manager + * Samir Medjiah : Technical co-manager + * Khalil Drira : Strategy expert + * Guillaume Garzone : Developer + * François Aïssaoui : Developer + * + * New contributors : + *******************************************************************************/ +package org.eclipse.om2m.binding.http.constants; + +public class HttpHeaders { + + /** Private constructor */ + private HttpHeaders(){ + } + + public static final String REQUEST_IDENTIFIER = "X-M2M-RI"; + public static final String ACCEPT = "Accept"; + public static final String CONTENT_TYPE = "Content-Type"; + public static final String CONTENT_LOCATION = "Content-Location"; + public static final String AUTHORIZATION = "Authorization"; + public static final String ETAG = "Etag"; + public static final String ORIGINATOR = "X-M2M-Origin"; + public static final String GROUP_REQUEST_IDENTIFIER = "X-M2M-GID"; + public static final String RESPONSE_TYPE = "X-M2M-RTU"; + public static final String HOST = "Host"; + public static final String ORIGINATING_TIMESTAMP = "X-M2M-OT"; + public static final String RESULT_EXPIRATION_TIMESTAMP = "X-M2M-RST"; + public static final String REQUEST_EXPIRATION_TIMESTAMP = "X-M2M-RET"; + public static final String OPERATION_EXECUTION_TIME = "X-M2M-OET"; + public static final String EVENT_CATEGORY = "X-M2M-EC"; + public static final String RESPONSE_STATUS_CODE = "X-M2M-RSC"; + public static final String TOKEN = "X-M2M-Token"; + +} diff --git a/org.eclipse.om2m.binding.mqtt/.classpath b/org.eclipse.om2m.binding.mqtt/.classpath deleted file mode 100644 index f7edce6b..00000000 --- a/org.eclipse.om2m.binding.mqtt/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/org.eclipse.om2m.binding.mqtt/.project b/org.eclipse.om2m.binding.mqtt/.project deleted file mode 100644 index fed26a33..00000000 --- a/org.eclipse.om2m.binding.mqtt/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.binding.mqtt - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.binding.service/.classpath b/org.eclipse.om2m.binding.service/.classpath deleted file mode 100644 index 642bfb34..00000000 --- a/org.eclipse.om2m.binding.service/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.binding.service/.project b/org.eclipse.om2m.binding.service/.project deleted file mode 100644 index a413df64..00000000 --- a/org.eclipse.om2m.binding.service/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.binding.service - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.commons.logging/.classpath b/org.eclipse.om2m.commons.logging/.classpath deleted file mode 100644 index b845c2b5..00000000 --- a/org.eclipse.om2m.commons.logging/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.commons.logging/.project b/org.eclipse.om2m.commons.logging/.project deleted file mode 100644 index 48280b2d..00000000 --- a/org.eclipse.om2m.commons.logging/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.commons.logging - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.commons/.classpath b/org.eclipse.om2m.commons/.classpath deleted file mode 100644 index 848ca71e..00000000 --- a/org.eclipse.om2m.commons/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/org.eclipse.om2m.commons/.project b/org.eclipse.om2m.commons/.project deleted file mode 100644 index 331307cd..00000000 --- a/org.eclipse.om2m.commons/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.commons - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/constants/ShortName.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/constants/ShortName.java index 37f91d64..76371148 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/constants/ShortName.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/constants/ShortName.java @@ -382,7 +382,7 @@ public class ShortName { public static final String HOSTED_SRV_LINK = "hsl"; // Short names for mgmt objects generic attributes - public static final String DESCRIPTION = "des"; + public static final String DESCRIPTION = "dc"; public static final String MGMT_DEF = "mgd"; public static final String OBJ_IDS = "obis"; public static final String OBJ_PATHS = "obps"; @@ -447,16 +447,16 @@ public class ShortName { public static final String SW_VERSION = "swv"; public static final String HW_VERSION = "hwv"; public static final String OS_VERSION = "osv"; - public static final String MANUF_DET_LINKS = "mfdtl"; - public static final String MANUF_DATE = "mfDte"; - public static final String DEVICE_SUB_MODEL = "sumod"; - public static final String DEVICE_NAME = "dnm"; - public static final String COUNTRY = "ctry"; + public static final String MANUF_DET_LINKS = "mfdl"; + public static final String MANUF_DATE = "mfd"; + public static final String DEVICE_SUB_MODEL = "smod"; + public static final String DEVICE_NAME = "dvnm"; + public static final String COUNTRY = "cnty"; public static final String LOCATION = "loc"; public static final String SYS_TIME = "syst"; - public static final String SUPPORT_URL = "surl"; + public static final String SUPPORT_URL = "spur"; public static final String PRES_URL = "purl"; - public static final String PROTOCOL = "prtl"; + public static final String PROTOCOL = "ptl"; // short names for battery public static final String BATTERY_LEVEL = "btl"; @@ -469,4 +469,22 @@ public class ShortName { public static final String DYNAMIC_AUTHORIZATION_ENABLED = "dae"; public static final String DYNAMIC_AUTHORIZATION_PoA = "dap"; public static final String DYNAMIC_AUTHORIZATION_LIFETIME = "dal"; + + // short names for DynAuthDasRequest + public static final String TARGETED_RESOURCE_TYPE = "tirt"; + public static final String TARGETED_RESOURCE_ID = "trid"; + public static final String ORIGINATOR_IP = "oip"; + public static final String ORIGINATOR_LOCATION = "olo"; + public static final String ORIGINATOR_ROLE_IDS = "orid"; + public static final String REQUEST_TIMESTAMP = "rts"; + public static final String PROPOSED_PRIVILEDGES_LIFETIME = "ppl"; + public static final String ROLE_IDS_FROM_ACPS = "rfa"; + public static final String TOKEN_IDS = "tids"; + + // short names for DynamicAuthTokenReqInfo + public static final String DYNAMIC_AUTHORIZATION_TOKEN_REQ_INFO = "tqf"; + public static final String TOKEN_REQ_INFO = "tqf"; + public static final String DAS_INFO = "dasi"; + public static final String URI = "uri"; + public static final String DAS_REQUEST = "daq"; } diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/CSEBaseEntity.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/CSEBaseEntity.java index cd633a8f..7d66e49b 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/CSEBaseEntity.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/CSEBaseEntity.java @@ -148,7 +148,7 @@ public class CSEBaseEntity extends ResourceEntity { /** List of FlexContainerEntites */ - @OneToMany(fetch=FetchType.LAZY, cascade={CascadeType.ALL}) + @OneToMany(fetch=FetchType.LAZY, cascade={CascadeType.ALL}, mappedBy="parentCSEB") @JoinTable( name=DBEntities.CSEB_FCNT_JOIN, joinColumns={@JoinColumn(name=DBEntities.CSEB_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/ContainerEntity.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/ContainerEntity.java index 95153a6e..391a3821 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/ContainerEntity.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/ContainerEntity.java @@ -1,447 +1,447 @@ -/******************************************************************************* - - * Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) - * 7 Colonel Roche 31077 Toulouse - France - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * Thierry Monteil : Project manager, technical co-manager - * Mahdi Ben Alaya : Technical co-manager - * Samir Medjiah : Technical co-manager - * Khalil Drira : Strategy expert - * Guillaume Garzone : Developer - * François Aïssaoui : Developer - * - * New contributors : - *******************************************************************************/ -package org.eclipse.om2m.commons.entities; - -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.List; - -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OrderBy; - -import org.eclipse.om2m.commons.constants.DBEntities; -import org.eclipse.om2m.commons.constants.ShortName; - -/** - * Container JPA entity - * - */ -@Entity(name=DBEntities.CONTAINER_ENTITY) -@Inheritance(strategy = InheritanceType.JOINED) -public class ContainerEntity extends AnnounceableSubordinateEntity{ - @Column(name= ShortName.STATETAG) - protected BigInteger stateTag; - @Column(name= ShortName.CREATOR) - protected String creator; - @Column(name= ShortName.MAX_NR_OF_INSTANCES) - protected BigInteger maxNrOfInstances; - @Column(name= ShortName.MAX_BYTE_SIZE) - protected BigInteger maxByteSize; - @Column(name= ShortName.CURRENT_NUMBER_OF_INSTANCES) - protected BigInteger currentNrOfInstances; - @Column(name= ShortName.MAX_INSTANCE_AGE) - protected BigInteger maxInstanceAge; - @Column(name= ShortName.LOCATION_ID) - protected String locationID; - @Column(name= ShortName.ONTOLOGY_REF) - protected String ontologyRef; - - @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy="parentCnt") - @JoinTable( - name = DBEntities.CNTSUB_JOIN, - joinColumns = { @JoinColumn(name = DBEntities.CNT_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) }, - inverseJoinColumns = { @JoinColumn(name = DBEntities.SUB_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) } - ) - protected List subscriptions; - - /** List of AccessControlPolicies */ - @OneToMany(fetch=FetchType.LAZY) - @JoinTable( - name = DBEntities.CNTACP_JOIN, - joinColumns = { @JoinColumn(name = DBEntities.CNT_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) }, - inverseJoinColumns = { @JoinColumn(name = DBEntities.ACP_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) } - ) - protected List accessControlPolicies; - - /** List of DynamicAuthorizationConsultations*/ - @ManyToMany(fetch=FetchType.LAZY, mappedBy="linkedContainerEntities") - @JoinTable( - name = DBEntities.CNT_DAC_JOIN, - joinColumns = { @JoinColumn(name = DBEntities.CNT_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) }, - inverseJoinColumns = { @JoinColumn(name = DBEntities.DAC_JOINID, referencedColumnName = ShortName.RESOURCE_ID) } - ) - protected List dynamicAuthorizationConsultations; - - /** List of child Container Entities */ - @OneToMany(fetch=FetchType.LAZY, cascade={CascadeType.ALL}) - @JoinTable( - name=DBEntities.CNTCNTCHILD_JOIN, - joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, - inverseJoinColumns={@JoinColumn(name=DBEntities.CNTCH_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} - ) - protected List childContainers; - - /** List of child ContentInstances Entities */ - @OneToMany(fetch=FetchType.LAZY, cascade={CascadeType.ALL}) - @JoinTable( - name=DBEntities.CNTCINCHILD_JOIN, - joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, - inverseJoinColumns={@JoinColumn(name=DBEntities.CINCH_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} - ) - @OrderBy("creationTime") - protected List childContentInstances; - - /** List of child FlexContainer entities */ - @OneToMany(fetch=FetchType.LAZY, cascade=CascadeType.ALL) - @JoinTable( - name=DBEntities.CNT_FCNTCHILD_JOIN, - joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, - inverseJoinColumns={@JoinColumn(name=DBEntities.FCNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} - ) - protected List childFlexContainers; - - // Database link to the possible parent Container - @ManyToOne(fetch=FetchType.LAZY, targetEntity=ContainerEntity.class) - @JoinTable( - name=DBEntities.CNTCNTCHILD_JOIN, - inverseJoinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, - joinColumns={@JoinColumn(name=DBEntities.CNTCH_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} - ) - protected ContainerEntity parentContainer; - - @ManyToOne(fetch=FetchType.LAZY, targetEntity=FlexContainerEntity.class) - @JoinTable( - name=DBEntities.FCNT_CNTCHILD_JOIN, - inverseJoinColumns={@JoinColumn(name=DBEntities.FCNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, - joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} - ) - protected FlexContainerEntity parentFlexContainer; - - // Database link to the possible parent Application Entity - @ManyToOne(fetch=FetchType.LAZY, targetEntity=AeEntity.class) - @JoinTable( - name = DBEntities.AECNTCHILD_JOIN, - inverseJoinColumns = { @JoinColumn(name = DBEntities.AE_JOINID, referencedColumnName = ShortName.RESOURCE_ID) }, - joinColumns = { @JoinColumn(name = DBEntities.CNT_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) } - ) - protected AeEntity parentAE; - - // Database link to the possible parent CSEBase Entity - @ManyToOne(fetch=FetchType.LAZY, targetEntity=CSEBaseEntity.class) - @JoinTable( - name=DBEntities.CSEB_CNT_JOIN, - inverseJoinColumns={@JoinColumn(name=DBEntities.CSEB_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, - joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} - ) - protected CSEBaseEntity parentCSEB; - - // Database link to the possible parent remote cse Entity - @ManyToOne(fetch=FetchType.LAZY, targetEntity=RemoteCSEEntity.class) - @JoinTable( - name=DBEntities.CSRCNTCHILD_JOIN, - inverseJoinColumns={@JoinColumn(name=DBEntities.CSR_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, - joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} - ) - - - public BigInteger getCurrentNrOfInstances() { - return currentNrOfInstances; - } - - public void setCurrentNrOfInstances(BigInteger currentNrOfInstances) { - this.currentNrOfInstances = currentNrOfInstances; - } - - protected RemoteCSEEntity parentCSR; - - /** - * @return the parentContainer - */ - public ContainerEntity getParentContainer() { - return parentContainer; - } - - /** - * @param parentContainer the parentContainer to set - */ - public void setParentContainer(ContainerEntity parentContainer) { - this.parentContainer = parentContainer; - } - - /** - * @return the parentAE - */ - public AeEntity getParentAE() { - return parentAE; - } - - /** - * @param parentAE the parentAE to set - */ - public void setParentAE(AeEntity parentAE) { - this.parentAE = parentAE; - } - - /** - * @return the parentCSEB - */ - public CSEBaseEntity getParentCSEB() { - return parentCSEB; - } - - /** - * @param parentCSEB the parentCSEB to set - */ - public void setParentCSEB(CSEBaseEntity parentCSEB) { - this.parentCSEB = parentCSEB; - } - - /** - * @return the stateTag - */ - public BigInteger getStateTag() { - return stateTag; - } - - /** - * @param stateTag the stateTag to set - */ - public void setStateTag(BigInteger stateTag) { - this.stateTag = stateTag; - } - - /** - * @return the creator - */ - public String getCreator() { - return creator; - } - - /** - * @param creator the creator to set - */ - public void setCreator(String creator) { - this.creator = creator; - } - - /** - * @return the maxNrOfInstances - */ - public BigInteger getMaxNrOfInstances() { - return maxNrOfInstances; - } - - /** - * @param maxNrOfInstances the maxNrOfInstances to set - */ - public void setMaxNrOfInstances(BigInteger maxNrOfInstances) { - this.maxNrOfInstances = maxNrOfInstances; - } - - /** - * @return the maxByteSize - */ - public BigInteger getMaxByteSize() { - return maxByteSize; - } - - /** - * @param maxByteSize the maxByteSize to set - */ - public void setMaxByteSize(BigInteger maxByteSize) { - this.maxByteSize = maxByteSize; - } - - /** - * @return the maxInstanceAge - */ - public BigInteger getMaxInstanceAge() { - return maxInstanceAge; - } - - /** - * @param maxInstanceAge the maxInstanceAge to set - */ - public void setMaxInstanceAge(BigInteger maxInstanceAge) { - this.maxInstanceAge = maxInstanceAge; - } - - /** - * @return the locationID - */ - public String getLocationID() { - return locationID; - } - - /** - * @param locationID the locationID to set - */ - public void setLocationID(String locationID) { - this.locationID = locationID; - } - - /** - * @return the ontologyRef - */ - public String getOntologyRef() { - return ontologyRef; - } - - /** - * @param ontologyRef the ontologyRef to set - */ - public void setOntologyRef(String ontologyRef) { - this.ontologyRef = ontologyRef; - } - - /** - * @return the childContainers - */ - public List getChildContainers() { - if (this.childContainers == null) { - this.childContainers = new ArrayList<>(); - } - return childContainers; - } - - /** - * @param childContainers the childContainers to set - */ - public void setChildContainers(List childContainers) { - this.childContainers = childContainers; - } - - /** - * @return the childFlexContainers - */ - public List getChildFlexContainers() { - if (this.childFlexContainers == null) { - this.childFlexContainers = new ArrayList<>(); - } - return childFlexContainers; - } - - /** - * @param childFlexContainers the childFlexContainers to set - */ - public void setChildFlexContainers(List childFlexContainers) { - this.childFlexContainers = childFlexContainers; - } - - /** - * @return the accessControlPolicies - */ - public List getAccessControlPolicies() { - if (accessControlPolicies == null) { - accessControlPolicies = new ArrayList<>(); - } - return accessControlPolicies; - } - - /** - * @param accessControlPolicies the accessControlPolicies to set - */ - public void setAccessControlPolicies( - List accessControlPolicies) { - this.accessControlPolicies = accessControlPolicies; - } - - /** - * @return the childContentInstances - */ - public List getChildContentInstances() { - if (childContentInstances == null) { - this.childContentInstances = new ArrayList<>(); - } - return childContentInstances; - } - - /** - * @param childContentInstances the childContentInstances to set - */ - public void setChildContentInstances( - List childContentInstances) { - this.childContentInstances = childContentInstances; - } - - /** - * @return the parentCSR - */ - public RemoteCSEEntity getParentCSR() { - return parentCSR; - } - - /** - * @param parentCSR the parentCSR to set - */ - public void setParentCSR(RemoteCSEEntity parentCSR) { - this.parentCSR = parentCSR; - } - - /** - * @return the subscriptions - */ - public List getSubscriptions() { - if (this.subscriptions == null) { - this.subscriptions = new ArrayList<>(); - } - return subscriptions; - } - - /** - * @param subscriptions the subscriptions to set - */ - public void setSubscriptions(List subscriptions) { - this.subscriptions = subscriptions; - } - - @Override - /** - * Retrieve linked dynamicAuthorizationConsultations - */ - public List getDynamicAuthorizationConsultations() { - if (dynamicAuthorizationConsultations == null) { - dynamicAuthorizationConsultations = new ArrayList<>(); - } - return dynamicAuthorizationConsultations; - } - - @Override - /** - * Set linked dynamicAuthorizationConsultations - */ - public void setDynamicAuthorizationConsultations(List list) { - this.dynamicAuthorizationConsultations = list; - } - - /** - * Return the current byte size of summed content instance content size in bytes - * @return - */ - public int getCurrentByteSize() { - int result = 0; - for (ContentInstanceEntity cin : this.getChildContentInstances()) { - result += cin.getByteSize(); - } - return result; - } - -} +/******************************************************************************* + + * Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) + * 7 Colonel Roche 31077 Toulouse - France + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Initial Contributors: + * Thierry Monteil : Project manager, technical co-manager + * Mahdi Ben Alaya : Technical co-manager + * Samir Medjiah : Technical co-manager + * Khalil Drira : Strategy expert + * Guillaume Garzone : Developer + * François Aïssaoui : Developer + * + * New contributors : + *******************************************************************************/ +package org.eclipse.om2m.commons.entities; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; +import javax.persistence.JoinColumn; +import javax.persistence.JoinTable; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OrderBy; + +import org.eclipse.om2m.commons.constants.DBEntities; +import org.eclipse.om2m.commons.constants.ShortName; + +/** + * Container JPA entity + * + */ +@Entity(name=DBEntities.CONTAINER_ENTITY) +@Inheritance(strategy = InheritanceType.JOINED) +public class ContainerEntity extends AnnounceableSubordinateEntity{ + @Column(name= ShortName.STATETAG) + protected BigInteger stateTag; + @Column(name= ShortName.CREATOR) + protected String creator; + @Column(name= ShortName.MAX_NR_OF_INSTANCES) + protected BigInteger maxNrOfInstances; + @Column(name= ShortName.MAX_BYTE_SIZE) + protected BigInteger maxByteSize; + @Column(name= ShortName.CURRENT_NUMBER_OF_INSTANCES) + protected BigInteger currentNrOfInstances; + @Column(name= ShortName.MAX_INSTANCE_AGE) + protected BigInteger maxInstanceAge; + @Column(name= ShortName.LOCATION_ID) + protected String locationID; + @Column(name= ShortName.ONTOLOGY_REF) + protected String ontologyRef; + + @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy="parentCnt") + @JoinTable( + name = DBEntities.CNTSUB_JOIN, + joinColumns = { @JoinColumn(name = DBEntities.CNT_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) }, + inverseJoinColumns = { @JoinColumn(name = DBEntities.SUB_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) } + ) + protected List subscriptions; + + /** List of AccessControlPolicies */ + @OneToMany(fetch=FetchType.LAZY) + @JoinTable( + name = DBEntities.CNTACP_JOIN, + joinColumns = { @JoinColumn(name = DBEntities.CNT_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) }, + inverseJoinColumns = { @JoinColumn(name = DBEntities.ACP_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) } + ) + protected List accessControlPolicies; + + /** List of DynamicAuthorizationConsultations*/ + @ManyToMany(fetch=FetchType.LAZY, mappedBy="linkedContainerEntities") + @JoinTable( + name = DBEntities.CNT_DAC_JOIN, + joinColumns = { @JoinColumn(name = DBEntities.CNT_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) }, + inverseJoinColumns = { @JoinColumn(name = DBEntities.DAC_JOINID, referencedColumnName = ShortName.RESOURCE_ID) } + ) + protected List dynamicAuthorizationConsultations; + + /** List of child Container Entities */ + @OneToMany(fetch=FetchType.LAZY, cascade={CascadeType.ALL}) + @JoinTable( + name=DBEntities.CNTCNTCHILD_JOIN, + joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, + inverseJoinColumns={@JoinColumn(name=DBEntities.CNTCH_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} + ) + protected List childContainers; + + /** List of child ContentInstances Entities */ + @OneToMany(fetch=FetchType.LAZY, cascade={CascadeType.ALL}) + @JoinTable( + name=DBEntities.CNTCINCHILD_JOIN, + joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, + inverseJoinColumns={@JoinColumn(name=DBEntities.CINCH_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} + ) + @OrderBy("creationTime") + protected List childContentInstances; + + /** List of child FlexContainer entities */ + @OneToMany(fetch=FetchType.LAZY, cascade=CascadeType.ALL, mappedBy="parentContainer") + @JoinTable( + name=DBEntities.CNT_FCNTCHILD_JOIN, + joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, + inverseJoinColumns={@JoinColumn(name=DBEntities.FCNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} + ) + protected List childFlexContainers; + + // Database link to the possible parent Container + @ManyToOne(fetch=FetchType.LAZY, targetEntity=ContainerEntity.class) + @JoinTable( + name=DBEntities.CNTCNTCHILD_JOIN, + inverseJoinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, + joinColumns={@JoinColumn(name=DBEntities.CNTCH_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} + ) + protected ContainerEntity parentContainer; + + @ManyToOne(fetch=FetchType.LAZY, targetEntity=FlexContainerEntity.class) + @JoinTable( + name=DBEntities.FCNT_CNTCHILD_JOIN, + inverseJoinColumns={@JoinColumn(name=DBEntities.FCNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, + joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} + ) + protected FlexContainerEntity parentFlexContainer; + + // Database link to the possible parent Application Entity + @ManyToOne(fetch=FetchType.LAZY, targetEntity=AeEntity.class) + @JoinTable( + name = DBEntities.AECNTCHILD_JOIN, + inverseJoinColumns = { @JoinColumn(name = DBEntities.AE_JOINID, referencedColumnName = ShortName.RESOURCE_ID) }, + joinColumns = { @JoinColumn(name = DBEntities.CNT_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) } + ) + protected AeEntity parentAE; + + // Database link to the possible parent CSEBase Entity + @ManyToOne(fetch=FetchType.LAZY, targetEntity=CSEBaseEntity.class) + @JoinTable( + name=DBEntities.CSEB_CNT_JOIN, + inverseJoinColumns={@JoinColumn(name=DBEntities.CSEB_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, + joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} + ) + protected CSEBaseEntity parentCSEB; + + // Database link to the possible parent remote cse Entity + @ManyToOne(fetch=FetchType.LAZY, targetEntity=RemoteCSEEntity.class) + @JoinTable( + name=DBEntities.CSRCNTCHILD_JOIN, + inverseJoinColumns={@JoinColumn(name=DBEntities.CSR_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)}, + joinColumns={@JoinColumn(name=DBEntities.CNT_JOIN_ID, referencedColumnName=ShortName.RESOURCE_ID)} + ) + + + public BigInteger getCurrentNrOfInstances() { + return currentNrOfInstances; + } + + public void setCurrentNrOfInstances(BigInteger currentNrOfInstances) { + this.currentNrOfInstances = currentNrOfInstances; + } + + protected RemoteCSEEntity parentCSR; + + /** + * @return the parentContainer + */ + public ContainerEntity getParentContainer() { + return parentContainer; + } + + /** + * @param parentContainer the parentContainer to set + */ + public void setParentContainer(ContainerEntity parentContainer) { + this.parentContainer = parentContainer; + } + + /** + * @return the parentAE + */ + public AeEntity getParentAE() { + return parentAE; + } + + /** + * @param parentAE the parentAE to set + */ + public void setParentAE(AeEntity parentAE) { + this.parentAE = parentAE; + } + + /** + * @return the parentCSEB + */ + public CSEBaseEntity getParentCSEB() { + return parentCSEB; + } + + /** + * @param parentCSEB the parentCSEB to set + */ + public void setParentCSEB(CSEBaseEntity parentCSEB) { + this.parentCSEB = parentCSEB; + } + + /** + * @return the stateTag + */ + public BigInteger getStateTag() { + return stateTag; + } + + /** + * @param stateTag the stateTag to set + */ + public void setStateTag(BigInteger stateTag) { + this.stateTag = stateTag; + } + + /** + * @return the creator + */ + public String getCreator() { + return creator; + } + + /** + * @param creator the creator to set + */ + public void setCreator(String creator) { + this.creator = creator; + } + + /** + * @return the maxNrOfInstances + */ + public BigInteger getMaxNrOfInstances() { + return maxNrOfInstances; + } + + /** + * @param maxNrOfInstances the maxNrOfInstances to set + */ + public void setMaxNrOfInstances(BigInteger maxNrOfInstances) { + this.maxNrOfInstances = maxNrOfInstances; + } + + /** + * @return the maxByteSize + */ + public BigInteger getMaxByteSize() { + return maxByteSize; + } + + /** + * @param maxByteSize the maxByteSize to set + */ + public void setMaxByteSize(BigInteger maxByteSize) { + this.maxByteSize = maxByteSize; + } + + /** + * @return the maxInstanceAge + */ + public BigInteger getMaxInstanceAge() { + return maxInstanceAge; + } + + /** + * @param maxInstanceAge the maxInstanceAge to set + */ + public void setMaxInstanceAge(BigInteger maxInstanceAge) { + this.maxInstanceAge = maxInstanceAge; + } + + /** + * @return the locationID + */ + public String getLocationID() { + return locationID; + } + + /** + * @param locationID the locationID to set + */ + public void setLocationID(String locationID) { + this.locationID = locationID; + } + + /** + * @return the ontologyRef + */ + public String getOntologyRef() { + return ontologyRef; + } + + /** + * @param ontologyRef the ontologyRef to set + */ + public void setOntologyRef(String ontologyRef) { + this.ontologyRef = ontologyRef; + } + + /** + * @return the childContainers + */ + public List getChildContainers() { + if (this.childContainers == null) { + this.childContainers = new ArrayList<>(); + } + return childContainers; + } + + /** + * @param childContainers the childContainers to set + */ + public void setChildContainers(List childContainers) { + this.childContainers = childContainers; + } + + /** + * @return the childFlexContainers + */ + public List getChildFlexContainers() { + if (this.childFlexContainers == null) { + this.childFlexContainers = new ArrayList<>(); + } + return childFlexContainers; + } + + /** + * @param childFlexContainers the childFlexContainers to set + */ + public void setChildFlexContainers(List childFlexContainers) { + this.childFlexContainers = childFlexContainers; + } + + /** + * @return the accessControlPolicies + */ + public List getAccessControlPolicies() { + if (accessControlPolicies == null) { + accessControlPolicies = new ArrayList<>(); + } + return accessControlPolicies; + } + + /** + * @param accessControlPolicies the accessControlPolicies to set + */ + public void setAccessControlPolicies( + List accessControlPolicies) { + this.accessControlPolicies = accessControlPolicies; + } + + /** + * @return the childContentInstances + */ + public List getChildContentInstances() { + if (childContentInstances == null) { + this.childContentInstances = new ArrayList<>(); + } + return childContentInstances; + } + + /** + * @param childContentInstances the childContentInstances to set + */ + public void setChildContentInstances( + List childContentInstances) { + this.childContentInstances = childContentInstances; + } + + /** + * @return the parentCSR + */ + public RemoteCSEEntity getParentCSR() { + return parentCSR; + } + + /** + * @param parentCSR the parentCSR to set + */ + public void setParentCSR(RemoteCSEEntity parentCSR) { + this.parentCSR = parentCSR; + } + + /** + * @return the subscriptions + */ + public List getSubscriptions() { + if (this.subscriptions == null) { + this.subscriptions = new ArrayList<>(); + } + return subscriptions; + } + + /** + * @param subscriptions the subscriptions to set + */ + public void setSubscriptions(List subscriptions) { + this.subscriptions = subscriptions; + } + + @Override + /** + * Retrieve linked dynamicAuthorizationConsultations + */ + public List getDynamicAuthorizationConsultations() { + if (dynamicAuthorizationConsultations == null) { + dynamicAuthorizationConsultations = new ArrayList<>(); + } + return dynamicAuthorizationConsultations; + } + + @Override + /** + * Set linked dynamicAuthorizationConsultations + */ + public void setDynamicAuthorizationConsultations(List list) { + this.dynamicAuthorizationConsultations = list; + } + + /** + * Return the current byte size of summed content instance content size in bytes + * @return + */ + public int getCurrentByteSize() { + int result = 0; + for (ContentInstanceEntity cin : this.getChildContentInstances()) { + result += cin.getByteSize(); + } + return result; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/CustomAttributeEntity.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/CustomAttributeEntity.java index b2781422..cc03f727 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/CustomAttributeEntity.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/CustomAttributeEntity.java @@ -27,14 +27,17 @@ public class CustomAttributeEntity { @Id @GeneratedValue(strategy=GenerationType.AUTO) - @Column(name=ShortName.RESOURCE_ID) + @Column(name = ShortName.RESOURCE_ID) protected long resourceID; - @Column(name= ShortName.CUSTOM_ATTRIBUTE_NAME) - protected String customAttributeName; + @Column(name = ShortName.CUSTOM_ATTRIBUTE_NAME) + protected String name; + + @Column(name = ShortName.CUSTOM_ATTRIBUTE_TYPE) + protected String type; @Column(name = ShortName.CUSTOM_ATTRIBUTE_VALUE) - protected String customAttributeValue; + protected String value; @ManyToOne(targetEntity = FlexContainerEntity.class) @JoinTable(name = DBEntities.FCNT_CA_JOIN, joinColumns = { @@ -42,20 +45,28 @@ public class CustomAttributeEntity { @JoinColumn(name = DBEntities.FCNT_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) }) protected FlexContainerEntity parentFlexContainer; - public String getCustomAttributeName() { - return customAttributeName; + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; } - public void setCustomAttributeName(String customAttributeName) { - this.customAttributeName = customAttributeName; + public void setType(String type) { + this.type = type; } - public String getCustomAttributeValue() { - return customAttributeValue; + public String getValue() { + return value; } - public void setCustomAttributeValue(String customAttributeValue) { - this.customAttributeValue = customAttributeValue; + public void setValue(String value) { + this.value = value; } public FlexContainerEntity getParentFlexContainer() { @@ -73,8 +84,10 @@ public class CustomAttributeEntity { public void setResourceID(long resourceID) { this.resourceID = resourceID; } - - - + + @Override + public String toString() { + return ""; + } } diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/FlexContainerEntity.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/FlexContainerEntity.java index 50e7d97b..8d0b70bc 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/FlexContainerEntity.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/FlexContainerEntity.java @@ -426,10 +426,10 @@ public class FlexContainerEntity extends AnnounceableSubordinateEntity{ this.customAttributes = customAttributes; } - public void createOrUpdateCustomAttribute(String name, Object value) { + public void createOrUpdateCustomAttribute(String name, Object value, String type) { CustomAttributeEntity attToCreateOrUpdate = null; for(CustomAttributeEntity cae : getCustomAttributes()) { - if (cae.getCustomAttributeName().equals(name)) { + if (cae.getName().equals(name)) { attToCreateOrUpdate = cae; break; } @@ -437,11 +437,11 @@ public class FlexContainerEntity extends AnnounceableSubordinateEntity{ if (attToCreateOrUpdate == null) { attToCreateOrUpdate = new CustomAttributeEntity(); - attToCreateOrUpdate.setCustomAttributeName(name); + attToCreateOrUpdate.setName(name); getCustomAttributes().add(attToCreateOrUpdate); } - attToCreateOrUpdate.setCustomAttributeValue((value != null) ? value.toString() : null); - + attToCreateOrUpdate.setValue((value != null) ? value.toString() : null); + attToCreateOrUpdate.setType(type); } } diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/RemoteCSEEntity.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/RemoteCSEEntity.java index a76f0e4e..9c65e57f 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/RemoteCSEEntity.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/RemoteCSEEntity.java @@ -113,7 +113,7 @@ public class RemoteCSEEntity extends AnnounceableSubordinateEntity { ) protected List childCnt; - @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL) + @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL, mappedBy="parentCSR") @JoinTable( name = DBEntities.CSR_FCNTCHILD_JOIN, joinColumns = { @JoinColumn(name = DBEntities.CSR_JOIN_ID, referencedColumnName = ShortName.RESOURCE_ID) }, diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/ResourceEntity.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/ResourceEntity.java index e7c8092c..aaecec6b 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/ResourceEntity.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/entities/ResourceEntity.java @@ -23,6 +23,7 @@ import java.math.BigInteger; import java.util.ArrayList; import java.util.List; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.FetchType; import javax.persistence.Id; @@ -43,19 +44,26 @@ public class ResourceEntity { @Id @Column(name=ShortName.RESOURCE_ID) protected String resourceID; + @Column(name = ShortName.RESOURCE_TYPE) protected BigInteger resourceType; + @Column(name=ShortName.PARENT_ID) protected String parentID; + @Column(name=ShortName.CREATION_TIME) protected String creationTime; + @Column(name=ShortName.LAST_MODIFIED_TIME) protected String lastModifiedTime; - @ManyToMany(targetEntity = LabelEntity.class, fetch = FetchType.LAZY) - protected List labelsEntities; + @ManyToMany(targetEntity = LabelEntity.class, fetch = FetchType.LAZY, + cascade = {CascadeType.PERSIST}) + protected List labelsEntities; + @Column(name=ShortName.RESOURCE_NAME) protected String name; + @Column(name=DBEntities.HIERARCHICAL_URI) protected String hierarchicalURI; @@ -221,10 +229,16 @@ public class ResourceEntity { */ public void setLabelsEntitiesFromSring(List labelsStrings) { this.getLabelsEntities().clear(); - for (String s: labelsStrings) { - LabelEntity toAdd = new LabelEntity(s); - if(!this.getLabelsEntities().contains(toAdd)){ - this.getLabelsEntities().add(new LabelEntity(s)); + for (String s : labelsStrings) { + boolean found = false; + for (LabelEntity label : this.getLabelsEntities()) { + if (s.equals(label.getLabel())) { + found = true; + break; + } + } + if (! found) { + this.getLabelsEntities().add(new LabelEntity(s)); } } } @@ -233,5 +247,4 @@ public class ResourceEntity { this.resourceType = BigInteger.valueOf(value); } - } diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/exceptions/AccessDeniedException.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/exceptions/AccessDeniedException.java index a7aac743..89ccc058 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/exceptions/AccessDeniedException.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/exceptions/AccessDeniedException.java @@ -1,44 +1,62 @@ -/******************************************************************************* - * Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) - * 7 Colonel Roche 31077 Toulouse - France - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * Thierry Monteil : Project manager, technical co-manager - * Mahdi Ben Alaya : Technical co-manager - * Samir Medjiah : Technical co-manager - * Khalil Drira : Strategy expert - * Guillaume Garzone : Developer - * François Aïssaoui : Developer - * - * New contributors : - *******************************************************************************/ -package org.eclipse.om2m.commons.exceptions; - -import org.eclipse.om2m.commons.constants.ResponseStatusCode; - -public class AccessDeniedException extends Om2mException { - - /** - * - */ - private static final long serialVersionUID = -2488820054507430948L; - - public AccessDeniedException(){ - super("Unknown or unauthorized originator", ResponseStatusCode.ACCESS_DENIED); - } - - public AccessDeniedException(String message){ - super(message, ResponseStatusCode.ACCESS_DENIED); - } - - public AccessDeniedException(String message, Throwable cause){ - super(message, cause, ResponseStatusCode.ACCESS_DENIED); - } - -} - +/******************************************************************************* + * Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) + * 7 Colonel Roche 31077 Toulouse - France + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Initial Contributors: + * Thierry Monteil : Project manager, technical co-manager + * Mahdi Ben Alaya : Technical co-manager + * Samir Medjiah : Technical co-manager + * Khalil Drira : Strategy expert + * Guillaume Garzone : Developer + * François Aïssaoui : Developer + * + * New contributors : + *******************************************************************************/ +package org.eclipse.om2m.commons.exceptions; + +import org.eclipse.om2m.commons.constants.ResponseStatusCode; +import org.eclipse.om2m.commons.resource.DynAuthTokenReqInfo; + +public class AccessDeniedException extends Om2mException { + + /** + * + */ + private static final long serialVersionUID = -2488820054507430948L; + + private DynAuthTokenReqInfo dynAuthTokenReqInfo = null; + + public AccessDeniedException(){ + super("Unknown or unauthorized originator", ResponseStatusCode.ACCESS_DENIED); + } + + public AccessDeniedException(DynAuthTokenReqInfo pDynAuthTokenReqInfo){ + super("Unknown or unauthorized originator", ResponseStatusCode.ACCESS_DENIED); + dynAuthTokenReqInfo = pDynAuthTokenReqInfo; + } + + public AccessDeniedException(String message){ + super(message, ResponseStatusCode.ACCESS_DENIED); + } + + public AccessDeniedException(String message, Throwable cause){ + super(message, cause, ResponseStatusCode.ACCESS_DENIED); + } + + public DynAuthTokenReqInfo getDynAuthTokenReqInfo() { + return dynAuthTokenReqInfo; + } + + public void setDynAuthTokenReqInfo(DynAuthTokenReqInfo dynAuthTokenReqInfo) { + this.dynAuthTokenReqInfo = dynAuthTokenReqInfo; + } + + + +} + diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AE.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AE.java index efade70b..148e4bd5 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AE.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AE.java @@ -39,99 +39,7 @@ import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import org.eclipse.om2m.commons.constants.ShortName; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ActivateClockTimerFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.AlarmSensorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.AlarmSpeakerFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.AtmosphericPressureSensorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.AudioVideoInputFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.AudioVolumeFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BatteryFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BinarySwitchFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BioElectricalImpedanceAnalysisFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BoilerFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BrewingFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BrightnessFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ClockFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ColourFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ColourSaturationFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ContactSensorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeactivateClockTimerFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DecrementNumberValueFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceAirConditionerFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceCameraFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceClothesWasherFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceCoffeeMachineFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceContactDetectorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceDoorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceElectricVehicleChargerFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceFloodDetectorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceGasValveFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceLightFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceMicrogenerationFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceMotionDetectorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceNumberDeviceFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceOvenFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceRefrigeratorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceRobotCleanerFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceSmartElectricMeterFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceSmokeDetectorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceSmokeExtractorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceStorageBatteryFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceSwitchButtonFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceTelevisionFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceTemperatureDetectorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceThermostatFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceWarningDeviceFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceWaterHeaterFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceWaterValveFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceWeatherStationFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DoorStatusFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DownChannelFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DownVolumeFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ElectricVehicleConnectorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.EnergyConsumptionFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.EnergyGenerationFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ExtendedCarbonDioxideSensorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.FaultDetectionFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.FoamingFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.GrinderFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.HeightFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.HotWaterSupplyFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.IncrementNumberValueFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.KeepWarmFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.KeypadFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.LiquidLevelFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.LockFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.MotionSensorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.NoiseFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.NumberValueFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.OximeterFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.PersonSensorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.PowerSaveFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.PushButtonFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RecorderFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RefrigerationFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RelativeHumidityFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ResetNumberValueFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RinseLevelFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RunModeFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.SignalStrengthFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.SmokeSensorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.SpinLevelFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.StreamingFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.TelevisionChannelFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.TemperatureAlarmFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.TemperatureFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.TimerFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ToggleFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.TurboFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.UpChannelFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.UpVolumeFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.WaterFlowFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.WaterLevelFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.WaterSensorFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.WeightFlexContainer; -import org.eclipse.om2m.commons.resource.flexcontainerspec.WindFlexContainer; +import org.eclipse.om2m.commons.resource.flexcontainerspec.*; /** *

@@ -208,100 +116,155 @@ public class AE extends AnnounceableResource { @XmlElement(name = ShortName.ACP, namespace = "http://www.onem2m.org/xml/protocols", type = AccessControlPolicy.class), @XmlElement(name = ShortName.SUB, namespace = "http://www.onem2m.org/xml/protocols", type = Subscription.class), @XmlElement(name = ShortName.PCH, namespace = "http://www.onem2m.org/xml/protocols", type = PollingChannel.class), - @XmlElement(name = ShortName.FCNT, type = AbstractFlexContainer.class), - @XmlElement(name = AlarmSpeakerFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSpeakerFlexContainer.class), - @XmlElement(name = AudioVideoInputFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AudioVideoInputFlexContainer.class), - @XmlElement(name = AudioVolumeFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AudioVolumeFlexContainer.class), - @XmlElement(name = UpVolumeFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = UpVolumeFlexContainer.class), - @XmlElement(name = DownVolumeFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DownVolumeFlexContainer.class), - @XmlElement(name = BatteryFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BatteryFlexContainer.class), - @XmlElement(name = BinarySwitchFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BinarySwitchFlexContainer.class), - @XmlElement(name = ToggleFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ToggleFlexContainer.class), - @XmlElement(name = BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BioElectricalImpedanceAnalysisFlexContainer.class), - @XmlElement(name = BoilerFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BoilerFlexContainer.class), - @XmlElement(name = BrightnessFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BrightnessFlexContainer.class), - @XmlElement(name = ClockFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ClockFlexContainer.class), - @XmlElement(name = ColourFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ColourFlexContainer.class), - @XmlElement(name = ColourSaturationFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ColourSaturationFlexContainer.class), - @XmlElement(name = DoorStatusFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DoorStatusFlexContainer.class), - @XmlElement(name = ElectricVehicleConnectorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ElectricVehicleConnectorFlexContainer.class), - @XmlElement(name = EnergyConsumptionFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = EnergyConsumptionFlexContainer.class), - @XmlElement(name = EnergyGenerationFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = EnergyGenerationFlexContainer.class), - @XmlElement(name = FaultDetectionFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = FaultDetectionFlexContainer.class), - @XmlElement(name = HeightFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = HeightFlexContainer.class), - @XmlElement(name = HotWaterSupplyFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = HotWaterSupplyFlexContainer.class), - @XmlElement(name = KeypadFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = KeypadFlexContainer.class), - @XmlElement(name = MotionSensorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = MotionSensorFlexContainer.class), - @XmlElement(name = OximeterFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = OximeterFlexContainer.class), - @XmlElement(name = PowerSaveFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = PowerSaveFlexContainer.class), - @XmlElement(name = PushButtonFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = PushButtonFlexContainer.class), - @XmlElement(name = RecorderFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RecorderFlexContainer.class), - @XmlElement(name = RefrigerationFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RefrigerationFlexContainer.class), - @XmlElement(name = RelativeHumidityFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RelativeHumidityFlexContainer.class), - @XmlElement(name = RinseLevelFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RinseLevelFlexContainer.class), - @XmlElement(name = RunModeFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RunModeFlexContainer.class), - @XmlElement(name = SignalStrengthFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = SignalStrengthFlexContainer.class), - @XmlElement(name = SmokeSensorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = SmokeSensorFlexContainer.class), - @XmlElement(name = SpinLevelFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = SpinLevelFlexContainer.class), - @XmlElement(name = TelevisionChannelFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TelevisionChannelFlexContainer.class), - @XmlElement(name = UpChannelFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = UpChannelFlexContainer.class), - @XmlElement(name = DownChannelFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DownChannelFlexContainer.class), - @XmlElement(name = TemperatureFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureFlexContainer.class), - @XmlElement(name = TemperatureAlarmFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureAlarmFlexContainer.class), - @XmlElement(name = TimerFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TimerFlexContainer.class), - @XmlElement(name = ActivateClockTimerFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ActivateClockTimerFlexContainer.class), - @XmlElement(name = DeactivateClockTimerFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeactivateClockTimerFlexContainer.class), - @XmlElement(name = TurboFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TurboFlexContainer.class), - @XmlElement(name = WaterFlowFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WaterFlowFlexContainer.class), - @XmlElement(name = WaterLevelFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WaterLevelFlexContainer.class), - @XmlElement(name = WaterSensorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WaterSensorFlexContainer.class), - @XmlElement(name = WeightFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WeightFlexContainer.class), - @XmlElement(name = WindFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WindFlexContainer.class), - @XmlElement(name = StreamingFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = StreamingFlexContainer.class), - @XmlElement(name = PersonSensorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = PersonSensorFlexContainer.class), - @XmlElement(name = BrewingFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BrewingFlexContainer.class), - @XmlElement(name = LiquidLevelFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = LiquidLevelFlexContainer.class), - @XmlElement(name = GrinderFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = GrinderFlexContainer.class), - @XmlElement(name = FoamingFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = FoamingFlexContainer.class), - @XmlElement(name = KeepWarmFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = KeepWarmFlexContainer.class), - @XmlElement(name = ContactSensorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ContactSensorFlexContainer.class), - @XmlElement(name = AlarmSensorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSensorFlexContainer.class), - @XmlElement(name = LockFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = LockFlexContainer.class), - @XmlElement(name = AtmosphericPressureSensorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AtmosphericPressureSensorFlexContainer.class), - @XmlElement(name = NoiseFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = NoiseFlexContainer.class), - @XmlElement(name = ExtendedCarbonDioxideSensorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ExtendedCarbonDioxideSensorFlexContainer.class), - @XmlElement(name = NumberValueFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = NumberValueFlexContainer.class), - @XmlElement(name = DecrementNumberValueFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DecrementNumberValueFlexContainer.class), - @XmlElement(name = IncrementNumberValueFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = IncrementNumberValueFlexContainer.class), - @XmlElement(name = ResetNumberValueFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ResetNumberValueFlexContainer.class), - @XmlElement(name = DeviceAirConditionerFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirConditionerFlexContainer.class), - @XmlElement(name = DeviceClothesWasherFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherFlexContainer.class), - @XmlElement(name = DeviceElectricVehicleChargerFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceElectricVehicleChargerFlexContainer.class), - @XmlElement(name = DeviceLightFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceLightFlexContainer.class), - @XmlElement(name = DeviceMicrogenerationFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMicrogenerationFlexContainer.class), - @XmlElement(name = DeviceOvenFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOvenFlexContainer.class), - @XmlElement(name = DeviceRefrigeratorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRefrigeratorFlexContainer.class), - @XmlElement(name = DeviceRobotCleanerFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRobotCleanerFlexContainer.class), - @XmlElement(name = DeviceSmartElectricMeterFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartElectricMeterFlexContainer.class), - @XmlElement(name = DeviceStorageBatteryFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceStorageBatteryFlexContainer.class), - @XmlElement(name = DeviceTelevisionFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTelevisionFlexContainer.class), - @XmlElement(name = DeviceThermostatFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermostatFlexContainer.class), - @XmlElement(name = DeviceWaterHeaterFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterHeaterFlexContainer.class), - @XmlElement(name = DeviceCameraFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCameraFlexContainer.class), - @XmlElement(name = DeviceCoffeeMachineFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCoffeeMachineFlexContainer.class), - @XmlElement(name = DeviceContactDetectorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceContactDetectorFlexContainer.class), - @XmlElement(name = DeviceDoorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorFlexContainer.class), - @XmlElement(name = DeviceFloodDetectorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFloodDetectorFlexContainer.class), - @XmlElement(name = DeviceGasValveFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGasValveFlexContainer.class), - @XmlElement(name = DeviceMotionDetectorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMotionDetectorFlexContainer.class), - @XmlElement(name = DeviceSmokeDetectorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeDetectorFlexContainer.class), - @XmlElement(name = DeviceSmokeExtractorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeExtractorFlexContainer.class), - @XmlElement(name = DeviceSwitchButtonFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchButtonFlexContainer.class), - @XmlElement(name = DeviceTemperatureDetectorFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTemperatureDetectorFlexContainer.class), - @XmlElement(name = DeviceWarningDeviceFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWarningDeviceFlexContainer.class), - @XmlElement(name = DeviceWaterValveFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterValveFlexContainer.class), - @XmlElement(name = DeviceWeatherStationFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeatherStationFlexContainer.class), - @XmlElement(name = DeviceNumberDeviceFlexContainer.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceNumberDeviceFlexContainer.class) + @XmlElement(name = ShortName.FCNT, type = AbstractFlexContainer.class), + @XmlElement(name = DeviceThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThreeDPrinterFlexContainer.class), + @XmlElement(name = DeviceAirConditionerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirConditionerFlexContainer.class), + @XmlElement(name = DeviceAirPurifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirPurifierFlexContainer.class), + @XmlElement(name = DeviceAirQualityMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirQualityMonitorFlexContainer.class), + @XmlElement(name = DeviceAudioReceiverFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAudioReceiverFlexContainer.class), + @XmlElement(name = DeviceBloodPressureMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceBloodPressureMonitorFlexContainer.class), + @XmlElement(name = DeviceCameraFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCameraFlexContainer.class), + @XmlElement(name = DeviceClothesDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesDryerFlexContainer.class), + @XmlElement(name = DeviceClothesWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherFlexContainer.class), + @XmlElement(name = DeviceClothesWasherDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherDryerFlexContainer.class), + @XmlElement(name = DeviceCoffeeMachineFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCoffeeMachineFlexContainer.class), + @XmlElement(name = DeviceCookerHoodFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCookerHoodFlexContainer.class), + @XmlElement(name = DeviceCooktopFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCooktopFlexContainer.class), + @XmlElement(name = DeviceDehumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDehumidifierFlexContainer.class), + @XmlElement(name = DeviceDishWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDishWasherFlexContainer.class), + @XmlElement(name = DeviceDoorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorFlexContainer.class), + @XmlElement(name = DeviceDoorLockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorLockFlexContainer.class), + @XmlElement(name = DeviceElectricVehicleChargerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceElectricVehicleChargerFlexContainer.class), + @XmlElement(name = DeviceFanFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFanFlexContainer.class), + @XmlElement(name = DeviceFoodProbeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFoodProbeFlexContainer.class), + @XmlElement(name = DeviceFreezerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFreezerFlexContainer.class), + @XmlElement(name = DeviceGlucosemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGlucosemeterFlexContainer.class), + @XmlElement(name = DeviceHeartRateMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHeartRateMonitorFlexContainer.class), + @XmlElement(name = DeviceHomeCCTVFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHomeCCTVFlexContainer.class), + @XmlElement(name = DeviceHumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHumidifierFlexContainer.class), + @XmlElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceKettleFlexContainer.class), + @XmlElement(name = DeviceLightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceLightFlexContainer.class), + @XmlElement(name = DeviceMicrogenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMicrogenerationFlexContainer.class), + @XmlElement(name = DeviceMultiFunctionPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMultiFunctionPrinterFlexContainer.class), + @XmlElement(name = DeviceOutdoorLampFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOutdoorLampFlexContainer.class), + @XmlElement(name = DeviceOvenFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOvenFlexContainer.class), + @XmlElement(name = DevicePrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DevicePrinterFlexContainer.class), + @XmlElement(name = DevicePulseOximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DevicePulseOximeterFlexContainer.class), + @XmlElement(name = DeviceRefrigeratorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRefrigeratorFlexContainer.class), + @XmlElement(name = DeviceRobotCleanerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRobotCleanerFlexContainer.class), + @XmlElement(name = DeviceScannerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceScannerFlexContainer.class), + @XmlElement(name = DeviceSecurityPanelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSecurityPanelFlexContainer.class), + @XmlElement(name = DeviceSetTopBoxFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSetTopBoxFlexContainer.class), + @XmlElement(name = DeviceSmartElectricMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartElectricMeterFlexContainer.class), + @XmlElement(name = DeviceSmartPlugFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartPlugFlexContainer.class), + @XmlElement(name = DeviceSteamClosetFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSteamClosetFlexContainer.class), + @XmlElement(name = DeviceStorageBatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceStorageBatteryFlexContainer.class), + @XmlElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchFlexContainer.class), + @XmlElement(name = DeviceTelevisionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTelevisionFlexContainer.class), + @XmlElement(name = DeviceThermometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermometerFlexContainer.class), + @XmlElement(name = DeviceThermostatFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermostatFlexContainer.class), + @XmlElement(name = DeviceWaterHeaterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterHeaterFlexContainer.class), + @XmlElement(name = DeviceWaterValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterValveFlexContainer.class), + @XmlElement(name = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.class), + @XmlElement(name = DeviceWindowShadeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWindowShadeFlexContainer.class), + @XmlElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchFlexContainer.class), + @XmlElement(name = DeviceSmokeDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeDetectorFlexContainer.class), + @XmlElement(name = DeviceContactDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceContactDetectorFlexContainer.class), + @XmlElement(name = DeviceMotionDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMotionDetectorFlexContainer.class), + @XmlElement(name = DeviceFloodDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFloodDetectorFlexContainer.class), + @XmlElement(name = DeviceTemperatureDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTemperatureDetectorFlexContainer.class), + @XmlElement(name = DeviceWeatherStationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeatherStationFlexContainer.class), + @XmlElement(name = DeviceGasValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGasValveFlexContainer.class), + @XmlElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceKettleFlexContainer.class), + @XmlElement(name = DeviceWarningFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWarningFlexContainer.class), + @XmlElement(name = LiquidLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LiquidLevelFlexContainer.class), + @XmlElement(name = TemperatureAlarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureAlarmFlexContainer.class), + @XmlElement(name = ContactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ContactSensorFlexContainer.class), + @XmlElement(name = ClothesDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesDryerJobModeFlexContainer.class), + @XmlElement(name = OximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OximeterFlexContainer.class), + @XmlElement(name = TurboFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TurboFlexContainer.class), + @XmlElement(name = AirConJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirConJobModeFlexContainer.class), + @XmlElement(name = EnergyGenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = EnergyGenerationFlexContainer.class), + @XmlElement(name = KeypadFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = KeypadFlexContainer.class), + @XmlElement(name = MotionSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = MotionSensorFlexContainer.class), + @XmlElement(name = SmokeSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SmokeSensorFlexContainer.class), + @XmlElement(name = MediaSelectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = MediaSelectFlexContainer.class), + @XmlElement(name = ElectricVehicleConnectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ElectricVehicleConnectorFlexContainer.class), + @XmlElement(name = AlarmSpeakerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSpeakerFlexContainer.class), + @XmlElement(name = LockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LockFlexContainer.class), + @XmlElement(name = AirPurifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirPurifierJobModeFlexContainer.class), + @XmlElement(name = GlucometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GlucometerFlexContainer.class), + @XmlElement(name = RemoteControlEnableFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RemoteControlEnableFlexContainer.class), + @XmlElement(name = HeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HeightFlexContainer.class), + @XmlElement(name = SpinLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SpinLevelFlexContainer.class), + @XmlElement(name = AudioVolumeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AudioVolumeFlexContainer.class), + @XmlElement(name = FoamingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FoamingFlexContainer.class), + @XmlElement(name = OvercurrentSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OvercurrentSensorFlexContainer.class), + @XmlElement(name = WeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WeightFlexContainer.class), + @XmlElement(name = SecurityModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SecurityModeFlexContainer.class), + @XmlElement(name = BodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BodyCompositionAnalyserFlexContainer.class), + @XmlElement(name = ClockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClockFlexContainer.class), + @XmlElement(name = ClothesWasherDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherDryerJobModeFlexContainer.class), + @XmlElement(name = FilterInfoFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FilterInfoFlexContainer.class), + @XmlElement(name = PushButtonFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PushButtonFlexContainer.class), + @XmlElement(name = ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherJobModeOptionFlexContainer.class), + @XmlElement(name = KeepWarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = KeepWarmFlexContainer.class), + @XmlElement(name = PersonSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PersonSensorFlexContainer.class), + @XmlElement(name = ColourSaturationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ColourSaturationFlexContainer.class), + @XmlElement(name = ImpactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ImpactSensorFlexContainer.class), + @XmlElement(name = ClothesWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherJobModeFlexContainer.class), + @XmlElement(name = RunStateFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RunStateFlexContainer.class), + @XmlElement(name = TextMessageFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TextMessageFlexContainer.class), + @XmlElement(name = BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BioElectricalImpedanceAnalysisFlexContainer.class), + @XmlElement(name = OpenLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OpenLevelFlexContainer.class), + @XmlElement(name = CredentialsFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = CredentialsFlexContainer.class), + @XmlElement(name = HotWaterSupplyFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HotWaterSupplyFlexContainer.class), + @XmlElement(name = AirFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirFlowFlexContainer.class), + @XmlElement(name = BatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BatteryFlexContainer.class), + @XmlElement(name = PulsemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PulsemeterFlexContainer.class), + @XmlElement(name = RobotCleanerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RobotCleanerJobModeFlexContainer.class), + @XmlElement(name = LiquidRemainingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LiquidRemainingFlexContainer.class), + @XmlElement(name = AirQualitySensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirQualitySensorFlexContainer.class), + @XmlElement(name = PhoneCallFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PhoneCallFlexContainer.class), + @XmlElement(name = WaterFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WaterFlowFlexContainer.class), + @XmlElement(name = TimerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TimerFlexContainer.class), + @XmlElement(name = BrewingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BrewingFlexContainer.class), + @XmlElement(name = DishWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DishWasherJobModeFlexContainer.class), + @XmlElement(name = OperationModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OperationModeFlexContainer.class), + @XmlElement(name = FaultDetectionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FaultDetectionFlexContainer.class), + @XmlElement(name = BoilerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BoilerFlexContainer.class), + @XmlElement(name = UvSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = UvSensorFlexContainer.class), + @XmlElement(name = BinarySwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BinarySwitchFlexContainer.class), + @XmlElement(name = WaterSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WaterSensorFlexContainer.class), + @XmlElement(name = AcousticSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AcousticSensorFlexContainer.class), + @XmlElement(name = TemperatureFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureFlexContainer.class), + @XmlElement(name = NumberValueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = NumberValueFlexContainer.class), + @XmlElement(name = DehumidifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DehumidifierJobModeFlexContainer.class), + @XmlElement(name = EnergyConsumptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = EnergyConsumptionFlexContainer.class), + @XmlElement(name = RecorderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RecorderFlexContainer.class), + @XmlElement(name = SphygmomanometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SphygmomanometerFlexContainer.class), + @XmlElement(name = GrinderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GrinderFlexContainer.class), + @XmlElement(name = PlayerControlFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PlayerControlFlexContainer.class), + @XmlElement(name = OzoneMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OzoneMeterFlexContainer.class), + @XmlElement(name = PrintQueueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PrintQueueFlexContainer.class), + @XmlElement(name = SessionDescriptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SessionDescriptionFlexContainer.class), + @XmlElement(name = SignalStrengthFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SignalStrengthFlexContainer.class), + @XmlElement(name = BinaryObjectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BinaryObjectFlexContainer.class), + @XmlElement(name = BarometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BarometerFlexContainer.class), + @XmlElement(name = HeatingZoneFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HeatingZoneFlexContainer.class), + @XmlElement(name = CookerHoodJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = CookerHoodJobModeFlexContainer.class), + @XmlElement(name = ColourFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ColourFlexContainer.class), + @XmlElement(name = BrightnessFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BrightnessFlexContainer.class), + @XmlElement(name = RefrigerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RefrigerationFlexContainer.class), + @XmlElement(name = AutoDocumentFeederFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AutoDocumentFeederFlexContainer.class), + @XmlElement(name = TelevisionChannelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TelevisionChannelFlexContainer.class), + @XmlElement(name = ThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ThreeDPrinterFlexContainer.class), + @XmlElement(name = GeoLocationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GeoLocationFlexContainer.class), + @XmlElement(name = DoorStatusFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DoorStatusFlexContainer.class), + @XmlElement(name = RelativeHumidityFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RelativeHumidityFlexContainer.class), + @XmlElement(name = SteamClosetJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SteamClosetJobModeFlexContainer.class), + @XmlElement(name = AnemometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AnemometerFlexContainer.class), + @XmlElement(name = PowerSaveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PowerSaveFlexContainer.class), }) protected List containerOrGroupOrAccessControlPolicy; diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AEAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AEAnnc.java index 8080a2ef..c9d683fc 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AEAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AEAnnc.java @@ -39,99 +39,7 @@ import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import org.eclipse.om2m.commons.constants.ShortName; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ActivateClockTimerFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.AlarmSensorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.AlarmSpeakerFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.AtmosphericPressureSensorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.AudioVideoInputFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.AudioVolumeFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BatteryFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BinarySwitchFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BioElectricalImpedanceAnalysisFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BoilerFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BrewingFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.BrightnessFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ClockFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ColourFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ColourSaturationFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ContactSensorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeactivateClockTimerFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DecrementNumberValueFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceAirConditionerFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceCameraFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceClothesWasherFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceCoffeeMachineFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceContactDetectorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceDoorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceElectricVehicleChargerFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceFloodDetectorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceGasValveFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceLightFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceMicrogenerationFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceMotionDetectorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceNumberDeviceFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceOvenFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceRefrigeratorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceRobotCleanerFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceSmartElectricMeterFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceSmokeDetectorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceSmokeExtractorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceStorageBatteryFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceSwitchButtonFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceTelevisionFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceTemperatureDetectorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceThermostatFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceWarningDeviceFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceWaterHeaterFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceWaterValveFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceWeatherStationFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DoorStatusFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DownChannelFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DownVolumeFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ElectricVehicleConnectorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.EnergyConsumptionFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.EnergyGenerationFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ExtendedCarbonDioxideSensorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.FaultDetectionFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.FoamingFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.GrinderFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.HeightFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.HotWaterSupplyFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.IncrementNumberValueFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.KeepWarmFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.KeypadFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.LiquidLevelFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.LockFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.MotionSensorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.NoiseFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.NumberValueFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.OximeterFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.PersonSensorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.PowerSaveFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.PushButtonFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RecorderFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RefrigerationFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RelativeHumidityFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ResetNumberValueFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RinseLevelFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RunModeFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.SignalStrengthFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.SmokeSensorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.SpinLevelFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.StreamingFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.TelevisionChannelFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.TemperatureAlarmFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.TemperatureFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.TimerFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.ToggleFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.TurboFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.UpChannelFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.UpVolumeFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.WaterFlowFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.WaterLevelFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.WaterSensorFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.WeightFlexContainerAnnc; -import org.eclipse.om2m.commons.resource.flexcontainerspec.WindFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.flexcontainerspec.*; /** *

@@ -212,99 +120,154 @@ public class AEAnnc extends AnnouncedResource { @XmlElement(name = ShortName.SUB, namespace = "http://www.onem2m.org/xml/protocols", type = Subscription.class), @XmlElement(name = ShortName.PCH, namespace = "http://www.onem2m.org/xml/protocols", type = PollingChannel.class), @XmlElement(name = ShortName.FCNTA, namespace = "http://www.onem2m.org/xml/protocols", type = AbstractFlexContainerAnnc.class), - @XmlElement(name = AlarmSpeakerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSpeakerFlexContainerAnnc.class), - @XmlElement(name = AudioVideoInputFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AudioVideoInputFlexContainerAnnc.class), - @XmlElement(name = AudioVolumeFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AudioVolumeFlexContainerAnnc.class), - @XmlElement(name = UpVolumeFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = UpVolumeFlexContainerAnnc.class), - @XmlElement(name = DownVolumeFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DownVolumeFlexContainerAnnc.class), - @XmlElement(name = BatteryFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BatteryFlexContainerAnnc.class), - @XmlElement(name = BinarySwitchFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BinarySwitchFlexContainerAnnc.class), - @XmlElement(name = ToggleFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ToggleFlexContainerAnnc.class), - @XmlElement(name = BioElectricalImpedanceAnalysisFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BioElectricalImpedanceAnalysisFlexContainerAnnc.class), - @XmlElement(name = BoilerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BoilerFlexContainerAnnc.class), - @XmlElement(name = BrightnessFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BrightnessFlexContainerAnnc.class), - @XmlElement(name = ClockFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ClockFlexContainerAnnc.class), - @XmlElement(name = ColourFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ColourFlexContainerAnnc.class), - @XmlElement(name = ColourSaturationFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ColourSaturationFlexContainerAnnc.class), - @XmlElement(name = DoorStatusFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DoorStatusFlexContainerAnnc.class), - @XmlElement(name = ElectricVehicleConnectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ElectricVehicleConnectorFlexContainerAnnc.class), - @XmlElement(name = EnergyConsumptionFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = EnergyConsumptionFlexContainerAnnc.class), - @XmlElement(name = EnergyGenerationFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = EnergyGenerationFlexContainerAnnc.class), - @XmlElement(name = FaultDetectionFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = FaultDetectionFlexContainerAnnc.class), - @XmlElement(name = HeightFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = HeightFlexContainerAnnc.class), - @XmlElement(name = HotWaterSupplyFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = HotWaterSupplyFlexContainerAnnc.class), - @XmlElement(name = KeypadFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = KeypadFlexContainerAnnc.class), - @XmlElement(name = MotionSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = MotionSensorFlexContainerAnnc.class), - @XmlElement(name = OximeterFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = OximeterFlexContainerAnnc.class), - @XmlElement(name = PowerSaveFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = PowerSaveFlexContainerAnnc.class), - @XmlElement(name = PushButtonFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = PushButtonFlexContainerAnnc.class), - @XmlElement(name = RecorderFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RecorderFlexContainerAnnc.class), - @XmlElement(name = RefrigerationFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RefrigerationFlexContainerAnnc.class), - @XmlElement(name = RelativeHumidityFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RelativeHumidityFlexContainerAnnc.class), - @XmlElement(name = RinseLevelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RinseLevelFlexContainerAnnc.class), - @XmlElement(name = RunModeFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RunModeFlexContainerAnnc.class), - @XmlElement(name = SignalStrengthFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = SignalStrengthFlexContainerAnnc.class), - @XmlElement(name = SmokeSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = SmokeSensorFlexContainerAnnc.class), - @XmlElement(name = SpinLevelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = SpinLevelFlexContainerAnnc.class), - @XmlElement(name = TelevisionChannelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TelevisionChannelFlexContainerAnnc.class), - @XmlElement(name = UpChannelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = UpChannelFlexContainerAnnc.class), - @XmlElement(name = DownChannelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DownChannelFlexContainerAnnc.class), - @XmlElement(name = TemperatureFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureFlexContainerAnnc.class), - @XmlElement(name = TemperatureAlarmFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureAlarmFlexContainerAnnc.class), - @XmlElement(name = TimerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TimerFlexContainerAnnc.class), - @XmlElement(name = ActivateClockTimerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ActivateClockTimerFlexContainerAnnc.class), - @XmlElement(name = DeactivateClockTimerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeactivateClockTimerFlexContainerAnnc.class), - @XmlElement(name = TurboFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TurboFlexContainerAnnc.class), - @XmlElement(name = WaterFlowFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WaterFlowFlexContainerAnnc.class), - @XmlElement(name = WaterLevelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WaterLevelFlexContainerAnnc.class), - @XmlElement(name = WaterSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WaterSensorFlexContainerAnnc.class), - @XmlElement(name = WeightFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WeightFlexContainerAnnc.class), - @XmlElement(name = WindFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WindFlexContainerAnnc.class), - @XmlElement(name = StreamingFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = StreamingFlexContainerAnnc.class), - @XmlElement(name = PersonSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = PersonSensorFlexContainerAnnc.class), - @XmlElement(name = BrewingFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BrewingFlexContainerAnnc.class), - @XmlElement(name = LiquidLevelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = LiquidLevelFlexContainerAnnc.class), - @XmlElement(name = GrinderFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = GrinderFlexContainerAnnc.class), - @XmlElement(name = FoamingFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = FoamingFlexContainerAnnc.class), - @XmlElement(name = KeepWarmFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = KeepWarmFlexContainerAnnc.class), - @XmlElement(name = ContactSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ContactSensorFlexContainerAnnc.class), - @XmlElement(name = AlarmSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSensorFlexContainerAnnc.class), - @XmlElement(name = LockFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = LockFlexContainerAnnc.class), - @XmlElement(name = AtmosphericPressureSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AtmosphericPressureSensorFlexContainerAnnc.class), - @XmlElement(name = NoiseFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = NoiseFlexContainerAnnc.class), - @XmlElement(name = ExtendedCarbonDioxideSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ExtendedCarbonDioxideSensorFlexContainerAnnc.class), - @XmlElement(name = NumberValueFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = NumberValueFlexContainerAnnc.class), - @XmlElement(name = DecrementNumberValueFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DecrementNumberValueFlexContainerAnnc.class), - @XmlElement(name = IncrementNumberValueFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = IncrementNumberValueFlexContainerAnnc.class), - @XmlElement(name = ResetNumberValueFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ResetNumberValueFlexContainerAnnc.class), - @XmlElement(name = DeviceAirConditionerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirConditionerFlexContainerAnnc.class), - @XmlElement(name = DeviceClothesWasherFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherFlexContainerAnnc.class), - @XmlElement(name = DeviceElectricVehicleChargerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceElectricVehicleChargerFlexContainerAnnc.class), - @XmlElement(name = DeviceLightFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceLightFlexContainerAnnc.class), - @XmlElement(name = DeviceMicrogenerationFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMicrogenerationFlexContainerAnnc.class), - @XmlElement(name = DeviceOvenFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOvenFlexContainerAnnc.class), - @XmlElement(name = DeviceRefrigeratorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRefrigeratorFlexContainerAnnc.class), - @XmlElement(name = DeviceRobotCleanerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRobotCleanerFlexContainerAnnc.class), - @XmlElement(name = DeviceSmartElectricMeterFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartElectricMeterFlexContainerAnnc.class), - @XmlElement(name = DeviceStorageBatteryFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceStorageBatteryFlexContainerAnnc.class), - @XmlElement(name = DeviceTelevisionFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTelevisionFlexContainerAnnc.class), - @XmlElement(name = DeviceThermostatFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermostatFlexContainerAnnc.class), - @XmlElement(name = DeviceWaterHeaterFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterHeaterFlexContainerAnnc.class), - @XmlElement(name = DeviceCameraFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCameraFlexContainerAnnc.class), - @XmlElement(name = DeviceCoffeeMachineFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCoffeeMachineFlexContainerAnnc.class), - @XmlElement(name = DeviceContactDetectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceContactDetectorFlexContainerAnnc.class), - @XmlElement(name = DeviceDoorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorFlexContainerAnnc.class), - @XmlElement(name = DeviceFloodDetectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFloodDetectorFlexContainerAnnc.class), - @XmlElement(name = DeviceGasValveFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGasValveFlexContainerAnnc.class), - @XmlElement(name = DeviceMotionDetectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMotionDetectorFlexContainerAnnc.class), - @XmlElement(name = DeviceSmokeDetectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeDetectorFlexContainerAnnc.class), - @XmlElement(name = DeviceSmokeExtractorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeExtractorFlexContainerAnnc.class), - @XmlElement(name = DeviceSwitchButtonFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchButtonFlexContainerAnnc.class), - @XmlElement(name = DeviceTemperatureDetectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTemperatureDetectorFlexContainerAnnc.class), - @XmlElement(name = DeviceWarningDeviceFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWarningDeviceFlexContainerAnnc.class), - @XmlElement(name = DeviceWaterValveFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterValveFlexContainerAnnc.class), - @XmlElement(name = DeviceWeatherStationFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeatherStationFlexContainerAnnc.class), - @XmlElement(name = DeviceNumberDeviceFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceNumberDeviceFlexContainerAnnc.class) + @XmlElement(name = DeviceThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThreeDPrinterFlexContainerAnnc.class), + @XmlElement(name = DeviceAirConditionerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirConditionerFlexContainerAnnc.class), + @XmlElement(name = DeviceAirPurifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirPurifierFlexContainerAnnc.class), + @XmlElement(name = DeviceAirQualityMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirQualityMonitorFlexContainerAnnc.class), + @XmlElement(name = DeviceAudioReceiverFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAudioReceiverFlexContainerAnnc.class), + @XmlElement(name = DeviceBloodPressureMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceBloodPressureMonitorFlexContainerAnnc.class), + @XmlElement(name = DeviceCameraFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCameraFlexContainerAnnc.class), + @XmlElement(name = DeviceClothesDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesDryerFlexContainerAnnc.class), + @XmlElement(name = DeviceClothesWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherFlexContainerAnnc.class), + @XmlElement(name = DeviceClothesWasherDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherDryerFlexContainerAnnc.class), + @XmlElement(name = DeviceCoffeeMachineFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCoffeeMachineFlexContainerAnnc.class), + @XmlElement(name = DeviceCookerHoodFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCookerHoodFlexContainerAnnc.class), + @XmlElement(name = DeviceCooktopFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCooktopFlexContainerAnnc.class), + @XmlElement(name = DeviceDehumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDehumidifierFlexContainerAnnc.class), + @XmlElement(name = DeviceDishWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDishWasherFlexContainerAnnc.class), + @XmlElement(name = DeviceDoorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorFlexContainerAnnc.class), + @XmlElement(name = DeviceDoorLockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorLockFlexContainerAnnc.class), + @XmlElement(name = DeviceElectricVehicleChargerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceElectricVehicleChargerFlexContainerAnnc.class), + @XmlElement(name = DeviceFanFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFanFlexContainerAnnc.class), + @XmlElement(name = DeviceFoodProbeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFoodProbeFlexContainerAnnc.class), + @XmlElement(name = DeviceFreezerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFreezerFlexContainerAnnc.class), + @XmlElement(name = DeviceGlucosemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGlucosemeterFlexContainerAnnc.class), + @XmlElement(name = DeviceHeartRateMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHeartRateMonitorFlexContainerAnnc.class), + @XmlElement(name = DeviceHomeCCTVFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHomeCCTVFlexContainerAnnc.class), + @XmlElement(name = DeviceHumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHumidifierFlexContainerAnnc.class), + @XmlElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceKettleFlexContainerAnnc.class), + @XmlElement(name = DeviceLightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceLightFlexContainerAnnc.class), + @XmlElement(name = DeviceMicrogenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMicrogenerationFlexContainerAnnc.class), + @XmlElement(name = DeviceMultiFunctionPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMultiFunctionPrinterFlexContainerAnnc.class), + @XmlElement(name = DeviceOutdoorLampFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOutdoorLampFlexContainerAnnc.class), + @XmlElement(name = DeviceOvenFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOvenFlexContainerAnnc.class), + @XmlElement(name = DevicePrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DevicePrinterFlexContainerAnnc.class), + @XmlElement(name = DevicePulseOximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DevicePulseOximeterFlexContainerAnnc.class), + @XmlElement(name = DeviceRefrigeratorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRefrigeratorFlexContainerAnnc.class), + @XmlElement(name = DeviceRobotCleanerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRobotCleanerFlexContainerAnnc.class), + @XmlElement(name = DeviceScannerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceScannerFlexContainerAnnc.class), + @XmlElement(name = DeviceSecurityPanelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSecurityPanelFlexContainerAnnc.class), + @XmlElement(name = DeviceSetTopBoxFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSetTopBoxFlexContainerAnnc.class), + @XmlElement(name = DeviceSmartElectricMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartElectricMeterFlexContainerAnnc.class), + @XmlElement(name = DeviceSmartPlugFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartPlugFlexContainerAnnc.class), + @XmlElement(name = DeviceSteamClosetFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSteamClosetFlexContainerAnnc.class), + @XmlElement(name = DeviceStorageBatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceStorageBatteryFlexContainerAnnc.class), + @XmlElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchFlexContainerAnnc.class), + @XmlElement(name = DeviceTelevisionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTelevisionFlexContainerAnnc.class), + @XmlElement(name = DeviceThermometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermometerFlexContainerAnnc.class), + @XmlElement(name = DeviceThermostatFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermostatFlexContainerAnnc.class), + @XmlElement(name = DeviceWaterHeaterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterHeaterFlexContainerAnnc.class), + @XmlElement(name = DeviceWaterValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterValveFlexContainerAnnc.class), + @XmlElement(name = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc.class), + @XmlElement(name = DeviceWindowShadeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWindowShadeFlexContainerAnnc.class), + @XmlElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchFlexContainerAnnc.class), + @XmlElement(name = DeviceSmokeDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeDetectorFlexContainerAnnc.class), + @XmlElement(name = DeviceContactDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceContactDetectorFlexContainerAnnc.class), + @XmlElement(name = DeviceMotionDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMotionDetectorFlexContainerAnnc.class), + @XmlElement(name = DeviceFloodDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFloodDetectorFlexContainerAnnc.class), + @XmlElement(name = DeviceTemperatureDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTemperatureDetectorFlexContainerAnnc.class), + @XmlElement(name = DeviceWeatherStationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeatherStationFlexContainerAnnc.class), + @XmlElement(name = DeviceGasValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGasValveFlexContainerAnnc.class), + @XmlElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceKettleFlexContainerAnnc.class), + @XmlElement(name = DeviceWarningFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWarningFlexContainerAnnc.class), + @XmlElement(name = LiquidLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LiquidLevelFlexContainerAnnc.class), + @XmlElement(name = TemperatureAlarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureAlarmFlexContainerAnnc.class), + @XmlElement(name = ContactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ContactSensorFlexContainerAnnc.class), + @XmlElement(name = ClothesDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesDryerJobModeFlexContainerAnnc.class), + @XmlElement(name = OximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OximeterFlexContainerAnnc.class), + @XmlElement(name = TurboFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TurboFlexContainerAnnc.class), + @XmlElement(name = AirConJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirConJobModeFlexContainerAnnc.class), + @XmlElement(name = EnergyGenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = EnergyGenerationFlexContainerAnnc.class), + @XmlElement(name = KeypadFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = KeypadFlexContainerAnnc.class), + @XmlElement(name = MotionSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = MotionSensorFlexContainerAnnc.class), + @XmlElement(name = SmokeSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SmokeSensorFlexContainerAnnc.class), + @XmlElement(name = MediaSelectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = MediaSelectFlexContainerAnnc.class), + @XmlElement(name = ElectricVehicleConnectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ElectricVehicleConnectorFlexContainerAnnc.class), + @XmlElement(name = AlarmSpeakerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSpeakerFlexContainerAnnc.class), + @XmlElement(name = LockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LockFlexContainerAnnc.class), + @XmlElement(name = AirPurifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirPurifierJobModeFlexContainerAnnc.class), + @XmlElement(name = GlucometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GlucometerFlexContainerAnnc.class), + @XmlElement(name = RemoteControlEnableFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RemoteControlEnableFlexContainerAnnc.class), + @XmlElement(name = HeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HeightFlexContainerAnnc.class), + @XmlElement(name = SpinLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SpinLevelFlexContainerAnnc.class), + @XmlElement(name = AudioVolumeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AudioVolumeFlexContainerAnnc.class), + @XmlElement(name = FoamingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FoamingFlexContainerAnnc.class), + @XmlElement(name = OvercurrentSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OvercurrentSensorFlexContainerAnnc.class), + @XmlElement(name = WeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WeightFlexContainerAnnc.class), + @XmlElement(name = SecurityModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SecurityModeFlexContainerAnnc.class), + @XmlElement(name = BodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BodyCompositionAnalyserFlexContainerAnnc.class), + @XmlElement(name = ClockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClockFlexContainerAnnc.class), + @XmlElement(name = ClothesWasherDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherDryerJobModeFlexContainerAnnc.class), + @XmlElement(name = FilterInfoFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FilterInfoFlexContainerAnnc.class), + @XmlElement(name = PushButtonFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PushButtonFlexContainerAnnc.class), + @XmlElement(name = ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherJobModeOptionFlexContainerAnnc.class), + @XmlElement(name = KeepWarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = KeepWarmFlexContainerAnnc.class), + @XmlElement(name = PersonSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PersonSensorFlexContainerAnnc.class), + @XmlElement(name = ColourSaturationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ColourSaturationFlexContainerAnnc.class), + @XmlElement(name = ImpactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ImpactSensorFlexContainerAnnc.class), + @XmlElement(name = ClothesWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherJobModeFlexContainerAnnc.class), + @XmlElement(name = RunStateFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RunStateFlexContainerAnnc.class), + @XmlElement(name = TextMessageFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TextMessageFlexContainerAnnc.class), + @XmlElement(name = BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BioElectricalImpedanceAnalysisFlexContainerAnnc.class), + @XmlElement(name = OpenLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OpenLevelFlexContainerAnnc.class), + @XmlElement(name = CredentialsFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = CredentialsFlexContainerAnnc.class), + @XmlElement(name = HotWaterSupplyFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HotWaterSupplyFlexContainerAnnc.class), + @XmlElement(name = AirFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirFlowFlexContainerAnnc.class), + @XmlElement(name = BatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BatteryFlexContainerAnnc.class), + @XmlElement(name = PulsemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PulsemeterFlexContainerAnnc.class), + @XmlElement(name = RobotCleanerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RobotCleanerJobModeFlexContainerAnnc.class), + @XmlElement(name = LiquidRemainingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LiquidRemainingFlexContainerAnnc.class), + @XmlElement(name = AirQualitySensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirQualitySensorFlexContainerAnnc.class), + @XmlElement(name = PhoneCallFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PhoneCallFlexContainerAnnc.class), + @XmlElement(name = WaterFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WaterFlowFlexContainerAnnc.class), + @XmlElement(name = TimerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TimerFlexContainerAnnc.class), + @XmlElement(name = BrewingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BrewingFlexContainerAnnc.class), + @XmlElement(name = DishWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DishWasherJobModeFlexContainerAnnc.class), + @XmlElement(name = OperationModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OperationModeFlexContainerAnnc.class), + @XmlElement(name = FaultDetectionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FaultDetectionFlexContainerAnnc.class), + @XmlElement(name = BoilerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BoilerFlexContainerAnnc.class), + @XmlElement(name = UvSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = UvSensorFlexContainerAnnc.class), + @XmlElement(name = BinarySwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BinarySwitchFlexContainerAnnc.class), + @XmlElement(name = WaterSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WaterSensorFlexContainerAnnc.class), + @XmlElement(name = AcousticSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AcousticSensorFlexContainerAnnc.class), + @XmlElement(name = TemperatureFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureFlexContainerAnnc.class), + @XmlElement(name = NumberValueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = NumberValueFlexContainerAnnc.class), + @XmlElement(name = DehumidifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DehumidifierJobModeFlexContainerAnnc.class), + @XmlElement(name = EnergyConsumptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = EnergyConsumptionFlexContainerAnnc.class), + @XmlElement(name = RecorderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RecorderFlexContainerAnnc.class), + @XmlElement(name = SphygmomanometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SphygmomanometerFlexContainerAnnc.class), + @XmlElement(name = GrinderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GrinderFlexContainerAnnc.class), + @XmlElement(name = PlayerControlFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PlayerControlFlexContainerAnnc.class), + @XmlElement(name = OzoneMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OzoneMeterFlexContainerAnnc.class), + @XmlElement(name = PrintQueueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PrintQueueFlexContainerAnnc.class), + @XmlElement(name = SessionDescriptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SessionDescriptionFlexContainerAnnc.class), + @XmlElement(name = SignalStrengthFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SignalStrengthFlexContainerAnnc.class), + @XmlElement(name = BinaryObjectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BinaryObjectFlexContainerAnnc.class), + @XmlElement(name = BarometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BarometerFlexContainerAnnc.class), + @XmlElement(name = HeatingZoneFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HeatingZoneFlexContainerAnnc.class), + @XmlElement(name = CookerHoodJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = CookerHoodJobModeFlexContainerAnnc.class), + @XmlElement(name = ColourFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ColourFlexContainerAnnc.class), + @XmlElement(name = BrightnessFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BrightnessFlexContainerAnnc.class), + @XmlElement(name = RefrigerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RefrigerationFlexContainerAnnc.class), + @XmlElement(name = AutoDocumentFeederFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AutoDocumentFeederFlexContainerAnnc.class), + @XmlElement(name = TelevisionChannelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TelevisionChannelFlexContainerAnnc.class), + @XmlElement(name = ThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ThreeDPrinterFlexContainerAnnc.class), + @XmlElement(name = GeoLocationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GeoLocationFlexContainerAnnc.class), + @XmlElement(name = DoorStatusFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DoorStatusFlexContainerAnnc.class), + @XmlElement(name = RelativeHumidityFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RelativeHumidityFlexContainerAnnc.class), + @XmlElement(name = SteamClosetJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SteamClosetJobModeFlexContainerAnnc.class), + @XmlElement(name = AnemometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AnemometerFlexContainerAnnc.class), + @XmlElement(name = PowerSaveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PowerSaveFlexContainerAnnc.class), }) protected List containerOrContainerAnncOrGroup; diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AbstractFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AbstractFlexContainer.java index a6879a75..51bba40e 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AbstractFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AbstractFlexContainer.java @@ -17,11 +17,11 @@ import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElements; import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlTransient; import org.eclipse.om2m.commons.constants.ShortName; import org.eclipse.om2m.commons.resource.flexcontainerspec.*; +import org.eclipse.om2m.commons.utils.CustomAttributList; /** *

@@ -96,12 +96,161 @@ public abstract class AbstractFlexContainer extends AnnounceableResource { @XmlElements({ @XmlElement(name = ShortName.CNT, namespace = "http://www.onem2m.org/xml/protocols", type = Container.class), - @XmlElement(name = ShortName.SUB, namespace = "http://www.onem2m.org/xml/protocols", type = Subscription.class) + @XmlElement(name = ShortName.FCNT, namespace = "http://www.onem2m.org/xml/protocols", type = AbstractFlexContainer.class), + @XmlElement(name = ShortName.SUB, namespace = "http://www.onem2m.org/xml/protocols", type = Subscription.class), + @XmlElement(name = DeviceThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThreeDPrinterFlexContainer.class), + @XmlElement(name = DeviceAirConditionerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirConditionerFlexContainer.class), + @XmlElement(name = DeviceAirPurifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirPurifierFlexContainer.class), + @XmlElement(name = DeviceAirQualityMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirQualityMonitorFlexContainer.class), + @XmlElement(name = DeviceAudioReceiverFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAudioReceiverFlexContainer.class), + @XmlElement(name = DeviceBloodPressureMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceBloodPressureMonitorFlexContainer.class), + @XmlElement(name = DeviceCameraFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCameraFlexContainer.class), + @XmlElement(name = DeviceClothesDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesDryerFlexContainer.class), + @XmlElement(name = DeviceClothesWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherFlexContainer.class), + @XmlElement(name = DeviceClothesWasherDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherDryerFlexContainer.class), + @XmlElement(name = DeviceCoffeeMachineFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCoffeeMachineFlexContainer.class), + @XmlElement(name = DeviceCookerHoodFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCookerHoodFlexContainer.class), + @XmlElement(name = DeviceCooktopFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCooktopFlexContainer.class), + @XmlElement(name = DeviceDehumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDehumidifierFlexContainer.class), + @XmlElement(name = DeviceDishWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDishWasherFlexContainer.class), + @XmlElement(name = DeviceDoorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorFlexContainer.class), + @XmlElement(name = DeviceDoorLockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorLockFlexContainer.class), + @XmlElement(name = DeviceElectricVehicleChargerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceElectricVehicleChargerFlexContainer.class), + @XmlElement(name = DeviceFanFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFanFlexContainer.class), + @XmlElement(name = DeviceFoodProbeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFoodProbeFlexContainer.class), + @XmlElement(name = DeviceFreezerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFreezerFlexContainer.class), + @XmlElement(name = DeviceGlucosemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGlucosemeterFlexContainer.class), + @XmlElement(name = DeviceHeartRateMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHeartRateMonitorFlexContainer.class), + @XmlElement(name = DeviceHomeCCTVFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHomeCCTVFlexContainer.class), + @XmlElement(name = DeviceHumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHumidifierFlexContainer.class), + @XmlElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceKettleFlexContainer.class), + @XmlElement(name = DeviceLightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceLightFlexContainer.class), + @XmlElement(name = DeviceMicrogenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMicrogenerationFlexContainer.class), + @XmlElement(name = DeviceMultiFunctionPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMultiFunctionPrinterFlexContainer.class), + @XmlElement(name = DeviceOutdoorLampFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOutdoorLampFlexContainer.class), + @XmlElement(name = DeviceOvenFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOvenFlexContainer.class), + @XmlElement(name = DevicePrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DevicePrinterFlexContainer.class), + @XmlElement(name = DevicePulseOximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DevicePulseOximeterFlexContainer.class), + @XmlElement(name = DeviceRefrigeratorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRefrigeratorFlexContainer.class), + @XmlElement(name = DeviceRobotCleanerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRobotCleanerFlexContainer.class), + @XmlElement(name = DeviceScannerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceScannerFlexContainer.class), + @XmlElement(name = DeviceSecurityPanelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSecurityPanelFlexContainer.class), + @XmlElement(name = DeviceSetTopBoxFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSetTopBoxFlexContainer.class), + @XmlElement(name = DeviceSmartElectricMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartElectricMeterFlexContainer.class), + @XmlElement(name = DeviceSmartPlugFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartPlugFlexContainer.class), + @XmlElement(name = DeviceSteamClosetFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSteamClosetFlexContainer.class), + @XmlElement(name = DeviceStorageBatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceStorageBatteryFlexContainer.class), + @XmlElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchFlexContainer.class), + @XmlElement(name = DeviceTelevisionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTelevisionFlexContainer.class), + @XmlElement(name = DeviceThermometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermometerFlexContainer.class), + @XmlElement(name = DeviceThermostatFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermostatFlexContainer.class), + @XmlElement(name = DeviceWaterHeaterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterHeaterFlexContainer.class), + @XmlElement(name = DeviceWaterValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterValveFlexContainer.class), + @XmlElement(name = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.class), + @XmlElement(name = DeviceWindowShadeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWindowShadeFlexContainer.class), + @XmlElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchFlexContainer.class), + @XmlElement(name = DeviceSmokeDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeDetectorFlexContainer.class), + @XmlElement(name = DeviceContactDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceContactDetectorFlexContainer.class), + @XmlElement(name = DeviceMotionDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMotionDetectorFlexContainer.class), + @XmlElement(name = DeviceFloodDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFloodDetectorFlexContainer.class), + @XmlElement(name = DeviceTemperatureDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTemperatureDetectorFlexContainer.class), + @XmlElement(name = DeviceWeatherStationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeatherStationFlexContainer.class), + @XmlElement(name = DeviceGasValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGasValveFlexContainer.class), + @XmlElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceKettleFlexContainer.class), + @XmlElement(name = DeviceWarningFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWarningFlexContainer.class), + @XmlElement(name = LiquidLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LiquidLevelFlexContainer.class), + @XmlElement(name = TemperatureAlarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureAlarmFlexContainer.class), + @XmlElement(name = ContactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ContactSensorFlexContainer.class), + @XmlElement(name = ClothesDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesDryerJobModeFlexContainer.class), + @XmlElement(name = OximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OximeterFlexContainer.class), + @XmlElement(name = TurboFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TurboFlexContainer.class), + @XmlElement(name = AirConJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirConJobModeFlexContainer.class), + @XmlElement(name = EnergyGenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = EnergyGenerationFlexContainer.class), + @XmlElement(name = KeypadFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = KeypadFlexContainer.class), + @XmlElement(name = MotionSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = MotionSensorFlexContainer.class), + @XmlElement(name = SmokeSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SmokeSensorFlexContainer.class), + @XmlElement(name = MediaSelectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = MediaSelectFlexContainer.class), + @XmlElement(name = ElectricVehicleConnectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ElectricVehicleConnectorFlexContainer.class), + @XmlElement(name = AlarmSpeakerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSpeakerFlexContainer.class), + @XmlElement(name = LockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LockFlexContainer.class), + @XmlElement(name = AirPurifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirPurifierJobModeFlexContainer.class), + @XmlElement(name = GlucometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GlucometerFlexContainer.class), + @XmlElement(name = RemoteControlEnableFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RemoteControlEnableFlexContainer.class), + @XmlElement(name = HeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HeightFlexContainer.class), + @XmlElement(name = SpinLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SpinLevelFlexContainer.class), + @XmlElement(name = AudioVolumeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AudioVolumeFlexContainer.class), + @XmlElement(name = FoamingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FoamingFlexContainer.class), + @XmlElement(name = OvercurrentSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OvercurrentSensorFlexContainer.class), + @XmlElement(name = WeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WeightFlexContainer.class), + @XmlElement(name = SecurityModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SecurityModeFlexContainer.class), + @XmlElement(name = BodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BodyCompositionAnalyserFlexContainer.class), + @XmlElement(name = ClockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClockFlexContainer.class), + @XmlElement(name = ClothesWasherDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherDryerJobModeFlexContainer.class), + @XmlElement(name = FilterInfoFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FilterInfoFlexContainer.class), + @XmlElement(name = PushButtonFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PushButtonFlexContainer.class), + @XmlElement(name = ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherJobModeOptionFlexContainer.class), + @XmlElement(name = KeepWarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = KeepWarmFlexContainer.class), + @XmlElement(name = PersonSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PersonSensorFlexContainer.class), + @XmlElement(name = ColourSaturationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ColourSaturationFlexContainer.class), + @XmlElement(name = ImpactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ImpactSensorFlexContainer.class), + @XmlElement(name = ClothesWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherJobModeFlexContainer.class), + @XmlElement(name = RunStateFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RunStateFlexContainer.class), + @XmlElement(name = TextMessageFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TextMessageFlexContainer.class), + @XmlElement(name = BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BioElectricalImpedanceAnalysisFlexContainer.class), + @XmlElement(name = OpenLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OpenLevelFlexContainer.class), + @XmlElement(name = CredentialsFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = CredentialsFlexContainer.class), + @XmlElement(name = HotWaterSupplyFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HotWaterSupplyFlexContainer.class), + @XmlElement(name = AirFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirFlowFlexContainer.class), + @XmlElement(name = BatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BatteryFlexContainer.class), + @XmlElement(name = PulsemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PulsemeterFlexContainer.class), + @XmlElement(name = RobotCleanerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RobotCleanerJobModeFlexContainer.class), + @XmlElement(name = LiquidRemainingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LiquidRemainingFlexContainer.class), + @XmlElement(name = AirQualitySensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirQualitySensorFlexContainer.class), + @XmlElement(name = PhoneCallFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PhoneCallFlexContainer.class), + @XmlElement(name = WaterFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WaterFlowFlexContainer.class), + @XmlElement(name = TimerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TimerFlexContainer.class), + @XmlElement(name = BrewingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BrewingFlexContainer.class), + @XmlElement(name = DishWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DishWasherJobModeFlexContainer.class), + @XmlElement(name = OperationModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OperationModeFlexContainer.class), + @XmlElement(name = FaultDetectionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FaultDetectionFlexContainer.class), + @XmlElement(name = BoilerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BoilerFlexContainer.class), + @XmlElement(name = UvSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = UvSensorFlexContainer.class), + @XmlElement(name = BinarySwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BinarySwitchFlexContainer.class), + @XmlElement(name = WaterSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WaterSensorFlexContainer.class), + @XmlElement(name = AcousticSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AcousticSensorFlexContainer.class), + @XmlElement(name = TemperatureFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureFlexContainer.class), + @XmlElement(name = NumberValueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = NumberValueFlexContainer.class), + @XmlElement(name = DehumidifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DehumidifierJobModeFlexContainer.class), + @XmlElement(name = EnergyConsumptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = EnergyConsumptionFlexContainer.class), + @XmlElement(name = RecorderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RecorderFlexContainer.class), + @XmlElement(name = SphygmomanometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SphygmomanometerFlexContainer.class), + @XmlElement(name = GrinderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GrinderFlexContainer.class), + @XmlElement(name = PlayerControlFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PlayerControlFlexContainer.class), + @XmlElement(name = OzoneMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OzoneMeterFlexContainer.class), + @XmlElement(name = PrintQueueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PrintQueueFlexContainer.class), + @XmlElement(name = SessionDescriptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SessionDescriptionFlexContainer.class), + @XmlElement(name = SignalStrengthFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SignalStrengthFlexContainer.class), + @XmlElement(name = BinaryObjectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BinaryObjectFlexContainer.class), + @XmlElement(name = BarometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BarometerFlexContainer.class), + @XmlElement(name = HeatingZoneFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HeatingZoneFlexContainer.class), + @XmlElement(name = CookerHoodJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = CookerHoodJobModeFlexContainer.class), + @XmlElement(name = ColourFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ColourFlexContainer.class), + @XmlElement(name = BrightnessFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BrightnessFlexContainer.class), + @XmlElement(name = RefrigerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RefrigerationFlexContainer.class), + @XmlElement(name = AutoDocumentFeederFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AutoDocumentFeederFlexContainer.class), + @XmlElement(name = TelevisionChannelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TelevisionChannelFlexContainer.class), + @XmlElement(name = ThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ThreeDPrinterFlexContainer.class), + @XmlElement(name = GeoLocationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GeoLocationFlexContainer.class), + @XmlElement(name = DoorStatusFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DoorStatusFlexContainer.class), + @XmlElement(name = RelativeHumidityFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RelativeHumidityFlexContainer.class), + @XmlElement(name = SteamClosetJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SteamClosetJobModeFlexContainer.class), + @XmlElement(name = AnemometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AnemometerFlexContainer.class), + @XmlElement(name = PowerSaveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PowerSaveFlexContainer.class), }) protected List flexContainerOrContainerOrSubscription; @XmlAnyElement() - protected List customAttributes; + protected CustomAttributList customAttributes; /** * @return the shortName @@ -133,21 +282,20 @@ public abstract class AbstractFlexContainer extends AnnounceableResource { public List getCustomAttributes() { if (customAttributes == null) { - customAttributes = new ArrayList(); + customAttributes = new CustomAttributList(); } return customAttributes; } - public void setCustomAttributes(List customAttributes) { - this.customAttributes = customAttributes; - } +// public void setCustomAttributes(List customAttributes) { +// this.customAttributes = customAttributes; +// } @XmlTransient public List getCustomAttributeNames() { List names = new ArrayList(); - for(CustomAttribute ca : getCustomAttributes()) { - names.add(ca.getCustomAttributeName()); + names.add(ca.getShortName()); } return names; @@ -156,7 +304,7 @@ public abstract class AbstractFlexContainer extends AnnounceableResource { @XmlTransient public CustomAttribute getCustomAttribute(String name) { for(CustomAttribute ca : getCustomAttributes()) { - if (ca.getCustomAttributeName().equals(name)) { + if (ca.getShortName().equals(name)) { return ca; } } @@ -341,4 +489,5 @@ public abstract class AbstractFlexContainer extends AnnounceableResource { } return null; } + } diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AbstractFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AbstractFlexContainerAnnc.java index 5c948b13..1b87924b 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AbstractFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/AbstractFlexContainerAnnc.java @@ -57,100 +57,155 @@ public class AbstractFlexContainerAnnc extends AnnouncedResource { @XmlElement(name = ShortName.CNT, namespace = "http://www.onem2m.org/xml/protocols", type = Container.class), @XmlElement(name = ShortName.SUB, namespace = "http://www.onem2m.org/xml/protocols", type = Subscription.class), @XmlElement(name = ShortName.FCNT, namespace = "http://www.onem2m.org/xml/protocols", type = AbstractFlexContainer.class), - @XmlElement(name = ShortName.FCNTA, namespace = "http://www.onem2m.org/xml/protocols", type = AbstractFlexContainerAnnc.class), - @XmlElement(name = AlarmSpeakerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSpeakerFlexContainerAnnc.class), - @XmlElement(name = AudioVideoInputFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AudioVideoInputFlexContainerAnnc.class), - @XmlElement(name = AudioVolumeFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AudioVolumeFlexContainerAnnc.class), - @XmlElement(name = UpVolumeFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = UpVolumeFlexContainerAnnc.class), - @XmlElement(name = DownVolumeFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DownVolumeFlexContainerAnnc.class), - @XmlElement(name = BatteryFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BatteryFlexContainerAnnc.class), - @XmlElement(name = BinarySwitchFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BinarySwitchFlexContainerAnnc.class), - @XmlElement(name = ToggleFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ToggleFlexContainerAnnc.class), - @XmlElement(name = BioElectricalImpedanceAnalysisFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BioElectricalImpedanceAnalysisFlexContainerAnnc.class), - @XmlElement(name = BoilerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BoilerFlexContainerAnnc.class), - @XmlElement(name = BrightnessFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BrightnessFlexContainerAnnc.class), - @XmlElement(name = ClockFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ClockFlexContainerAnnc.class), - @XmlElement(name = ColourFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ColourFlexContainerAnnc.class), - @XmlElement(name = ColourSaturationFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ColourSaturationFlexContainerAnnc.class), - @XmlElement(name = DoorStatusFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DoorStatusFlexContainerAnnc.class), - @XmlElement(name = ElectricVehicleConnectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ElectricVehicleConnectorFlexContainerAnnc.class), - @XmlElement(name = EnergyConsumptionFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = EnergyConsumptionFlexContainerAnnc.class), - @XmlElement(name = EnergyGenerationFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = EnergyGenerationFlexContainerAnnc.class), - @XmlElement(name = FaultDetectionFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = FaultDetectionFlexContainerAnnc.class), - @XmlElement(name = HeightFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = HeightFlexContainerAnnc.class), - @XmlElement(name = HotWaterSupplyFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = HotWaterSupplyFlexContainerAnnc.class), - @XmlElement(name = KeypadFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = KeypadFlexContainerAnnc.class), - @XmlElement(name = MotionSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = MotionSensorFlexContainerAnnc.class), - @XmlElement(name = OximeterFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = OximeterFlexContainerAnnc.class), - @XmlElement(name = PowerSaveFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = PowerSaveFlexContainerAnnc.class), - @XmlElement(name = PushButtonFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = PushButtonFlexContainerAnnc.class), - @XmlElement(name = RecorderFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RecorderFlexContainerAnnc.class), - @XmlElement(name = RefrigerationFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RefrigerationFlexContainerAnnc.class), - @XmlElement(name = RelativeHumidityFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RelativeHumidityFlexContainerAnnc.class), - @XmlElement(name = RinseLevelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RinseLevelFlexContainerAnnc.class), - @XmlElement(name = RunModeFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = RunModeFlexContainerAnnc.class), - @XmlElement(name = SignalStrengthFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = SignalStrengthFlexContainerAnnc.class), - @XmlElement(name = SmokeSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = SmokeSensorFlexContainerAnnc.class), - @XmlElement(name = SpinLevelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = SpinLevelFlexContainerAnnc.class), - @XmlElement(name = TelevisionChannelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TelevisionChannelFlexContainerAnnc.class), - @XmlElement(name = UpChannelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = UpChannelFlexContainerAnnc.class), - @XmlElement(name = DownChannelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DownChannelFlexContainerAnnc.class), - @XmlElement(name = TemperatureFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureFlexContainerAnnc.class), - @XmlElement(name = TemperatureAlarmFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureAlarmFlexContainerAnnc.class), - @XmlElement(name = TimerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TimerFlexContainerAnnc.class), - @XmlElement(name = ActivateClockTimerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ActivateClockTimerFlexContainerAnnc.class), - @XmlElement(name = DeactivateClockTimerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeactivateClockTimerFlexContainerAnnc.class), - @XmlElement(name = TurboFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = TurboFlexContainerAnnc.class), - @XmlElement(name = WaterFlowFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WaterFlowFlexContainerAnnc.class), - @XmlElement(name = WaterLevelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WaterLevelFlexContainerAnnc.class), - @XmlElement(name = WaterSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WaterSensorFlexContainerAnnc.class), - @XmlElement(name = WeightFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WeightFlexContainerAnnc.class), - @XmlElement(name = WindFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = WindFlexContainerAnnc.class), - @XmlElement(name = StreamingFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = StreamingFlexContainerAnnc.class), - @XmlElement(name = PersonSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = PersonSensorFlexContainerAnnc.class), - @XmlElement(name = BrewingFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = BrewingFlexContainerAnnc.class), - @XmlElement(name = LiquidLevelFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = LiquidLevelFlexContainerAnnc.class), - @XmlElement(name = GrinderFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = GrinderFlexContainerAnnc.class), - @XmlElement(name = FoamingFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = FoamingFlexContainerAnnc.class), - @XmlElement(name = KeepWarmFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = KeepWarmFlexContainerAnnc.class), - @XmlElement(name = ContactSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ContactSensorFlexContainerAnnc.class), - @XmlElement(name = AlarmSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSensorFlexContainerAnnc.class), - @XmlElement(name = LockFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = LockFlexContainerAnnc.class), - @XmlElement(name = AtmosphericPressureSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = AtmosphericPressureSensorFlexContainerAnnc.class), - @XmlElement(name = NoiseFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = NoiseFlexContainerAnnc.class), - @XmlElement(name = ExtendedCarbonDioxideSensorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ExtendedCarbonDioxideSensorFlexContainerAnnc.class), - @XmlElement(name = NumberValueFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = NumberValueFlexContainerAnnc.class), - @XmlElement(name = DecrementNumberValueFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DecrementNumberValueFlexContainerAnnc.class), - @XmlElement(name = IncrementNumberValueFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = IncrementNumberValueFlexContainerAnnc.class), - @XmlElement(name = ResetNumberValueFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = ResetNumberValueFlexContainerAnnc.class), - @XmlElement(name = DeviceAirConditionerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirConditionerFlexContainerAnnc.class), - @XmlElement(name = DeviceClothesWasherFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherFlexContainerAnnc.class), - @XmlElement(name = DeviceElectricVehicleChargerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceElectricVehicleChargerFlexContainerAnnc.class), - @XmlElement(name = DeviceLightFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceLightFlexContainerAnnc.class), - @XmlElement(name = DeviceMicrogenerationFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMicrogenerationFlexContainerAnnc.class), - @XmlElement(name = DeviceOvenFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOvenFlexContainerAnnc.class), - @XmlElement(name = DeviceRefrigeratorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRefrigeratorFlexContainerAnnc.class), - @XmlElement(name = DeviceRobotCleanerFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRobotCleanerFlexContainerAnnc.class), - @XmlElement(name = DeviceSmartElectricMeterFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartElectricMeterFlexContainerAnnc.class), - @XmlElement(name = DeviceStorageBatteryFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceStorageBatteryFlexContainerAnnc.class), - @XmlElement(name = DeviceTelevisionFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTelevisionFlexContainerAnnc.class), - @XmlElement(name = DeviceThermostatFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermostatFlexContainerAnnc.class), - @XmlElement(name = DeviceWaterHeaterFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterHeaterFlexContainerAnnc.class), - @XmlElement(name = DeviceCameraFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCameraFlexContainerAnnc.class), - @XmlElement(name = DeviceCoffeeMachineFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCoffeeMachineFlexContainerAnnc.class), - @XmlElement(name = DeviceContactDetectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceContactDetectorFlexContainerAnnc.class), - @XmlElement(name = DeviceDoorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorFlexContainerAnnc.class), - @XmlElement(name = DeviceFloodDetectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFloodDetectorFlexContainerAnnc.class), - @XmlElement(name = DeviceGasValveFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGasValveFlexContainerAnnc.class), - @XmlElement(name = DeviceMotionDetectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMotionDetectorFlexContainerAnnc.class), - @XmlElement(name = DeviceSmokeDetectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeDetectorFlexContainerAnnc.class), - @XmlElement(name = DeviceSmokeExtractorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeExtractorFlexContainerAnnc.class), - @XmlElement(name = DeviceSwitchButtonFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchButtonFlexContainerAnnc.class), - @XmlElement(name = DeviceTemperatureDetectorFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTemperatureDetectorFlexContainerAnnc.class), - @XmlElement(name = DeviceWarningDeviceFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWarningDeviceFlexContainerAnnc.class), - @XmlElement(name = DeviceWaterValveFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterValveFlexContainerAnnc.class), - @XmlElement(name = DeviceWeatherStationFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeatherStationFlexContainerAnnc.class), - @XmlElement(name = DeviceNumberDeviceFlexContainerAnnc.SHORT_NAME, namespace="http://www.onem2m.org/xml/protocols/homedomain", type = DeviceNumberDeviceFlexContainerAnnc.class) + @XmlElement(name = ShortName.FCNTA, namespace = "http://www.onem2m.org/xml/protocols", type = AbstractFlexContainerAnnc.class), + @XmlElement(name = DeviceThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThreeDPrinterFlexContainerAnnc.class), + @XmlElement(name = DeviceAirConditionerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirConditionerFlexContainerAnnc.class), + @XmlElement(name = DeviceAirPurifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirPurifierFlexContainerAnnc.class), + @XmlElement(name = DeviceAirQualityMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirQualityMonitorFlexContainerAnnc.class), + @XmlElement(name = DeviceAudioReceiverFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAudioReceiverFlexContainerAnnc.class), + @XmlElement(name = DeviceBloodPressureMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceBloodPressureMonitorFlexContainerAnnc.class), + @XmlElement(name = DeviceCameraFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCameraFlexContainerAnnc.class), + @XmlElement(name = DeviceClothesDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesDryerFlexContainerAnnc.class), + @XmlElement(name = DeviceClothesWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherFlexContainerAnnc.class), + @XmlElement(name = DeviceClothesWasherDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherDryerFlexContainerAnnc.class), + @XmlElement(name = DeviceCoffeeMachineFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCoffeeMachineFlexContainerAnnc.class), + @XmlElement(name = DeviceCookerHoodFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCookerHoodFlexContainerAnnc.class), + @XmlElement(name = DeviceCooktopFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCooktopFlexContainerAnnc.class), + @XmlElement(name = DeviceDehumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDehumidifierFlexContainerAnnc.class), + @XmlElement(name = DeviceDishWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDishWasherFlexContainerAnnc.class), + @XmlElement(name = DeviceDoorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorFlexContainerAnnc.class), + @XmlElement(name = DeviceDoorLockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorLockFlexContainerAnnc.class), + @XmlElement(name = DeviceElectricVehicleChargerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceElectricVehicleChargerFlexContainerAnnc.class), + @XmlElement(name = DeviceFanFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFanFlexContainerAnnc.class), + @XmlElement(name = DeviceFoodProbeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFoodProbeFlexContainerAnnc.class), + @XmlElement(name = DeviceFreezerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFreezerFlexContainerAnnc.class), + @XmlElement(name = DeviceGlucosemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGlucosemeterFlexContainerAnnc.class), + @XmlElement(name = DeviceHeartRateMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHeartRateMonitorFlexContainerAnnc.class), + @XmlElement(name = DeviceHomeCCTVFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHomeCCTVFlexContainerAnnc.class), + @XmlElement(name = DeviceHumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHumidifierFlexContainerAnnc.class), + @XmlElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceKettleFlexContainerAnnc.class), + @XmlElement(name = DeviceLightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceLightFlexContainerAnnc.class), + @XmlElement(name = DeviceMicrogenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMicrogenerationFlexContainerAnnc.class), + @XmlElement(name = DeviceMultiFunctionPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMultiFunctionPrinterFlexContainerAnnc.class), + @XmlElement(name = DeviceOutdoorLampFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOutdoorLampFlexContainerAnnc.class), + @XmlElement(name = DeviceOvenFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOvenFlexContainerAnnc.class), + @XmlElement(name = DevicePrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DevicePrinterFlexContainerAnnc.class), + @XmlElement(name = DevicePulseOximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DevicePulseOximeterFlexContainerAnnc.class), + @XmlElement(name = DeviceRefrigeratorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRefrigeratorFlexContainerAnnc.class), + @XmlElement(name = DeviceRobotCleanerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRobotCleanerFlexContainerAnnc.class), + @XmlElement(name = DeviceScannerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceScannerFlexContainerAnnc.class), + @XmlElement(name = DeviceSecurityPanelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSecurityPanelFlexContainerAnnc.class), + @XmlElement(name = DeviceSetTopBoxFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSetTopBoxFlexContainerAnnc.class), + @XmlElement(name = DeviceSmartElectricMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartElectricMeterFlexContainerAnnc.class), + @XmlElement(name = DeviceSmartPlugFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartPlugFlexContainerAnnc.class), + @XmlElement(name = DeviceSteamClosetFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSteamClosetFlexContainerAnnc.class), + @XmlElement(name = DeviceStorageBatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceStorageBatteryFlexContainerAnnc.class), + @XmlElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchFlexContainerAnnc.class), + @XmlElement(name = DeviceTelevisionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTelevisionFlexContainerAnnc.class), + @XmlElement(name = DeviceThermometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermometerFlexContainerAnnc.class), + @XmlElement(name = DeviceThermostatFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermostatFlexContainerAnnc.class), + @XmlElement(name = DeviceWaterHeaterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterHeaterFlexContainerAnnc.class), + @XmlElement(name = DeviceWaterValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterValveFlexContainerAnnc.class), + @XmlElement(name = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc.class), + @XmlElement(name = DeviceWindowShadeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWindowShadeFlexContainerAnnc.class), + @XmlElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchFlexContainerAnnc.class), + @XmlElement(name = DeviceSmokeDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeDetectorFlexContainerAnnc.class), + @XmlElement(name = DeviceContactDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceContactDetectorFlexContainerAnnc.class), + @XmlElement(name = DeviceMotionDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMotionDetectorFlexContainerAnnc.class), + @XmlElement(name = DeviceFloodDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFloodDetectorFlexContainerAnnc.class), + @XmlElement(name = DeviceTemperatureDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTemperatureDetectorFlexContainerAnnc.class), + @XmlElement(name = DeviceWeatherStationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeatherStationFlexContainerAnnc.class), + @XmlElement(name = DeviceGasValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGasValveFlexContainerAnnc.class), + @XmlElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceKettleFlexContainerAnnc.class), + @XmlElement(name = DeviceWarningFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWarningFlexContainerAnnc.class), + @XmlElement(name = LiquidLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LiquidLevelFlexContainerAnnc.class), + @XmlElement(name = TemperatureAlarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureAlarmFlexContainerAnnc.class), + @XmlElement(name = ContactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ContactSensorFlexContainerAnnc.class), + @XmlElement(name = ClothesDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesDryerJobModeFlexContainerAnnc.class), + @XmlElement(name = OximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OximeterFlexContainerAnnc.class), + @XmlElement(name = TurboFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TurboFlexContainerAnnc.class), + @XmlElement(name = AirConJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirConJobModeFlexContainerAnnc.class), + @XmlElement(name = EnergyGenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = EnergyGenerationFlexContainerAnnc.class), + @XmlElement(name = KeypadFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = KeypadFlexContainerAnnc.class), + @XmlElement(name = MotionSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = MotionSensorFlexContainerAnnc.class), + @XmlElement(name = SmokeSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SmokeSensorFlexContainerAnnc.class), + @XmlElement(name = MediaSelectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = MediaSelectFlexContainerAnnc.class), + @XmlElement(name = ElectricVehicleConnectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ElectricVehicleConnectorFlexContainerAnnc.class), + @XmlElement(name = AlarmSpeakerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSpeakerFlexContainerAnnc.class), + @XmlElement(name = LockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LockFlexContainerAnnc.class), + @XmlElement(name = AirPurifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirPurifierJobModeFlexContainerAnnc.class), + @XmlElement(name = GlucometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GlucometerFlexContainerAnnc.class), + @XmlElement(name = RemoteControlEnableFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RemoteControlEnableFlexContainerAnnc.class), + @XmlElement(name = HeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HeightFlexContainerAnnc.class), + @XmlElement(name = SpinLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SpinLevelFlexContainerAnnc.class), + @XmlElement(name = AudioVolumeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AudioVolumeFlexContainerAnnc.class), + @XmlElement(name = FoamingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FoamingFlexContainerAnnc.class), + @XmlElement(name = OvercurrentSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OvercurrentSensorFlexContainerAnnc.class), + @XmlElement(name = WeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WeightFlexContainerAnnc.class), + @XmlElement(name = SecurityModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SecurityModeFlexContainerAnnc.class), + @XmlElement(name = BodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BodyCompositionAnalyserFlexContainerAnnc.class), + @XmlElement(name = ClockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClockFlexContainerAnnc.class), + @XmlElement(name = ClothesWasherDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherDryerJobModeFlexContainerAnnc.class), + @XmlElement(name = FilterInfoFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FilterInfoFlexContainerAnnc.class), + @XmlElement(name = PushButtonFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PushButtonFlexContainerAnnc.class), + @XmlElement(name = ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherJobModeOptionFlexContainerAnnc.class), + @XmlElement(name = KeepWarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = KeepWarmFlexContainerAnnc.class), + @XmlElement(name = PersonSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PersonSensorFlexContainerAnnc.class), + @XmlElement(name = ColourSaturationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ColourSaturationFlexContainerAnnc.class), + @XmlElement(name = ImpactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ImpactSensorFlexContainerAnnc.class), + @XmlElement(name = ClothesWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherJobModeFlexContainerAnnc.class), + @XmlElement(name = RunStateFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RunStateFlexContainerAnnc.class), + @XmlElement(name = TextMessageFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TextMessageFlexContainerAnnc.class), + @XmlElement(name = BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BioElectricalImpedanceAnalysisFlexContainerAnnc.class), + @XmlElement(name = OpenLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OpenLevelFlexContainerAnnc.class), + @XmlElement(name = CredentialsFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = CredentialsFlexContainerAnnc.class), + @XmlElement(name = HotWaterSupplyFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HotWaterSupplyFlexContainerAnnc.class), + @XmlElement(name = AirFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirFlowFlexContainerAnnc.class), + @XmlElement(name = BatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BatteryFlexContainerAnnc.class), + @XmlElement(name = PulsemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PulsemeterFlexContainerAnnc.class), + @XmlElement(name = RobotCleanerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RobotCleanerJobModeFlexContainerAnnc.class), + @XmlElement(name = LiquidRemainingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LiquidRemainingFlexContainerAnnc.class), + @XmlElement(name = AirQualitySensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirQualitySensorFlexContainerAnnc.class), + @XmlElement(name = PhoneCallFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PhoneCallFlexContainerAnnc.class), + @XmlElement(name = WaterFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WaterFlowFlexContainerAnnc.class), + @XmlElement(name = TimerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TimerFlexContainerAnnc.class), + @XmlElement(name = BrewingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BrewingFlexContainerAnnc.class), + @XmlElement(name = DishWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DishWasherJobModeFlexContainerAnnc.class), + @XmlElement(name = OperationModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OperationModeFlexContainerAnnc.class), + @XmlElement(name = FaultDetectionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FaultDetectionFlexContainerAnnc.class), + @XmlElement(name = BoilerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BoilerFlexContainerAnnc.class), + @XmlElement(name = UvSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = UvSensorFlexContainerAnnc.class), + @XmlElement(name = BinarySwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BinarySwitchFlexContainerAnnc.class), + @XmlElement(name = WaterSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WaterSensorFlexContainerAnnc.class), + @XmlElement(name = AcousticSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AcousticSensorFlexContainerAnnc.class), + @XmlElement(name = TemperatureFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureFlexContainerAnnc.class), + @XmlElement(name = NumberValueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = NumberValueFlexContainerAnnc.class), + @XmlElement(name = DehumidifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DehumidifierJobModeFlexContainerAnnc.class), + @XmlElement(name = EnergyConsumptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = EnergyConsumptionFlexContainerAnnc.class), + @XmlElement(name = RecorderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RecorderFlexContainerAnnc.class), + @XmlElement(name = SphygmomanometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SphygmomanometerFlexContainerAnnc.class), + @XmlElement(name = GrinderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GrinderFlexContainerAnnc.class), + @XmlElement(name = PlayerControlFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PlayerControlFlexContainerAnnc.class), + @XmlElement(name = OzoneMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OzoneMeterFlexContainerAnnc.class), + @XmlElement(name = PrintQueueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PrintQueueFlexContainerAnnc.class), + @XmlElement(name = SessionDescriptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SessionDescriptionFlexContainerAnnc.class), + @XmlElement(name = SignalStrengthFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SignalStrengthFlexContainerAnnc.class), + @XmlElement(name = BinaryObjectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BinaryObjectFlexContainerAnnc.class), + @XmlElement(name = BarometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BarometerFlexContainerAnnc.class), + @XmlElement(name = HeatingZoneFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HeatingZoneFlexContainerAnnc.class), + @XmlElement(name = CookerHoodJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = CookerHoodJobModeFlexContainerAnnc.class), + @XmlElement(name = ColourFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ColourFlexContainerAnnc.class), + @XmlElement(name = BrightnessFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BrightnessFlexContainerAnnc.class), + @XmlElement(name = RefrigerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RefrigerationFlexContainerAnnc.class), + @XmlElement(name = AutoDocumentFeederFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AutoDocumentFeederFlexContainerAnnc.class), + @XmlElement(name = TelevisionChannelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TelevisionChannelFlexContainerAnnc.class), + @XmlElement(name = ThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ThreeDPrinterFlexContainerAnnc.class), + @XmlElement(name = GeoLocationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GeoLocationFlexContainerAnnc.class), + @XmlElement(name = DoorStatusFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DoorStatusFlexContainerAnnc.class), + @XmlElement(name = RelativeHumidityFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RelativeHumidityFlexContainerAnnc.class), + @XmlElement(name = SteamClosetJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SteamClosetJobModeFlexContainerAnnc.class), + @XmlElement(name = AnemometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AnemometerFlexContainerAnnc.class), + @XmlElement(name = PowerSaveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PowerSaveFlexContainerAnnc.class), }) protected List flexContainerOrContainerOrSubscription; @@ -201,18 +256,16 @@ public class AbstractFlexContainerAnnc extends AnnouncedResource { @XmlTransient public List getCustomAttributeNames() { List names = new ArrayList(); - for (CustomAttribute ca : getCustomAttributes()) { - names.add(ca.getCustomAttributeName()); + names.add(ca.getShortName()); } - return names; } @XmlTransient public CustomAttribute getCustomAttribute(String name) { for (CustomAttribute ca : getCustomAttributes()) { - if (ca.getCustomAttributeName().equals(name)) { + if (ca.getShortName().equals(name)) { return ca; } } diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/Container.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/Container.java index 555e7602..76b3fa76 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/Container.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/Container.java @@ -39,6 +39,7 @@ import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import org.eclipse.om2m.commons.constants.ShortName; +import org.eclipse.om2m.commons.resource.flexcontainerspec.*; /** *

@@ -88,40 +89,203 @@ public class Container extends AnnounceableResource { @XmlElement(name = ShortName.STATETAG, required = true, namespace="") @XmlSchemaType(name = "nonNegativeInteger") protected BigInteger stateTag; + @XmlElement(name = ShortName.CREATOR, required = true, namespace="") protected String creator; + @XmlSchemaType(name = "nonNegativeInteger") @XmlElement(name = ShortName.MAX_NR_OF_INSTANCES, namespace="") protected BigInteger maxNrOfInstances; + @XmlSchemaType(name = "nonNegativeInteger") @XmlElement(name = ShortName.MAX_BYTE_SIZE, namespace="") protected BigInteger maxByteSize; + @XmlSchemaType(name = "nonNegativeInteger") @XmlElement(name = ShortName.MAX_INSTANCE_AGE, namespace="") protected BigInteger maxInstanceAge; + @XmlElement(name = ShortName.CURRENT_NUMBER_OF_INSTANCES, required = true, namespace="") @XmlSchemaType(name = "nonNegativeInteger") protected BigInteger currentNrOfInstances; + @XmlElement(name = ShortName.CURRENT_BYTE_SIZE, required = true, namespace="") @XmlSchemaType(name = "nonNegativeInteger") protected BigInteger currentByteSize; + @XmlSchemaType(name = "anyURI") @XmlElement(name = ShortName.LOCATION_ID, namespace="") protected String locationID; + @XmlSchemaType(name = "anyURI") @XmlElement(name = ShortName.ONTOLOGY_REF, namespace="") protected String ontologyRef; + @XmlElement(name = ShortName.CHILD_RESOURCE, namespace="") protected List childResource; + @XmlElements({ @XmlElement(name = ShortName.CIN, namespace = "http://www.onem2m.org/xml/protocols", type = ContentInstance.class), @XmlElement(name = ShortName.CNT, namespace = "http://www.onem2m.org/xml/protocols", type = Container.class), - @XmlElement(name = ShortName.SUB, namespace = "http://www.onem2m.org/xml/protocols", type = Subscription.class) }) + @XmlElement(name = ShortName.SUB, namespace = "http://www.onem2m.org/xml/protocols", type = Subscription.class), + @XmlElement(name = ShortName.FCNT, type = AbstractFlexContainer.class), + @XmlElement(name = DeviceThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThreeDPrinterFlexContainer.class), + @XmlElement(name = DeviceAirConditionerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirConditionerFlexContainer.class), + @XmlElement(name = DeviceAirPurifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirPurifierFlexContainer.class), + @XmlElement(name = DeviceAirQualityMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAirQualityMonitorFlexContainer.class), + @XmlElement(name = DeviceAudioReceiverFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceAudioReceiverFlexContainer.class), + @XmlElement(name = DeviceBloodPressureMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceBloodPressureMonitorFlexContainer.class), + @XmlElement(name = DeviceCameraFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCameraFlexContainer.class), + @XmlElement(name = DeviceClothesDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesDryerFlexContainer.class), + @XmlElement(name = DeviceClothesWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherFlexContainer.class), + @XmlElement(name = DeviceClothesWasherDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceClothesWasherDryerFlexContainer.class), + @XmlElement(name = DeviceCoffeeMachineFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCoffeeMachineFlexContainer.class), + @XmlElement(name = DeviceCookerHoodFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCookerHoodFlexContainer.class), + @XmlElement(name = DeviceCooktopFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceCooktopFlexContainer.class), + @XmlElement(name = DeviceDehumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDehumidifierFlexContainer.class), + @XmlElement(name = DeviceDishWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDishWasherFlexContainer.class), + @XmlElement(name = DeviceDoorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorFlexContainer.class), + @XmlElement(name = DeviceDoorLockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceDoorLockFlexContainer.class), + @XmlElement(name = DeviceElectricVehicleChargerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceElectricVehicleChargerFlexContainer.class), + @XmlElement(name = DeviceFanFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFanFlexContainer.class), + @XmlElement(name = DeviceFoodProbeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFoodProbeFlexContainer.class), + @XmlElement(name = DeviceFreezerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFreezerFlexContainer.class), + @XmlElement(name = DeviceGlucosemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGlucosemeterFlexContainer.class), + @XmlElement(name = DeviceHeartRateMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHeartRateMonitorFlexContainer.class), + @XmlElement(name = DeviceHomeCCTVFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHomeCCTVFlexContainer.class), + @XmlElement(name = DeviceHumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceHumidifierFlexContainer.class), + @XmlElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceKettleFlexContainer.class), + @XmlElement(name = DeviceLightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceLightFlexContainer.class), + @XmlElement(name = DeviceMicrogenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMicrogenerationFlexContainer.class), + @XmlElement(name = DeviceMultiFunctionPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMultiFunctionPrinterFlexContainer.class), + @XmlElement(name = DeviceOutdoorLampFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOutdoorLampFlexContainer.class), + @XmlElement(name = DeviceOvenFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceOvenFlexContainer.class), + @XmlElement(name = DevicePrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DevicePrinterFlexContainer.class), + @XmlElement(name = DevicePulseOximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DevicePulseOximeterFlexContainer.class), + @XmlElement(name = DeviceRefrigeratorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRefrigeratorFlexContainer.class), + @XmlElement(name = DeviceRobotCleanerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceRobotCleanerFlexContainer.class), + @XmlElement(name = DeviceScannerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceScannerFlexContainer.class), + @XmlElement(name = DeviceSecurityPanelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSecurityPanelFlexContainer.class), + @XmlElement(name = DeviceSetTopBoxFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSetTopBoxFlexContainer.class), + @XmlElement(name = DeviceSmartElectricMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartElectricMeterFlexContainer.class), + @XmlElement(name = DeviceSmartPlugFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmartPlugFlexContainer.class), + @XmlElement(name = DeviceSteamClosetFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSteamClosetFlexContainer.class), + @XmlElement(name = DeviceStorageBatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceStorageBatteryFlexContainer.class), + @XmlElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchFlexContainer.class), + @XmlElement(name = DeviceTelevisionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTelevisionFlexContainer.class), + @XmlElement(name = DeviceThermometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermometerFlexContainer.class), + @XmlElement(name = DeviceThermostatFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceThermostatFlexContainer.class), + @XmlElement(name = DeviceWaterHeaterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterHeaterFlexContainer.class), + @XmlElement(name = DeviceWaterValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWaterValveFlexContainer.class), + @XmlElement(name = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.class), + @XmlElement(name = DeviceWindowShadeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWindowShadeFlexContainer.class), + @XmlElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSwitchFlexContainer.class), + @XmlElement(name = DeviceSmokeDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceSmokeDetectorFlexContainer.class), + @XmlElement(name = DeviceContactDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceContactDetectorFlexContainer.class), + @XmlElement(name = DeviceMotionDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceMotionDetectorFlexContainer.class), + @XmlElement(name = DeviceFloodDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceFloodDetectorFlexContainer.class), + @XmlElement(name = DeviceTemperatureDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceTemperatureDetectorFlexContainer.class), + @XmlElement(name = DeviceWeatherStationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWeatherStationFlexContainer.class), + @XmlElement(name = DeviceGasValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceGasValveFlexContainer.class), + @XmlElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceKettleFlexContainer.class), + @XmlElement(name = DeviceWarningFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DeviceWarningFlexContainer.class), + @XmlElement(name = LiquidLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LiquidLevelFlexContainer.class), + @XmlElement(name = TemperatureAlarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureAlarmFlexContainer.class), + @XmlElement(name = ContactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ContactSensorFlexContainer.class), + @XmlElement(name = ClothesDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesDryerJobModeFlexContainer.class), + @XmlElement(name = OximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OximeterFlexContainer.class), + @XmlElement(name = TurboFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TurboFlexContainer.class), + @XmlElement(name = AirConJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirConJobModeFlexContainer.class), + @XmlElement(name = EnergyGenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = EnergyGenerationFlexContainer.class), + @XmlElement(name = KeypadFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = KeypadFlexContainer.class), + @XmlElement(name = MotionSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = MotionSensorFlexContainer.class), + @XmlElement(name = SmokeSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SmokeSensorFlexContainer.class), + @XmlElement(name = MediaSelectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = MediaSelectFlexContainer.class), + @XmlElement(name = ElectricVehicleConnectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ElectricVehicleConnectorFlexContainer.class), + @XmlElement(name = AlarmSpeakerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AlarmSpeakerFlexContainer.class), + @XmlElement(name = LockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LockFlexContainer.class), + @XmlElement(name = AirPurifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirPurifierJobModeFlexContainer.class), + @XmlElement(name = GlucometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GlucometerFlexContainer.class), + @XmlElement(name = RemoteControlEnableFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RemoteControlEnableFlexContainer.class), + @XmlElement(name = HeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HeightFlexContainer.class), + @XmlElement(name = SpinLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SpinLevelFlexContainer.class), + @XmlElement(name = AudioVolumeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AudioVolumeFlexContainer.class), + @XmlElement(name = FoamingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FoamingFlexContainer.class), + @XmlElement(name = OvercurrentSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OvercurrentSensorFlexContainer.class), + @XmlElement(name = WeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WeightFlexContainer.class), + @XmlElement(name = SecurityModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SecurityModeFlexContainer.class), + @XmlElement(name = BodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BodyCompositionAnalyserFlexContainer.class), + @XmlElement(name = ClockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClockFlexContainer.class), + @XmlElement(name = ClothesWasherDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherDryerJobModeFlexContainer.class), + @XmlElement(name = FilterInfoFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FilterInfoFlexContainer.class), + @XmlElement(name = PushButtonFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PushButtonFlexContainer.class), + @XmlElement(name = ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherJobModeOptionFlexContainer.class), + @XmlElement(name = KeepWarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = KeepWarmFlexContainer.class), + @XmlElement(name = PersonSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PersonSensorFlexContainer.class), + @XmlElement(name = ColourSaturationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ColourSaturationFlexContainer.class), + @XmlElement(name = ImpactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ImpactSensorFlexContainer.class), + @XmlElement(name = ClothesWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ClothesWasherJobModeFlexContainer.class), + @XmlElement(name = RunStateFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RunStateFlexContainer.class), + @XmlElement(name = TextMessageFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TextMessageFlexContainer.class), + @XmlElement(name = BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BioElectricalImpedanceAnalysisFlexContainer.class), + @XmlElement(name = OpenLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OpenLevelFlexContainer.class), + @XmlElement(name = CredentialsFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = CredentialsFlexContainer.class), + @XmlElement(name = HotWaterSupplyFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HotWaterSupplyFlexContainer.class), + @XmlElement(name = AirFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirFlowFlexContainer.class), + @XmlElement(name = BatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BatteryFlexContainer.class), + @XmlElement(name = PulsemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PulsemeterFlexContainer.class), + @XmlElement(name = RobotCleanerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RobotCleanerJobModeFlexContainer.class), + @XmlElement(name = LiquidRemainingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = LiquidRemainingFlexContainer.class), + @XmlElement(name = AirQualitySensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AirQualitySensorFlexContainer.class), + @XmlElement(name = PhoneCallFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PhoneCallFlexContainer.class), + @XmlElement(name = WaterFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WaterFlowFlexContainer.class), + @XmlElement(name = TimerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TimerFlexContainer.class), + @XmlElement(name = BrewingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BrewingFlexContainer.class), + @XmlElement(name = DishWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DishWasherJobModeFlexContainer.class), + @XmlElement(name = OperationModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OperationModeFlexContainer.class), + @XmlElement(name = FaultDetectionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = FaultDetectionFlexContainer.class), + @XmlElement(name = BoilerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BoilerFlexContainer.class), + @XmlElement(name = UvSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = UvSensorFlexContainer.class), + @XmlElement(name = BinarySwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BinarySwitchFlexContainer.class), + @XmlElement(name = WaterSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = WaterSensorFlexContainer.class), + @XmlElement(name = AcousticSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AcousticSensorFlexContainer.class), + @XmlElement(name = TemperatureFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TemperatureFlexContainer.class), + @XmlElement(name = NumberValueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = NumberValueFlexContainer.class), + @XmlElement(name = DehumidifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DehumidifierJobModeFlexContainer.class), + @XmlElement(name = EnergyConsumptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = EnergyConsumptionFlexContainer.class), + @XmlElement(name = RecorderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RecorderFlexContainer.class), + @XmlElement(name = SphygmomanometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SphygmomanometerFlexContainer.class), + @XmlElement(name = GrinderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GrinderFlexContainer.class), + @XmlElement(name = PlayerControlFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PlayerControlFlexContainer.class), + @XmlElement(name = OzoneMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = OzoneMeterFlexContainer.class), + @XmlElement(name = PrintQueueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PrintQueueFlexContainer.class), + @XmlElement(name = SessionDescriptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SessionDescriptionFlexContainer.class), + @XmlElement(name = SignalStrengthFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SignalStrengthFlexContainer.class), + @XmlElement(name = BinaryObjectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BinaryObjectFlexContainer.class), + @XmlElement(name = BarometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BarometerFlexContainer.class), + @XmlElement(name = HeatingZoneFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = HeatingZoneFlexContainer.class), + @XmlElement(name = CookerHoodJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = CookerHoodJobModeFlexContainer.class), + @XmlElement(name = ColourFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ColourFlexContainer.class), + @XmlElement(name = BrightnessFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = BrightnessFlexContainer.class), + @XmlElement(name = RefrigerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RefrigerationFlexContainer.class), + @XmlElement(name = AutoDocumentFeederFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AutoDocumentFeederFlexContainer.class), + @XmlElement(name = TelevisionChannelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = TelevisionChannelFlexContainer.class), + @XmlElement(name = ThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = ThreeDPrinterFlexContainer.class), + @XmlElement(name = GeoLocationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = GeoLocationFlexContainer.class), + @XmlElement(name = DoorStatusFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = DoorStatusFlexContainer.class), + @XmlElement(name = RelativeHumidityFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = RelativeHumidityFlexContainer.class), + @XmlElement(name = SteamClosetJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = SteamClosetJobModeFlexContainer.class), + @XmlElement(name = AnemometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = AnemometerFlexContainer.class), + @XmlElement(name = PowerSaveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain", type = PowerSaveFlexContainer.class), + }) protected List contentInstanceOrContainerOrSubscription; + @XmlElement(name = ShortName.OLDEST, namespace="") protected String oldest; + @XmlElement(name = ShortName.LATEST, namespace="") protected String latest; + /** * Gets the value of the stateTag property. * diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/CustomAttribute.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/CustomAttribute.java index 1d6c1d4a..7c75a21e 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/CustomAttribute.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/CustomAttribute.java @@ -15,31 +15,47 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlJavaTypeAdapter(CustomAttributeAdapter.class) public class CustomAttribute { - private String customAttributeName; + private String shortName; + private String longName; + private String value; + private String type; - private String customAttributeValue; + public String getLongName() { + return longName; + } + + public void setLongName(String name) { + this.longName = name; + } - public String getCustomAttributeName() { - return customAttributeName; + public String getShortName() { + return shortName; } - public void setCustomAttributeName(String customAttributeName) { - this.customAttributeName = customAttributeName; + public void setShortName(String shortName) { + this.shortName = shortName; } - public String getCustomAttributeValue() { - return customAttributeValue; + public String getValue() { + return value; } - public void setCustomAttributeValue(String customAttributeValue) { - this.customAttributeValue = customAttributeValue; + public void setValue(String value) { + this.value = value; + } + + public String getType() { + return type; } + public void setType(String type) { + this.type = type; + } @Override public String toString() { - return ""; + return ""; } } diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/CustomAttributeAdapter.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/CustomAttributeAdapter.java index 9fa5b468..79741331 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/CustomAttributeAdapter.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/CustomAttributeAdapter.java @@ -11,53 +11,50 @@ import javax.xml.bind.annotation.adapters.XmlAdapter; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; public class CustomAttributeAdapter extends XmlAdapter { + private static Log LOGGER = LogFactory.getLog(CustomAttributeAdapter.class); + private DocumentBuilder documentBuilder; @Override - public CustomAttribute unmarshal(Element v) throws Exception { - CustomAttribute customAttribute = new CustomAttribute(); - - String value = null; - Attr att = v.getAttributeNode("val"); - if (att != null) { - // json case - value = v.getAttribute("val"); - } else { - // xml case - value = v.getTextContent(); - } - customAttribute.setCustomAttributeName(v.getTagName()); - customAttribute.setCustomAttributeValue(value); - - return customAttribute; + public CustomAttribute unmarshal(Element elt) throws Exception { + CustomAttribute ca = new CustomAttribute(); + Attr attr = elt.getAttributeNode("val"); + String value = (attr == null) ? elt.getTextContent() // xml case + : elt.getAttribute("val"); // json case + ca.setShortName(elt.getTagName()); + ca.setValue(value); +// try { +// ca.setType(elt.getAttributeNode("type").getValue()); +// } catch (Exception e) { +// LOGGER.info("error getting type " + elt, e); +// } + LOGGER.info("unmarshal: " + print(elt) + " -> " + ca); + return ca; } @Override - public Element marshal(CustomAttribute v) throws Exception { - - if (null == v) { - return null; - } - - Object value = v.getCustomAttributeValue(); - - Element e = null; + public Element marshal(CustomAttribute ca) throws Exception { try { Document document = getDocumentBuilder().newDocument(); - e = document.createElement(v.getCustomAttributeName()); - e.setTextContent((value != null ? value.toString() : "")); - + Element elt = document.createElement(ca.getShortName()); + String value = ca.getValue(); +// elt.setAttribute("type", ca.getType()); + elt.setTextContent((value != null ? value : "")); + return elt; } catch (Throwable t) { - t.printStackTrace(); + LOGGER.info("error marshalling " + ca, t); + return null; } - - return e; } private DocumentBuilder getDocumentBuilder() throws Exception { @@ -68,6 +65,15 @@ public class CustomAttributeAdapter extends XmlAdapter } return documentBuilder; } - + + private String print(Element elt) { + String ret = "" + elt.getTextContent() + ""; + } } diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DasInfo.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DasInfo.java new file mode 100644 index 00000000..5b8e1092 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DasInfo.java @@ -0,0 +1,38 @@ +package org.eclipse.om2m.commons.resource; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.constants.ShortName; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(propOrder = { "URI", "dasRequest" }) +public class DasInfo { + + @XmlElement(required = true, name=ShortName.URI) + @XmlSchemaType(name = "anyURI") + private String URI; + + @XmlElement(nillable = true, type = DynAuthDasRequest.class, name=ShortName.DAS_REQUEST) + private DynAuthDasRequest dasRequest; + // private DynAuthJWT securedDasRequest; + + public String getURI() { + return URI; + } + + public void setURI(String uRI) { + URI = uRI; + } + + public DynAuthDasRequest getDasRequest() { + return dasRequest; + } + + public void setDasRequest(DynAuthDasRequest dasRequest) { + this.dasRequest = dasRequest; + } +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DynAuthDasRequest.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DynAuthDasRequest.java index b4c119bf..8032faf0 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DynAuthDasRequest.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DynAuthDasRequest.java @@ -20,6 +20,8 @@ import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.eclipse.om2m.commons.constants.ShortName; + /** *

Classe Java pour dynAuthDasRequest complex type. @@ -104,26 +106,34 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; }) public class DynAuthDasRequest { - @XmlElement(required = true) + @XmlElement(required = true, name=ShortName.ORIGINATOR) @XmlSchemaType(name = "anyURI") protected String originator; - @XmlElement(required = true) + @XmlElement(required = true, name = ShortName.TARGETED_RESOURCE_TYPE) protected BigInteger targetedResourceType; - @XmlElement(required = true) + @XmlElement(required = true, name=ShortName.OPERATION) protected BigInteger operation; + @XmlElement(name=ShortName.ORIGINATOR_IP) protected DynAuthDasRequest.OriginatorIP originatorIP; + @XmlElement(name=ShortName.ORIGINATOR_LOCATION) protected LocationRegion originatorLocation; @XmlList + @XmlElement(name=ShortName.ORIGINATOR_ROLE_IDS) protected List originatorRoleIDs; @XmlSchemaType(name = "anySimpleType") + @XmlElement(name=ShortName.REQUEST_TIMESTAMP) protected String requestTimestamp; @XmlSchemaType(name = "anyURI") + @XmlElement(name=ShortName.TARGETED_RESOURCE_ID) protected String targetedResourceID; @XmlSchemaType(name = "anySimpleType") + @XmlElement(name=ShortName.PROPOSED_PRIVILEDGES_LIFETIME) protected String proposedPrivilegesLifetime; @XmlList + @XmlElement(name=ShortName.ROLE_IDS_FROM_ACPS) protected List roleIDsFromACPs; @XmlList + @XmlElement(name=ShortName.TOKEN_IDS) protected List tokenIDs; /** @@ -435,9 +445,11 @@ public class DynAuthDasRequest { @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") + @XmlElement(name=ShortName.IPV4) protected String ipv4Address; @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlSchemaType(name = "token") + @XmlElement(name=ShortName.IPV6) protected String ipv6Address; /** diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DynAuthTokenReqInfo.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DynAuthTokenReqInfo.java new file mode 100644 index 00000000..e0a0dd7f --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/DynAuthTokenReqInfo.java @@ -0,0 +1,37 @@ +package org.eclipse.om2m.commons.resource; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElements; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.constants.ShortName; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ShortName.DYNAMIC_AUTHORIZATION_TOKEN_REQ_INFO, namespace = "http://www.onem2m.org/xml/protocols", propOrder = { + "dasInfo" }) +@XmlRootElement(name = ShortName.DYNAMIC_AUTHORIZATION_TOKEN_REQ_INFO, namespace = "http://www.onem2m.org/xml/protocols") +public class DynAuthTokenReqInfo { + + @XmlElements({ + @XmlElement(name = ShortName.DAS_INFO, type = DasInfo.class) }) + private List dasInfo; + + public List getDasInfo() { + if (dasInfo == null) { + dasInfo = new ArrayList<>(); + } + return dasInfo; + } + + public void setDasInfo(List dasInfo) { + this.dasInfo = dasInfo; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/RequestPrimitive.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/RequestPrimitive.java index 8565f478..94924a69 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/RequestPrimitive.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/RequestPrimitive.java @@ -27,6 +27,7 @@ package org.eclipse.om2m.commons.resource; import java.math.BigInteger; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -128,6 +129,8 @@ public class RequestPrimitive { @XmlElement(name = ShortName.DISCOVERY_RESULT_TYPE) protected BigInteger discoveryResultType; @XmlTransient + protected List tokens; + @XmlTransient protected String returnContentType; @XmlTransient protected String requestContentType; @@ -607,6 +610,13 @@ public class RequestPrimitive { } return httpHeaders; } + + public List getTokens() { + if (tokens == null) { + tokens = new ArrayList(); + } + return tokens; + } /* (non-Javadoc) * @see java.lang.Object#toString() @@ -652,7 +662,8 @@ public class RequestPrimitive { + returnContentType + ",\n " : "") + (requestContentType != null ? "requestContentType=" + requestContentType + ",\n ": "") - + (queryStrings != null ? "queryStrings=" + queryStrings : "") + + (queryStrings != null ? "queryStrings=" + queryStrings : "") + ", \n" + + ",tokens=" + (tokens != null ? tokens.toString() : "null") + "]"; } diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/ResponsePrimitive.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/ResponsePrimitive.java index 646078c0..c94e877a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/ResponsePrimitive.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/ResponsePrimitive.java @@ -91,6 +91,8 @@ public class ResponsePrimitive implements Constants { protected String resultExpirationTimestamp; @XmlElement(name = ShortName.EVENT_CATEGORY) protected String eventCategory; + @XmlElement(name= ShortName.TOKEN_REQ_INFO) + protected DynAuthTokenReqInfo tokenReqInfo; @XmlTransient protected String location; @XmlTransient @@ -301,6 +303,16 @@ public class ResponsePrimitive implements Constants { public void setLocation(String location) { this.location = location; } + + + + public DynAuthTokenReqInfo getTokenReqInfo() { + return tokenReqInfo; + } + + public void setTokenReqInfo(DynAuthTokenReqInfo tokenReqInfo) { + this.tokenReqInfo = tokenReqInfo; + } /* (non-Javadoc) * @see java.lang.Object#toString() diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AcousticSensorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AcousticSensorFlexContainer.java new file mode 100644 index 00000000..660e8899 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AcousticSensorFlexContainer.java @@ -0,0 +1,58 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AcousticSensor + +This ModuleClass provides capabilities for an acoustic sensor. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = AcousticSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AcousticSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AcousticSensorFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "acousticSensor"; + public static final String SHORT_NAME = "acoSr"; + + public AcousticSensorFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + AcousticSensorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute loudness = new CustomAttribute(); + loudness.setLongName("loudness"); + loudness.setShortName("louds"); + loudness.setType("xs:float"); + getCustomAttributes().add(loudness); + CustomAttribute acousticStatus = new CustomAttribute(); + acousticStatus.setLongName("acousticStatus"); + acousticStatus.setShortName("acoSs"); + acousticStatus.setType("xs:integer"); + getCustomAttributes().add(acousticStatus); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AcousticSensorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AcousticSensorFlexContainerAnnc.java new file mode 100644 index 00000000..bfc3f1c5 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AcousticSensorFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AcousticSensorAnnc + +This ModuleClass provides capabilities for an acoustic sensor. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = AcousticSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AcousticSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AcousticSensorFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "acousticSensorAnnc"; + public static final String SHORT_NAME = "acoSrAnnc"; + + public AcousticSensorFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + AcousticSensorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ActivateClockTimerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ActivateClockTimerFlexContainer.java index 88ae863f..0cee1cc6 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ActivateClockTimerFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ActivateClockTimerFlexContainer.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : activateClockTimer +Action : ActivateClockTimer Activate current clock timer. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = ActivateClockTimerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class ActivateClockTimerFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ActivateClockTimerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ActivateClockTimerFlexContainerAnnc.java index 61ef166f..ef3c9922 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ActivateClockTimerFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ActivateClockTimerFlexContainerAnnc.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : activateClockTimer +Action : ActivateClockTimerAnnc Activate current clock timer. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = ActivateClockTimerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class ActivateClockTimerFlexContainerAnnc extends AbstractFlexContainerAn setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } - -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirConJobModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirConJobModeFlexContainer.java new file mode 100644 index 00000000..7b4ad330 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirConJobModeFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AirConJobMode + +This ModuleClasses provides capabilities to control and monitor the job modes of an air conditioner. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = AirConJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AirConJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AirConJobModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "airConJobMode"; + public static final String SHORT_NAME = "aCJMe"; + + public AirConJobModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + AirConJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentJobModeName = new CustomAttribute(); + currentJobModeName.setLongName("currentJobModeName"); + currentJobModeName.setShortName("cJMNe"); + currentJobModeName.setType("xs:string"); + getCustomAttributes().add(currentJobModeName); + CustomAttribute currentJobMode = new CustomAttribute(); + currentJobMode.setLongName("currentJobMode"); + currentJobMode.setShortName("cuJMe"); + currentJobMode.setType("hd:enumAirConJobMode"); + getCustomAttributes().add(currentJobMode); + CustomAttribute jobModes = new CustomAttribute(); + jobModes.setLongName("jobModes"); + jobModes.setShortName("jobMs"); + jobModes.setType("[hd:enumAirConJobMode]"); + getCustomAttributes().add(jobModes); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirConJobModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirConJobModeFlexContainerAnnc.java new file mode 100644 index 00000000..dbf630f0 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirConJobModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AirConJobModeAnnc + +This ModuleClasses provides capabilities to control and monitor the job modes of an air conditioner. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = AirConJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AirConJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AirConJobModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "airConJobModeAnnc"; + public static final String SHORT_NAME = "aCJMeAnnc"; + + public AirConJobModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + AirConJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirFlowFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirFlowFlexContainer.java new file mode 100644 index 00000000..fc841467 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirFlowFlexContainer.java @@ -0,0 +1,88 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AirFlow + +This ModuleClass provides capabilities for controlling the air flow of a device. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = AirFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AirFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AirFlowFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "airFlow"; + public static final String SHORT_NAME = "airFw"; + + public AirFlowFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + AirFlowFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute horizontalDirection = new CustomAttribute(); + horizontalDirection.setLongName("horizontalDirection"); + horizontalDirection.setShortName("horDn"); + horizontalDirection.setType("hd:enumHorizontalDirection"); + getCustomAttributes().add(horizontalDirection); + CustomAttribute verticalDirection = new CustomAttribute(); + verticalDirection.setLongName("verticalDirection"); + verticalDirection.setShortName("verDn"); + verticalDirection.setType("hd:enumVerticalDirection"); + getCustomAttributes().add(verticalDirection); + CustomAttribute supportedHorizontalDirection = new CustomAttribute(); + supportedHorizontalDirection.setLongName("supportedHorizontalDirection"); + supportedHorizontalDirection.setShortName("suHDn"); + supportedHorizontalDirection.setType("[hd:enumHorizontalDirection]"); + getCustomAttributes().add(supportedHorizontalDirection); + CustomAttribute maxSpeed = new CustomAttribute(); + maxSpeed.setLongName("maxSpeed"); + maxSpeed.setShortName("maxSd"); + maxSpeed.setType("xs:integer"); + getCustomAttributes().add(maxSpeed); + CustomAttribute supportedVerticalDirection = new CustomAttribute(); + supportedVerticalDirection.setLongName("supportedVerticalDirection"); + supportedVerticalDirection.setShortName("suVDn"); + supportedVerticalDirection.setType("[hd:enumVerticalDirection]"); + getCustomAttributes().add(supportedVerticalDirection); + CustomAttribute minSpeed = new CustomAttribute(); + minSpeed.setLongName("minSpeed"); + minSpeed.setShortName("minSd"); + minSpeed.setType("xs:integer"); + getCustomAttributes().add(minSpeed); + CustomAttribute speed = new CustomAttribute(); + speed.setLongName("speed"); + speed.setShortName("speed"); + speed.setType("xs:integer"); + getCustomAttributes().add(speed); + CustomAttribute automode = new CustomAttribute(); + automode.setLongName("automode"); + automode.setShortName("autoe"); + automode.setType("xs:boolean"); + getCustomAttributes().add(automode); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirFlowFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirFlowFlexContainerAnnc.java new file mode 100644 index 00000000..23259f73 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirFlowFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AirFlowAnnc + +This ModuleClass provides capabilities for controlling the air flow of a device. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = AirFlowFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AirFlowFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AirFlowFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "airFlowAnnc"; + public static final String SHORT_NAME = "airFwAnnc"; + + public AirFlowFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + AirFlowFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirPurifierJobModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirPurifierJobModeFlexContainer.java new file mode 100644 index 00000000..f9d1d268 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirPurifierJobModeFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AirPurifierJobMode + +This ModuleClasses provides capabilities to control and monitor the job modes of an airPurifier. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = AirPurifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AirPurifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AirPurifierJobModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "airPurifierJobMode"; + public static final String SHORT_NAME = "aPJMe"; + + public AirPurifierJobModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + AirPurifierJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentJobModeName = new CustomAttribute(); + currentJobModeName.setLongName("currentJobModeName"); + currentJobModeName.setShortName("cJMNe"); + currentJobModeName.setType("xs:string"); + getCustomAttributes().add(currentJobModeName); + CustomAttribute currentJobMode = new CustomAttribute(); + currentJobMode.setLongName("currentJobMode"); + currentJobMode.setShortName("cuJMe"); + currentJobMode.setType("hd:enumAirPurifierJobMode"); + getCustomAttributes().add(currentJobMode); + CustomAttribute jobModes = new CustomAttribute(); + jobModes.setLongName("jobModes"); + jobModes.setShortName("jobMs"); + jobModes.setType("[hd:enumAirPurifierJobMode]"); + getCustomAttributes().add(jobModes); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirPurifierJobModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirPurifierJobModeFlexContainerAnnc.java new file mode 100644 index 00000000..962092b8 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirPurifierJobModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AirPurifierJobModeAnnc + +This ModuleClasses provides capabilities to control and monitor the job modes of an airPurifier. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = AirPurifierJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AirPurifierJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AirPurifierJobModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "airPurifierJobModeAnnc"; + public static final String SHORT_NAME = "aPJMeAnnc"; + + public AirPurifierJobModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + AirPurifierJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirQualitySensorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirQualitySensorFlexContainer.java new file mode 100644 index 00000000..32683741 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirQualitySensorFlexContainer.java @@ -0,0 +1,98 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AirQualitySensor + +ThThis ModuleClass provides capabilities for a monitoring sensor that measures the air quality. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = AirQualitySensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AirQualitySensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AirQualitySensorFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "airQualitySensor"; + public static final String SHORT_NAME = "aiQSr"; + + public AirQualitySensorFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + AirQualitySensorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute sensorOdor = new CustomAttribute(); + sensorOdor.setLongName("sensorOdor"); + sensorOdor.setShortName("senOr"); + sensorOdor.setType("xs:integer"); + getCustomAttributes().add(sensorOdor); + CustomAttribute sensorPM10 = new CustomAttribute(); + sensorPM10.setLongName("sensorPM10"); + sensorPM10.setShortName("sePM0"); + sensorPM10.setType("xs:integer"); + getCustomAttributes().add(sensorPM10); + CustomAttribute sensorHumidity = new CustomAttribute(); + sensorHumidity.setLongName("sensorHumidity"); + sensorHumidity.setShortName("senHy"); + sensorHumidity.setType("xs:integer"); + getCustomAttributes().add(sensorHumidity); + CustomAttribute co2 = new CustomAttribute(); + co2.setLongName("co2"); + co2.setShortName("co2"); + co2.setType("xs:integer"); + getCustomAttributes().add(co2); + CustomAttribute sensorPM1 = new CustomAttribute(); + sensorPM1.setLongName("sensorPM1"); + sensorPM1.setShortName("sePM1"); + sensorPM1.setType("xs:integer"); + getCustomAttributes().add(sensorPM1); + CustomAttribute sensorPM2 = new CustomAttribute(); + sensorPM2.setLongName("sensorPM2"); + sensorPM2.setShortName("sePM2"); + sensorPM2.setType("xs:integer"); + getCustomAttributes().add(sensorPM2); + CustomAttribute voc = new CustomAttribute(); + voc.setLongName("voc"); + voc.setShortName("voc"); + voc.setType("xs:integer"); + getCustomAttributes().add(voc); + CustomAttribute co = new CustomAttribute(); + co.setLongName("co"); + co.setShortName("co"); + co.setType("xs:integer"); + getCustomAttributes().add(co); + CustomAttribute ch2o = new CustomAttribute(); + ch2o.setLongName("ch2o"); + ch2o.setShortName("ch2o"); + ch2o.setType("xs:integer"); + getCustomAttributes().add(ch2o); + CustomAttribute monitoringEnabled = new CustomAttribute(); + monitoringEnabled.setLongName("monitoringEnabled"); + monitoringEnabled.setShortName("monEd"); + monitoringEnabled.setType("xs:boolean"); + getCustomAttributes().add(monitoringEnabled); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirQualitySensorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirQualitySensorFlexContainerAnnc.java new file mode 100644 index 00000000..ff01de19 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AirQualitySensorFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AirQualitySensorAnnc + +ThThis ModuleClass provides capabilities for a monitoring sensor that measures the air quality. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = AirQualitySensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AirQualitySensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AirQualitySensorFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "airQualitySensorAnnc"; + public static final String SHORT_NAME = "aiQSrAnnc"; + + public AirQualitySensorFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + AirQualitySensorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AlarmSpeakerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AlarmSpeakerFlexContainer.java index 572e5186..153cfb70 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AlarmSpeakerFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AlarmSpeakerFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : AlarmSpeaker -This ModuleClass provides the capability to initiate an alarm. +This ModuleClass provides the capabilites to initiate and monitor an alarm. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = AlarmSpeakerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,33 @@ public class AlarmSpeakerFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "alarmSpeaker"; public static final String SHORT_NAME = "alaSr"; - + public AlarmSpeakerFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + AlarmSpeakerFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute alarmStatus = new CustomAttribute(); + alarmStatus.setLongName("alarmStatus"); + alarmStatus.setShortName("alaSs"); + alarmStatus.setType("xs:boolean"); + getCustomAttributes().add(alarmStatus); + CustomAttribute tone = new CustomAttribute(); + tone.setLongName("tone"); + tone.setShortName("tone"); + tone.setType("hd:enumTone"); + getCustomAttributes().add(tone); + CustomAttribute light = new CustomAttribute(); + light.setLongName("light"); + light.setShortName("light"); + light.setType("hd:enumAlertColourCode"); + getCustomAttributes().add(light); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AlarmSpeakerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AlarmSpeakerFlexContainerAnnc.java index a1a10c20..9dd93420 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AlarmSpeakerFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AlarmSpeakerFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : AlarmSpeakerAnnc -This ModuleClass provides the capability to initiate an alarm. +This ModuleClass provides the capabilites to initiate and monitor an alarm. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = AlarmSpeakerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class AlarmSpeakerFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnemometerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnemometerFlexContainer.java new file mode 100644 index 00000000..36b544b0 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnemometerFlexContainer.java @@ -0,0 +1,53 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : Anemometer + +This ModuleClass provides the capabilities to indicate the measure of the wind speed. + +Created: 2018-07-04 10:25:08 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = AnemometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AnemometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AnemometerFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "anemometer"; + public static final String SHORT_NAME = "anemr"; + + public AnemometerFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + AnemometerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute speed = new CustomAttribute(); + speed.setLongName("speed"); + speed.setShortName("speed"); + speed.setType("xs:float"); + getCustomAttributes().add(speed); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnemometerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnemometerFlexContainerAnnc.java new file mode 100644 index 00000000..2007cfd5 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnemometerFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AnemometerAnnc + +This ModuleClass provides the capabilities to indicate the measure of the wind speed. + +Created: 2018-07-04 10:25:08 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = AnemometerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AnemometerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AnemometerFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "anemometerAnnc"; + public static final String SHORT_NAME = "anemrAnnc"; + + public AnemometerFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + AnemometerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnswerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnswerFlexContainer.java new file mode 100644 index 00000000..3d3cab90 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnswerFlexContainer.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : Answer + +Answer (pickup) an incoming call. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = AnswerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AnswerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AnswerFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "answer"; + public static final String SHORT_NAME = "answr"; + + public AnswerFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass.phonecall." + AnswerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnswerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnswerFlexContainerAnnc.java new file mode 100644 index 00000000..e510c991 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AnswerFlexContainerAnnc.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : AnswerAnnc + +Answer (pickup) an incoming call. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = AnswerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AnswerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AnswerFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "answerAnnc"; + public static final String SHORT_NAME = "answrAnnc"; + + public AnswerFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass.phonecall." + AnswerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AudioVolumeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AudioVolumeFlexContainer.java index fcdc38d0..a6330ed5 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AudioVolumeFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AudioVolumeFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ ModuleClass : AudioVolume -This ModuleClass provides capabilities to control and monitor volume. +This ModuleClass provides capabilities to control and monitor volume. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,9 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = AudioVolumeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,53 +32,72 @@ public class AudioVolumeFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "audioVolume"; public static final String SHORT_NAME = "audVe"; - + public AudioVolumeFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + AudioVolumeFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute volumePercentage = new CustomAttribute(); + volumePercentage.setLongName("volumePercentage"); + volumePercentage.setShortName("volPe"); + volumePercentage.setType("xs:integer"); + getCustomAttributes().add(volumePercentage); + CustomAttribute stepValue = new CustomAttribute(); + stepValue.setLongName("stepValue"); + stepValue.setShortName("steVe"); + stepValue.setType("xs:integer"); + getCustomAttributes().add(stepValue); + CustomAttribute maxValue = new CustomAttribute(); + maxValue.setLongName("maxValue"); + maxValue.setShortName("maxVe"); + maxValue.setType("xs:integer"); + getCustomAttributes().add(maxValue); + CustomAttribute muteEnabled = new CustomAttribute(); + muteEnabled.setLongName("muteEnabled"); + muteEnabled.setShortName("mutEd"); + muteEnabled.setType("xs:boolean"); + getCustomAttributes().add(muteEnabled); } - - public void finalizeSerialization() { - getUpVolume(); - getDownVolume(); - } - - public void finalizeDeserialization() { - if (this.upVolume != null) { - setUpVolume(upVolume); - } - if (this.downVolume != null) { - setDownVolume(downVolume); - } - } - + + @XmlElement(name=UpVolumeFlexContainer.SHORT_NAME, required=true, type=UpVolumeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private UpVolumeFlexContainer upVolume; - - public void setUpVolume(UpVolumeFlexContainer upVolume) { - this.upVolume = upVolume; - getFlexContainerOrContainerOrSubscription().add(upVolume); - } - public UpVolumeFlexContainer getUpVolume() { this.upVolume = (UpVolumeFlexContainer) getResourceByName(UpVolumeFlexContainer.SHORT_NAME); return upVolume; } + public void setUpVolume(UpVolumeFlexContainer newAction) { + this.upVolume = newAction; + getFlexContainerOrContainerOrSubscription().add(upVolume); + } + @XmlElement(name=DownVolumeFlexContainer.SHORT_NAME, required=true, type=DownVolumeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private DownVolumeFlexContainer downVolume; + public DownVolumeFlexContainer getDownVolume() { + this.downVolume = (DownVolumeFlexContainer) getResourceByName(DownVolumeFlexContainer.SHORT_NAME); + return downVolume; + } - public void setDownVolume(DownVolumeFlexContainer downVolume) { - this.downVolume = downVolume; + public void setDownVolume(DownVolumeFlexContainer newAction) { + this.downVolume = newAction; getFlexContainerOrContainerOrSubscription().add(downVolume); } + + public void finalizeSerialization() { + getUpVolume(); + getDownVolume(); + } - public DownVolumeFlexContainer getDownVolume() { - this.downVolume = (DownVolumeFlexContainer) getResourceByName(DownVolumeFlexContainer.SHORT_NAME); - return downVolume; + public void finalizeDeserialization() { + if (this.upVolume != null) { + setUpVolume(this.upVolume); + } + if (this.downVolume != null) { + setDownVolume(this.downVolume); + } } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AudioVolumeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AudioVolumeFlexContainerAnnc.java index 499444d7..9c33748e 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AudioVolumeFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AudioVolumeFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ ModuleClass : AudioVolumeAnnc -This ModuleClass provides capabilities to control and monitor volume. +This ModuleClass provides capabilities to control and monitor volume. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = AudioVolumeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,24 +37,23 @@ public class AudioVolumeFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { - getUpVolumeAnnc(); - getDownVolumeAnnc(); + getUpVolumeAnnc(); + getDownVolumeAnnc(); } public void finalizeDeserialization() { - if (this.upVolumeAnnc != null) { - setUpVolumeAnnc(upVolumeAnnc); + if (this.upVolumeAnnc != null){ + setUpVolumeAnnc(upVolumeAnnc); } - if (this.downVolumeAnnc != null) { - setDownVolumeAnnc(downVolumeAnnc); + if (this.downVolumeAnnc != null){ + setDownVolumeAnnc(downVolumeAnnc); } } @XmlElement(name=UpVolumeFlexContainerAnnc.SHORT_NAME, required=true, type=UpVolumeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private UpVolumeFlexContainerAnnc upVolumeAnnc; - + private UpVolumeFlexContainerAnnc upVolumeAnnc; public void setUpVolumeAnnc(UpVolumeFlexContainerAnnc upVolumeAnnc) { this.upVolumeAnnc = upVolumeAnnc; @@ -66,10 +64,8 @@ public class AudioVolumeFlexContainerAnnc extends AbstractFlexContainerAnnc { this.upVolumeAnnc = (UpVolumeFlexContainerAnnc) getResourceByName(UpVolumeFlexContainerAnnc.SHORT_NAME); return upVolumeAnnc; } - @XmlElement(name=DownVolumeFlexContainerAnnc.SHORT_NAME, required=true, type=DownVolumeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private DownVolumeFlexContainerAnnc downVolumeAnnc; - + private DownVolumeFlexContainerAnnc downVolumeAnnc; public void setDownVolumeAnnc(DownVolumeFlexContainerAnnc downVolumeAnnc) { this.downVolumeAnnc = downVolumeAnnc; @@ -81,4 +77,4 @@ public class AudioVolumeFlexContainerAnnc extends AbstractFlexContainerAnnc { return downVolumeAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AutoDocumentFeederFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AutoDocumentFeederFlexContainer.java new file mode 100644 index 00000000..2130e3b7 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AutoDocumentFeederFlexContainer.java @@ -0,0 +1,58 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AutoDocumentFeeder + +This ModuleClasses provides capabilities to monitor the state of autoDocumentFeeder (ADF). ADF is a feature which takes several pages and feeds the paper one page at a time into a scanner or printer, allowing the user to scan, print or fax, multiple-page documents without having to manually replace each page. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = AutoDocumentFeederFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AutoDocumentFeederFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AutoDocumentFeederFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "autoDocumentFeeder"; + public static final String SHORT_NAME = "auDFr"; + + public AutoDocumentFeederFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + AutoDocumentFeederFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute adfStates = new CustomAttribute(); + adfStates.setLongName("adfStates"); + adfStates.setShortName("adfSs"); + adfStates.setType("[hd:enumAdfState]"); + getCustomAttributes().add(adfStates); + CustomAttribute currentAdfState = new CustomAttribute(); + currentAdfState.setLongName("currentAdfState"); + currentAdfState.setShortName("cuASe"); + currentAdfState.setType("hd:enumAdfState"); + getCustomAttributes().add(currentAdfState); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AutoDocumentFeederFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AutoDocumentFeederFlexContainerAnnc.java new file mode 100644 index 00000000..188792a5 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/AutoDocumentFeederFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AutoDocumentFeederAnnc + +This ModuleClasses provides capabilities to monitor the state of autoDocumentFeeder (ADF). ADF is a feature which takes several pages and feeds the paper one page at a time into a scanner or printer, allowing the user to scan, print or fax, multiple-page documents without having to manually replace each page. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = AutoDocumentFeederFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = AutoDocumentFeederFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class AutoDocumentFeederFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "autoDocumentFeederAnnc"; + public static final String SHORT_NAME = "auDFrAnnc"; + + public AutoDocumentFeederFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + AutoDocumentFeederFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BarometerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BarometerFlexContainer.java new file mode 100644 index 00000000..87784bac --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BarometerFlexContainer.java @@ -0,0 +1,68 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : Barometer + +This ModuleClass provides the capabilities to measure the atomospheric pressure and indicate the detection of abnormal pressures and raises an alarm if the triggering criterion is met. + +Created: 2018-07-04 10:25:08 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = BarometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = BarometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class BarometerFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "barometer"; + public static final String SHORT_NAME = "baror"; + + public BarometerFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + BarometerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute minPressureThreshhold = new CustomAttribute(); + minPressureThreshhold.setLongName("minPressureThreshhold"); + minPressureThreshhold.setShortName("miPTd"); + minPressureThreshhold.setType("xs:integer"); + getCustomAttributes().add(minPressureThreshhold); + CustomAttribute unit = new CustomAttribute(); + unit.setLongName("unit"); + unit.setShortName("unit"); + unit.setType("xs:string"); + getCustomAttributes().add(unit); + CustomAttribute maxPressureThreshhold = new CustomAttribute(); + maxPressureThreshhold.setLongName("maxPressureThreshhold"); + maxPressureThreshhold.setShortName("maPTd"); + maxPressureThreshhold.setType("xs:integer"); + getCustomAttributes().add(maxPressureThreshhold); + CustomAttribute atmosphericPressure = new CustomAttribute(); + atmosphericPressure.setLongName("atmosphericPressure"); + atmosphericPressure.setShortName("atmPe"); + atmosphericPressure.setType("xs:float"); + getCustomAttributes().add(atmosphericPressure); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BarometerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BarometerFlexContainerAnnc.java new file mode 100644 index 00000000..ffd4092f --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BarometerFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : BarometerAnnc + +This ModuleClass provides the capabilities to measure the atomospheric pressure and indicate the detection of abnormal pressures and raises an alarm if the triggering criterion is met. + +Created: 2018-07-04 10:25:08 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = BarometerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = BarometerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class BarometerFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "barometerAnnc"; + public static final String SHORT_NAME = "barorAnnc"; + + public BarometerFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + BarometerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BatteryFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BatteryFlexContainer.java index 9ae6d870..d6740852 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BatteryFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BatteryFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Battery -Battery indicates the detection of low battery and gives an alarm if triggering criterion is met. The charge value in the module shows the current battery charge level. +This ModuleClass provides capabilities to indicate the detection of low battery and gives an alarm if triggering criterion is met. The level data point in the module represents the current battery charge level. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = BatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -31,18 +30,64 @@ import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; public class BatteryFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "battery"; - public static final String SHORT_NAME = "batty"; - + public static final String SHORT_NAME = "bat"; + public BatteryFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + BatteryFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute discharging = new CustomAttribute(); + discharging.setLongName("discharging"); + discharging.setShortName("discg"); + discharging.setType("xs:boolean"); + getCustomAttributes().add(discharging); + CustomAttribute lowBattery = new CustomAttribute(); + lowBattery.setLongName("lowBattery"); + lowBattery.setShortName("lowBy"); + lowBattery.setType("xs:boolean"); + getCustomAttributes().add(lowBattery); + CustomAttribute material = new CustomAttribute(); + material.setLongName("material"); + material.setShortName("matel"); + material.setType("xs:string"); + getCustomAttributes().add(material); + CustomAttribute level = new CustomAttribute(); + level.setLongName("level"); + level.setShortName("lvl"); + level.setType("xs:integer"); + getCustomAttributes().add(level); + CustomAttribute charging = new CustomAttribute(); + charging.setLongName("charging"); + charging.setShortName("charg"); + charging.setType("xs:boolean"); + getCustomAttributes().add(charging); + CustomAttribute electricEnergy = new CustomAttribute(); + electricEnergy.setLongName("electricEnergy"); + electricEnergy.setShortName("eleEy"); + electricEnergy.setType("xs:integer"); + getCustomAttributes().add(electricEnergy); + CustomAttribute batteryThreshold = new CustomAttribute(); + batteryThreshold.setLongName("batteryThreshold"); + batteryThreshold.setShortName("batTd"); + batteryThreshold.setType("xs:integer"); + getCustomAttributes().add(batteryThreshold); + CustomAttribute capacity = new CustomAttribute(); + capacity.setLongName("capacity"); + capacity.setShortName("capay"); + capacity.setType("xs:integer"); + getCustomAttributes().add(capacity); + CustomAttribute voltage = new CustomAttribute(); + voltage.setLongName("voltage"); + voltage.setShortName("volte"); + voltage.setType("xs:integer"); + getCustomAttributes().add(voltage); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BatteryFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BatteryFlexContainerAnnc.java index 282e5944..8310a6fb 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BatteryFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BatteryFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : BatteryAnnc -Battery indicates the detection of low battery and gives an alarm if triggering criterion is met. The charge value in the module shows the current battery charge level. +This ModuleClass provides capabilities to indicate the detection of low battery and gives an alarm if triggering criterion is met. The level data point in the module represents the current battery charge level. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = BatteryFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -31,18 +29,19 @@ import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; public class BatteryFlexContainerAnnc extends AbstractFlexContainerAnnc { public static final String LONG_NAME = "batteryAnnc"; - public static final String SHORT_NAME = "battyAnnc"; + public static final String SHORT_NAME = "batAnnc"; public BatteryFlexContainerAnnc () { setContainerDefinition("org.onem2m.home.moduleclass." + BatteryFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinaryObjectFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinaryObjectFlexContainer.java new file mode 100644 index 00000000..de3ce8aa --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinaryObjectFlexContainer.java @@ -0,0 +1,68 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : BinaryObject + +This ModuleClass describes the handling of a binary object (blob). + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = BinaryObjectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = BinaryObjectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class BinaryObjectFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "binaryObject"; + public static final String SHORT_NAME = "binOt"; + + public BinaryObjectFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + BinaryObjectFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute size = new CustomAttribute(); + size.setLongName("size"); + size.setShortName("size"); + size.setType("xs:integer"); + getCustomAttributes().add(size); + CustomAttribute hash = new CustomAttribute(); + hash.setLongName("hash"); + hash.setShortName("hash"); + hash.setType("xs:string"); + getCustomAttributes().add(hash); + CustomAttribute object = new CustomAttribute(); + object.setLongName("object"); + object.setShortName("objet"); + object.setType("xs:string"); + getCustomAttributes().add(object); + CustomAttribute objectType = new CustomAttribute(); + objectType.setLongName("objectType"); + objectType.setShortName("objTe"); + objectType.setType("xs:string"); + getCustomAttributes().add(objectType); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinaryObjectFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinaryObjectFlexContainerAnnc.java new file mode 100644 index 00000000..cce95bbb --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinaryObjectFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : BinaryObjectAnnc + +This ModuleClass describes the handling of a binary object (blob). + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = BinaryObjectFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = BinaryObjectFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class BinaryObjectFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "binaryObjectAnnc"; + public static final String SHORT_NAME = "binOtAnnc"; + + public BinaryObjectFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + BinaryObjectFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinarySwitchFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinarySwitchFlexContainer.java index a18b8a97..00b0c77c 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinarySwitchFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinarySwitchFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ ModuleClass : BinarySwitch -This ModuleClass provides capabilities to control and monitor the state of power. +This ModuleClass provides capabilities to control and monitor the state of power. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,9 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = BinarySwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,35 +32,40 @@ public class BinarySwitchFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "binarySwitch"; public static final String SHORT_NAME = "binSh"; - + public BinarySwitchFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + BinarySwitchFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute powerState = new CustomAttribute(); + powerState.setLongName("powerState"); + powerState.setShortName("powSe"); + powerState.setType("xs:boolean"); + getCustomAttributes().add(powerState); } + + + @XmlElement(name=ToggleFlexContainer.SHORT_NAME, required=true, type=ToggleFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ToggleFlexContainer toggle; + public ToggleFlexContainer getToggle() { + this.toggle = (ToggleFlexContainer) getResourceByName(ToggleFlexContainer.SHORT_NAME); + return toggle; + } + + public void setToggle(ToggleFlexContainer newAction) { + this.toggle = newAction; + getFlexContainerOrContainerOrSubscription().add(toggle); + } + public void finalizeSerialization() { getToggle(); } public void finalizeDeserialization() { if (this.toggle != null) { - setToggle(toggle); + setToggle(this.toggle); } } - @XmlElement(name=ToggleFlexContainer.SHORT_NAME, required=true, type=ToggleFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private ToggleFlexContainer toggle; - - - public void setToggle(ToggleFlexContainer toggle) { - this.toggle = toggle; - getFlexContainerOrContainerOrSubscription().add(toggle); - } - - public ToggleFlexContainer getToggle() { - this.toggle = (ToggleFlexContainer) getResourceByName(ToggleFlexContainer.SHORT_NAME); - return toggle; - } - -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinarySwitchFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinarySwitchFlexContainerAnnc.java index 4ec85806..8ab4fb01 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinarySwitchFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BinarySwitchFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ ModuleClass : BinarySwitchAnnc -This ModuleClass provides capabilities to control and monitor the state of power. +This ModuleClass provides capabilities to control and monitor the state of power. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = BinarySwitchFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,20 +37,19 @@ public class BinarySwitchFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { - getToggleAnnc(); + getToggleAnnc(); } public void finalizeDeserialization() { - if (this.toggleAnnc != null) { - setToggleAnnc(toggleAnnc); + if (this.toggleAnnc != null){ + setToggleAnnc(toggleAnnc); } } @XmlElement(name=ToggleFlexContainerAnnc.SHORT_NAME, required=true, type=ToggleFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private ToggleFlexContainerAnnc toggleAnnc; - + private ToggleFlexContainerAnnc toggleAnnc; public void setToggleAnnc(ToggleFlexContainerAnnc toggleAnnc) { this.toggleAnnc = toggleAnnc; @@ -63,4 +61,4 @@ public class BinarySwitchFlexContainerAnnc extends AbstractFlexContainerAnnc { return toggleAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BioElectricalImpedanceAnalysisFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BioElectricalImpedanceAnalysisFlexContainer.java index 11a92c72..e304209f 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BioElectricalImpedanceAnalysisFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BioElectricalImpedanceAnalysisFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : BioElectricalImpedanceAnalysis -ModuleClass provides the analysis of human body tissue based on impedance measurement. +This ModuleClass provides the analysis of human body tissue based on impedance measurement. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,53 @@ public class BioElectricalImpedanceAnalysisFlexContainer extends AbstractFlexCon public static final String LONG_NAME = "bioElectricalImpedanceAnalysis"; public static final String SHORT_NAME = "bEIAs"; - + public BioElectricalImpedanceAnalysisFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + BioElectricalImpedanceAnalysisFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute visceraFat = new CustomAttribute(); + visceraFat.setLongName("visceraFat"); + visceraFat.setShortName("visFt"); + visceraFat.setType("xs:float"); + getCustomAttributes().add(visceraFat); + CustomAttribute kcal = new CustomAttribute(); + kcal.setLongName("kcal"); + kcal.setShortName("kcal"); + kcal.setType("xs:float"); + getCustomAttributes().add(kcal); + CustomAttribute muscle = new CustomAttribute(); + muscle.setLongName("muscle"); + muscle.setShortName("musce"); + muscle.setType("xs:float"); + getCustomAttributes().add(muscle); + CustomAttribute fat = new CustomAttribute(); + fat.setLongName("fat"); + fat.setShortName("fat"); + fat.setType("xs:float"); + getCustomAttributes().add(fat); + CustomAttribute bone = new CustomAttribute(); + bone.setLongName("bone"); + bone.setShortName("bone"); + bone.setType("xs:float"); + getCustomAttributes().add(bone); + CustomAttribute water = new CustomAttribute(); + water.setLongName("water"); + water.setShortName("water"); + water.setType("xs:float"); + getCustomAttributes().add(water); + CustomAttribute resistance = new CustomAttribute(); + resistance.setLongName("resistance"); + resistance.setShortName("resie"); + resistance.setType("xs:boolean"); + getCustomAttributes().add(resistance); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BioElectricalImpedanceAnalysisFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BioElectricalImpedanceAnalysisFlexContainerAnnc.java index 7cb0c69d..d5314c29 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BioElectricalImpedanceAnalysisFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BioElectricalImpedanceAnalysisFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : BioElectricalImpedanceAnalysisAnnc -ModuleClass provides the analysis of human body tissue based on impedance measurement. +This ModuleClass provides the analysis of human body tissue based on impedance measurement. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = BioElectricalImpedanceAnalysisFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class BioElectricalImpedanceAnalysisFlexContainerAnnc extends AbstractFle setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BodyCompositionAnalyserFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BodyCompositionAnalyserFlexContainer.java new file mode 100644 index 00000000..759a7e0a --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BodyCompositionAnalyserFlexContainer.java @@ -0,0 +1,83 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : BodyCompositionAnalyser + +This ModuleClass provides the capability to report the measurement of a body composition analyser. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = BodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = BodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class BodyCompositionAnalyserFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "bodyCompositionAnalyser"; + public static final String SHORT_NAME = "boCAr"; + + public BodyCompositionAnalyserFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + BodyCompositionAnalyserFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute fatFreeMass = new CustomAttribute(); + fatFreeMass.setLongName("fatFreeMass"); + fatFreeMass.setShortName("faFMs"); + fatFreeMass.setType("xs:float"); + getCustomAttributes().add(fatFreeMass); + CustomAttribute softLeanMass = new CustomAttribute(); + softLeanMass.setLongName("softLeanMass"); + softLeanMass.setShortName("soLMs"); + softLeanMass.setType("xs:float"); + getCustomAttributes().add(softLeanMass); + CustomAttribute impedance = new CustomAttribute(); + impedance.setLongName("impedance"); + impedance.setShortName("impee"); + impedance.setType("xs:float"); + getCustomAttributes().add(impedance); + CustomAttribute bodyLength = new CustomAttribute(); + bodyLength.setLongName("bodyLength"); + bodyLength.setShortName("bodLh"); + bodyLength.setType("xs:float"); + getCustomAttributes().add(bodyLength); + CustomAttribute basalMetabolism = new CustomAttribute(); + basalMetabolism.setLongName("basalMetabolism"); + basalMetabolism.setShortName("basMm"); + basalMetabolism.setType("xs:float"); + getCustomAttributes().add(basalMetabolism); + CustomAttribute muscleMass = new CustomAttribute(); + muscleMass.setLongName("muscleMass"); + muscleMass.setShortName("musMs"); + muscleMass.setType("xs:float"); + getCustomAttributes().add(muscleMass); + CustomAttribute bmi = new CustomAttribute(); + bmi.setLongName("bmi"); + bmi.setShortName("bmi"); + bmi.setType("xs:float"); + getCustomAttributes().add(bmi); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BodyCompositionAnalyserFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BodyCompositionAnalyserFlexContainerAnnc.java new file mode 100644 index 00000000..45898532 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BodyCompositionAnalyserFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : BodyCompositionAnalyserAnnc + +This ModuleClass provides the capability to report the measurement of a body composition analyser. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = BodyCompositionAnalyserFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = BodyCompositionAnalyserFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class BodyCompositionAnalyserFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "bodyCompositionAnalyserAnnc"; + public static final String SHORT_NAME = "boCArAnnc"; + + public BodyCompositionAnalyserFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + BodyCompositionAnalyserFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BoilerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BoilerFlexContainer.java index 6b6bea62..de3e2ea5 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BoilerFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BoilerFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Boiler -This ModuleClass provides the status of boiling function for water heaters. +This ModuleClass provides the capabilities to control the status of the boiling functionality for water heaters. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = BoilerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class BoilerFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "boiler"; public static final String SHORT_NAME = "boilr"; - + public BoilerFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + BoilerFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute status = new CustomAttribute(); + status.setLongName("status"); + status.setShortName("sus"); + status.setType("xs:boolean"); + getCustomAttributes().add(status); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BoilerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BoilerFlexContainerAnnc.java index f18b4b8d..221f9755 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BoilerFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BoilerFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : BoilerAnnc -This ModuleClass provides the status of boiling function for water heaters. +This ModuleClass provides the capabilities to control the status of the boiling functionality for water heaters. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = BoilerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class BoilerFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrewingFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrewingFlexContainer.java index 0d70afe4..afb2200b 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrewingFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrewingFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Brewing -This ModuleClass manages brewing feature. +This ModuleClass provides capabilities to control and monitor a brewing process. It is intended to be part of devices that prepare hot drinks such as a coffee or a tea. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = BrewingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,28 @@ public class BrewingFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "brewing"; public static final String SHORT_NAME = "brewg"; - + public BrewingFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + BrewingFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute strength = new CustomAttribute(); + strength.setLongName("strength"); + strength.setShortName("streh"); + strength.setType("hd:enumTasteStrength"); + getCustomAttributes().add(strength); + CustomAttribute cupsNumber = new CustomAttribute(); + cupsNumber.setLongName("cupsNumber"); + cupsNumber.setShortName("cupNr"); + cupsNumber.setType("xs:integer"); + getCustomAttributes().add(cupsNumber); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrewingFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrewingFlexContainerAnnc.java index 055cd121..23e0897a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrewingFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrewingFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : BrewingAnnc -This ModuleClass manages brewing feature. +This ModuleClass provides capabilities to control and monitor a brewing process. It is intended to be part of devices that prepare hot drinks such as a coffee or a tea. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = BrewingFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class BrewingFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrightnessFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrightnessFlexContainer.java index a35ed2e0..470bd404 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrightnessFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrightnessFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Brightness -This ModuleClass describes the brightness of a light, e.g. from a lamp. Brightness is scaled as a percentage. A lamp or a monitor can be adjusted to a level of light between very dim (0% is the minimum brightness) and very bright (100% is the maximum brightness). +This ModuleClass provides capabilities to control and monitor the brightness of a light for example from a lamp. Brightness is scaled as a percentage. A lamp or a monitor can be adjusted to a level of light between very dim (0% is the minimum brightness) and very bright (100% is the maximum brightness). -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = BrightnessFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class BrightnessFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "brightness"; public static final String SHORT_NAME = "brigs"; - + public BrightnessFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + BrightnessFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute brightness = new CustomAttribute(); + brightness.setLongName("brightness"); + brightness.setShortName("brigs"); + brightness.setType("xs:integer"); + getCustomAttributes().add(brightness); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrightnessFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrightnessFlexContainerAnnc.java index 9728500f..24163471 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrightnessFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/BrightnessFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : BrightnessAnnc -This ModuleClass describes the brightness of a light, e.g. from a lamp. Brightness is scaled as a percentage. A lamp or a monitor can be adjusted to a level of light between very dim (0% is the minimum brightness) and very bright (100% is the maximum brightness). +This ModuleClass provides capabilities to control and monitor the brightness of a light for example from a lamp. Brightness is scaled as a percentage. A lamp or a monitor can be adjusted to a level of light between very dim (0% is the minimum brightness) and very bright (100% is the maximum brightness). -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = BrightnessFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class BrightnessFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CallFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CallFlexContainer.java new file mode 100644 index 00000000..6c695ff0 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CallFlexContainer.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : Call + +Initiate an outgoing call. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = CallFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = CallFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class CallFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "call"; + public static final String SHORT_NAME = "call"; + + public CallFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass.phonecall." + CallFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CallFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CallFlexContainerAnnc.java new file mode 100644 index 00000000..264be042 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CallFlexContainerAnnc.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : CallAnnc + +Initiate an outgoing call. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = CallFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = CallFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class CallFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "callAnnc"; + public static final String SHORT_NAME = "callAnnc"; + + public CallFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass.phonecall." + CallFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClockFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClockFlexContainer.java index 6f1f238b..4809d59c 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClockFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClockFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Clock -This ModuleClass provides the information about current date and time. +This ModuleClass provides capabilities to control and monitor time and date information. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = ClockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,33 @@ public class ClockFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "clock"; public static final String SHORT_NAME = "clock"; - + public ClockFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + ClockFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute currentTime = new CustomAttribute(); + currentTime.setLongName("currentTime"); + currentTime.setShortName("curTe"); + currentTime.setType("xs:time"); + getCustomAttributes().add(currentTime); + CustomAttribute currentTimeZone = new CustomAttribute(); + currentTimeZone.setLongName("currentTimeZone"); + currentTimeZone.setShortName("cuTZe"); + currentTimeZone.setType("xs:string"); + getCustomAttributes().add(currentTimeZone); + CustomAttribute currentDate = new CustomAttribute(); + currentDate.setLongName("currentDate"); + currentDate.setShortName("curDe"); + currentDate.setType("xs:date"); + getCustomAttributes().add(currentDate); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClockFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClockFlexContainerAnnc.java index b78838cb..39477fe6 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClockFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClockFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : ClockAnnc -This ModuleClass provides the information about current date and time. +This ModuleClass provides capabilities to control and monitor time and date information. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = ClockFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class ClockFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CloseFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CloseFlexContainer.java new file mode 100644 index 00000000..d4964837 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CloseFlexContainer.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : Close + +Decrease the open level by the amount of the "stepValue" down to the "minLevel". + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = CloseFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = CloseFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class CloseFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "close"; + public static final String SHORT_NAME = "close"; + + public CloseFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass.openlevel." + CloseFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CloseFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CloseFlexContainerAnnc.java new file mode 100644 index 00000000..b84d4e57 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CloseFlexContainerAnnc.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : CloseAnnc + +Decrease the open level by the amount of the "stepValue" down to the "minLevel". + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = CloseFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = CloseFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class CloseFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "closeAnnc"; + public static final String SHORT_NAME = "closeAnnc"; + + public CloseFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass.openlevel." + CloseFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesDryerJobModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesDryerJobModeFlexContainer.java new file mode 100644 index 00000000..f6ea3346 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesDryerJobModeFlexContainer.java @@ -0,0 +1,58 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ClothesDryerJobMode + +This ModuleClasses provides capabilities to control and monitor the job modes of a clothes dryer. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = ClothesDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ClothesDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ClothesDryerJobModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "clothesDryerJobMode"; + public static final String SHORT_NAME = "cDJMe"; + + public ClothesDryerJobModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + ClothesDryerJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentJobModeName = new CustomAttribute(); + currentJobModeName.setLongName("currentJobModeName"); + currentJobModeName.setShortName("cJMNe"); + currentJobModeName.setType("xs:string"); + getCustomAttributes().add(currentJobModeName); + CustomAttribute currentJobMode = new CustomAttribute(); + currentJobMode.setLongName("currentJobMode"); + currentJobMode.setShortName("cuJMe"); + currentJobMode.setType("hd:enumClothesDryerJobMode"); + getCustomAttributes().add(currentJobMode); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesDryerJobModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesDryerJobModeFlexContainerAnnc.java new file mode 100644 index 00000000..b30a9a1a --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesDryerJobModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ClothesDryerJobModeAnnc + +This ModuleClasses provides capabilities to control and monitor the job modes of a clothes dryer. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = ClothesDryerJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ClothesDryerJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ClothesDryerJobModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "clothesDryerJobModeAnnc"; + public static final String SHORT_NAME = "cDJMeAnnc"; + + public ClothesDryerJobModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + ClothesDryerJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherDryerJobModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherDryerJobModeFlexContainer.java new file mode 100644 index 00000000..713c9e5c --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherDryerJobModeFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ClothesWasherDryerJobMode + +This ModuleClasses provides capabilities to control and monitor the job modes of clothesWasherDryer. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = ClothesWasherDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ClothesWasherDryerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ClothesWasherDryerJobModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "clothesWasherDryerJobMode"; + public static final String SHORT_NAME = "cWDJM"; + + public ClothesWasherDryerJobModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + ClothesWasherDryerJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentJobModeName = new CustomAttribute(); + currentJobModeName.setLongName("currentJobModeName"); + currentJobModeName.setShortName("cJMNe"); + currentJobModeName.setType("xs:string"); + getCustomAttributes().add(currentJobModeName); + CustomAttribute currentJobMode = new CustomAttribute(); + currentJobMode.setLongName("currentJobMode"); + currentJobMode.setShortName("cuJMe"); + currentJobMode.setType("hd:enumClothesWasherDryerJobMode"); + getCustomAttributes().add(currentJobMode); + CustomAttribute jobModes = new CustomAttribute(); + jobModes.setLongName("jobModes"); + jobModes.setShortName("jobMs"); + jobModes.setType("[hd:enumClothesWasherDryerJobMode]"); + getCustomAttributes().add(jobModes); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherDryerJobModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherDryerJobModeFlexContainerAnnc.java new file mode 100644 index 00000000..9101d1aa --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherDryerJobModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ClothesWasherDryerJobModeAnnc + +This ModuleClasses provides capabilities to control and monitor the job modes of clothesWasherDryer. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = ClothesWasherDryerJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ClothesWasherDryerJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ClothesWasherDryerJobModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "clothesWasherDryerJobModeAnnc"; + public static final String SHORT_NAME = "cWDJMAnnc"; + + public ClothesWasherDryerJobModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + ClothesWasherDryerJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeFlexContainer.java new file mode 100644 index 00000000..c0a1c20b --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ClothesWasherJobMode + +This ModuleClasses provides capabilities to control and monitor the job mode of a washer. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = ClothesWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ClothesWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ClothesWasherJobModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "clothesWasherJobMode"; + public static final String SHORT_NAME = "cWJMe"; + + public ClothesWasherJobModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + ClothesWasherJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentJobModeName = new CustomAttribute(); + currentJobModeName.setLongName("currentJobModeName"); + currentJobModeName.setShortName("cJMNe"); + currentJobModeName.setType("xs:string"); + getCustomAttributes().add(currentJobModeName); + CustomAttribute currentJobMode = new CustomAttribute(); + currentJobMode.setLongName("currentJobMode"); + currentJobMode.setShortName("cuJMe"); + currentJobMode.setType("hd:enumClothesWasherJobMode"); + getCustomAttributes().add(currentJobMode); + CustomAttribute jobModes = new CustomAttribute(); + jobModes.setLongName("jobModes"); + jobModes.setShortName("jobMs"); + jobModes.setType("[hd:enumClothesWasherJobMode]"); + getCustomAttributes().add(jobModes); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeFlexContainerAnnc.java new file mode 100644 index 00000000..0664acc9 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ClothesWasherJobModeAnnc + +This ModuleClasses provides capabilities to control and monitor the job mode of a washer. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = ClothesWasherJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ClothesWasherJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ClothesWasherJobModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "clothesWasherJobModeAnnc"; + public static final String SHORT_NAME = "cWJMeAnnc"; + + public ClothesWasherJobModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + ClothesWasherJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeOptionFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeOptionFlexContainer.java new file mode 100644 index 00000000..218dc2ea --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeOptionFlexContainer.java @@ -0,0 +1,88 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ClothesWasherJobModeOption + +This ModuleClasses provides capabilities to control and monitor the washing job mode options of a washer. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ClothesWasherJobModeOptionFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "clothesWasherJobModeOption"; + public static final String SHORT_NAME = "cWJMO"; + + public ClothesWasherJobModeOptionFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + ClothesWasherJobModeOptionFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute steamTreat = new CustomAttribute(); + steamTreat.setLongName("steamTreat"); + steamTreat.setShortName("steTt"); + steamTreat.setType("xs:boolean"); + getCustomAttributes().add(steamTreat); + CustomAttribute washTemp = new CustomAttribute(); + washTemp.setLongName("washTemp"); + washTemp.setShortName("wasTp"); + washTemp.setType("hd:enumGeneralTemperature"); + getCustomAttributes().add(washTemp); + CustomAttribute preWash = new CustomAttribute(); + preWash.setLongName("preWash"); + preWash.setShortName("preWh"); + preWash.setType("xs:boolean"); + getCustomAttributes().add(preWash); + CustomAttribute speedWash = new CustomAttribute(); + speedWash.setLongName("speedWash"); + speedWash.setShortName("speWh"); + speedWash.setType("xs:boolean"); + getCustomAttributes().add(speedWash); + CustomAttribute soilLevel = new CustomAttribute(); + soilLevel.setLongName("soilLevel"); + soilLevel.setShortName("soiLl"); + soilLevel.setType("hd:enumGeneralLevel"); + getCustomAttributes().add(soilLevel); + CustomAttribute coldWash = new CustomAttribute(); + coldWash.setLongName("coldWash"); + coldWash.setShortName("colWh"); + coldWash.setType("xs:boolean"); + getCustomAttributes().add(coldWash); + CustomAttribute extraRinse = new CustomAttribute(); + extraRinse.setLongName("extraRinse"); + extraRinse.setShortName("extRe"); + extraRinse.setType("xs:boolean"); + getCustomAttributes().add(extraRinse); + CustomAttribute spinSpeed = new CustomAttribute(); + spinSpeed.setLongName("spinSpeed"); + spinSpeed.setShortName("spiSd"); + spinSpeed.setType("hd:enumGeneralSpeed"); + getCustomAttributes().add(spinSpeed); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeOptionFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeOptionFlexContainerAnnc.java new file mode 100644 index 00000000..c72cb13b --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ClothesWasherJobModeOptionFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ClothesWasherJobModeOptionAnnc + +This ModuleClasses provides capabilities to control and monitor the washing job mode options of a washer. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = ClothesWasherJobModeOptionFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ClothesWasherJobModeOptionFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ClothesWasherJobModeOptionFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "clothesWasherJobModeOptionAnnc"; + public static final String SHORT_NAME = "cWJMOAnnc"; + + public ClothesWasherJobModeOptionFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + ClothesWasherJobModeOptionFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourFlexContainer.java index 78477519..7d299419 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Colour -This ModuleClass provides the capabilities to set the value of Red, Green, Blue for the color device. +This ModuleClass provides the capabilities to set the value of the Red, Green, and Blue colour channels for a colour device. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = ColourFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,33 @@ public class ColourFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "colour"; public static final String SHORT_NAME = "color"; - + public ColourFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + ColourFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute red = new CustomAttribute(); + red.setLongName("red"); + red.setShortName("red"); + red.setType("xs:integer"); + getCustomAttributes().add(red); + CustomAttribute green = new CustomAttribute(); + green.setLongName("green"); + green.setShortName("green"); + green.setType("xs:integer"); + getCustomAttributes().add(green); + CustomAttribute blue = new CustomAttribute(); + blue.setLongName("blue"); + blue.setShortName("blue"); + blue.setType("xs:integer"); + getCustomAttributes().add(blue); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourFlexContainerAnnc.java index ccd35cbf..c68a1e99 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : ColourAnnc -This ModuleClass provides the capabilities to set the value of Red, Green, Blue for the color device. +This ModuleClass provides the capabilities to set the value of the Red, Green, and Blue colour channels for a colour device. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = ColourFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class ColourFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourSaturationFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourSaturationFlexContainer.java index 6ad73cbc..2666f156 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourSaturationFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourSaturationFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : ColourSaturation -This ModuleClass describes a colour saturation value. The value is an integer. A colourSaturation has a range of [0,100]. A colourSaturation value of 0 means producing black and white images. A colourSaturation value of 50 means producing device specific normal colour images. A colourSaturation value of 100 means producing device very colourfull images. +This ModuleClass provides cababilities to control and monitor a colour saturation value. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = ColourSaturationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class ColourSaturationFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "colourSaturation"; public static final String SHORT_NAME = "colSn"; - + public ColourSaturationFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + ColourSaturationFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute colourSaturation = new CustomAttribute(); + colourSaturation.setLongName("colourSaturation"); + colourSaturation.setShortName("colSn"); + colourSaturation.setType("xs:integer"); + getCustomAttributes().add(colourSaturation); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourSaturationFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourSaturationFlexContainerAnnc.java index 767e7204..9c6a23fa 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourSaturationFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ColourSaturationFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : ColourSaturationAnnc -This ModuleClass describes a colour saturation value. The value is an integer. A colourSaturation has a range of [0,100]. A colourSaturation value of 0 means producing black and white images. A colourSaturation value of 50 means producing device specific normal colour images. A colourSaturation value of 100 means producing device very colourfull images. +This ModuleClass provides cababilities to control and monitor a colour saturation value. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = ColourSaturationFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class ColourSaturationFlexContainerAnnc extends AbstractFlexContainerAnnc setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ContactSensorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ContactSensorFlexContainer.java index 5f25fbf5..7d1063c3 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ContactSensorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ContactSensorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : ContactSensor -This ModuleClass manages alarmSensor feature. +This ModuleClass provides the capabilities to indicate whether or not a contact has been sensed, and raising an alarm if the triggering criterion is met. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = ContactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class ContactSensorFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "contactSensor"; public static final String SHORT_NAME = "conSr"; - + public ContactSensorFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + ContactSensorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute alarm = new CustomAttribute(); + alarm.setLongName("alarm"); + alarm.setShortName("alarm"); + alarm.setType("xs:boolean"); + getCustomAttributes().add(alarm); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ContactSensorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ContactSensorFlexContainerAnnc.java index 80ce2414..57bf8a52 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ContactSensorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ContactSensorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : ContactSensorAnnc -This ModuleClass manages alarmSensor feature. +This ModuleClass provides the capabilities to indicate whether or not a contact has been sensed, and raising an alarm if the triggering criterion is met. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = ContactSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class ContactSensorFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CookerHoodJobModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CookerHoodJobModeFlexContainer.java new file mode 100644 index 00000000..8ceea6f0 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CookerHoodJobModeFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : CookerHoodJobMode + +This ModuleClasses provides capabilities to control and monitor the job modes of a cookerHood. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = CookerHoodJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = CookerHoodJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class CookerHoodJobModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "cookerHoodJobMode"; + public static final String SHORT_NAME = "cHJMe"; + + public CookerHoodJobModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + CookerHoodJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentJobModeName = new CustomAttribute(); + currentJobModeName.setLongName("currentJobModeName"); + currentJobModeName.setShortName("cJMNe"); + currentJobModeName.setType("xs:string"); + getCustomAttributes().add(currentJobModeName); + CustomAttribute currentJobMode = new CustomAttribute(); + currentJobMode.setLongName("currentJobMode"); + currentJobMode.setShortName("cuJMe"); + currentJobMode.setType("hd:enumCookerHoodJobMode"); + getCustomAttributes().add(currentJobMode); + CustomAttribute jobModes = new CustomAttribute(); + jobModes.setLongName("jobModes"); + jobModes.setShortName("jobMs"); + jobModes.setType("[hd:enumCookerHoodJobMode]"); + getCustomAttributes().add(jobModes); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CookerHoodJobModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CookerHoodJobModeFlexContainerAnnc.java new file mode 100644 index 00000000..d0667763 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CookerHoodJobModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : CookerHoodJobModeAnnc + +This ModuleClasses provides capabilities to control and monitor the job modes of a cookerHood. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = CookerHoodJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = CookerHoodJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class CookerHoodJobModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "cookerHoodJobModeAnnc"; + public static final String SHORT_NAME = "cHJMeAnnc"; + + public CookerHoodJobModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + CookerHoodJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CredentialsFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CredentialsFlexContainer.java new file mode 100644 index 00000000..910bb71f --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CredentialsFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : Credentials + +This ModuleClass provides the capability to manage user credentials which allows a user to authenticate on an appliance or a server that is associated with the appliance. The authentication depends on a user login and password, or on a token. An example appliance which may include this ModuleClass is a camera. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = CredentialsFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = CredentialsFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class CredentialsFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "credentials"; + public static final String SHORT_NAME = "creds"; + + public CredentialsFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + CredentialsFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute password = new CustomAttribute(); + password.setLongName("password"); + password.setShortName("pwd"); + password.setType("xs:string"); + getCustomAttributes().add(password); + CustomAttribute loginName = new CustomAttribute(); + loginName.setLongName("loginName"); + loginName.setShortName("logNe"); + loginName.setType("xs:string"); + getCustomAttributes().add(loginName); + CustomAttribute token = new CustomAttribute(); + token.setLongName("token"); + token.setShortName("tk"); + token.setType("xs:string"); + getCustomAttributes().add(token); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CredentialsFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CredentialsFlexContainerAnnc.java new file mode 100644 index 00000000..742f6508 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/CredentialsFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : CredentialsAnnc + +This ModuleClass provides the capability to manage user credentials which allows a user to authenticate on an appliance or a server that is associated with the appliance. The authentication depends on a user login and password, or on a token. An example appliance which may include this ModuleClass is a camera. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = CredentialsFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = CredentialsFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class CredentialsFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "credentialsAnnc"; + public static final String SHORT_NAME = "credsAnnc"; + + public CredentialsFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + CredentialsFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeactivateClockTimerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeactivateClockTimerFlexContainer.java index 6fb58d35..1065d189 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeactivateClockTimerFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeactivateClockTimerFlexContainer.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : deactivateClockTimer +Action : DeactivateClockTimer Deactivate current clock timer. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeactivateClockTimerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class DeactivateClockTimerFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeactivateClockTimerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeactivateClockTimerFlexContainerAnnc.java index ec1e4144..6b3efc5c 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeactivateClockTimerFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeactivateClockTimerFlexContainerAnnc.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : deactivateClockTimer +Action : DeactivateClockTimerAnnc Deactivate current clock timer. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = DeactivateClockTimerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class DeactivateClockTimerFlexContainerAnnc extends AbstractFlexContainer setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } - -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DecrementNumberValueFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DecrementNumberValueFlexContainer.java index 362c3b5d..b44b7b90 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DecrementNumberValueFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DecrementNumberValueFlexContainer.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : decrementNumberValue +Action : DecrementNumberValue Decrement the "numberValue" by the value of "step", down to the value of "minimum". -Created: 2017-09-28 17:26:40 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DecrementNumberValueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class DecrementNumberValueFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DecrementNumberValueFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DecrementNumberValueFlexContainerAnnc.java index b5ed5953..745f4e8d 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DecrementNumberValueFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DecrementNumberValueFlexContainerAnnc.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : decrementNumberValue +Action : DecrementNumberValueAnnc Decrement the "numberValue" by the value of "step", down to the value of "minimum". -Created: 2017-09-28 17:26:40 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = DecrementNumberValueFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class DecrementNumberValueFlexContainerAnnc extends AbstractFlexContainer setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } - -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DehumidifierJobModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DehumidifierJobModeFlexContainer.java new file mode 100644 index 00000000..f6a030e4 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DehumidifierJobModeFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : DehumidifierJobMode + +This ModuleClasses provides capabilities to control and monitor the job modes of a dehumidifier device. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = DehumidifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DehumidifierJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DehumidifierJobModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "dehumidifierJobMode"; + public static final String SHORT_NAME = "deJMe"; + + public DehumidifierJobModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + DehumidifierJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentJobModeName = new CustomAttribute(); + currentJobModeName.setLongName("currentJobModeName"); + currentJobModeName.setShortName("cJMNe"); + currentJobModeName.setType("xs:string"); + getCustomAttributes().add(currentJobModeName); + CustomAttribute currentJobMode = new CustomAttribute(); + currentJobMode.setLongName("currentJobMode"); + currentJobMode.setShortName("cuJMe"); + currentJobMode.setType("hd:enumDehumidifierJobMode"); + getCustomAttributes().add(currentJobMode); + CustomAttribute jobModes = new CustomAttribute(); + jobModes.setLongName("jobModes"); + jobModes.setShortName("jobMs"); + jobModes.setType("[hd:enumDehumidifierJobMode]"); + getCustomAttributes().add(jobModes); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DehumidifierJobModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DehumidifierJobModeFlexContainerAnnc.java new file mode 100644 index 00000000..686e0747 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DehumidifierJobModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : DehumidifierJobModeAnnc + +This ModuleClasses provides capabilities to control and monitor the job modes of a dehumidifier device. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DehumidifierJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DehumidifierJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DehumidifierJobModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "dehumidifierJobModeAnnc"; + public static final String SHORT_NAME = "deJMeAnnc"; + + public DehumidifierJobModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + DehumidifierJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirConditionerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirConditionerFlexContainer.java index 7c6cdfa1..6fc1ec95 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirConditionerFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirConditionerFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceAirConditioner An air conditioner is a home appliance used to alter the properties of air (primarily temperature and humidity) to more comfortable conditions. This air conditioner information model provides capabilities to control and monitor air conditioner specific functions and resources. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceAirConditionerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,21 +38,37 @@ public class DeviceAirConditionerFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getBinarySwitch(); - getRunMode(); + getRunState(); + getAirConJobMode(); + getAirConOperationMode(); + getAirCleanOperationMode(); getTemperature(); getTimer(); + getSleepTimer(); getTurbo(); - getWind(); + getAirFlow(); + getPowerSave(); + getAirQualitySensor(); + getFilterInfo(); } public void finalizeDeserialization() { if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); + } + if (this.airConJobMode != null) { + setAirConJobMode(this.airConJobMode); + } + if (this.airConOperationMode != null) { + setAirConOperationMode(this.airConOperationMode); + } + if (this.airCleanOperationMode != null) { + setAirCleanOperationMode(this.airCleanOperationMode); } if (this.temperature != null) { setTemperature(this.temperature); @@ -61,18 +76,29 @@ public class DeviceAirConditionerFlexContainer extends AbstractFlexContainer { if (this.timer != null) { setTimer(this.timer); } + if (this.sleepTimer != null) { + setSleepTimer(this.sleepTimer); + } if (this.turbo != null) { setTurbo(this.turbo); } - if (this.wind != null) { - setWind(this.wind); + if (this.airFlow != null) { + setAirFlow(this.airFlow); + } + if (this.powerSave != null) { + setPowerSave(this.powerSave); + } + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); + } + if (this.filterInfo != null) { + setFilterInfo(this.filterInfo); } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -83,24 +109,61 @@ public class DeviceAirConditionerFlexContainer extends AbstractFlexContainer { return binarySwitch; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + @XmlElement(name=AirConJobModeFlexContainer.SHORT_NAME, required=true, type=AirConJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirConJobModeFlexContainer airConJobMode; + + public void setAirConJobMode(AirConJobModeFlexContainer airConJobMode) { + this.airConJobMode = airConJobMode; + getFlexContainerOrContainerOrSubscription().add(airConJobMode); + } - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + public AirConJobModeFlexContainer getAirConJobMode() { + this.airConJobMode = (AirConJobModeFlexContainer) getResourceByName(AirConJobModeFlexContainer.SHORT_NAME); + return airConJobMode; } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + @XmlElement(name=OperationModeFlexContainer.SHORT_NAME, required=true, type=OperationModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OperationModeFlexContainer airConOperationMode; + + public void setAirConOperationMode(OperationModeFlexContainer airConOperationMode) { + this.airConOperationMode = airConOperationMode; + getFlexContainerOrContainerOrSubscription().add(airConOperationMode); } - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TemperatureFlexContainer temperature; + public OperationModeFlexContainer getAirConOperationMode() { + this.airConOperationMode = (OperationModeFlexContainer) getResourceByName(OperationModeFlexContainer.SHORT_NAME); + return airConOperationMode; + } + @XmlElement(name=OperationModeFlexContainer.SHORT_NAME, required=true, type=OperationModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OperationModeFlexContainer airCleanOperationMode; + + public void setAirCleanOperationMode(OperationModeFlexContainer airCleanOperationMode) { + this.airCleanOperationMode = airCleanOperationMode; + getFlexContainerOrContainerOrSubscription().add(airCleanOperationMode); + } + public OperationModeFlexContainer getAirCleanOperationMode() { + this.airCleanOperationMode = (OperationModeFlexContainer) getResourceByName(OperationModeFlexContainer.SHORT_NAME); + return airCleanOperationMode; + } + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer temperature; + public void setTemperature(TemperatureFlexContainer temperature) { this.temperature = temperature; getFlexContainerOrContainerOrSubscription().add(temperature); @@ -111,10 +174,9 @@ public class DeviceAirConditionerFlexContainer extends AbstractFlexContainer { return temperature; } - @XmlElement(name="timer", required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainer timer; - - + public void setTimer(TimerFlexContainer timer) { this.timer = timer; getFlexContainerOrContainerOrSubscription().add(timer); @@ -125,10 +187,22 @@ public class DeviceAirConditionerFlexContainer extends AbstractFlexContainer { return timer; } - @XmlElement(name="turbo", required=true, type=TurboFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TurboFlexContainer turbo; + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer sleepTimer; + + public void setSleepTimer(TimerFlexContainer sleepTimer) { + this.sleepTimer = sleepTimer; + getFlexContainerOrContainerOrSubscription().add(sleepTimer); + } + public TimerFlexContainer getSleepTimer() { + this.sleepTimer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return sleepTimer; + } + @XmlElement(name=TurboFlexContainer.SHORT_NAME, required=true, type=TurboFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TurboFlexContainer turbo; + public void setTurbo(TurboFlexContainer turbo) { this.turbo = turbo; getFlexContainerOrContainerOrSubscription().add(turbo); @@ -139,18 +213,56 @@ public class DeviceAirConditionerFlexContainer extends AbstractFlexContainer { return turbo; } - @XmlElement(name="wind", required=true, type=WindFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private WindFlexContainer wind; + @XmlElement(name=AirFlowFlexContainer.SHORT_NAME, required=true, type=AirFlowFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirFlowFlexContainer airFlow; + + public void setAirFlow(AirFlowFlexContainer airFlow) { + this.airFlow = airFlow; + getFlexContainerOrContainerOrSubscription().add(airFlow); + } + public AirFlowFlexContainer getAirFlow() { + this.airFlow = (AirFlowFlexContainer) getResourceByName(AirFlowFlexContainer.SHORT_NAME); + return airFlow; + } + + @XmlElement(name=PowerSaveFlexContainer.SHORT_NAME, required=true, type=PowerSaveFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PowerSaveFlexContainer powerSave; + + public void setPowerSave(PowerSaveFlexContainer powerSave) { + this.powerSave = powerSave; + getFlexContainerOrContainerOrSubscription().add(powerSave); + } + + public PowerSaveFlexContainer getPowerSave() { + this.powerSave = (PowerSaveFlexContainer) getResourceByName(PowerSaveFlexContainer.SHORT_NAME); + return powerSave; + } + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); + } + + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; + } - public void setWind(WindFlexContainer wind) { - this.wind = wind; - getFlexContainerOrContainerOrSubscription().add(wind); + @XmlElement(name=FilterInfoFlexContainer.SHORT_NAME, required=true, type=FilterInfoFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FilterInfoFlexContainer filterInfo; + + public void setFilterInfo(FilterInfoFlexContainer filterInfo) { + this.filterInfo = filterInfo; + getFlexContainerOrContainerOrSubscription().add(filterInfo); } - public WindFlexContainer getWind() { - this.wind = (WindFlexContainer) getResourceByName(WindFlexContainer.SHORT_NAME); - return wind; + public FilterInfoFlexContainer getFilterInfo() { + this.filterInfo = (FilterInfoFlexContainer) getResourceByName(FilterInfoFlexContainer.SHORT_NAME); + return filterInfo; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirConditionerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirConditionerFlexContainerAnnc.java index 86372ff9..26e1a060 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirConditionerFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirConditionerFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceAirConditionerAnnc An air conditioner is a home appliance used to alter the properties of air (primarily temperature and humidity) to more comfortable conditions. This air conditioner information model provides capabilities to control and monitor air conditioner specific functions and resources. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceAirConditionerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceAirConditionerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,22 +37,30 @@ public class DeviceAirConditionerFlexContainerAnnc extends AbstractFlexContainer setContainerDefinition("org.onem2m.home.device." + DeviceAirConditionerFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getBinarySwitch(); getBinarySwitchAnnc(); - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); + getAirConJobMode(); + getAirConJobModeAnnc(); getTemperature(); getTemperatureAnnc(); getTimer(); getTimerAnnc(); getTurbo(); getTurboAnnc(); - getWind(); - getWindAnnc(); - } + getAirFlow(); + getAirFlowAnnc(); + getPowerSave(); + getPowerSaveAnnc(); + getAirQualitySensor(); + getAirQualitySensorAnnc(); + getFilterInfo(); + getFilterInfoAnnc(); + } public void finalizeDeserialization() { if (this.binarySwitch != null) { @@ -60,49 +68,66 @@ public class DeviceAirConditionerFlexContainerAnnc extends AbstractFlexContainer } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.airConJobMode != null) { + setAirConJobMode(this.airConJobMode); + } + if (this.airConJobModeAnnc != null) { + setAirConJobModeAnnc(this.airConJobModeAnnc); + } if (this.temperature != null) { setTemperature(this.temperature); } if (this.temperatureAnnc != null) { setTemperatureAnnc(this.temperatureAnnc); - } - + } if (this.timer != null) { setTimer(this.timer); } if (this.timerAnnc != null) { setTimerAnnc(this.timerAnnc); - } - + } if (this.turbo != null) { setTurbo(this.turbo); } if (this.turboAnnc != null) { setTurboAnnc(this.turboAnnc); - } - - if (this.wind != null) { - setWind(this.wind); } - if (this.windAnnc != null) { - setWindAnnc(this.windAnnc); - } - + if (this.airFlow != null) { + setAirFlow(this.airFlow); + } + if (this.airFlowAnnc != null) { + setAirFlowAnnc(this.airFlowAnnc); + } + if (this.powerSave != null) { + setPowerSave(this.powerSave); + } + if (this.powerSaveAnnc != null) { + setPowerSaveAnnc(this.powerSaveAnnc); + } + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); + } + if (this.airQualitySensorAnnc != null) { + setAirQualitySensorAnnc(this.airQualitySensorAnnc); + } + if (this.filterInfo != null) { + setFilterInfo(this.filterInfo); + } + if (this.filterInfoAnnc != null) { + setFilterInfoAnnc(this.filterInfoAnnc); + } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -113,10 +138,9 @@ public class DeviceAirConditionerFlexContainerAnnc extends AbstractFlexContainer return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -127,38 +151,61 @@ public class DeviceAirConditionerFlexContainerAnnc extends AbstractFlexContainer return binarySwitchAnnc; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; + @XmlElement(name=AirConJobModeFlexContainer.SHORT_NAME, required=true, type=AirConJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirConJobModeFlexContainer airConJobMode; + + public void setAirConJobMode(AirConJobModeFlexContainer airConJobMode) { + this.airConJobMode = airConJobMode; + getFlexContainerOrContainerOrSubscription().add(airConJobMode); + } + public AirConJobModeFlexContainer getAirConJobMode() { + this.airConJobMode = (AirConJobModeFlexContainer) getResourceByName(AirConJobModeFlexContainer.SHORT_NAME); + return airConJobMode; + } - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=AirConJobModeFlexContainerAnnc.SHORT_NAME, required=true, type=AirConJobModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirConJobModeFlexContainerAnnc airConJobModeAnnc; + + public void setAirConJobModeAnnc(AirConJobModeFlexContainerAnnc airConJobModeAnnc) { + this.airConJobModeAnnc = airConJobModeAnnc; + getFlexContainerOrContainerOrSubscription().add(airConJobModeAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public AirConJobModeFlexContainerAnnc getAirConJobModeAnnc() { + this.airConJobModeAnnc = (AirConJobModeFlexContainerAnnc) getResourceByName(AirConJobModeFlexContainerAnnc.SHORT_NAME); + return airConJobModeAnnc; } - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainer temperature; - - + public void setTemperature(TemperatureFlexContainer temperature) { this.temperature = temperature; getFlexContainerOrContainerOrSubscription().add(temperature); @@ -169,10 +216,9 @@ public class DeviceAirConditionerFlexContainerAnnc extends AbstractFlexContainer return temperature; } - @XmlElement(name="tempeAnnc", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TemperatureFlexContainerAnnc.SHORT_NAME, required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainerAnnc temperatureAnnc; - - + public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { this.temperatureAnnc = temperatureAnnc; getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); @@ -183,10 +229,9 @@ public class DeviceAirConditionerFlexContainerAnnc extends AbstractFlexContainer return temperatureAnnc; } - @XmlElement(name="timer", required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainer timer; - - + public void setTimer(TimerFlexContainer timer) { this.timer = timer; getFlexContainerOrContainerOrSubscription().add(timer); @@ -197,10 +242,9 @@ public class DeviceAirConditionerFlexContainerAnnc extends AbstractFlexContainer return timer; } - @XmlElement(name="timerAnnc", required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainerAnnc.SHORT_NAME, required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainerAnnc timerAnnc; - - + public void setTimerAnnc(TimerFlexContainerAnnc timerAnnc) { this.timerAnnc = timerAnnc; getFlexContainerOrContainerOrSubscription().add(timerAnnc); @@ -211,10 +255,9 @@ public class DeviceAirConditionerFlexContainerAnnc extends AbstractFlexContainer return timerAnnc; } - @XmlElement(name="turbo", required=true, type=TurboFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TurboFlexContainer.SHORT_NAME, required=true, type=TurboFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TurboFlexContainer turbo; - - + public void setTurbo(TurboFlexContainer turbo) { this.turbo = turbo; getFlexContainerOrContainerOrSubscription().add(turbo); @@ -225,10 +268,9 @@ public class DeviceAirConditionerFlexContainerAnnc extends AbstractFlexContainer return turbo; } - @XmlElement(name="turboAnnc", required=true, type=TurboFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TurboFlexContainerAnnc.SHORT_NAME, required=true, type=TurboFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TurboFlexContainerAnnc turboAnnc; - - + public void setTurboAnnc(TurboFlexContainerAnnc turboAnnc) { this.turboAnnc = turboAnnc; getFlexContainerOrContainerOrSubscription().add(turboAnnc); @@ -239,32 +281,108 @@ public class DeviceAirConditionerFlexContainerAnnc extends AbstractFlexContainer return turboAnnc; } - @XmlElement(name="wind", required=true, type=WindFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private WindFlexContainer wind; + @XmlElement(name=AirFlowFlexContainer.SHORT_NAME, required=true, type=AirFlowFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirFlowFlexContainer airFlow; + + public void setAirFlow(AirFlowFlexContainer airFlow) { + this.airFlow = airFlow; + getFlexContainerOrContainerOrSubscription().add(airFlow); + } + public AirFlowFlexContainer getAirFlow() { + this.airFlow = (AirFlowFlexContainer) getResourceByName(AirFlowFlexContainer.SHORT_NAME); + return airFlow; + } - public void setWind(WindFlexContainer wind) { - this.wind = wind; - getFlexContainerOrContainerOrSubscription().add(wind); + @XmlElement(name=AirFlowFlexContainerAnnc.SHORT_NAME, required=true, type=AirFlowFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirFlowFlexContainerAnnc airFlowAnnc; + + public void setAirFlowAnnc(AirFlowFlexContainerAnnc airFlowAnnc) { + this.airFlowAnnc = airFlowAnnc; + getFlexContainerOrContainerOrSubscription().add(airFlowAnnc); } - public WindFlexContainer getWind() { - this.wind = (WindFlexContainer) getResourceByName(WindFlexContainer.SHORT_NAME); - return wind; + public AirFlowFlexContainerAnnc getAirFlowAnnc() { + this.airFlowAnnc = (AirFlowFlexContainerAnnc) getResourceByName(AirFlowFlexContainerAnnc.SHORT_NAME); + return airFlowAnnc; } - @XmlElement(name="windAnnc", required=true, type=WindFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private WindFlexContainerAnnc windAnnc; + @XmlElement(name=PowerSaveFlexContainer.SHORT_NAME, required=true, type=PowerSaveFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PowerSaveFlexContainer powerSave; + + public void setPowerSave(PowerSaveFlexContainer powerSave) { + this.powerSave = powerSave; + getFlexContainerOrContainerOrSubscription().add(powerSave); + } + public PowerSaveFlexContainer getPowerSave() { + this.powerSave = (PowerSaveFlexContainer) getResourceByName(PowerSaveFlexContainer.SHORT_NAME); + return powerSave; + } - public void setWindAnnc(WindFlexContainerAnnc windAnnc) { - this.windAnnc = windAnnc; - getFlexContainerOrContainerOrSubscription().add(windAnnc); + @XmlElement(name=PowerSaveFlexContainerAnnc.SHORT_NAME, required=true, type=PowerSaveFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PowerSaveFlexContainerAnnc powerSaveAnnc; + + public void setPowerSaveAnnc(PowerSaveFlexContainerAnnc powerSaveAnnc) { + this.powerSaveAnnc = powerSaveAnnc; + getFlexContainerOrContainerOrSubscription().add(powerSaveAnnc); + } + + public PowerSaveFlexContainerAnnc getPowerSaveAnnc() { + this.powerSaveAnnc = (PowerSaveFlexContainerAnnc) getResourceByName(PowerSaveFlexContainerAnnc.SHORT_NAME); + return powerSaveAnnc; + } + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); + } + + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; + } + + @XmlElement(name=AirQualitySensorFlexContainerAnnc.SHORT_NAME, required=true, type=AirQualitySensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainerAnnc airQualitySensorAnnc; + + public void setAirQualitySensorAnnc(AirQualitySensorFlexContainerAnnc airQualitySensorAnnc) { + this.airQualitySensorAnnc = airQualitySensorAnnc; + getFlexContainerOrContainerOrSubscription().add(airQualitySensorAnnc); + } + + public AirQualitySensorFlexContainerAnnc getAirQualitySensorAnnc() { + this.airQualitySensorAnnc = (AirQualitySensorFlexContainerAnnc) getResourceByName(AirQualitySensorFlexContainerAnnc.SHORT_NAME); + return airQualitySensorAnnc; + } + + @XmlElement(name=FilterInfoFlexContainer.SHORT_NAME, required=true, type=FilterInfoFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FilterInfoFlexContainer filterInfo; + + public void setFilterInfo(FilterInfoFlexContainer filterInfo) { + this.filterInfo = filterInfo; + getFlexContainerOrContainerOrSubscription().add(filterInfo); + } + + public FilterInfoFlexContainer getFilterInfo() { + this.filterInfo = (FilterInfoFlexContainer) getResourceByName(FilterInfoFlexContainer.SHORT_NAME); + return filterInfo; + } + + @XmlElement(name=FilterInfoFlexContainerAnnc.SHORT_NAME, required=true, type=FilterInfoFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FilterInfoFlexContainerAnnc filterInfoAnnc; + + public void setFilterInfoAnnc(FilterInfoFlexContainerAnnc filterInfoAnnc) { + this.filterInfoAnnc = filterInfoAnnc; + getFlexContainerOrContainerOrSubscription().add(filterInfoAnnc); } - public WindFlexContainerAnnc getWindAnnc() { - this.windAnnc = (WindFlexContainerAnnc) getResourceByName(WindFlexContainerAnnc.SHORT_NAME); - return windAnnc; + public FilterInfoFlexContainerAnnc getFilterInfoAnnc() { + this.filterInfoAnnc = (FilterInfoFlexContainerAnnc) getResourceByName(FilterInfoFlexContainerAnnc.SHORT_NAME); + return filterInfoAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirPurifierFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirPurifierFlexContainer.java new file mode 100644 index 00000000..d1b2e9d7 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirPurifierFlexContainer.java @@ -0,0 +1,183 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceAirPurifier + +An airPurifieris a home appliance is used to prevent dust and other particles from air by filtering, washing or electrostatic precipitation. This airPurifier information model provides capabilities to control and monitor airPurifier specific functions and resources. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceAirPurifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceAirPurifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceAirPurifierFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceAirPurifier"; + public static final String SHORT_NAME = "deAPr"; + + public DeviceAirPurifierFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceAirPurifierFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getRunState(); + getAirPurifierJobMode(); + getAirPurifierOperationMode(); + getTimer(); + getPowerSave(); + getAirQualitySensor(); + getFilterInfo(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.airPurifierJobMode != null) { + setAirPurifierJobMode(this.airPurifierJobMode); + } + if (this.airPurifierOperationMode != null) { + setAirPurifierOperationMode(this.airPurifierOperationMode); + } + if (this.timer != null) { + setTimer(this.timer); + } + if (this.powerSave != null) { + setPowerSave(this.powerSave); + } + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); + } + if (this.filterInfo != null) { + setFilterInfo(this.filterInfo); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=AirPurifierJobModeFlexContainer.SHORT_NAME, required=true, type=AirPurifierJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirPurifierJobModeFlexContainer airPurifierJobMode; + + public void setAirPurifierJobMode(AirPurifierJobModeFlexContainer airPurifierJobMode) { + this.airPurifierJobMode = airPurifierJobMode; + getFlexContainerOrContainerOrSubscription().add(airPurifierJobMode); + } + + public AirPurifierJobModeFlexContainer getAirPurifierJobMode() { + this.airPurifierJobMode = (AirPurifierJobModeFlexContainer) getResourceByName(AirPurifierJobModeFlexContainer.SHORT_NAME); + return airPurifierJobMode; + } + + @XmlElement(name=OperationModeFlexContainer.SHORT_NAME, required=true, type=OperationModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OperationModeFlexContainer airPurifierOperationMode; + + public void setAirPurifierOperationMode(OperationModeFlexContainer airPurifierOperationMode) { + this.airPurifierOperationMode = airPurifierOperationMode; + getFlexContainerOrContainerOrSubscription().add(airPurifierOperationMode); + } + + public OperationModeFlexContainer getAirPurifierOperationMode() { + this.airPurifierOperationMode = (OperationModeFlexContainer) getResourceByName(OperationModeFlexContainer.SHORT_NAME); + return airPurifierOperationMode; + } + + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer timer; + + public void setTimer(TimerFlexContainer timer) { + this.timer = timer; + getFlexContainerOrContainerOrSubscription().add(timer); + } + + public TimerFlexContainer getTimer() { + this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return timer; + } + + @XmlElement(name=PowerSaveFlexContainer.SHORT_NAME, required=true, type=PowerSaveFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PowerSaveFlexContainer powerSave; + + public void setPowerSave(PowerSaveFlexContainer powerSave) { + this.powerSave = powerSave; + getFlexContainerOrContainerOrSubscription().add(powerSave); + } + + public PowerSaveFlexContainer getPowerSave() { + this.powerSave = (PowerSaveFlexContainer) getResourceByName(PowerSaveFlexContainer.SHORT_NAME); + return powerSave; + } + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); + } + + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; + } + + @XmlElement(name=FilterInfoFlexContainer.SHORT_NAME, required=true, type=FilterInfoFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FilterInfoFlexContainer filterInfo; + + public void setFilterInfo(FilterInfoFlexContainer filterInfo) { + this.filterInfo = filterInfo; + getFlexContainerOrContainerOrSubscription().add(filterInfo); + } + + public FilterInfoFlexContainer getFilterInfo() { + this.filterInfo = (FilterInfoFlexContainer) getResourceByName(FilterInfoFlexContainer.SHORT_NAME); + return filterInfo; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirPurifierFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirPurifierFlexContainerAnnc.java new file mode 100644 index 00000000..51b082fc --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirPurifierFlexContainerAnnc.java @@ -0,0 +1,286 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceAirPurifierAnnc + +An airPurifieris a home appliance is used to prevent dust and other particles from air by filtering, washing or electrostatic precipitation. This airPurifier information model provides capabilities to control and monitor airPurifier specific functions and resources. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceAirPurifierFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceAirPurifierFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceAirPurifierFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceAirPurifierAnnc"; + public static final String SHORT_NAME = "deAPrAnnc"; + + public DeviceAirPurifierFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceAirPurifierFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getRunState(); + getRunStateAnnc(); + getAirPurifierJobMode(); + getAirPurifierJobModeAnnc(); + getTimer(); + getTimerAnnc(); + getPowerSave(); + getPowerSaveAnnc(); + getAirQualitySensor(); + getAirQualitySensorAnnc(); + getFilterInfo(); + getFilterInfoAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.airPurifierJobMode != null) { + setAirPurifierJobMode(this.airPurifierJobMode); + } + if (this.airPurifierJobModeAnnc != null) { + setAirPurifierJobModeAnnc(this.airPurifierJobModeAnnc); + } + if (this.timer != null) { + setTimer(this.timer); + } + if (this.timerAnnc != null) { + setTimerAnnc(this.timerAnnc); + } + if (this.powerSave != null) { + setPowerSave(this.powerSave); + } + if (this.powerSaveAnnc != null) { + setPowerSaveAnnc(this.powerSaveAnnc); + } + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); + } + if (this.airQualitySensorAnnc != null) { + setAirQualitySensorAnnc(this.airQualitySensorAnnc); + } + if (this.filterInfo != null) { + setFilterInfo(this.filterInfo); + } + if (this.filterInfoAnnc != null) { + setFilterInfoAnnc(this.filterInfoAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=AirPurifierJobModeFlexContainer.SHORT_NAME, required=true, type=AirPurifierJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirPurifierJobModeFlexContainer airPurifierJobMode; + + public void setAirPurifierJobMode(AirPurifierJobModeFlexContainer airPurifierJobMode) { + this.airPurifierJobMode = airPurifierJobMode; + getFlexContainerOrContainerOrSubscription().add(airPurifierJobMode); + } + + public AirPurifierJobModeFlexContainer getAirPurifierJobMode() { + this.airPurifierJobMode = (AirPurifierJobModeFlexContainer) getResourceByName(AirPurifierJobModeFlexContainer.SHORT_NAME); + return airPurifierJobMode; + } + + @XmlElement(name=AirPurifierJobModeFlexContainerAnnc.SHORT_NAME, required=true, type=AirPurifierJobModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirPurifierJobModeFlexContainerAnnc airPurifierJobModeAnnc; + + public void setAirPurifierJobModeAnnc(AirPurifierJobModeFlexContainerAnnc airPurifierJobModeAnnc) { + this.airPurifierJobModeAnnc = airPurifierJobModeAnnc; + getFlexContainerOrContainerOrSubscription().add(airPurifierJobModeAnnc); + } + + public AirPurifierJobModeFlexContainerAnnc getAirPurifierJobModeAnnc() { + this.airPurifierJobModeAnnc = (AirPurifierJobModeFlexContainerAnnc) getResourceByName(AirPurifierJobModeFlexContainerAnnc.SHORT_NAME); + return airPurifierJobModeAnnc; + } + + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer timer; + + public void setTimer(TimerFlexContainer timer) { + this.timer = timer; + getFlexContainerOrContainerOrSubscription().add(timer); + } + + public TimerFlexContainer getTimer() { + this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return timer; + } + + @XmlElement(name=TimerFlexContainerAnnc.SHORT_NAME, required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainerAnnc timerAnnc; + + public void setTimerAnnc(TimerFlexContainerAnnc timerAnnc) { + this.timerAnnc = timerAnnc; + getFlexContainerOrContainerOrSubscription().add(timerAnnc); + } + + public TimerFlexContainerAnnc getTimerAnnc() { + this.timerAnnc = (TimerFlexContainerAnnc) getResourceByName(TimerFlexContainerAnnc.SHORT_NAME); + return timerAnnc; + } + + @XmlElement(name=PowerSaveFlexContainer.SHORT_NAME, required=true, type=PowerSaveFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PowerSaveFlexContainer powerSave; + + public void setPowerSave(PowerSaveFlexContainer powerSave) { + this.powerSave = powerSave; + getFlexContainerOrContainerOrSubscription().add(powerSave); + } + + public PowerSaveFlexContainer getPowerSave() { + this.powerSave = (PowerSaveFlexContainer) getResourceByName(PowerSaveFlexContainer.SHORT_NAME); + return powerSave; + } + + @XmlElement(name=PowerSaveFlexContainerAnnc.SHORT_NAME, required=true, type=PowerSaveFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PowerSaveFlexContainerAnnc powerSaveAnnc; + + public void setPowerSaveAnnc(PowerSaveFlexContainerAnnc powerSaveAnnc) { + this.powerSaveAnnc = powerSaveAnnc; + getFlexContainerOrContainerOrSubscription().add(powerSaveAnnc); + } + + public PowerSaveFlexContainerAnnc getPowerSaveAnnc() { + this.powerSaveAnnc = (PowerSaveFlexContainerAnnc) getResourceByName(PowerSaveFlexContainerAnnc.SHORT_NAME); + return powerSaveAnnc; + } + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); + } + + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; + } + + @XmlElement(name=AirQualitySensorFlexContainerAnnc.SHORT_NAME, required=true, type=AirQualitySensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainerAnnc airQualitySensorAnnc; + + public void setAirQualitySensorAnnc(AirQualitySensorFlexContainerAnnc airQualitySensorAnnc) { + this.airQualitySensorAnnc = airQualitySensorAnnc; + getFlexContainerOrContainerOrSubscription().add(airQualitySensorAnnc); + } + + public AirQualitySensorFlexContainerAnnc getAirQualitySensorAnnc() { + this.airQualitySensorAnnc = (AirQualitySensorFlexContainerAnnc) getResourceByName(AirQualitySensorFlexContainerAnnc.SHORT_NAME); + return airQualitySensorAnnc; + } + + @XmlElement(name=FilterInfoFlexContainer.SHORT_NAME, required=true, type=FilterInfoFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FilterInfoFlexContainer filterInfo; + + public void setFilterInfo(FilterInfoFlexContainer filterInfo) { + this.filterInfo = filterInfo; + getFlexContainerOrContainerOrSubscription().add(filterInfo); + } + + public FilterInfoFlexContainer getFilterInfo() { + this.filterInfo = (FilterInfoFlexContainer) getResourceByName(FilterInfoFlexContainer.SHORT_NAME); + return filterInfo; + } + + @XmlElement(name=FilterInfoFlexContainerAnnc.SHORT_NAME, required=true, type=FilterInfoFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FilterInfoFlexContainerAnnc filterInfoAnnc; + + public void setFilterInfoAnnc(FilterInfoFlexContainerAnnc filterInfoAnnc) { + this.filterInfoAnnc = filterInfoAnnc; + getFlexContainerOrContainerOrSubscription().add(filterInfoAnnc); + } + + public FilterInfoFlexContainerAnnc getFilterInfoAnnc() { + this.filterInfoAnnc = (FilterInfoFlexContainerAnnc) getResourceByName(FilterInfoFlexContainerAnnc.SHORT_NAME); + return filterInfoAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirQualityMonitorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirQualityMonitorFlexContainer.java new file mode 100644 index 00000000..a521a5e9 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirQualityMonitorFlexContainer.java @@ -0,0 +1,64 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceAirQualityMonitor + +An air quality monitor is a home appliance for monitoring the air quality. This airQualityMonitor information model provides capabilities to monitor the airQualityMonitor functions and resources. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceAirQualityMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceAirQualityMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceAirQualityMonitorFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceAirQualityMonitor"; + public static final String SHORT_NAME = "dAQMr"; + + public DeviceAirQualityMonitorFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceAirQualityMonitorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getAirQualitySensor(); + } + + public void finalizeDeserialization() { + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); + } + } + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); + } + + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirQualityMonitorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirQualityMonitorFlexContainerAnnc.java new file mode 100644 index 00000000..299ada53 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAirQualityMonitorFlexContainerAnnc.java @@ -0,0 +1,82 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceAirQualityMonitorAnnc + +An air quality monitor is a home appliance for monitoring the air quality. This airQualityMonitor information model provides capabilities to monitor the airQualityMonitor functions and resources. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceAirQualityMonitorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceAirQualityMonitorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceAirQualityMonitorFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceAirQualityMonitorAnnc"; + public static final String SHORT_NAME = "dAQMrAnnc"; + + public DeviceAirQualityMonitorFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceAirQualityMonitorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getAirQualitySensor(); + getAirQualitySensorAnnc(); + } + + public void finalizeDeserialization() { + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); + } + if (this.airQualitySensorAnnc != null) { + setAirQualitySensorAnnc(this.airQualitySensorAnnc); + } + } + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); + } + + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; + } + + @XmlElement(name=AirQualitySensorFlexContainerAnnc.SHORT_NAME, required=true, type=AirQualitySensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainerAnnc airQualitySensorAnnc; + + public void setAirQualitySensorAnnc(AirQualitySensorFlexContainerAnnc airQualitySensorAnnc) { + this.airQualitySensorAnnc = airQualitySensorAnnc; + getFlexContainerOrContainerOrSubscription().add(airQualitySensorAnnc); + } + + public AirQualitySensorFlexContainerAnnc getAirQualitySensorAnnc() { + this.airQualitySensorAnnc = (AirQualitySensorFlexContainerAnnc) getResourceByName(AirQualitySensorFlexContainerAnnc.SHORT_NAME); + return airQualitySensorAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAudioReceiverFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAudioReceiverFlexContainer.java new file mode 100644 index 00000000..c29a873a --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAudioReceiverFlexContainer.java @@ -0,0 +1,115 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceAudioReceiver + +An audio receiver is a device that receives audio signals from a number of sources, processing them to drive speakers. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceAudioReceiverFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceAudioReceiverFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceAudioReceiverFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceAudioReceiver"; + public static final String SHORT_NAME = "deARr"; + + public DeviceAudioReceiverFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceAudioReceiverFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getAudioVolume(); + getMediaInput(); + getMediaOutput(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.audioVolume != null) { + setAudioVolume(this.audioVolume); + } + if (this.mediaInput != null) { + setMediaInput(this.mediaInput); + } + if (this.mediaOutput != null) { + setMediaOutput(this.mediaOutput); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=AudioVolumeFlexContainer.SHORT_NAME, required=true, type=AudioVolumeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AudioVolumeFlexContainer audioVolume; + + public void setAudioVolume(AudioVolumeFlexContainer audioVolume) { + this.audioVolume = audioVolume; + getFlexContainerOrContainerOrSubscription().add(audioVolume); + } + + public AudioVolumeFlexContainer getAudioVolume() { + this.audioVolume = (AudioVolumeFlexContainer) getResourceByName(AudioVolumeFlexContainer.SHORT_NAME); + return audioVolume; + } + + @XmlElement(name=MediaSelectFlexContainer.SHORT_NAME, required=true, type=MediaSelectFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MediaSelectFlexContainer mediaInput; + + public void setMediaInput(MediaSelectFlexContainer mediaInput) { + this.mediaInput = mediaInput; + getFlexContainerOrContainerOrSubscription().add(mediaInput); + } + + public MediaSelectFlexContainer getMediaInput() { + this.mediaInput = (MediaSelectFlexContainer) getResourceByName(MediaSelectFlexContainer.SHORT_NAME); + return mediaInput; + } + + @XmlElement(name=MediaSelectFlexContainer.SHORT_NAME, required=true, type=MediaSelectFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MediaSelectFlexContainer mediaOutput; + + public void setMediaOutput(MediaSelectFlexContainer mediaOutput) { + this.mediaOutput = mediaOutput; + getFlexContainerOrContainerOrSubscription().add(mediaOutput); + } + + public MediaSelectFlexContainer getMediaOutput() { + this.mediaOutput = (MediaSelectFlexContainer) getResourceByName(MediaSelectFlexContainer.SHORT_NAME); + return mediaOutput; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAudioReceiverFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAudioReceiverFlexContainerAnnc.java new file mode 100644 index 00000000..0a688176 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceAudioReceiverFlexContainerAnnc.java @@ -0,0 +1,116 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceAudioReceiverAnnc + +An audio receiver is a device that receives audio signals from a number of sources, processing them to drive speakers. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceAudioReceiverFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceAudioReceiverFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceAudioReceiverFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceAudioReceiverAnnc"; + public static final String SHORT_NAME = "deARrAnnc"; + + public DeviceAudioReceiverFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceAudioReceiverFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getAudioVolume(); + getAudioVolumeAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.audioVolume != null) { + setAudioVolume(this.audioVolume); + } + if (this.audioVolumeAnnc != null) { + setAudioVolumeAnnc(this.audioVolumeAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=AudioVolumeFlexContainer.SHORT_NAME, required=true, type=AudioVolumeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AudioVolumeFlexContainer audioVolume; + + public void setAudioVolume(AudioVolumeFlexContainer audioVolume) { + this.audioVolume = audioVolume; + getFlexContainerOrContainerOrSubscription().add(audioVolume); + } + + public AudioVolumeFlexContainer getAudioVolume() { + this.audioVolume = (AudioVolumeFlexContainer) getResourceByName(AudioVolumeFlexContainer.SHORT_NAME); + return audioVolume; + } + + @XmlElement(name=AudioVolumeFlexContainerAnnc.SHORT_NAME, required=true, type=AudioVolumeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AudioVolumeFlexContainerAnnc audioVolumeAnnc; + + public void setAudioVolumeAnnc(AudioVolumeFlexContainerAnnc audioVolumeAnnc) { + this.audioVolumeAnnc = audioVolumeAnnc; + getFlexContainerOrContainerOrSubscription().add(audioVolumeAnnc); + } + + public AudioVolumeFlexContainerAnnc getAudioVolumeAnnc() { + this.audioVolumeAnnc = (AudioVolumeFlexContainerAnnc) getResourceByName(AudioVolumeFlexContainerAnnc.SHORT_NAME); + return audioVolumeAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceBloodPressureMonitorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceBloodPressureMonitorFlexContainer.java new file mode 100644 index 00000000..4bb363b4 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceBloodPressureMonitorFlexContainer.java @@ -0,0 +1,81 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceBloodPressureMonitor + +A blood pressure monitor is a device that can be used to monitor the blood pressure and is composed of one or more cuffs and a main montor machine. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceBloodPressureMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceBloodPressureMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceBloodPressureMonitorFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceBloodPressureMonitor"; + public static final String SHORT_NAME = "dBPMr"; + + public DeviceBloodPressureMonitorFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceBloodPressureMonitorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBattery(); + getBinarySwitch(); + } + + public void finalizeDeserialization() { + if (this.battery != null) { + setBattery(this.battery); + } + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceBloodPressureMonitorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceBloodPressureMonitorFlexContainerAnnc.java new file mode 100644 index 00000000..7e7bee85 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceBloodPressureMonitorFlexContainerAnnc.java @@ -0,0 +1,116 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceBloodPressureMonitorAnnc + +A blood pressure monitor is a device that can be used to monitor the blood pressure and is composed of one or more cuffs and a main montor machine. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceBloodPressureMonitorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceBloodPressureMonitorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceBloodPressureMonitorFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceBloodPressureMonitorAnnc"; + public static final String SHORT_NAME = "dBPMrAnnc"; + + public DeviceBloodPressureMonitorFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceBloodPressureMonitorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBattery(); + getBatteryAnnc(); + getBinarySwitch(); + getBinarySwitchAnnc(); + } + + public void finalizeDeserialization() { + if (this.battery != null) { + setBattery(this.battery); + } + if (this.batteryAnnc != null) { + setBatteryAnnc(this.batteryAnnc); + } + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainerAnnc batteryAnnc; + + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { + this.batteryAnnc = batteryAnnc; + getFlexContainerOrContainerOrSubscription().add(batteryAnnc); + } + + public BatteryFlexContainerAnnc getBatteryAnnc() { + this.batteryAnnc = (BatteryFlexContainerAnnc) getResourceByName(BatteryFlexContainerAnnc.SHORT_NAME); + return batteryAnnc; + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCameraFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCameraFlexContainer.java index 6a8da522..f33aeb09 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCameraFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCameraFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceCamera -A Camera is a device that provides video streaming feature. +A camera is an optical instrument for recording or capturing images, which may be stored locally or transmitted to another locations. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceCameraFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,28 +38,53 @@ public class DeviceCameraFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { + getSessionDescription(); + getPlayerControl(); getMotionSensor(); - getStreaming(); - getPersonSensor(); } public void finalizeDeserialization() { - if (this.motionSensor != null) { - setMotionSensor(this.motionSensor); + if (this.sessionDescription != null) { + setSessionDescription(this.sessionDescription); } - if (this.streaming != null) { - setStreaming(this.streaming); + if (this.playerControl != null) { + setPlayerControl(this.playerControl); } - if (this.personSensor != null) { - setPersonSensor(this.personSensor); + if (this.motionSensor != null) { + setMotionSensor(this.motionSensor); } } + + @XmlElement(name=SessionDescriptionFlexContainer.SHORT_NAME, required=true, type=SessionDescriptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SessionDescriptionFlexContainer sessionDescription; + + public void setSessionDescription(SessionDescriptionFlexContainer sessionDescription) { + this.sessionDescription = sessionDescription; + getFlexContainerOrContainerOrSubscription().add(sessionDescription); + } - @XmlElement(name="motSr", required=true, type=MotionSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private MotionSensorFlexContainer motionSensor; + public SessionDescriptionFlexContainer getSessionDescription() { + this.sessionDescription = (SessionDescriptionFlexContainer) getResourceByName(SessionDescriptionFlexContainer.SHORT_NAME); + return sessionDescription; + } + @XmlElement(name=PlayerControlFlexContainer.SHORT_NAME, required=true, type=PlayerControlFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PlayerControlFlexContainer playerControl; + + public void setPlayerControl(PlayerControlFlexContainer playerControl) { + this.playerControl = playerControl; + getFlexContainerOrContainerOrSubscription().add(playerControl); + } + + public PlayerControlFlexContainer getPlayerControl() { + this.playerControl = (PlayerControlFlexContainer) getResourceByName(PlayerControlFlexContainer.SHORT_NAME); + return playerControl; + } + @XmlElement(name=MotionSensorFlexContainer.SHORT_NAME, required=true, type=MotionSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MotionSensorFlexContainer motionSensor; + public void setMotionSensor(MotionSensorFlexContainer motionSensor) { this.motionSensor = motionSensor; getFlexContainerOrContainerOrSubscription().add(motionSensor); @@ -71,32 +95,4 @@ public class DeviceCameraFlexContainer extends AbstractFlexContainer { return motionSensor; } - @XmlElement(name="streg", required=true, type=StreamingFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private StreamingFlexContainer streaming; - - - public void setStreaming(StreamingFlexContainer streaming) { - this.streaming = streaming; - getFlexContainerOrContainerOrSubscription().add(streaming); - } - - public StreamingFlexContainer getStreaming() { - this.streaming = (StreamingFlexContainer) getResourceByName(StreamingFlexContainer.SHORT_NAME); - return streaming; - } - - @XmlElement(name="perSr", required=true, type=PersonSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private PersonSensorFlexContainer personSensor; - - - public void setPersonSensor(PersonSensorFlexContainer personSensor) { - this.personSensor = personSensor; - getFlexContainerOrContainerOrSubscription().add(personSensor); - } - - public PersonSensorFlexContainer getPersonSensor() { - this.personSensor = (PersonSensorFlexContainer) getResourceByName(PersonSensorFlexContainer.SHORT_NAME); - return personSensor; - } - -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCameraFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCameraFlexContainerAnnc.java index e0512c1e..efdd4675 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCameraFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCameraFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceCameraAnnc -A Camera is a device that provides video streaming feature. +A camera is an optical instrument for recording or capturing images, which may be stored locally or transmitted to another locations. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceCameraFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceCameraFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,45 +37,93 @@ public class DeviceCameraFlexContainerAnnc extends AbstractFlexContainerAnnc { setContainerDefinition("org.onem2m.home.device." + DeviceCameraFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { + getSessionDescription(); + getSessionDescriptionAnnc(); + getPlayerControl(); + getPlayerControlAnnc(); getMotionSensor(); getMotionSensorAnnc(); - getStreaming(); - getStreamingAnnc(); - getPersonSensor(); - getPersonSensorAnnc(); - } + } public void finalizeDeserialization() { + if (this.sessionDescription != null) { + setSessionDescription(this.sessionDescription); + } + if (this.sessionDescriptionAnnc != null) { + setSessionDescriptionAnnc(this.sessionDescriptionAnnc); + } + if (this.playerControl != null) { + setPlayerControl(this.playerControl); + } + if (this.playerControlAnnc != null) { + setPlayerControlAnnc(this.playerControlAnnc); + } if (this.motionSensor != null) { setMotionSensor(this.motionSensor); } if (this.motionSensorAnnc != null) { setMotionSensorAnnc(this.motionSensorAnnc); - } - - if (this.streaming != null) { - setStreaming(this.streaming); } - if (this.streamingAnnc != null) { - setStreamingAnnc(this.streamingAnnc); - } + } + + @XmlElement(name=SessionDescriptionFlexContainer.SHORT_NAME, required=true, type=SessionDescriptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SessionDescriptionFlexContainer sessionDescription; - if (this.personSensor != null) { - setPersonSensor(this.personSensor); - } - if (this.personSensorAnnc != null) { - setPersonSensorAnnc(this.personSensorAnnc); - } + public void setSessionDescription(SessionDescriptionFlexContainer sessionDescription) { + this.sessionDescription = sessionDescription; + getFlexContainerOrContainerOrSubscription().add(sessionDescription); + } + + public SessionDescriptionFlexContainer getSessionDescription() { + this.sessionDescription = (SessionDescriptionFlexContainer) getResourceByName(SessionDescriptionFlexContainer.SHORT_NAME); + return sessionDescription; + } + + @XmlElement(name=SessionDescriptionFlexContainerAnnc.SHORT_NAME, required=true, type=SessionDescriptionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SessionDescriptionFlexContainerAnnc sessionDescriptionAnnc; + public void setSessionDescriptionAnnc(SessionDescriptionFlexContainerAnnc sessionDescriptionAnnc) { + this.sessionDescriptionAnnc = sessionDescriptionAnnc; + getFlexContainerOrContainerOrSubscription().add(sessionDescriptionAnnc); } - @XmlElement(name="motSr", required=true, type=MotionSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private MotionSensorFlexContainer motionSensor; + public SessionDescriptionFlexContainerAnnc getSessionDescriptionAnnc() { + this.sessionDescriptionAnnc = (SessionDescriptionFlexContainerAnnc) getResourceByName(SessionDescriptionFlexContainerAnnc.SHORT_NAME); + return sessionDescriptionAnnc; + } + + @XmlElement(name=PlayerControlFlexContainer.SHORT_NAME, required=true, type=PlayerControlFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PlayerControlFlexContainer playerControl; + + public void setPlayerControl(PlayerControlFlexContainer playerControl) { + this.playerControl = playerControl; + getFlexContainerOrContainerOrSubscription().add(playerControl); + } + public PlayerControlFlexContainer getPlayerControl() { + this.playerControl = (PlayerControlFlexContainer) getResourceByName(PlayerControlFlexContainer.SHORT_NAME); + return playerControl; + } + + @XmlElement(name=PlayerControlFlexContainerAnnc.SHORT_NAME, required=true, type=PlayerControlFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PlayerControlFlexContainerAnnc playerControlAnnc; + + public void setPlayerControlAnnc(PlayerControlFlexContainerAnnc playerControlAnnc) { + this.playerControlAnnc = playerControlAnnc; + getFlexContainerOrContainerOrSubscription().add(playerControlAnnc); + } + public PlayerControlFlexContainerAnnc getPlayerControlAnnc() { + this.playerControlAnnc = (PlayerControlFlexContainerAnnc) getResourceByName(PlayerControlFlexContainerAnnc.SHORT_NAME); + return playerControlAnnc; + } + + @XmlElement(name=MotionSensorFlexContainer.SHORT_NAME, required=true, type=MotionSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MotionSensorFlexContainer motionSensor; + public void setMotionSensor(MotionSensorFlexContainer motionSensor) { this.motionSensor = motionSensor; getFlexContainerOrContainerOrSubscription().add(motionSensor); @@ -86,10 +134,9 @@ public class DeviceCameraFlexContainerAnnc extends AbstractFlexContainerAnnc { return motionSensor; } - @XmlElement(name="motSrAnnc", required=true, type=MotionSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=MotionSensorFlexContainerAnnc.SHORT_NAME, required=true, type=MotionSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private MotionSensorFlexContainerAnnc motionSensorAnnc; - - + public void setMotionSensorAnnc(MotionSensorFlexContainerAnnc motionSensorAnnc) { this.motionSensorAnnc = motionSensorAnnc; getFlexContainerOrContainerOrSubscription().add(motionSensorAnnc); @@ -100,60 +147,4 @@ public class DeviceCameraFlexContainerAnnc extends AbstractFlexContainerAnnc { return motionSensorAnnc; } - @XmlElement(name="streg", required=true, type=StreamingFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private StreamingFlexContainer streaming; - - - public void setStreaming(StreamingFlexContainer streaming) { - this.streaming = streaming; - getFlexContainerOrContainerOrSubscription().add(streaming); - } - - public StreamingFlexContainer getStreaming() { - this.streaming = (StreamingFlexContainer) getResourceByName(StreamingFlexContainer.SHORT_NAME); - return streaming; - } - - @XmlElement(name="stregAnnc", required=true, type=StreamingFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private StreamingFlexContainerAnnc streamingAnnc; - - - public void setStreamingAnnc(StreamingFlexContainerAnnc streamingAnnc) { - this.streamingAnnc = streamingAnnc; - getFlexContainerOrContainerOrSubscription().add(streamingAnnc); - } - - public StreamingFlexContainerAnnc getStreamingAnnc() { - this.streamingAnnc = (StreamingFlexContainerAnnc) getResourceByName(StreamingFlexContainerAnnc.SHORT_NAME); - return streamingAnnc; - } - - @XmlElement(name="perSr", required=true, type=PersonSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private PersonSensorFlexContainer personSensor; - - - public void setPersonSensor(PersonSensorFlexContainer personSensor) { - this.personSensor = personSensor; - getFlexContainerOrContainerOrSubscription().add(personSensor); - } - - public PersonSensorFlexContainer getPersonSensor() { - this.personSensor = (PersonSensorFlexContainer) getResourceByName(PersonSensorFlexContainer.SHORT_NAME); - return personSensor; - } - - @XmlElement(name="perSrAnnc", required=true, type=PersonSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private PersonSensorFlexContainerAnnc personSensorAnnc; - - - public void setPersonSensorAnnc(PersonSensorFlexContainerAnnc personSensorAnnc) { - this.personSensorAnnc = personSensorAnnc; - getFlexContainerOrContainerOrSubscription().add(personSensorAnnc); - } - - public PersonSensorFlexContainerAnnc getPersonSensorAnnc() { - this.personSensorAnnc = (PersonSensorFlexContainerAnnc) getResourceByName(PersonSensorFlexContainerAnnc.SHORT_NAME); - return personSensorAnnc; - } - -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesDryerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesDryerFlexContainer.java new file mode 100644 index 00000000..f6c57159 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesDryerFlexContainer.java @@ -0,0 +1,115 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceClothesDryer + +A clothes dryer is a home appliance for drying clothes. This clothesDryer information model provides capabilities to control and monitor clothes dryer specific functions and resources. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceClothesDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceClothesDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceClothesDryerFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceClothesDryer"; + public static final String SHORT_NAME = "deCDr"; + + public DeviceClothesDryerFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceClothesDryerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getRunState(); + getClothesDryerJobMode(); + getClothesDryerOperationMode(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.clothesDryerJobMode != null) { + setClothesDryerJobMode(this.clothesDryerJobMode); + } + if (this.clothesDryerOperationMode != null) { + setClothesDryerOperationMode(this.clothesDryerOperationMode); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=ClothesDryerJobModeFlexContainer.SHORT_NAME, required=true, type=ClothesDryerJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesDryerJobModeFlexContainer clothesDryerJobMode; + + public void setClothesDryerJobMode(ClothesDryerJobModeFlexContainer clothesDryerJobMode) { + this.clothesDryerJobMode = clothesDryerJobMode; + getFlexContainerOrContainerOrSubscription().add(clothesDryerJobMode); + } + + public ClothesDryerJobModeFlexContainer getClothesDryerJobMode() { + this.clothesDryerJobMode = (ClothesDryerJobModeFlexContainer) getResourceByName(ClothesDryerJobModeFlexContainer.SHORT_NAME); + return clothesDryerJobMode; + } + + @XmlElement(name=OperationModeFlexContainer.SHORT_NAME, required=true, type=OperationModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OperationModeFlexContainer clothesDryerOperationMode; + + public void setClothesDryerOperationMode(OperationModeFlexContainer clothesDryerOperationMode) { + this.clothesDryerOperationMode = clothesDryerOperationMode; + getFlexContainerOrContainerOrSubscription().add(clothesDryerOperationMode); + } + + public OperationModeFlexContainer getClothesDryerOperationMode() { + this.clothesDryerOperationMode = (OperationModeFlexContainer) getResourceByName(OperationModeFlexContainer.SHORT_NAME); + return clothesDryerOperationMode; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesDryerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesDryerFlexContainerAnnc.java new file mode 100644 index 00000000..eb82930b --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesDryerFlexContainerAnnc.java @@ -0,0 +1,150 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceClothesDryerAnnc + +A clothes dryer is a home appliance for drying clothes. This clothesDryer information model provides capabilities to control and monitor clothes dryer specific functions and resources. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceClothesDryerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceClothesDryerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceClothesDryerFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceClothesDryerAnnc"; + public static final String SHORT_NAME = "deCDrAnnc"; + + public DeviceClothesDryerFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceClothesDryerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getRunState(); + getRunStateAnnc(); + getClothesDryerJobMode(); + getClothesDryerJobModeAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.clothesDryerJobMode != null) { + setClothesDryerJobMode(this.clothesDryerJobMode); + } + if (this.clothesDryerJobModeAnnc != null) { + setClothesDryerJobModeAnnc(this.clothesDryerJobModeAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=ClothesDryerJobModeFlexContainer.SHORT_NAME, required=true, type=ClothesDryerJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesDryerJobModeFlexContainer clothesDryerJobMode; + + public void setClothesDryerJobMode(ClothesDryerJobModeFlexContainer clothesDryerJobMode) { + this.clothesDryerJobMode = clothesDryerJobMode; + getFlexContainerOrContainerOrSubscription().add(clothesDryerJobMode); + } + + public ClothesDryerJobModeFlexContainer getClothesDryerJobMode() { + this.clothesDryerJobMode = (ClothesDryerJobModeFlexContainer) getResourceByName(ClothesDryerJobModeFlexContainer.SHORT_NAME); + return clothesDryerJobMode; + } + + @XmlElement(name=ClothesDryerJobModeFlexContainerAnnc.SHORT_NAME, required=true, type=ClothesDryerJobModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesDryerJobModeFlexContainerAnnc clothesDryerJobModeAnnc; + + public void setClothesDryerJobModeAnnc(ClothesDryerJobModeFlexContainerAnnc clothesDryerJobModeAnnc) { + this.clothesDryerJobModeAnnc = clothesDryerJobModeAnnc; + getFlexContainerOrContainerOrSubscription().add(clothesDryerJobModeAnnc); + } + + public ClothesDryerJobModeFlexContainerAnnc getClothesDryerJobModeAnnc() { + this.clothesDryerJobModeAnnc = (ClothesDryerJobModeFlexContainerAnnc) getResourceByName(ClothesDryerJobModeFlexContainerAnnc.SHORT_NAME); + return clothesDryerJobModeAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherDryerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherDryerFlexContainer.java new file mode 100644 index 00000000..27c8e515 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherDryerFlexContainer.java @@ -0,0 +1,166 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceClothesWasherDryer + +A clothes washer dryer is a home appliance that is a combination of cloth washer and cloth dryer in a single cabinet. This information model provides capabilities to interact with specific functions and resources of clothes washers and dryers. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceClothesWasherDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceClothesWasherDryerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceClothesWasherDryerFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceClothesWasherDryer"; + public static final String SHORT_NAME = "dCWDr"; + + public DeviceClothesWasherDryerFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceClothesWasherDryerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getClothesWasherDryerOperationMode(); + getRunState(); + getClothesWasherDryerJobMode(); + getClothesWasherJobModeOption(); + getRemoteControlEnable(); + getTimer(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.clothesWasherDryerOperationMode != null) { + setClothesWasherDryerOperationMode(this.clothesWasherDryerOperationMode); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.clothesWasherDryerJobMode != null) { + setClothesWasherDryerJobMode(this.clothesWasherDryerJobMode); + } + if (this.clothesWasherJobModeOption != null) { + setClothesWasherJobModeOption(this.clothesWasherJobModeOption); + } + if (this.remoteControlEnable != null) { + setRemoteControlEnable(this.remoteControlEnable); + } + if (this.timer != null) { + setTimer(this.timer); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=OperationModeFlexContainer.SHORT_NAME, required=true, type=OperationModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OperationModeFlexContainer clothesWasherDryerOperationMode; + + public void setClothesWasherDryerOperationMode(OperationModeFlexContainer clothesWasherDryerOperationMode) { + this.clothesWasherDryerOperationMode = clothesWasherDryerOperationMode; + getFlexContainerOrContainerOrSubscription().add(clothesWasherDryerOperationMode); + } + + public OperationModeFlexContainer getClothesWasherDryerOperationMode() { + this.clothesWasherDryerOperationMode = (OperationModeFlexContainer) getResourceByName(OperationModeFlexContainer.SHORT_NAME); + return clothesWasherDryerOperationMode; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=ClothesWasherDryerJobModeFlexContainer.SHORT_NAME, required=true, type=ClothesWasherDryerJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherDryerJobModeFlexContainer clothesWasherDryerJobMode; + + public void setClothesWasherDryerJobMode(ClothesWasherDryerJobModeFlexContainer clothesWasherDryerJobMode) { + this.clothesWasherDryerJobMode = clothesWasherDryerJobMode; + getFlexContainerOrContainerOrSubscription().add(clothesWasherDryerJobMode); + } + + public ClothesWasherDryerJobModeFlexContainer getClothesWasherDryerJobMode() { + this.clothesWasherDryerJobMode = (ClothesWasherDryerJobModeFlexContainer) getResourceByName(ClothesWasherDryerJobModeFlexContainer.SHORT_NAME); + return clothesWasherDryerJobMode; + } + + @XmlElement(name=ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, required=true, type=ClothesWasherJobModeOptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherJobModeOptionFlexContainer clothesWasherJobModeOption; + + public void setClothesWasherJobModeOption(ClothesWasherJobModeOptionFlexContainer clothesWasherJobModeOption) { + this.clothesWasherJobModeOption = clothesWasherJobModeOption; + getFlexContainerOrContainerOrSubscription().add(clothesWasherJobModeOption); + } + + public ClothesWasherJobModeOptionFlexContainer getClothesWasherJobModeOption() { + this.clothesWasherJobModeOption = (ClothesWasherJobModeOptionFlexContainer) getResourceByName(ClothesWasherJobModeOptionFlexContainer.SHORT_NAME); + return clothesWasherJobModeOption; + } + + @XmlElement(name=RemoteControlEnableFlexContainer.SHORT_NAME, required=true, type=RemoteControlEnableFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RemoteControlEnableFlexContainer remoteControlEnable; + + public void setRemoteControlEnable(RemoteControlEnableFlexContainer remoteControlEnable) { + this.remoteControlEnable = remoteControlEnable; + getFlexContainerOrContainerOrSubscription().add(remoteControlEnable); + } + + public RemoteControlEnableFlexContainer getRemoteControlEnable() { + this.remoteControlEnable = (RemoteControlEnableFlexContainer) getResourceByName(RemoteControlEnableFlexContainer.SHORT_NAME); + return remoteControlEnable; + } + + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer timer; + + public void setTimer(TimerFlexContainer timer) { + this.timer = timer; + getFlexContainerOrContainerOrSubscription().add(timer); + } + + public TimerFlexContainer getTimer() { + this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return timer; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherDryerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherDryerFlexContainerAnnc.java new file mode 100644 index 00000000..e4fe7e33 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherDryerFlexContainerAnnc.java @@ -0,0 +1,252 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceClothesWasherDryerAnnc + +A clothes washer dryer is a home appliance that is a combination of cloth washer and cloth dryer in a single cabinet. This information model provides capabilities to interact with specific functions and resources of clothes washers and dryers. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceClothesWasherDryerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceClothesWasherDryerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceClothesWasherDryerFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceClothesWasherDryerAnnc"; + public static final String SHORT_NAME = "dCWDrAnnc"; + + public DeviceClothesWasherDryerFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceClothesWasherDryerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getRunState(); + getRunStateAnnc(); + getClothesWasherDryerJobMode(); + getClothesWasherDryerJobModeAnnc(); + getClothesWasherJobModeOption(); + getClothesWasherJobModeOptionAnnc(); + getRemoteControlEnable(); + getRemoteControlEnableAnnc(); + getTimer(); + getTimerAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.clothesWasherDryerJobMode != null) { + setClothesWasherDryerJobMode(this.clothesWasherDryerJobMode); + } + if (this.clothesWasherDryerJobModeAnnc != null) { + setClothesWasherDryerJobModeAnnc(this.clothesWasherDryerJobModeAnnc); + } + if (this.clothesWasherJobModeOption != null) { + setClothesWasherJobModeOption(this.clothesWasherJobModeOption); + } + if (this.clothesWasherJobModeOptionAnnc != null) { + setClothesWasherJobModeOptionAnnc(this.clothesWasherJobModeOptionAnnc); + } + if (this.remoteControlEnable != null) { + setRemoteControlEnable(this.remoteControlEnable); + } + if (this.remoteControlEnableAnnc != null) { + setRemoteControlEnableAnnc(this.remoteControlEnableAnnc); + } + if (this.timer != null) { + setTimer(this.timer); + } + if (this.timerAnnc != null) { + setTimerAnnc(this.timerAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=ClothesWasherDryerJobModeFlexContainer.SHORT_NAME, required=true, type=ClothesWasherDryerJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherDryerJobModeFlexContainer clothesWasherDryerJobMode; + + public void setClothesWasherDryerJobMode(ClothesWasherDryerJobModeFlexContainer clothesWasherDryerJobMode) { + this.clothesWasherDryerJobMode = clothesWasherDryerJobMode; + getFlexContainerOrContainerOrSubscription().add(clothesWasherDryerJobMode); + } + + public ClothesWasherDryerJobModeFlexContainer getClothesWasherDryerJobMode() { + this.clothesWasherDryerJobMode = (ClothesWasherDryerJobModeFlexContainer) getResourceByName(ClothesWasherDryerJobModeFlexContainer.SHORT_NAME); + return clothesWasherDryerJobMode; + } + + @XmlElement(name=ClothesWasherDryerJobModeFlexContainerAnnc.SHORT_NAME, required=true, type=ClothesWasherDryerJobModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherDryerJobModeFlexContainerAnnc clothesWasherDryerJobModeAnnc; + + public void setClothesWasherDryerJobModeAnnc(ClothesWasherDryerJobModeFlexContainerAnnc clothesWasherDryerJobModeAnnc) { + this.clothesWasherDryerJobModeAnnc = clothesWasherDryerJobModeAnnc; + getFlexContainerOrContainerOrSubscription().add(clothesWasherDryerJobModeAnnc); + } + + public ClothesWasherDryerJobModeFlexContainerAnnc getClothesWasherDryerJobModeAnnc() { + this.clothesWasherDryerJobModeAnnc = (ClothesWasherDryerJobModeFlexContainerAnnc) getResourceByName(ClothesWasherDryerJobModeFlexContainerAnnc.SHORT_NAME); + return clothesWasherDryerJobModeAnnc; + } + + @XmlElement(name=ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, required=true, type=ClothesWasherJobModeOptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherJobModeOptionFlexContainer clothesWasherJobModeOption; + + public void setClothesWasherJobModeOption(ClothesWasherJobModeOptionFlexContainer clothesWasherJobModeOption) { + this.clothesWasherJobModeOption = clothesWasherJobModeOption; + getFlexContainerOrContainerOrSubscription().add(clothesWasherJobModeOption); + } + + public ClothesWasherJobModeOptionFlexContainer getClothesWasherJobModeOption() { + this.clothesWasherJobModeOption = (ClothesWasherJobModeOptionFlexContainer) getResourceByName(ClothesWasherJobModeOptionFlexContainer.SHORT_NAME); + return clothesWasherJobModeOption; + } + + @XmlElement(name=ClothesWasherJobModeOptionFlexContainerAnnc.SHORT_NAME, required=true, type=ClothesWasherJobModeOptionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherJobModeOptionFlexContainerAnnc clothesWasherJobModeOptionAnnc; + + public void setClothesWasherJobModeOptionAnnc(ClothesWasherJobModeOptionFlexContainerAnnc clothesWasherJobModeOptionAnnc) { + this.clothesWasherJobModeOptionAnnc = clothesWasherJobModeOptionAnnc; + getFlexContainerOrContainerOrSubscription().add(clothesWasherJobModeOptionAnnc); + } + + public ClothesWasherJobModeOptionFlexContainerAnnc getClothesWasherJobModeOptionAnnc() { + this.clothesWasherJobModeOptionAnnc = (ClothesWasherJobModeOptionFlexContainerAnnc) getResourceByName(ClothesWasherJobModeOptionFlexContainerAnnc.SHORT_NAME); + return clothesWasherJobModeOptionAnnc; + } + + @XmlElement(name=RemoteControlEnableFlexContainer.SHORT_NAME, required=true, type=RemoteControlEnableFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RemoteControlEnableFlexContainer remoteControlEnable; + + public void setRemoteControlEnable(RemoteControlEnableFlexContainer remoteControlEnable) { + this.remoteControlEnable = remoteControlEnable; + getFlexContainerOrContainerOrSubscription().add(remoteControlEnable); + } + + public RemoteControlEnableFlexContainer getRemoteControlEnable() { + this.remoteControlEnable = (RemoteControlEnableFlexContainer) getResourceByName(RemoteControlEnableFlexContainer.SHORT_NAME); + return remoteControlEnable; + } + + @XmlElement(name=RemoteControlEnableFlexContainerAnnc.SHORT_NAME, required=true, type=RemoteControlEnableFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RemoteControlEnableFlexContainerAnnc remoteControlEnableAnnc; + + public void setRemoteControlEnableAnnc(RemoteControlEnableFlexContainerAnnc remoteControlEnableAnnc) { + this.remoteControlEnableAnnc = remoteControlEnableAnnc; + getFlexContainerOrContainerOrSubscription().add(remoteControlEnableAnnc); + } + + public RemoteControlEnableFlexContainerAnnc getRemoteControlEnableAnnc() { + this.remoteControlEnableAnnc = (RemoteControlEnableFlexContainerAnnc) getResourceByName(RemoteControlEnableFlexContainerAnnc.SHORT_NAME); + return remoteControlEnableAnnc; + } + + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer timer; + + public void setTimer(TimerFlexContainer timer) { + this.timer = timer; + getFlexContainerOrContainerOrSubscription().add(timer); + } + + public TimerFlexContainer getTimer() { + this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return timer; + } + + @XmlElement(name=TimerFlexContainerAnnc.SHORT_NAME, required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainerAnnc timerAnnc; + + public void setTimerAnnc(TimerFlexContainerAnnc timerAnnc) { + this.timerAnnc = timerAnnc; + getFlexContainerOrContainerOrSubscription().add(timerAnnc); + } + + public TimerFlexContainerAnnc getTimerAnnc() { + this.timerAnnc = (TimerFlexContainerAnnc) getResourceByName(TimerFlexContainerAnnc.SHORT_NAME); + return timerAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherFlexContainer.java index 71f70762..47767a29 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceClothesWasher A clothes washer is a home appliance that is used to wash laundry, such as clothing and sheets. This information model provides capabilities to interact with specific functions and resources of clothes washers. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceClothesWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,48 +38,43 @@ public class DeviceClothesWasherFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getBinarySwitch(); + getClothesWasherOperationMode(); + getRunState(); + getClothesWasherJobMode(); + getClothesWasherJobModeOption(); + getRemoteControlEnable(); getTimer(); - getRunMode(); - getTemperature(); - getWaterLevel(); - getRinseLevel(); - getWaterFlow(); - getSpinLevel(); } public void finalizeDeserialization() { if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } - if (this.timer != null) { - setTimer(this.timer); - } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.clothesWasherOperationMode != null) { + setClothesWasherOperationMode(this.clothesWasherOperationMode); } - if (this.temperature != null) { - setTemperature(this.temperature); + if (this.runState != null) { + setRunState(this.runState); } - if (this.waterLevel != null) { - setWaterLevel(this.waterLevel); + if (this.clothesWasherJobMode != null) { + setClothesWasherJobMode(this.clothesWasherJobMode); } - if (this.rinseLevel != null) { - setRinseLevel(this.rinseLevel); + if (this.clothesWasherJobModeOption != null) { + setClothesWasherJobModeOption(this.clothesWasherJobModeOption); } - if (this.waterFlow != null) { - setWaterFlow(this.waterFlow); + if (this.remoteControlEnable != null) { + setRemoteControlEnable(this.remoteControlEnable); } - if (this.spinLevel != null) { - setSpinLevel(this.spinLevel); + if (this.timer != null) { + setTimer(this.timer); } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -91,102 +85,82 @@ public class DeviceClothesWasherFlexContainer extends AbstractFlexContainer { return binarySwitch; } - @XmlElement(name="timer", required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TimerFlexContainer timer; - - - public void setTimer(TimerFlexContainer timer) { - this.timer = timer; - getFlexContainerOrContainerOrSubscription().add(timer); + @XmlElement(name=OperationModeFlexContainer.SHORT_NAME, required=true, type=OperationModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OperationModeFlexContainer clothesWasherOperationMode; + + public void setClothesWasherOperationMode(OperationModeFlexContainer clothesWasherOperationMode) { + this.clothesWasherOperationMode = clothesWasherOperationMode; + getFlexContainerOrContainerOrSubscription().add(clothesWasherOperationMode); } - public TimerFlexContainer getTimer() { - this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); - return timer; + public OperationModeFlexContainer getClothesWasherOperationMode() { + this.clothesWasherOperationMode = (OperationModeFlexContainer) getResourceByName(OperationModeFlexContainer.SHORT_NAME); + return clothesWasherOperationMode; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TemperatureFlexContainer temperature; - - - public void setTemperature(TemperatureFlexContainer temperature) { - this.temperature = temperature; - getFlexContainerOrContainerOrSubscription().add(temperature); + @XmlElement(name=ClothesWasherJobModeFlexContainer.SHORT_NAME, required=true, type=ClothesWasherJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherJobModeFlexContainer clothesWasherJobMode; + + public void setClothesWasherJobMode(ClothesWasherJobModeFlexContainer clothesWasherJobMode) { + this.clothesWasherJobMode = clothesWasherJobMode; + getFlexContainerOrContainerOrSubscription().add(clothesWasherJobMode); } - public TemperatureFlexContainer getTemperature() { - this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); - return temperature; + public ClothesWasherJobModeFlexContainer getClothesWasherJobMode() { + this.clothesWasherJobMode = (ClothesWasherJobModeFlexContainer) getResourceByName(ClothesWasherJobModeFlexContainer.SHORT_NAME); + return clothesWasherJobMode; } - @XmlElement(name="watLl", required=true, type=WaterLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private WaterLevelFlexContainer waterLevel; - - - public void setWaterLevel(WaterLevelFlexContainer waterLevel) { - this.waterLevel = waterLevel; - getFlexContainerOrContainerOrSubscription().add(waterLevel); + @XmlElement(name=ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, required=true, type=ClothesWasherJobModeOptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherJobModeOptionFlexContainer clothesWasherJobModeOption; + + public void setClothesWasherJobModeOption(ClothesWasherJobModeOptionFlexContainer clothesWasherJobModeOption) { + this.clothesWasherJobModeOption = clothesWasherJobModeOption; + getFlexContainerOrContainerOrSubscription().add(clothesWasherJobModeOption); } - public WaterLevelFlexContainer getWaterLevel() { - this.waterLevel = (WaterLevelFlexContainer) getResourceByName(WaterLevelFlexContainer.SHORT_NAME); - return waterLevel; + public ClothesWasherJobModeOptionFlexContainer getClothesWasherJobModeOption() { + this.clothesWasherJobModeOption = (ClothesWasherJobModeOptionFlexContainer) getResourceByName(ClothesWasherJobModeOptionFlexContainer.SHORT_NAME); + return clothesWasherJobModeOption; } - @XmlElement(name="rinLl", required=true, type=RinseLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RinseLevelFlexContainer rinseLevel; - - - public void setRinseLevel(RinseLevelFlexContainer rinseLevel) { - this.rinseLevel = rinseLevel; - getFlexContainerOrContainerOrSubscription().add(rinseLevel); + @XmlElement(name=RemoteControlEnableFlexContainer.SHORT_NAME, required=true, type=RemoteControlEnableFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RemoteControlEnableFlexContainer remoteControlEnable; + + public void setRemoteControlEnable(RemoteControlEnableFlexContainer remoteControlEnable) { + this.remoteControlEnable = remoteControlEnable; + getFlexContainerOrContainerOrSubscription().add(remoteControlEnable); } - public RinseLevelFlexContainer getRinseLevel() { - this.rinseLevel = (RinseLevelFlexContainer) getResourceByName(RinseLevelFlexContainer.SHORT_NAME); - return rinseLevel; + public RemoteControlEnableFlexContainer getRemoteControlEnable() { + this.remoteControlEnable = (RemoteControlEnableFlexContainer) getResourceByName(RemoteControlEnableFlexContainer.SHORT_NAME); + return remoteControlEnable; } - @XmlElement(name="watFw", required=true, type=WaterFlowFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private WaterFlowFlexContainer waterFlow; - - - public void setWaterFlow(WaterFlowFlexContainer waterFlow) { - this.waterFlow = waterFlow; - getFlexContainerOrContainerOrSubscription().add(waterFlow); - } - - public WaterFlowFlexContainer getWaterFlow() { - this.waterFlow = (WaterFlowFlexContainer) getResourceByName(WaterFlowFlexContainer.SHORT_NAME); - return waterFlow; - } - - @XmlElement(name="spiLl", required=true, type=SpinLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private SpinLevelFlexContainer spinLevel; - - - public void setSpinLevel(SpinLevelFlexContainer spinLevel) { - this.spinLevel = spinLevel; - getFlexContainerOrContainerOrSubscription().add(spinLevel); + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer timer; + + public void setTimer(TimerFlexContainer timer) { + this.timer = timer; + getFlexContainerOrContainerOrSubscription().add(timer); } - public SpinLevelFlexContainer getSpinLevel() { - this.spinLevel = (SpinLevelFlexContainer) getResourceByName(SpinLevelFlexContainer.SHORT_NAME); - return spinLevel; + public TimerFlexContainer getTimer() { + this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return timer; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherFlexContainerAnnc.java index a7909288..eda78b37 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceClothesWasherFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceClothesWasherAnnc A clothes washer is a home appliance that is used to wash laundry, such as clothing and sheets. This information model provides capabilities to interact with specific functions and resources of clothes washers. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceClothesWasherFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceClothesWasherFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,26 +37,22 @@ public class DeviceClothesWasherFlexContainerAnnc extends AbstractFlexContainerA setContainerDefinition("org.onem2m.home.device." + DeviceClothesWasherFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getBinarySwitch(); getBinarySwitchAnnc(); + getRunState(); + getRunStateAnnc(); + getClothesWasherJobMode(); + getClothesWasherJobModeAnnc(); + getClothesWasherJobModeOption(); + getClothesWasherJobModeOptionAnnc(); + getRemoteControlEnable(); + getRemoteControlEnableAnnc(); getTimer(); getTimerAnnc(); - getRunMode(); - getRunModeAnnc(); - getTemperature(); - getTemperatureAnnc(); - getWaterLevel(); - getWaterLevelAnnc(); - getRinseLevel(); - getRinseLevelAnnc(); - getWaterFlow(); - getWaterFlowAnnc(); - getSpinLevel(); - getSpinLevelAnnc(); - } + } public void finalizeDeserialization() { if (this.binarySwitch != null) { @@ -64,63 +60,42 @@ public class DeviceClothesWasherFlexContainerAnnc extends AbstractFlexContainerA } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - if (this.timer != null) { - setTimer(this.timer); } - if (this.timerAnnc != null) { - setTimerAnnc(this.timerAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - - if (this.temperature != null) { - setTemperature(this.temperature); + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); } - if (this.temperatureAnnc != null) { - setTemperatureAnnc(this.temperatureAnnc); - } - - if (this.waterLevel != null) { - setWaterLevel(this.waterLevel); + if (this.clothesWasherJobMode != null) { + setClothesWasherJobMode(this.clothesWasherJobMode); } - if (this.waterLevelAnnc != null) { - setWaterLevelAnnc(this.waterLevelAnnc); - } - - if (this.rinseLevel != null) { - setRinseLevel(this.rinseLevel); + if (this.clothesWasherJobModeAnnc != null) { + setClothesWasherJobModeAnnc(this.clothesWasherJobModeAnnc); } - if (this.rinseLevelAnnc != null) { - setRinseLevelAnnc(this.rinseLevelAnnc); - } - - if (this.waterFlow != null) { - setWaterFlow(this.waterFlow); + if (this.clothesWasherJobModeOption != null) { + setClothesWasherJobModeOption(this.clothesWasherJobModeOption); } - if (this.waterFlowAnnc != null) { - setWaterFlowAnnc(this.waterFlowAnnc); - } - - if (this.spinLevel != null) { - setSpinLevel(this.spinLevel); + if (this.clothesWasherJobModeOptionAnnc != null) { + setClothesWasherJobModeOptionAnnc(this.clothesWasherJobModeOptionAnnc); + } + if (this.remoteControlEnable != null) { + setRemoteControlEnable(this.remoteControlEnable); + } + if (this.remoteControlEnableAnnc != null) { + setRemoteControlEnableAnnc(this.remoteControlEnableAnnc); + } + if (this.timer != null) { + setTimer(this.timer); + } + if (this.timerAnnc != null) { + setTimerAnnc(this.timerAnnc); } - if (this.spinLevelAnnc != null) { - setSpinLevelAnnc(this.spinLevelAnnc); - } - } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -131,10 +106,9 @@ public class DeviceClothesWasherFlexContainerAnnc extends AbstractFlexContainerA return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -145,200 +119,134 @@ public class DeviceClothesWasherFlexContainerAnnc extends AbstractFlexContainerA return binarySwitchAnnc; } - @XmlElement(name="timer", required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TimerFlexContainer timer; - - - public void setTimer(TimerFlexContainer timer) { - this.timer = timer; - getFlexContainerOrContainerOrSubscription().add(timer); - } - - public TimerFlexContainer getTimer() { - this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); - return timer; - } - - @XmlElement(name="timerAnnc", required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TimerFlexContainerAnnc timerAnnc; - - - public void setTimerAnnc(TimerFlexContainerAnnc timerAnnc) { - this.timerAnnc = timerAnnc; - getFlexContainerOrContainerOrSubscription().add(timerAnnc); - } - - public TimerFlexContainerAnnc getTimerAnnc() { - this.timerAnnc = (TimerFlexContainerAnnc) getResourceByName(TimerFlexContainerAnnc.SHORT_NAME); - return timerAnnc; - } - - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); - } - - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; - } - - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; - - - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); - } - - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; - } - - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TemperatureFlexContainer temperature; - - - public void setTemperature(TemperatureFlexContainer temperature) { - this.temperature = temperature; - getFlexContainerOrContainerOrSubscription().add(temperature); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public TemperatureFlexContainer getTemperature() { - this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); - return temperature; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="tempeAnnc", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TemperatureFlexContainerAnnc temperatureAnnc; - - - public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { - this.temperatureAnnc = temperatureAnnc; - getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public TemperatureFlexContainerAnnc getTemperatureAnnc() { - this.temperatureAnnc = (TemperatureFlexContainerAnnc) getResourceByName(TemperatureFlexContainerAnnc.SHORT_NAME); - return temperatureAnnc; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="watLl", required=true, type=WaterLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private WaterLevelFlexContainer waterLevel; - - - public void setWaterLevel(WaterLevelFlexContainer waterLevel) { - this.waterLevel = waterLevel; - getFlexContainerOrContainerOrSubscription().add(waterLevel); + @XmlElement(name=ClothesWasherJobModeFlexContainer.SHORT_NAME, required=true, type=ClothesWasherJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherJobModeFlexContainer clothesWasherJobMode; + + public void setClothesWasherJobMode(ClothesWasherJobModeFlexContainer clothesWasherJobMode) { + this.clothesWasherJobMode = clothesWasherJobMode; + getFlexContainerOrContainerOrSubscription().add(clothesWasherJobMode); } - public WaterLevelFlexContainer getWaterLevel() { - this.waterLevel = (WaterLevelFlexContainer) getResourceByName(WaterLevelFlexContainer.SHORT_NAME); - return waterLevel; + public ClothesWasherJobModeFlexContainer getClothesWasherJobMode() { + this.clothesWasherJobMode = (ClothesWasherJobModeFlexContainer) getResourceByName(ClothesWasherJobModeFlexContainer.SHORT_NAME); + return clothesWasherJobMode; } - @XmlElement(name="watLlAnnc", required=true, type=WaterLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private WaterLevelFlexContainerAnnc waterLevelAnnc; - - - public void setWaterLevelAnnc(WaterLevelFlexContainerAnnc waterLevelAnnc) { - this.waterLevelAnnc = waterLevelAnnc; - getFlexContainerOrContainerOrSubscription().add(waterLevelAnnc); + @XmlElement(name=ClothesWasherJobModeFlexContainerAnnc.SHORT_NAME, required=true, type=ClothesWasherJobModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherJobModeFlexContainerAnnc clothesWasherJobModeAnnc; + + public void setClothesWasherJobModeAnnc(ClothesWasherJobModeFlexContainerAnnc clothesWasherJobModeAnnc) { + this.clothesWasherJobModeAnnc = clothesWasherJobModeAnnc; + getFlexContainerOrContainerOrSubscription().add(clothesWasherJobModeAnnc); } - public WaterLevelFlexContainerAnnc getWaterLevelAnnc() { - this.waterLevelAnnc = (WaterLevelFlexContainerAnnc) getResourceByName(WaterLevelFlexContainerAnnc.SHORT_NAME); - return waterLevelAnnc; + public ClothesWasherJobModeFlexContainerAnnc getClothesWasherJobModeAnnc() { + this.clothesWasherJobModeAnnc = (ClothesWasherJobModeFlexContainerAnnc) getResourceByName(ClothesWasherJobModeFlexContainerAnnc.SHORT_NAME); + return clothesWasherJobModeAnnc; } - @XmlElement(name="rinLl", required=true, type=RinseLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RinseLevelFlexContainer rinseLevel; - - - public void setRinseLevel(RinseLevelFlexContainer rinseLevel) { - this.rinseLevel = rinseLevel; - getFlexContainerOrContainerOrSubscription().add(rinseLevel); + @XmlElement(name=ClothesWasherJobModeOptionFlexContainer.SHORT_NAME, required=true, type=ClothesWasherJobModeOptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherJobModeOptionFlexContainer clothesWasherJobModeOption; + + public void setClothesWasherJobModeOption(ClothesWasherJobModeOptionFlexContainer clothesWasherJobModeOption) { + this.clothesWasherJobModeOption = clothesWasherJobModeOption; + getFlexContainerOrContainerOrSubscription().add(clothesWasherJobModeOption); } - public RinseLevelFlexContainer getRinseLevel() { - this.rinseLevel = (RinseLevelFlexContainer) getResourceByName(RinseLevelFlexContainer.SHORT_NAME); - return rinseLevel; + public ClothesWasherJobModeOptionFlexContainer getClothesWasherJobModeOption() { + this.clothesWasherJobModeOption = (ClothesWasherJobModeOptionFlexContainer) getResourceByName(ClothesWasherJobModeOptionFlexContainer.SHORT_NAME); + return clothesWasherJobModeOption; } - @XmlElement(name="rinLlAnnc", required=true, type=RinseLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RinseLevelFlexContainerAnnc rinseLevelAnnc; - - - public void setRinseLevelAnnc(RinseLevelFlexContainerAnnc rinseLevelAnnc) { - this.rinseLevelAnnc = rinseLevelAnnc; - getFlexContainerOrContainerOrSubscription().add(rinseLevelAnnc); + @XmlElement(name=ClothesWasherJobModeOptionFlexContainerAnnc.SHORT_NAME, required=true, type=ClothesWasherJobModeOptionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ClothesWasherJobModeOptionFlexContainerAnnc clothesWasherJobModeOptionAnnc; + + public void setClothesWasherJobModeOptionAnnc(ClothesWasherJobModeOptionFlexContainerAnnc clothesWasherJobModeOptionAnnc) { + this.clothesWasherJobModeOptionAnnc = clothesWasherJobModeOptionAnnc; + getFlexContainerOrContainerOrSubscription().add(clothesWasherJobModeOptionAnnc); } - public RinseLevelFlexContainerAnnc getRinseLevelAnnc() { - this.rinseLevelAnnc = (RinseLevelFlexContainerAnnc) getResourceByName(RinseLevelFlexContainerAnnc.SHORT_NAME); - return rinseLevelAnnc; + public ClothesWasherJobModeOptionFlexContainerAnnc getClothesWasherJobModeOptionAnnc() { + this.clothesWasherJobModeOptionAnnc = (ClothesWasherJobModeOptionFlexContainerAnnc) getResourceByName(ClothesWasherJobModeOptionFlexContainerAnnc.SHORT_NAME); + return clothesWasherJobModeOptionAnnc; } - @XmlElement(name="watFw", required=true, type=WaterFlowFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private WaterFlowFlexContainer waterFlow; - - - public void setWaterFlow(WaterFlowFlexContainer waterFlow) { - this.waterFlow = waterFlow; - getFlexContainerOrContainerOrSubscription().add(waterFlow); + @XmlElement(name=RemoteControlEnableFlexContainer.SHORT_NAME, required=true, type=RemoteControlEnableFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RemoteControlEnableFlexContainer remoteControlEnable; + + public void setRemoteControlEnable(RemoteControlEnableFlexContainer remoteControlEnable) { + this.remoteControlEnable = remoteControlEnable; + getFlexContainerOrContainerOrSubscription().add(remoteControlEnable); } - public WaterFlowFlexContainer getWaterFlow() { - this.waterFlow = (WaterFlowFlexContainer) getResourceByName(WaterFlowFlexContainer.SHORT_NAME); - return waterFlow; + public RemoteControlEnableFlexContainer getRemoteControlEnable() { + this.remoteControlEnable = (RemoteControlEnableFlexContainer) getResourceByName(RemoteControlEnableFlexContainer.SHORT_NAME); + return remoteControlEnable; } - @XmlElement(name="watFwAnnc", required=true, type=WaterFlowFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private WaterFlowFlexContainerAnnc waterFlowAnnc; - - - public void setWaterFlowAnnc(WaterFlowFlexContainerAnnc waterFlowAnnc) { - this.waterFlowAnnc = waterFlowAnnc; - getFlexContainerOrContainerOrSubscription().add(waterFlowAnnc); + @XmlElement(name=RemoteControlEnableFlexContainerAnnc.SHORT_NAME, required=true, type=RemoteControlEnableFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RemoteControlEnableFlexContainerAnnc remoteControlEnableAnnc; + + public void setRemoteControlEnableAnnc(RemoteControlEnableFlexContainerAnnc remoteControlEnableAnnc) { + this.remoteControlEnableAnnc = remoteControlEnableAnnc; + getFlexContainerOrContainerOrSubscription().add(remoteControlEnableAnnc); } - public WaterFlowFlexContainerAnnc getWaterFlowAnnc() { - this.waterFlowAnnc = (WaterFlowFlexContainerAnnc) getResourceByName(WaterFlowFlexContainerAnnc.SHORT_NAME); - return waterFlowAnnc; + public RemoteControlEnableFlexContainerAnnc getRemoteControlEnableAnnc() { + this.remoteControlEnableAnnc = (RemoteControlEnableFlexContainerAnnc) getResourceByName(RemoteControlEnableFlexContainerAnnc.SHORT_NAME); + return remoteControlEnableAnnc; } - @XmlElement(name="spiLl", required=true, type=SpinLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private SpinLevelFlexContainer spinLevel; - - - public void setSpinLevel(SpinLevelFlexContainer spinLevel) { - this.spinLevel = spinLevel; - getFlexContainerOrContainerOrSubscription().add(spinLevel); + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer timer; + + public void setTimer(TimerFlexContainer timer) { + this.timer = timer; + getFlexContainerOrContainerOrSubscription().add(timer); } - public SpinLevelFlexContainer getSpinLevel() { - this.spinLevel = (SpinLevelFlexContainer) getResourceByName(SpinLevelFlexContainer.SHORT_NAME); - return spinLevel; + public TimerFlexContainer getTimer() { + this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return timer; } - @XmlElement(name="spiLlAnnc", required=true, type=SpinLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private SpinLevelFlexContainerAnnc spinLevelAnnc; - - - public void setSpinLevelAnnc(SpinLevelFlexContainerAnnc spinLevelAnnc) { - this.spinLevelAnnc = spinLevelAnnc; - getFlexContainerOrContainerOrSubscription().add(spinLevelAnnc); + @XmlElement(name=TimerFlexContainerAnnc.SHORT_NAME, required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainerAnnc timerAnnc; + + public void setTimerAnnc(TimerFlexContainerAnnc timerAnnc) { + this.timerAnnc = timerAnnc; + getFlexContainerOrContainerOrSubscription().add(timerAnnc); } - public SpinLevelFlexContainerAnnc getSpinLevelAnnc() { - this.spinLevelAnnc = (SpinLevelFlexContainerAnnc) getResourceByName(SpinLevelFlexContainerAnnc.SHORT_NAME); - return spinLevelAnnc; + public TimerFlexContainerAnnc getTimerAnnc() { + this.timerAnnc = (TimerFlexContainerAnnc) getResourceByName(TimerFlexContainerAnnc.SHORT_NAME); + return timerAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCoffeeMachineFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCoffeeMachineFlexContainer.java index 7ed49b5a..6c9074a7 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCoffeeMachineFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCoffeeMachineFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceCoffeeMachine -A CoffeeMachine is a device that produces coffee. +A coffee machine is a device that is used to brew a coffee, may add foamed milk, and may include some variants, for example a grinder. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceCoffeeMachineFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,27 +38,26 @@ public class DeviceCoffeeMachineFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getFaultDetection(); - getRunMode(); + getRunState(); getClock(); getBrewing(); getWaterStatus(); getMilkStatus(); - getBeansStatus(); getGrinder(); - getFoamedMilk(); + getMilkFoaming(); getMilkQuantity(); - getKeepWarm(); getBrewingSwitch(); + getKeepWarm(); } public void finalizeDeserialization() { if (this.faultDetection != null) { setFaultDetection(this.faultDetection); } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); } if (this.clock != null) { setClock(this.clock); @@ -73,30 +71,26 @@ public class DeviceCoffeeMachineFlexContainer extends AbstractFlexContainer { if (this.milkStatus != null) { setMilkStatus(this.milkStatus); } - if (this.beansStatus != null) { - setBeansStatus(this.beansStatus); - } if (this.grinder != null) { setGrinder(this.grinder); } - if (this.foamedMilk != null) { - setFoamedMilk(this.foamedMilk); + if (this.milkFoaming != null) { + setMilkFoaming(this.milkFoaming); } if (this.milkQuantity != null) { setMilkQuantity(this.milkQuantity); } - if (this.keepWarm != null) { - setKeepWarm(this.keepWarm); - } if (this.brewingSwitch != null) { setBrewingSwitch(this.brewingSwitch); } + if (this.keepWarm != null) { + setKeepWarm(this.keepWarm); + } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -107,24 +101,22 @@ public class DeviceCoffeeMachineFlexContainer extends AbstractFlexContainer { return faultDetection; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="clock", required=true, type=ClockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ClockFlexContainer.SHORT_NAME, required=true, type=ClockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ClockFlexContainer clock; - - + public void setClock(ClockFlexContainer clock) { this.clock = clock; getFlexContainerOrContainerOrSubscription().add(clock); @@ -135,10 +127,9 @@ public class DeviceCoffeeMachineFlexContainer extends AbstractFlexContainer { return clock; } - @XmlElement(name="brewg", required=true, type=BrewingFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BrewingFlexContainer.SHORT_NAME, required=true, type=BrewingFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BrewingFlexContainer brewing; - - + public void setBrewing(BrewingFlexContainer brewing) { this.brewing = brewing; getFlexContainerOrContainerOrSubscription().add(brewing); @@ -149,52 +140,35 @@ public class DeviceCoffeeMachineFlexContainer extends AbstractFlexContainer { return brewing; } - @XmlElement(name="watSs", required=true, type=LiquidLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainer waterStatus; - - - public void setWaterStatus(LiquidLevelFlexContainer waterStatus) { + @XmlElement(name=LiquidRemainingFlexContainer.SHORT_NAME, required=true, type=LiquidRemainingFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private LiquidRemainingFlexContainer waterStatus; + + public void setWaterStatus(LiquidRemainingFlexContainer waterStatus) { this.waterStatus = waterStatus; getFlexContainerOrContainerOrSubscription().add(waterStatus); } - public LiquidLevelFlexContainer getWaterStatus() { - this.waterStatus = (LiquidLevelFlexContainer) getResourceByName(LiquidLevelFlexContainer.SHORT_NAME); + public LiquidRemainingFlexContainer getWaterStatus() { + this.waterStatus = (LiquidRemainingFlexContainer) getResourceByName(LiquidRemainingFlexContainer.SHORT_NAME); return waterStatus; } - @XmlElement(name="milSs", required=true, type=LiquidLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainer milkStatus; - - - public void setMilkStatus(LiquidLevelFlexContainer milkStatus) { + @XmlElement(name=LiquidRemainingFlexContainer.SHORT_NAME, required=true, type=LiquidRemainingFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private LiquidRemainingFlexContainer milkStatus; + + public void setMilkStatus(LiquidRemainingFlexContainer milkStatus) { this.milkStatus = milkStatus; getFlexContainerOrContainerOrSubscription().add(milkStatus); } - public LiquidLevelFlexContainer getMilkStatus() { - this.milkStatus = (LiquidLevelFlexContainer) getResourceByName(LiquidLevelFlexContainer.SHORT_NAME); + public LiquidRemainingFlexContainer getMilkStatus() { + this.milkStatus = (LiquidRemainingFlexContainer) getResourceByName(LiquidRemainingFlexContainer.SHORT_NAME); return milkStatus; } - @XmlElement(name="beaSs", required=true, type=LiquidLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainer beansStatus; - - - public void setBeansStatus(LiquidLevelFlexContainer beansStatus) { - this.beansStatus = beansStatus; - getFlexContainerOrContainerOrSubscription().add(beansStatus); - } - - public LiquidLevelFlexContainer getBeansStatus() { - this.beansStatus = (LiquidLevelFlexContainer) getResourceByName(LiquidLevelFlexContainer.SHORT_NAME); - return beansStatus; - } - - @XmlElement(name="grinr", required=true, type=GrinderFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=GrinderFlexContainer.SHORT_NAME, required=true, type=GrinderFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private GrinderFlexContainer grinder; - - + public void setGrinder(GrinderFlexContainer grinder) { this.grinder = grinder; getFlexContainerOrContainerOrSubscription().add(grinder); @@ -205,24 +179,22 @@ public class DeviceCoffeeMachineFlexContainer extends AbstractFlexContainer { return grinder; } - @XmlElement(name="foaMk", required=true, type=FoamingFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private FoamingFlexContainer foamedMilk; - - - public void setFoamedMilk(FoamingFlexContainer foamedMilk) { - this.foamedMilk = foamedMilk; - getFlexContainerOrContainerOrSubscription().add(foamedMilk); + @XmlElement(name=FoamingFlexContainer.SHORT_NAME, required=true, type=FoamingFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FoamingFlexContainer milkFoaming; + + public void setMilkFoaming(FoamingFlexContainer milkFoaming) { + this.milkFoaming = milkFoaming; + getFlexContainerOrContainerOrSubscription().add(milkFoaming); } - public FoamingFlexContainer getFoamedMilk() { - this.foamedMilk = (FoamingFlexContainer) getResourceByName(FoamingFlexContainer.SHORT_NAME); - return foamedMilk; + public FoamingFlexContainer getMilkFoaming() { + this.milkFoaming = (FoamingFlexContainer) getResourceByName(FoamingFlexContainer.SHORT_NAME); + return milkFoaming; } - @XmlElement(name="milQy", required=true, type=LiquidLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=LiquidLevelFlexContainer.SHORT_NAME, required=true, type=LiquidLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private LiquidLevelFlexContainer milkQuantity; - - + public void setMilkQuantity(LiquidLevelFlexContainer milkQuantity) { this.milkQuantity = milkQuantity; getFlexContainerOrContainerOrSubscription().add(milkQuantity); @@ -233,10 +205,22 @@ public class DeviceCoffeeMachineFlexContainer extends AbstractFlexContainer { return milkQuantity; } - @XmlElement(name="keeWm", required=true, type=KeepWarmFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private KeepWarmFlexContainer keepWarm; + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer brewingSwitch; + + public void setBrewingSwitch(BinarySwitchFlexContainer brewingSwitch) { + this.brewingSwitch = brewingSwitch; + getFlexContainerOrContainerOrSubscription().add(brewingSwitch); + } + public BinarySwitchFlexContainer getBrewingSwitch() { + this.brewingSwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return brewingSwitch; + } + @XmlElement(name=KeepWarmFlexContainer.SHORT_NAME, required=true, type=KeepWarmFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private KeepWarmFlexContainer keepWarm; + public void setKeepWarm(KeepWarmFlexContainer keepWarm) { this.keepWarm = keepWarm; getFlexContainerOrContainerOrSubscription().add(keepWarm); @@ -247,18 +231,4 @@ public class DeviceCoffeeMachineFlexContainer extends AbstractFlexContainer { return keepWarm; } - @XmlElement(name="breSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private BinarySwitchFlexContainer brewingSwitch; - - - public void setBrewingSwitch(BinarySwitchFlexContainer brewingSwitch) { - this.brewingSwitch = brewingSwitch; - getFlexContainerOrContainerOrSubscription().add(brewingSwitch); - } - - public BinarySwitchFlexContainer getBrewingSwitch() { - this.brewingSwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); - return brewingSwitch; - } - -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCoffeeMachineFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCoffeeMachineFlexContainerAnnc.java index c19c9b08..590b8444 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCoffeeMachineFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCoffeeMachineFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceCoffeeMachineAnnc -A CoffeeMachine is a device that produces coffee. +A coffee machine is a device that is used to brew a coffee, may add foamed milk, and may include some variants, for example a grinder. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceCoffeeMachineFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceCoffeeMachineFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,34 +37,22 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA setContainerDefinition("org.onem2m.home.device." + DeviceCoffeeMachineFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getFaultDetection(); getFaultDetectionAnnc(); - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); getClock(); getClockAnnc(); getBrewing(); getBrewingAnnc(); - getWaterStatus(); - getWaterStatusAnnc(); - getMilkStatus(); - getMilkStatusAnnc(); - getBeansStatus(); - getBeansStatusAnnc(); getGrinder(); getGrinderAnnc(); - getFoamedMilk(); - getFoamedMilkAnnc(); - getMilkQuantity(); - getMilkQuantityAnnc(); getKeepWarm(); getKeepWarmAnnc(); - getBrewingSwitch(); - getBrewingSwitchAnnc(); - } + } public void finalizeDeserialization() { if (this.faultDetection != null) { @@ -72,91 +60,42 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA } if (this.faultDetectionAnnc != null) { setFaultDetectionAnnc(this.faultDetectionAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } if (this.clock != null) { setClock(this.clock); } if (this.clockAnnc != null) { setClockAnnc(this.clockAnnc); - } - + } if (this.brewing != null) { setBrewing(this.brewing); } if (this.brewingAnnc != null) { setBrewingAnnc(this.brewingAnnc); - } - - if (this.waterStatus != null) { - setWaterStatus(this.waterStatus); - } - if (this.waterStatusAnnc != null) { - setWaterStatusAnnc(this.waterStatusAnnc); - } - - if (this.milkStatus != null) { - setMilkStatus(this.milkStatus); } - if (this.milkStatusAnnc != null) { - setMilkStatusAnnc(this.milkStatusAnnc); - } - - if (this.beansStatus != null) { - setBeansStatus(this.beansStatus); - } - if (this.beansStatusAnnc != null) { - setBeansStatusAnnc(this.beansStatusAnnc); - } - if (this.grinder != null) { setGrinder(this.grinder); } if (this.grinderAnnc != null) { setGrinderAnnc(this.grinderAnnc); - } - - if (this.foamedMilk != null) { - setFoamedMilk(this.foamedMilk); } - if (this.foamedMilkAnnc != null) { - setFoamedMilkAnnc(this.foamedMilkAnnc); - } - - if (this.milkQuantity != null) { - setMilkQuantity(this.milkQuantity); - } - if (this.milkQuantityAnnc != null) { - setMilkQuantityAnnc(this.milkQuantityAnnc); - } - if (this.keepWarm != null) { setKeepWarm(this.keepWarm); } if (this.keepWarmAnnc != null) { setKeepWarmAnnc(this.keepWarmAnnc); - } - - if (this.brewingSwitch != null) { - setBrewingSwitch(this.brewingSwitch); } - if (this.brewingSwitchAnnc != null) { - setBrewingSwitchAnnc(this.brewingSwitchAnnc); - } - } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -167,10 +106,9 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA return faultDetection; } - @XmlElement(name="fauDnAnnc", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainerAnnc faultDetectionAnnc; - - + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { this.faultDetectionAnnc = faultDetectionAnnc; getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); @@ -181,38 +119,35 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA return faultDetectionAnnc; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; - - - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="clock", required=true, type=ClockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ClockFlexContainer.SHORT_NAME, required=true, type=ClockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ClockFlexContainer clock; - - + public void setClock(ClockFlexContainer clock) { this.clock = clock; getFlexContainerOrContainerOrSubscription().add(clock); @@ -223,10 +158,9 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA return clock; } - @XmlElement(name="clockAnnc", required=true, type=ClockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ClockFlexContainerAnnc.SHORT_NAME, required=true, type=ClockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ClockFlexContainerAnnc clockAnnc; - - + public void setClockAnnc(ClockFlexContainerAnnc clockAnnc) { this.clockAnnc = clockAnnc; getFlexContainerOrContainerOrSubscription().add(clockAnnc); @@ -237,10 +171,9 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA return clockAnnc; } - @XmlElement(name="brewg", required=true, type=BrewingFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BrewingFlexContainer.SHORT_NAME, required=true, type=BrewingFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BrewingFlexContainer brewing; - - + public void setBrewing(BrewingFlexContainer brewing) { this.brewing = brewing; getFlexContainerOrContainerOrSubscription().add(brewing); @@ -251,10 +184,9 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA return brewing; } - @XmlElement(name="brewgAnnc", required=true, type=BrewingFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BrewingFlexContainerAnnc.SHORT_NAME, required=true, type=BrewingFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BrewingFlexContainerAnnc brewingAnnc; - - + public void setBrewingAnnc(BrewingFlexContainerAnnc brewingAnnc) { this.brewingAnnc = brewingAnnc; getFlexContainerOrContainerOrSubscription().add(brewingAnnc); @@ -265,94 +197,9 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA return brewingAnnc; } - @XmlElement(name="watSs", required=true, type=LiquidLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainer waterStatus; - - - public void setWaterStatus(LiquidLevelFlexContainer waterStatus) { - this.waterStatus = waterStatus; - getFlexContainerOrContainerOrSubscription().add(waterStatus); - } - - public LiquidLevelFlexContainer getWaterStatus() { - this.waterStatus = (LiquidLevelFlexContainer) getResourceByName(LiquidLevelFlexContainer.SHORT_NAME); - return waterStatus; - } - - @XmlElement(name="watSsAnnc", required=true, type=LiquidLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainerAnnc waterStatusAnnc; - - - public void setWaterStatusAnnc(LiquidLevelFlexContainerAnnc waterStatusAnnc) { - this.waterStatusAnnc = waterStatusAnnc; - getFlexContainerOrContainerOrSubscription().add(waterStatusAnnc); - } - - public LiquidLevelFlexContainerAnnc getWaterStatusAnnc() { - this.waterStatusAnnc = (LiquidLevelFlexContainerAnnc) getResourceByName(LiquidLevelFlexContainerAnnc.SHORT_NAME); - return waterStatusAnnc; - } - - @XmlElement(name="milSs", required=true, type=LiquidLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainer milkStatus; - - - public void setMilkStatus(LiquidLevelFlexContainer milkStatus) { - this.milkStatus = milkStatus; - getFlexContainerOrContainerOrSubscription().add(milkStatus); - } - - public LiquidLevelFlexContainer getMilkStatus() { - this.milkStatus = (LiquidLevelFlexContainer) getResourceByName(LiquidLevelFlexContainer.SHORT_NAME); - return milkStatus; - } - - @XmlElement(name="milSsAnnc", required=true, type=LiquidLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainerAnnc milkStatusAnnc; - - - public void setMilkStatusAnnc(LiquidLevelFlexContainerAnnc milkStatusAnnc) { - this.milkStatusAnnc = milkStatusAnnc; - getFlexContainerOrContainerOrSubscription().add(milkStatusAnnc); - } - - public LiquidLevelFlexContainerAnnc getMilkStatusAnnc() { - this.milkStatusAnnc = (LiquidLevelFlexContainerAnnc) getResourceByName(LiquidLevelFlexContainerAnnc.SHORT_NAME); - return milkStatusAnnc; - } - - @XmlElement(name="beaSs", required=true, type=LiquidLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainer beansStatus; - - - public void setBeansStatus(LiquidLevelFlexContainer beansStatus) { - this.beansStatus = beansStatus; - getFlexContainerOrContainerOrSubscription().add(beansStatus); - } - - public LiquidLevelFlexContainer getBeansStatus() { - this.beansStatus = (LiquidLevelFlexContainer) getResourceByName(LiquidLevelFlexContainer.SHORT_NAME); - return beansStatus; - } - - @XmlElement(name="beaSsAnnc", required=true, type=LiquidLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainerAnnc beansStatusAnnc; - - - public void setBeansStatusAnnc(LiquidLevelFlexContainerAnnc beansStatusAnnc) { - this.beansStatusAnnc = beansStatusAnnc; - getFlexContainerOrContainerOrSubscription().add(beansStatusAnnc); - } - - public LiquidLevelFlexContainerAnnc getBeansStatusAnnc() { - this.beansStatusAnnc = (LiquidLevelFlexContainerAnnc) getResourceByName(LiquidLevelFlexContainerAnnc.SHORT_NAME); - return beansStatusAnnc; - } - - @XmlElement(name="grinr", required=true, type=GrinderFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=GrinderFlexContainer.SHORT_NAME, required=true, type=GrinderFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private GrinderFlexContainer grinder; - - + public void setGrinder(GrinderFlexContainer grinder) { this.grinder = grinder; getFlexContainerOrContainerOrSubscription().add(grinder); @@ -363,10 +210,9 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA return grinder; } - @XmlElement(name="grinrAnnc", required=true, type=GrinderFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=GrinderFlexContainerAnnc.SHORT_NAME, required=true, type=GrinderFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private GrinderFlexContainerAnnc grinderAnnc; - - + public void setGrinderAnnc(GrinderFlexContainerAnnc grinderAnnc) { this.grinderAnnc = grinderAnnc; getFlexContainerOrContainerOrSubscription().add(grinderAnnc); @@ -377,66 +223,9 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA return grinderAnnc; } - @XmlElement(name="foaMk", required=true, type=FoamingFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private FoamingFlexContainer foamedMilk; - - - public void setFoamedMilk(FoamingFlexContainer foamedMilk) { - this.foamedMilk = foamedMilk; - getFlexContainerOrContainerOrSubscription().add(foamedMilk); - } - - public FoamingFlexContainer getFoamedMilk() { - this.foamedMilk = (FoamingFlexContainer) getResourceByName(FoamingFlexContainer.SHORT_NAME); - return foamedMilk; - } - - @XmlElement(name="foaMkAnnc", required=true, type=FoamingFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private FoamingFlexContainerAnnc foamedMilkAnnc; - - - public void setFoamedMilkAnnc(FoamingFlexContainerAnnc foamedMilkAnnc) { - this.foamedMilkAnnc = foamedMilkAnnc; - getFlexContainerOrContainerOrSubscription().add(foamedMilkAnnc); - } - - public FoamingFlexContainerAnnc getFoamedMilkAnnc() { - this.foamedMilkAnnc = (FoamingFlexContainerAnnc) getResourceByName(FoamingFlexContainerAnnc.SHORT_NAME); - return foamedMilkAnnc; - } - - @XmlElement(name="milQy", required=true, type=LiquidLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainer milkQuantity; - - - public void setMilkQuantity(LiquidLevelFlexContainer milkQuantity) { - this.milkQuantity = milkQuantity; - getFlexContainerOrContainerOrSubscription().add(milkQuantity); - } - - public LiquidLevelFlexContainer getMilkQuantity() { - this.milkQuantity = (LiquidLevelFlexContainer) getResourceByName(LiquidLevelFlexContainer.SHORT_NAME); - return milkQuantity; - } - - @XmlElement(name="milQyAnnc", required=true, type=LiquidLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainerAnnc milkQuantityAnnc; - - - public void setMilkQuantityAnnc(LiquidLevelFlexContainerAnnc milkQuantityAnnc) { - this.milkQuantityAnnc = milkQuantityAnnc; - getFlexContainerOrContainerOrSubscription().add(milkQuantityAnnc); - } - - public LiquidLevelFlexContainerAnnc getMilkQuantityAnnc() { - this.milkQuantityAnnc = (LiquidLevelFlexContainerAnnc) getResourceByName(LiquidLevelFlexContainerAnnc.SHORT_NAME); - return milkQuantityAnnc; - } - - @XmlElement(name="keeWm", required=true, type=KeepWarmFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=KeepWarmFlexContainer.SHORT_NAME, required=true, type=KeepWarmFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private KeepWarmFlexContainer keepWarm; - - + public void setKeepWarm(KeepWarmFlexContainer keepWarm) { this.keepWarm = keepWarm; getFlexContainerOrContainerOrSubscription().add(keepWarm); @@ -447,10 +236,9 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA return keepWarm; } - @XmlElement(name="keeWmAnnc", required=true, type=KeepWarmFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=KeepWarmFlexContainerAnnc.SHORT_NAME, required=true, type=KeepWarmFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private KeepWarmFlexContainerAnnc keepWarmAnnc; - - + public void setKeepWarmAnnc(KeepWarmFlexContainerAnnc keepWarmAnnc) { this.keepWarmAnnc = keepWarmAnnc; getFlexContainerOrContainerOrSubscription().add(keepWarmAnnc); @@ -461,32 +249,4 @@ public class DeviceCoffeeMachineFlexContainerAnnc extends AbstractFlexContainerA return keepWarmAnnc; } - @XmlElement(name="breSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private BinarySwitchFlexContainer brewingSwitch; - - - public void setBrewingSwitch(BinarySwitchFlexContainer brewingSwitch) { - this.brewingSwitch = brewingSwitch; - getFlexContainerOrContainerOrSubscription().add(brewingSwitch); - } - - public BinarySwitchFlexContainer getBrewingSwitch() { - this.brewingSwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); - return brewingSwitch; - } - - @XmlElement(name="breShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private BinarySwitchFlexContainerAnnc brewingSwitchAnnc; - - - public void setBrewingSwitchAnnc(BinarySwitchFlexContainerAnnc brewingSwitchAnnc) { - this.brewingSwitchAnnc = brewingSwitchAnnc; - getFlexContainerOrContainerOrSubscription().add(brewingSwitchAnnc); - } - - public BinarySwitchFlexContainerAnnc getBrewingSwitchAnnc() { - this.brewingSwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); - return brewingSwitchAnnc; - } - -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceContactDetectorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceContactDetectorFlexContainer.java index abd02bc6..f5d173cc 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceContactDetectorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceContactDetectorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceContactDetector -A ContactDetector is a device that trigger alarm when contact is lost. -Created: 2018-06-11 12:14:18 + +Created: 2018-07-04 10:25:10 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceContactDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -31,7 +30,7 @@ import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; public class DeviceContactDetectorFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "deviceContactDetector"; - public static final String SHORT_NAME = "deCDr"; + public static final String SHORT_NAME = "dCDr"; public DeviceContactDetectorFlexContainer () { setContainerDefinition("org.onem2m.home.device." + DeviceContactDetectorFlexContainer.LONG_NAME); @@ -39,7 +38,7 @@ public class DeviceContactDetectorFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getContactSensor(); } @@ -48,11 +47,10 @@ public class DeviceContactDetectorFlexContainer extends AbstractFlexContainer { setContactSensor(this.contactSensor); } } - - @XmlElement(name="conSr", required=true, type=ContactSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=ContactSensorFlexContainer.SHORT_NAME, required=true, type=ContactSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ContactSensorFlexContainer contactSensor; - - + public void setContactSensor(ContactSensorFlexContainer contactSensor) { this.contactSensor = contactSensor; getFlexContainerOrContainerOrSubscription().add(contactSensor); @@ -63,4 +61,4 @@ public class DeviceContactDetectorFlexContainer extends AbstractFlexContainer { return contactSensor; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceContactDetectorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceContactDetectorFlexContainerAnnc.java index 0bb94a1c..e87b62be 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceContactDetectorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceContactDetectorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceContactDetectorAnnc -A ContactDetector is a device that trigger alarm when contact is lost. -Created: 2018-06-11 12:14:18 + +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,28 +21,28 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceContactDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceContactDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") public class DeviceContactDetectorFlexContainerAnnc extends AbstractFlexContainerAnnc { public static final String LONG_NAME = "deviceContactDetectorAnnc"; - public static final String SHORT_NAME = "deCDrAnnc"; + public static final String SHORT_NAME = "dCDrAnnc"; public DeviceContactDetectorFlexContainerAnnc () { setContainerDefinition("org.onem2m.home.device." + DeviceContactDetectorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getContactSensor(); getContactSensorAnnc(); - } + } public void finalizeDeserialization() { if (this.contactSensor != null) { @@ -50,14 +50,12 @@ public class DeviceContactDetectorFlexContainerAnnc extends AbstractFlexContaine } if (this.contactSensorAnnc != null) { setContactSensorAnnc(this.contactSensorAnnc); - } - + } } - - @XmlElement(name="conSr", required=true, type=ContactSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=ContactSensorFlexContainer.SHORT_NAME, required=true, type=ContactSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ContactSensorFlexContainer contactSensor; - - + public void setContactSensor(ContactSensorFlexContainer contactSensor) { this.contactSensor = contactSensor; getFlexContainerOrContainerOrSubscription().add(contactSensor); @@ -68,10 +66,9 @@ public class DeviceContactDetectorFlexContainerAnnc extends AbstractFlexContaine return contactSensor; } - @XmlElement(name="conSrAnnc", required=true, type=ContactSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ContactSensorFlexContainerAnnc.SHORT_NAME, required=true, type=ContactSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ContactSensorFlexContainerAnnc contactSensorAnnc; - - + public void setContactSensorAnnc(ContactSensorFlexContainerAnnc contactSensorAnnc) { this.contactSensorAnnc = contactSensorAnnc; getFlexContainerOrContainerOrSubscription().add(contactSensorAnnc); @@ -82,4 +79,4 @@ public class DeviceContactDetectorFlexContainerAnnc extends AbstractFlexContaine return contactSensorAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCookerHoodFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCookerHoodFlexContainer.java new file mode 100644 index 00000000..a4b83a75 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCookerHoodFlexContainer.java @@ -0,0 +1,115 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceCookerHood + +A cooker hood is a device containing a mechanical fan that hangs above the stove or cooktop in the kitchen. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceCookerHoodFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceCookerHoodFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceCookerHoodFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceCookerHood"; + public static final String SHORT_NAME = "deCHd"; + + public DeviceCookerHoodFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceCookerHoodFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getRunState(); + getAirFlow(); + getCookerHoodJobMode(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.airFlow != null) { + setAirFlow(this.airFlow); + } + if (this.cookerHoodJobMode != null) { + setCookerHoodJobMode(this.cookerHoodJobMode); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=AirFlowFlexContainer.SHORT_NAME, required=true, type=AirFlowFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirFlowFlexContainer airFlow; + + public void setAirFlow(AirFlowFlexContainer airFlow) { + this.airFlow = airFlow; + getFlexContainerOrContainerOrSubscription().add(airFlow); + } + + public AirFlowFlexContainer getAirFlow() { + this.airFlow = (AirFlowFlexContainer) getResourceByName(AirFlowFlexContainer.SHORT_NAME); + return airFlow; + } + + @XmlElement(name=CookerHoodJobModeFlexContainer.SHORT_NAME, required=true, type=CookerHoodJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private CookerHoodJobModeFlexContainer cookerHoodJobMode; + + public void setCookerHoodJobMode(CookerHoodJobModeFlexContainer cookerHoodJobMode) { + this.cookerHoodJobMode = cookerHoodJobMode; + getFlexContainerOrContainerOrSubscription().add(cookerHoodJobMode); + } + + public CookerHoodJobModeFlexContainer getCookerHoodJobMode() { + this.cookerHoodJobMode = (CookerHoodJobModeFlexContainer) getResourceByName(CookerHoodJobModeFlexContainer.SHORT_NAME); + return cookerHoodJobMode; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCookerHoodFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCookerHoodFlexContainerAnnc.java new file mode 100644 index 00000000..028896e2 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCookerHoodFlexContainerAnnc.java @@ -0,0 +1,184 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceCookerHoodAnnc + +A cooker hood is a device containing a mechanical fan that hangs above the stove or cooktop in the kitchen. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceCookerHoodFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceCookerHoodFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceCookerHoodFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceCookerHoodAnnc"; + public static final String SHORT_NAME = "deCHdAnnc"; + + public DeviceCookerHoodFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceCookerHoodFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getRunState(); + getRunStateAnnc(); + getAirFlow(); + getAirFlowAnnc(); + getCookerHoodJobMode(); + getCookerHoodJobModeAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.airFlow != null) { + setAirFlow(this.airFlow); + } + if (this.airFlowAnnc != null) { + setAirFlowAnnc(this.airFlowAnnc); + } + if (this.cookerHoodJobMode != null) { + setCookerHoodJobMode(this.cookerHoodJobMode); + } + if (this.cookerHoodJobModeAnnc != null) { + setCookerHoodJobModeAnnc(this.cookerHoodJobModeAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=AirFlowFlexContainer.SHORT_NAME, required=true, type=AirFlowFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirFlowFlexContainer airFlow; + + public void setAirFlow(AirFlowFlexContainer airFlow) { + this.airFlow = airFlow; + getFlexContainerOrContainerOrSubscription().add(airFlow); + } + + public AirFlowFlexContainer getAirFlow() { + this.airFlow = (AirFlowFlexContainer) getResourceByName(AirFlowFlexContainer.SHORT_NAME); + return airFlow; + } + + @XmlElement(name=AirFlowFlexContainerAnnc.SHORT_NAME, required=true, type=AirFlowFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirFlowFlexContainerAnnc airFlowAnnc; + + public void setAirFlowAnnc(AirFlowFlexContainerAnnc airFlowAnnc) { + this.airFlowAnnc = airFlowAnnc; + getFlexContainerOrContainerOrSubscription().add(airFlowAnnc); + } + + public AirFlowFlexContainerAnnc getAirFlowAnnc() { + this.airFlowAnnc = (AirFlowFlexContainerAnnc) getResourceByName(AirFlowFlexContainerAnnc.SHORT_NAME); + return airFlowAnnc; + } + + @XmlElement(name=CookerHoodJobModeFlexContainer.SHORT_NAME, required=true, type=CookerHoodJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private CookerHoodJobModeFlexContainer cookerHoodJobMode; + + public void setCookerHoodJobMode(CookerHoodJobModeFlexContainer cookerHoodJobMode) { + this.cookerHoodJobMode = cookerHoodJobMode; + getFlexContainerOrContainerOrSubscription().add(cookerHoodJobMode); + } + + public CookerHoodJobModeFlexContainer getCookerHoodJobMode() { + this.cookerHoodJobMode = (CookerHoodJobModeFlexContainer) getResourceByName(CookerHoodJobModeFlexContainer.SHORT_NAME); + return cookerHoodJobMode; + } + + @XmlElement(name=CookerHoodJobModeFlexContainerAnnc.SHORT_NAME, required=true, type=CookerHoodJobModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private CookerHoodJobModeFlexContainerAnnc cookerHoodJobModeAnnc; + + public void setCookerHoodJobModeAnnc(CookerHoodJobModeFlexContainerAnnc cookerHoodJobModeAnnc) { + this.cookerHoodJobModeAnnc = cookerHoodJobModeAnnc; + getFlexContainerOrContainerOrSubscription().add(cookerHoodJobModeAnnc); + } + + public CookerHoodJobModeFlexContainerAnnc getCookerHoodJobModeAnnc() { + this.cookerHoodJobModeAnnc = (CookerHoodJobModeFlexContainerAnnc) getResourceByName(CookerHoodJobModeFlexContainerAnnc.SHORT_NAME); + return cookerHoodJobModeAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCooktopFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCooktopFlexContainer.java new file mode 100644 index 00000000..16bb031a --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCooktopFlexContainer.java @@ -0,0 +1,149 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceCooktop + +A cooktop is a device that is a kitchen appliance designed for the purpose of cooking food. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceCooktopFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceCooktopFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceCooktopFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceCooktop"; + public static final String SHORT_NAME = "devCp"; + + public DeviceCooktopFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceCooktopFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getHeatingZone0(); + getHeatingZone1(); + getHeatingZone2(); + getHeatingZone3(); + getHeatingZone4(); + getHeatingZone5(); + } + + public void finalizeDeserialization() { + if (this.heatingZone0 != null) { + setHeatingZone0(this.heatingZone0); + } + if (this.heatingZone1 != null) { + setHeatingZone1(this.heatingZone1); + } + if (this.heatingZone2 != null) { + setHeatingZone2(this.heatingZone2); + } + if (this.heatingZone3 != null) { + setHeatingZone3(this.heatingZone3); + } + if (this.heatingZone4 != null) { + setHeatingZone4(this.heatingZone4); + } + if (this.heatingZone5 != null) { + setHeatingZone5(this.heatingZone5); + } + } + + @XmlElement(name=HeatingZoneFlexContainer.SHORT_NAME, required=true, type=HeatingZoneFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private HeatingZoneFlexContainer heatingZone0; + + public void setHeatingZone0(HeatingZoneFlexContainer heatingZone0) { + this.heatingZone0 = heatingZone0; + getFlexContainerOrContainerOrSubscription().add(heatingZone0); + } + + public HeatingZoneFlexContainer getHeatingZone0() { + this.heatingZone0 = (HeatingZoneFlexContainer) getResourceByName(HeatingZoneFlexContainer.SHORT_NAME); + return heatingZone0; + } + + @XmlElement(name=HeatingZoneFlexContainer.SHORT_NAME, required=true, type=HeatingZoneFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private HeatingZoneFlexContainer heatingZone1; + + public void setHeatingZone1(HeatingZoneFlexContainer heatingZone1) { + this.heatingZone1 = heatingZone1; + getFlexContainerOrContainerOrSubscription().add(heatingZone1); + } + + public HeatingZoneFlexContainer getHeatingZone1() { + this.heatingZone1 = (HeatingZoneFlexContainer) getResourceByName(HeatingZoneFlexContainer.SHORT_NAME); + return heatingZone1; + } + + @XmlElement(name=HeatingZoneFlexContainer.SHORT_NAME, required=true, type=HeatingZoneFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private HeatingZoneFlexContainer heatingZone2; + + public void setHeatingZone2(HeatingZoneFlexContainer heatingZone2) { + this.heatingZone2 = heatingZone2; + getFlexContainerOrContainerOrSubscription().add(heatingZone2); + } + + public HeatingZoneFlexContainer getHeatingZone2() { + this.heatingZone2 = (HeatingZoneFlexContainer) getResourceByName(HeatingZoneFlexContainer.SHORT_NAME); + return heatingZone2; + } + + @XmlElement(name=HeatingZoneFlexContainer.SHORT_NAME, required=true, type=HeatingZoneFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private HeatingZoneFlexContainer heatingZone3; + + public void setHeatingZone3(HeatingZoneFlexContainer heatingZone3) { + this.heatingZone3 = heatingZone3; + getFlexContainerOrContainerOrSubscription().add(heatingZone3); + } + + public HeatingZoneFlexContainer getHeatingZone3() { + this.heatingZone3 = (HeatingZoneFlexContainer) getResourceByName(HeatingZoneFlexContainer.SHORT_NAME); + return heatingZone3; + } + + @XmlElement(name=HeatingZoneFlexContainer.SHORT_NAME, required=true, type=HeatingZoneFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private HeatingZoneFlexContainer heatingZone4; + + public void setHeatingZone4(HeatingZoneFlexContainer heatingZone4) { + this.heatingZone4 = heatingZone4; + getFlexContainerOrContainerOrSubscription().add(heatingZone4); + } + + public HeatingZoneFlexContainer getHeatingZone4() { + this.heatingZone4 = (HeatingZoneFlexContainer) getResourceByName(HeatingZoneFlexContainer.SHORT_NAME); + return heatingZone4; + } + + @XmlElement(name=HeatingZoneFlexContainer.SHORT_NAME, required=true, type=HeatingZoneFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private HeatingZoneFlexContainer heatingZone5; + + public void setHeatingZone5(HeatingZoneFlexContainer heatingZone5) { + this.heatingZone5 = heatingZone5; + getFlexContainerOrContainerOrSubscription().add(heatingZone5); + } + + public HeatingZoneFlexContainer getHeatingZone5() { + this.heatingZone5 = (HeatingZoneFlexContainer) getResourceByName(HeatingZoneFlexContainer.SHORT_NAME); + return heatingZone5; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCooktopFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCooktopFlexContainerAnnc.java new file mode 100644 index 00000000..70551009 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceCooktopFlexContainerAnnc.java @@ -0,0 +1,48 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceCooktopAnnc + +A cooktop is a device that is a kitchen appliance designed for the purpose of cooking food. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceCooktopFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceCooktopFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceCooktopFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceCooktopAnnc"; + public static final String SHORT_NAME = "devCpAnnc"; + + public DeviceCooktopFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceCooktopFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDehumidifierFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDehumidifierFlexContainer.java new file mode 100644 index 00000000..3dd80dc1 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDehumidifierFlexContainer.java @@ -0,0 +1,166 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceDehumidifier + +A dehumidifier is a device that is used to monitor or control the state of a dehumidifying appliance. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceDehumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceDehumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceDehumidifierFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceDehumidifier"; + public static final String SHORT_NAME = "devDr"; + + public DeviceDehumidifierFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceDehumidifierFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getRelativeHumidity(); + getRunState(); + getDehumidifierJobMode(); + getDehumidifierOperationMode(); + getTimer(); + getPowerSave(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.relativeHumidity != null) { + setRelativeHumidity(this.relativeHumidity); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.dehumidifierJobMode != null) { + setDehumidifierJobMode(this.dehumidifierJobMode); + } + if (this.dehumidifierOperationMode != null) { + setDehumidifierOperationMode(this.dehumidifierOperationMode); + } + if (this.timer != null) { + setTimer(this.timer); + } + if (this.powerSave != null) { + setPowerSave(this.powerSave); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=RelativeHumidityFlexContainer.SHORT_NAME, required=true, type=RelativeHumidityFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RelativeHumidityFlexContainer relativeHumidity; + + public void setRelativeHumidity(RelativeHumidityFlexContainer relativeHumidity) { + this.relativeHumidity = relativeHumidity; + getFlexContainerOrContainerOrSubscription().add(relativeHumidity); + } + + public RelativeHumidityFlexContainer getRelativeHumidity() { + this.relativeHumidity = (RelativeHumidityFlexContainer) getResourceByName(RelativeHumidityFlexContainer.SHORT_NAME); + return relativeHumidity; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=DehumidifierJobModeFlexContainer.SHORT_NAME, required=true, type=DehumidifierJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private DehumidifierJobModeFlexContainer dehumidifierJobMode; + + public void setDehumidifierJobMode(DehumidifierJobModeFlexContainer dehumidifierJobMode) { + this.dehumidifierJobMode = dehumidifierJobMode; + getFlexContainerOrContainerOrSubscription().add(dehumidifierJobMode); + } + + public DehumidifierJobModeFlexContainer getDehumidifierJobMode() { + this.dehumidifierJobMode = (DehumidifierJobModeFlexContainer) getResourceByName(DehumidifierJobModeFlexContainer.SHORT_NAME); + return dehumidifierJobMode; + } + + @XmlElement(name=OperationModeFlexContainer.SHORT_NAME, required=true, type=OperationModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OperationModeFlexContainer dehumidifierOperationMode; + + public void setDehumidifierOperationMode(OperationModeFlexContainer dehumidifierOperationMode) { + this.dehumidifierOperationMode = dehumidifierOperationMode; + getFlexContainerOrContainerOrSubscription().add(dehumidifierOperationMode); + } + + public OperationModeFlexContainer getDehumidifierOperationMode() { + this.dehumidifierOperationMode = (OperationModeFlexContainer) getResourceByName(OperationModeFlexContainer.SHORT_NAME); + return dehumidifierOperationMode; + } + + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer timer; + + public void setTimer(TimerFlexContainer timer) { + this.timer = timer; + getFlexContainerOrContainerOrSubscription().add(timer); + } + + public TimerFlexContainer getTimer() { + this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return timer; + } + + @XmlElement(name=PowerSaveFlexContainer.SHORT_NAME, required=true, type=PowerSaveFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PowerSaveFlexContainer powerSave; + + public void setPowerSave(PowerSaveFlexContainer powerSave) { + this.powerSave = powerSave; + getFlexContainerOrContainerOrSubscription().add(powerSave); + } + + public PowerSaveFlexContainer getPowerSave() { + this.powerSave = (PowerSaveFlexContainer) getResourceByName(PowerSaveFlexContainer.SHORT_NAME); + return powerSave; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDehumidifierFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDehumidifierFlexContainerAnnc.java new file mode 100644 index 00000000..c1e7bf3a --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDehumidifierFlexContainerAnnc.java @@ -0,0 +1,252 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceDehumidifierAnnc + +A dehumidifier is a device that is used to monitor or control the state of a dehumidifying appliance. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceDehumidifierFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceDehumidifierFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceDehumidifierFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceDehumidifierAnnc"; + public static final String SHORT_NAME = "devDrAnnc"; + + public DeviceDehumidifierFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceDehumidifierFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getRelativeHumidity(); + getRelativeHumidityAnnc(); + getRunState(); + getRunStateAnnc(); + getDehumidifierJobMode(); + getDehumidifierJobModeAnnc(); + getTimer(); + getTimerAnnc(); + getPowerSave(); + getPowerSaveAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.relativeHumidity != null) { + setRelativeHumidity(this.relativeHumidity); + } + if (this.relativeHumidityAnnc != null) { + setRelativeHumidityAnnc(this.relativeHumidityAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.dehumidifierJobMode != null) { + setDehumidifierJobMode(this.dehumidifierJobMode); + } + if (this.dehumidifierJobModeAnnc != null) { + setDehumidifierJobModeAnnc(this.dehumidifierJobModeAnnc); + } + if (this.timer != null) { + setTimer(this.timer); + } + if (this.timerAnnc != null) { + setTimerAnnc(this.timerAnnc); + } + if (this.powerSave != null) { + setPowerSave(this.powerSave); + } + if (this.powerSaveAnnc != null) { + setPowerSaveAnnc(this.powerSaveAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=RelativeHumidityFlexContainer.SHORT_NAME, required=true, type=RelativeHumidityFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RelativeHumidityFlexContainer relativeHumidity; + + public void setRelativeHumidity(RelativeHumidityFlexContainer relativeHumidity) { + this.relativeHumidity = relativeHumidity; + getFlexContainerOrContainerOrSubscription().add(relativeHumidity); + } + + public RelativeHumidityFlexContainer getRelativeHumidity() { + this.relativeHumidity = (RelativeHumidityFlexContainer) getResourceByName(RelativeHumidityFlexContainer.SHORT_NAME); + return relativeHumidity; + } + + @XmlElement(name=RelativeHumidityFlexContainerAnnc.SHORT_NAME, required=true, type=RelativeHumidityFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RelativeHumidityFlexContainerAnnc relativeHumidityAnnc; + + public void setRelativeHumidityAnnc(RelativeHumidityFlexContainerAnnc relativeHumidityAnnc) { + this.relativeHumidityAnnc = relativeHumidityAnnc; + getFlexContainerOrContainerOrSubscription().add(relativeHumidityAnnc); + } + + public RelativeHumidityFlexContainerAnnc getRelativeHumidityAnnc() { + this.relativeHumidityAnnc = (RelativeHumidityFlexContainerAnnc) getResourceByName(RelativeHumidityFlexContainerAnnc.SHORT_NAME); + return relativeHumidityAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=DehumidifierJobModeFlexContainer.SHORT_NAME, required=true, type=DehumidifierJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private DehumidifierJobModeFlexContainer dehumidifierJobMode; + + public void setDehumidifierJobMode(DehumidifierJobModeFlexContainer dehumidifierJobMode) { + this.dehumidifierJobMode = dehumidifierJobMode; + getFlexContainerOrContainerOrSubscription().add(dehumidifierJobMode); + } + + public DehumidifierJobModeFlexContainer getDehumidifierJobMode() { + this.dehumidifierJobMode = (DehumidifierJobModeFlexContainer) getResourceByName(DehumidifierJobModeFlexContainer.SHORT_NAME); + return dehumidifierJobMode; + } + + @XmlElement(name=DehumidifierJobModeFlexContainerAnnc.SHORT_NAME, required=true, type=DehumidifierJobModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private DehumidifierJobModeFlexContainerAnnc dehumidifierJobModeAnnc; + + public void setDehumidifierJobModeAnnc(DehumidifierJobModeFlexContainerAnnc dehumidifierJobModeAnnc) { + this.dehumidifierJobModeAnnc = dehumidifierJobModeAnnc; + getFlexContainerOrContainerOrSubscription().add(dehumidifierJobModeAnnc); + } + + public DehumidifierJobModeFlexContainerAnnc getDehumidifierJobModeAnnc() { + this.dehumidifierJobModeAnnc = (DehumidifierJobModeFlexContainerAnnc) getResourceByName(DehumidifierJobModeFlexContainerAnnc.SHORT_NAME); + return dehumidifierJobModeAnnc; + } + + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer timer; + + public void setTimer(TimerFlexContainer timer) { + this.timer = timer; + getFlexContainerOrContainerOrSubscription().add(timer); + } + + public TimerFlexContainer getTimer() { + this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return timer; + } + + @XmlElement(name=TimerFlexContainerAnnc.SHORT_NAME, required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainerAnnc timerAnnc; + + public void setTimerAnnc(TimerFlexContainerAnnc timerAnnc) { + this.timerAnnc = timerAnnc; + getFlexContainerOrContainerOrSubscription().add(timerAnnc); + } + + public TimerFlexContainerAnnc getTimerAnnc() { + this.timerAnnc = (TimerFlexContainerAnnc) getResourceByName(TimerFlexContainerAnnc.SHORT_NAME); + return timerAnnc; + } + + @XmlElement(name=PowerSaveFlexContainer.SHORT_NAME, required=true, type=PowerSaveFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PowerSaveFlexContainer powerSave; + + public void setPowerSave(PowerSaveFlexContainer powerSave) { + this.powerSave = powerSave; + getFlexContainerOrContainerOrSubscription().add(powerSave); + } + + public PowerSaveFlexContainer getPowerSave() { + this.powerSave = (PowerSaveFlexContainer) getResourceByName(PowerSaveFlexContainer.SHORT_NAME); + return powerSave; + } + + @XmlElement(name=PowerSaveFlexContainerAnnc.SHORT_NAME, required=true, type=PowerSaveFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PowerSaveFlexContainerAnnc powerSaveAnnc; + + public void setPowerSaveAnnc(PowerSaveFlexContainerAnnc powerSaveAnnc) { + this.powerSaveAnnc = powerSaveAnnc; + getFlexContainerOrContainerOrSubscription().add(powerSaveAnnc); + } + + public PowerSaveFlexContainerAnnc getPowerSaveAnnc() { + this.powerSaveAnnc = (PowerSaveFlexContainerAnnc) getResourceByName(PowerSaveFlexContainerAnnc.SHORT_NAME); + return powerSaveAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDishWasherFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDishWasherFlexContainer.java new file mode 100644 index 00000000..99b31d6f --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDishWasherFlexContainer.java @@ -0,0 +1,98 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceDishWasher + +A dish washer is a home appliance used to wash dishes. This information model provides capabilities to interact with specific functions and resources of a dish washer. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceDishWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceDishWasherFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceDishWasherFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceDishWasher"; + public static final String SHORT_NAME = "deDWr"; + + public DeviceDishWasherFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceDishWasherFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getRunState(); + getDishWasherJobMode(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.dishWasherJobMode != null) { + setDishWasherJobMode(this.dishWasherJobMode); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=DishWasherJobModeFlexContainer.SHORT_NAME, required=true, type=DishWasherJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private DishWasherJobModeFlexContainer dishWasherJobMode; + + public void setDishWasherJobMode(DishWasherJobModeFlexContainer dishWasherJobMode) { + this.dishWasherJobMode = dishWasherJobMode; + getFlexContainerOrContainerOrSubscription().add(dishWasherJobMode); + } + + public DishWasherJobModeFlexContainer getDishWasherJobMode() { + this.dishWasherJobMode = (DishWasherJobModeFlexContainer) getResourceByName(DishWasherJobModeFlexContainer.SHORT_NAME); + return dishWasherJobMode; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDishWasherFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDishWasherFlexContainerAnnc.java new file mode 100644 index 00000000..456b3d66 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDishWasherFlexContainerAnnc.java @@ -0,0 +1,150 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceDishWasherAnnc + +A dish washer is a home appliance used to wash dishes. This information model provides capabilities to interact with specific functions and resources of a dish washer. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceDishWasherFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceDishWasherFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceDishWasherFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceDishWasherAnnc"; + public static final String SHORT_NAME = "deDWrAnnc"; + + public DeviceDishWasherFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceDishWasherFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getRunState(); + getRunStateAnnc(); + getDishWasherJobMode(); + getDishWasherJobModeAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.dishWasherJobMode != null) { + setDishWasherJobMode(this.dishWasherJobMode); + } + if (this.dishWasherJobModeAnnc != null) { + setDishWasherJobModeAnnc(this.dishWasherJobModeAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=DishWasherJobModeFlexContainer.SHORT_NAME, required=true, type=DishWasherJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private DishWasherJobModeFlexContainer dishWasherJobMode; + + public void setDishWasherJobMode(DishWasherJobModeFlexContainer dishWasherJobMode) { + this.dishWasherJobMode = dishWasherJobMode; + getFlexContainerOrContainerOrSubscription().add(dishWasherJobMode); + } + + public DishWasherJobModeFlexContainer getDishWasherJobMode() { + this.dishWasherJobMode = (DishWasherJobModeFlexContainer) getResourceByName(DishWasherJobModeFlexContainer.SHORT_NAME); + return dishWasherJobMode; + } + + @XmlElement(name=DishWasherJobModeFlexContainerAnnc.SHORT_NAME, required=true, type=DishWasherJobModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private DishWasherJobModeFlexContainerAnnc dishWasherJobModeAnnc; + + public void setDishWasherJobModeAnnc(DishWasherJobModeFlexContainerAnnc dishWasherJobModeAnnc) { + this.dishWasherJobModeAnnc = dishWasherJobModeAnnc; + getFlexContainerOrContainerOrSubscription().add(dishWasherJobModeAnnc); + } + + public DishWasherJobModeFlexContainerAnnc getDishWasherJobModeAnnc() { + this.dishWasherJobModeAnnc = (DishWasherJobModeFlexContainerAnnc) getResourceByName(DishWasherJobModeFlexContainerAnnc.SHORT_NAME); + return dishWasherJobModeAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorFlexContainer.java index 48e24c2f..7cc163bb 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceDoor -A door is a door. +A door is a device that is used to open and close a door. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceDoorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -31,7 +30,7 @@ import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; public class DeviceDoorFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "deviceDoor"; - public static final String SHORT_NAME = "devDr"; + public static final String SHORT_NAME = "devD0"; public DeviceDoorFlexContainer () { setContainerDefinition("org.onem2m.home.device." + DeviceDoorFlexContainer.LONG_NAME); @@ -39,42 +38,53 @@ public class DeviceDoorFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { - getBattery(); + public void finalizeSerialization() { + getOpenLevel(); + getDoorlock(); getDoorStatus(); - getLock(); } public void finalizeDeserialization() { - if (this.battery != null) { - setBattery(this.battery); + if (this.openLevel != null) { + setOpenLevel(this.openLevel); + } + if (this.doorlock != null) { + setDoorlock(this.doorlock); } if (this.doorStatus != null) { setDoorStatus(this.doorStatus); } - if (this.lock != null) { - setLock(this.lock); - } + } + + @XmlElement(name=OpenLevelFlexContainer.SHORT_NAME, required=true, type=OpenLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainer openLevel; + + public void setOpenLevel(OpenLevelFlexContainer openLevel) { + this.openLevel = openLevel; + getFlexContainerOrContainerOrSubscription().add(openLevel); } - @XmlElement(name="batty", required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private BatteryFlexContainer battery; - + public OpenLevelFlexContainer getOpenLevel() { + this.openLevel = (OpenLevelFlexContainer) getResourceByName(OpenLevelFlexContainer.SHORT_NAME); + return openLevel; + } - public void setBattery(BatteryFlexContainer battery) { - this.battery = battery; - getFlexContainerOrContainerOrSubscription().add(battery); + @XmlElement(name=LockFlexContainer.SHORT_NAME, required=true, type=LockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private LockFlexContainer doorlock; + + public void setDoorlock(LockFlexContainer doorlock) { + this.doorlock = doorlock; + getFlexContainerOrContainerOrSubscription().add(doorlock); } - public BatteryFlexContainer getBattery() { - this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); - return battery; + public LockFlexContainer getDoorlock() { + this.doorlock = (LockFlexContainer) getResourceByName(LockFlexContainer.SHORT_NAME); + return doorlock; } - @XmlElement(name="dooSs", required=true, type=DoorStatusFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=DoorStatusFlexContainer.SHORT_NAME, required=true, type=DoorStatusFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private DoorStatusFlexContainer doorStatus; - - + public void setDoorStatus(DoorStatusFlexContainer doorStatus) { this.doorStatus = doorStatus; getFlexContainerOrContainerOrSubscription().add(doorStatus); @@ -85,18 +95,4 @@ public class DeviceDoorFlexContainer extends AbstractFlexContainer { return doorStatus; } - @XmlElement(name="lock", required=true, type=LockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LockFlexContainer lock; - - - public void setLock(LockFlexContainer lock) { - this.lock = lock; - getFlexContainerOrContainerOrSubscription().add(lock); - } - - public LockFlexContainer getLock() { - this.lock = (LockFlexContainer) getResourceByName(LockFlexContainer.SHORT_NAME); - return lock; - } - -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorFlexContainerAnnc.java index b37dc8ba..87748075 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceDoorAnnc -A door is a door. +A door is a device that is used to open and close a door. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,89 +21,75 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceDoorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceDoorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") public class DeviceDoorFlexContainerAnnc extends AbstractFlexContainerAnnc { public static final String LONG_NAME = "deviceDoorAnnc"; - public static final String SHORT_NAME = "devDrAnnc"; + public static final String SHORT_NAME = "devD0Annc"; public DeviceDoorFlexContainerAnnc () { setContainerDefinition("org.onem2m.home.device." + DeviceDoorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { - getBattery(); - getBatteryAnnc(); + getOpenLevel(); + getOpenLevelAnnc(); getDoorStatus(); getDoorStatusAnnc(); - getLock(); - getLockAnnc(); - } + } public void finalizeDeserialization() { - if (this.battery != null) { - setBattery(this.battery); + if (this.openLevel != null) { + setOpenLevel(this.openLevel); + } + if (this.openLevelAnnc != null) { + setOpenLevelAnnc(this.openLevelAnnc); } - if (this.batteryAnnc != null) { - setBatteryAnnc(this.batteryAnnc); - } - if (this.doorStatus != null) { setDoorStatus(this.doorStatus); } if (this.doorStatusAnnc != null) { setDoorStatusAnnc(this.doorStatusAnnc); - } - - if (this.lock != null) { - setLock(this.lock); } - if (this.lockAnnc != null) { - setLockAnnc(this.lockAnnc); - } - } - - @XmlElement(name="batty", required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private BatteryFlexContainer battery; - - - public void setBattery(BatteryFlexContainer battery) { - this.battery = battery; - getFlexContainerOrContainerOrSubscription().add(battery); + + @XmlElement(name=OpenLevelFlexContainer.SHORT_NAME, required=true, type=OpenLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainer openLevel; + + public void setOpenLevel(OpenLevelFlexContainer openLevel) { + this.openLevel = openLevel; + getFlexContainerOrContainerOrSubscription().add(openLevel); } - public BatteryFlexContainer getBattery() { - this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); - return battery; + public OpenLevelFlexContainer getOpenLevel() { + this.openLevel = (OpenLevelFlexContainer) getResourceByName(OpenLevelFlexContainer.SHORT_NAME); + return openLevel; } - @XmlElement(name="battyAnnc", required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private BatteryFlexContainerAnnc batteryAnnc; - - - public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { - this.batteryAnnc = batteryAnnc; - getFlexContainerOrContainerOrSubscription().add(batteryAnnc); + @XmlElement(name=OpenLevelFlexContainerAnnc.SHORT_NAME, required=true, type=OpenLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainerAnnc openLevelAnnc; + + public void setOpenLevelAnnc(OpenLevelFlexContainerAnnc openLevelAnnc) { + this.openLevelAnnc = openLevelAnnc; + getFlexContainerOrContainerOrSubscription().add(openLevelAnnc); } - public BatteryFlexContainerAnnc getBatteryAnnc() { - this.batteryAnnc = (BatteryFlexContainerAnnc) getResourceByName(BatteryFlexContainerAnnc.SHORT_NAME); - return batteryAnnc; + public OpenLevelFlexContainerAnnc getOpenLevelAnnc() { + this.openLevelAnnc = (OpenLevelFlexContainerAnnc) getResourceByName(OpenLevelFlexContainerAnnc.SHORT_NAME); + return openLevelAnnc; } - @XmlElement(name="dooSs", required=true, type=DoorStatusFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=DoorStatusFlexContainer.SHORT_NAME, required=true, type=DoorStatusFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private DoorStatusFlexContainer doorStatus; - - + public void setDoorStatus(DoorStatusFlexContainer doorStatus) { this.doorStatus = doorStatus; getFlexContainerOrContainerOrSubscription().add(doorStatus); @@ -114,10 +100,9 @@ public class DeviceDoorFlexContainerAnnc extends AbstractFlexContainerAnnc { return doorStatus; } - @XmlElement(name="dooSsAnnc", required=true, type=DoorStatusFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=DoorStatusFlexContainerAnnc.SHORT_NAME, required=true, type=DoorStatusFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private DoorStatusFlexContainerAnnc doorStatusAnnc; - - + public void setDoorStatusAnnc(DoorStatusFlexContainerAnnc doorStatusAnnc) { this.doorStatusAnnc = doorStatusAnnc; getFlexContainerOrContainerOrSubscription().add(doorStatusAnnc); @@ -128,32 +113,4 @@ public class DeviceDoorFlexContainerAnnc extends AbstractFlexContainerAnnc { return doorStatusAnnc; } - @XmlElement(name="lock", required=true, type=LockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LockFlexContainer lock; - - - public void setLock(LockFlexContainer lock) { - this.lock = lock; - getFlexContainerOrContainerOrSubscription().add(lock); - } - - public LockFlexContainer getLock() { - this.lock = (LockFlexContainer) getResourceByName(LockFlexContainer.SHORT_NAME); - return lock; - } - - @XmlElement(name="lockAnnc", required=true, type=LockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LockFlexContainerAnnc lockAnnc; - - - public void setLockAnnc(LockFlexContainerAnnc lockAnnc) { - this.lockAnnc = lockAnnc; - getFlexContainerOrContainerOrSubscription().add(lockAnnc); - } - - public LockFlexContainerAnnc getLockAnnc() { - this.lockAnnc = (LockFlexContainerAnnc) getResourceByName(LockFlexContainerAnnc.SHORT_NAME); - return lockAnnc; - } - -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorLockFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorLockFlexContainer.java new file mode 100644 index 00000000..e452dae0 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorLockFlexContainer.java @@ -0,0 +1,98 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceDoorLock + +A door lock is a device that can be used to lock, for example, a door. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceDoorLockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceDoorLockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceDoorLockFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceDoorLock"; + public static final String SHORT_NAME = "deDLk"; + + public DeviceDoorLockFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceDoorLockFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getDoorLock(); + getDoorStatus(); + getBattery(); + } + + public void finalizeDeserialization() { + if (this.doorLock != null) { + setDoorLock(this.doorLock); + } + if (this.doorStatus != null) { + setDoorStatus(this.doorStatus); + } + if (this.battery != null) { + setBattery(this.battery); + } + } + + @XmlElement(name=LockFlexContainer.SHORT_NAME, required=true, type=LockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private LockFlexContainer doorLock; + + public void setDoorLock(LockFlexContainer doorLock) { + this.doorLock = doorLock; + getFlexContainerOrContainerOrSubscription().add(doorLock); + } + + public LockFlexContainer getDoorLock() { + this.doorLock = (LockFlexContainer) getResourceByName(LockFlexContainer.SHORT_NAME); + return doorLock; + } + + @XmlElement(name=DoorStatusFlexContainer.SHORT_NAME, required=true, type=DoorStatusFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private DoorStatusFlexContainer doorStatus; + + public void setDoorStatus(DoorStatusFlexContainer doorStatus) { + this.doorStatus = doorStatus; + getFlexContainerOrContainerOrSubscription().add(doorStatus); + } + + public DoorStatusFlexContainer getDoorStatus() { + this.doorStatus = (DoorStatusFlexContainer) getResourceByName(DoorStatusFlexContainer.SHORT_NAME); + return doorStatus; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorLockFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorLockFlexContainerAnnc.java new file mode 100644 index 00000000..340b6fe1 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceDoorLockFlexContainerAnnc.java @@ -0,0 +1,116 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceDoorLockAnnc + +A door lock is a device that can be used to lock, for example, a door. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceDoorLockFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceDoorLockFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceDoorLockFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceDoorLockAnnc"; + public static final String SHORT_NAME = "deDLkAnnc"; + + public DeviceDoorLockFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceDoorLockFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getDoorStatus(); + getDoorStatusAnnc(); + getBattery(); + getBatteryAnnc(); + } + + public void finalizeDeserialization() { + if (this.doorStatus != null) { + setDoorStatus(this.doorStatus); + } + if (this.doorStatusAnnc != null) { + setDoorStatusAnnc(this.doorStatusAnnc); + } + if (this.battery != null) { + setBattery(this.battery); + } + if (this.batteryAnnc != null) { + setBatteryAnnc(this.batteryAnnc); + } + } + + @XmlElement(name=DoorStatusFlexContainer.SHORT_NAME, required=true, type=DoorStatusFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private DoorStatusFlexContainer doorStatus; + + public void setDoorStatus(DoorStatusFlexContainer doorStatus) { + this.doorStatus = doorStatus; + getFlexContainerOrContainerOrSubscription().add(doorStatus); + } + + public DoorStatusFlexContainer getDoorStatus() { + this.doorStatus = (DoorStatusFlexContainer) getResourceByName(DoorStatusFlexContainer.SHORT_NAME); + return doorStatus; + } + + @XmlElement(name=DoorStatusFlexContainerAnnc.SHORT_NAME, required=true, type=DoorStatusFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private DoorStatusFlexContainerAnnc doorStatusAnnc; + + public void setDoorStatusAnnc(DoorStatusFlexContainerAnnc doorStatusAnnc) { + this.doorStatusAnnc = doorStatusAnnc; + getFlexContainerOrContainerOrSubscription().add(doorStatusAnnc); + } + + public DoorStatusFlexContainerAnnc getDoorStatusAnnc() { + this.doorStatusAnnc = (DoorStatusFlexContainerAnnc) getResourceByName(DoorStatusFlexContainerAnnc.SHORT_NAME); + return doorStatusAnnc; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainerAnnc batteryAnnc; + + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { + this.batteryAnnc = batteryAnnc; + getFlexContainerOrContainerOrSubscription().add(batteryAnnc); + } + + public BatteryFlexContainerAnnc getBatteryAnnc() { + this.batteryAnnc = (BatteryFlexContainerAnnc) getResourceByName(BatteryFlexContainerAnnc.SHORT_NAME); + return batteryAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceElectricVehicleChargerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceElectricVehicleChargerFlexContainer.java index 8e6bb170..424a9918 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceElectricVehicleChargerFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceElectricVehicleChargerFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceElectricVehicleCharger An electric vehicle charger is a device that is used for charging or discharging electric vehicles. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceElectricVehicleChargerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,10 +38,10 @@ public class DeviceElectricVehicleChargerFlexContainer extends AbstractFlexConta setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getFaultDetection(); getBinarySwitch(); - getRunMode(); + getRunState(); getBattery(); getElectricVehicleConnector(); } @@ -54,8 +53,8 @@ public class DeviceElectricVehicleChargerFlexContainer extends AbstractFlexConta if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); } if (this.battery != null) { setBattery(this.battery); @@ -64,11 +63,10 @@ public class DeviceElectricVehicleChargerFlexContainer extends AbstractFlexConta setElectricVehicleConnector(this.electricVehicleConnector); } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -79,10 +77,9 @@ public class DeviceElectricVehicleChargerFlexContainer extends AbstractFlexConta return faultDetection; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -93,24 +90,22 @@ public class DeviceElectricVehicleChargerFlexContainer extends AbstractFlexConta return binarySwitch; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="batty", required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BatteryFlexContainer battery; - - + public void setBattery(BatteryFlexContainer battery) { this.battery = battery; getFlexContainerOrContainerOrSubscription().add(battery); @@ -121,10 +116,9 @@ public class DeviceElectricVehicleChargerFlexContainer extends AbstractFlexConta return battery; } - @XmlElement(name="elVCr", required=true, type=ElectricVehicleConnectorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ElectricVehicleConnectorFlexContainer.SHORT_NAME, required=true, type=ElectricVehicleConnectorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ElectricVehicleConnectorFlexContainer electricVehicleConnector; - - + public void setElectricVehicleConnector(ElectricVehicleConnectorFlexContainer electricVehicleConnector) { this.electricVehicleConnector = electricVehicleConnector; getFlexContainerOrContainerOrSubscription().add(electricVehicleConnector); @@ -135,4 +129,4 @@ public class DeviceElectricVehicleChargerFlexContainer extends AbstractFlexConta return electricVehicleConnector; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceElectricVehicleChargerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceElectricVehicleChargerFlexContainerAnnc.java index f46be182..afd323b4 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceElectricVehicleChargerFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceElectricVehicleChargerFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceElectricVehicleChargerAnnc An electric vehicle charger is a device that is used for charging or discharging electric vehicles. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceElectricVehicleChargerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceElectricVehicleChargerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,20 +37,20 @@ public class DeviceElectricVehicleChargerFlexContainerAnnc extends AbstractFlexC setContainerDefinition("org.onem2m.home.device." + DeviceElectricVehicleChargerFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getFaultDetection(); getFaultDetectionAnnc(); getBinarySwitch(); getBinarySwitchAnnc(); - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); getBattery(); getBatteryAnnc(); getElectricVehicleConnector(); getElectricVehicleConnectorAnnc(); - } + } public void finalizeDeserialization() { if (this.faultDetection != null) { @@ -58,42 +58,36 @@ public class DeviceElectricVehicleChargerFlexContainerAnnc extends AbstractFlexC } if (this.faultDetectionAnnc != null) { setFaultDetectionAnnc(this.faultDetectionAnnc); - } - + } if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } if (this.battery != null) { setBattery(this.battery); } if (this.batteryAnnc != null) { setBatteryAnnc(this.batteryAnnc); - } - + } if (this.electricVehicleConnector != null) { setElectricVehicleConnector(this.electricVehicleConnector); } if (this.electricVehicleConnectorAnnc != null) { setElectricVehicleConnectorAnnc(this.electricVehicleConnectorAnnc); - } - + } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -104,10 +98,9 @@ public class DeviceElectricVehicleChargerFlexContainerAnnc extends AbstractFlexC return faultDetection; } - @XmlElement(name="fauDnAnnc", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainerAnnc faultDetectionAnnc; - - + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { this.faultDetectionAnnc = faultDetectionAnnc; getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); @@ -118,10 +111,9 @@ public class DeviceElectricVehicleChargerFlexContainerAnnc extends AbstractFlexC return faultDetectionAnnc; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -132,10 +124,9 @@ public class DeviceElectricVehicleChargerFlexContainerAnnc extends AbstractFlexC return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -146,38 +137,35 @@ public class DeviceElectricVehicleChargerFlexContainerAnnc extends AbstractFlexC return binarySwitchAnnc; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; - - - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="batty", required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BatteryFlexContainer battery; - - + public void setBattery(BatteryFlexContainer battery) { this.battery = battery; getFlexContainerOrContainerOrSubscription().add(battery); @@ -188,10 +176,9 @@ public class DeviceElectricVehicleChargerFlexContainerAnnc extends AbstractFlexC return battery; } - @XmlElement(name="battyAnnc", required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BatteryFlexContainerAnnc batteryAnnc; - - + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { this.batteryAnnc = batteryAnnc; getFlexContainerOrContainerOrSubscription().add(batteryAnnc); @@ -202,10 +189,9 @@ public class DeviceElectricVehicleChargerFlexContainerAnnc extends AbstractFlexC return batteryAnnc; } - @XmlElement(name="elVCr", required=true, type=ElectricVehicleConnectorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ElectricVehicleConnectorFlexContainer.SHORT_NAME, required=true, type=ElectricVehicleConnectorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ElectricVehicleConnectorFlexContainer electricVehicleConnector; - - + public void setElectricVehicleConnector(ElectricVehicleConnectorFlexContainer electricVehicleConnector) { this.electricVehicleConnector = electricVehicleConnector; getFlexContainerOrContainerOrSubscription().add(electricVehicleConnector); @@ -216,10 +202,9 @@ public class DeviceElectricVehicleChargerFlexContainerAnnc extends AbstractFlexC return electricVehicleConnector; } - @XmlElement(name="elVCrAnnc", required=true, type=ElectricVehicleConnectorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ElectricVehicleConnectorFlexContainerAnnc.SHORT_NAME, required=true, type=ElectricVehicleConnectorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ElectricVehicleConnectorFlexContainerAnnc electricVehicleConnectorAnnc; - - + public void setElectricVehicleConnectorAnnc(ElectricVehicleConnectorFlexContainerAnnc electricVehicleConnectorAnnc) { this.electricVehicleConnectorAnnc = electricVehicleConnectorAnnc; getFlexContainerOrContainerOrSubscription().add(electricVehicleConnectorAnnc); @@ -230,4 +215,4 @@ public class DeviceElectricVehicleChargerFlexContainerAnnc extends AbstractFlexC return electricVehicleConnectorAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFanFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFanFlexContainer.java new file mode 100644 index 00000000..a6223bf2 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFanFlexContainer.java @@ -0,0 +1,64 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceFan + +A fan is a device that is used to monitor or control the state of a fanning device. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceFanFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceFanFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceFanFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceFan"; + public static final String SHORT_NAME = "devFn"; + + public DeviceFanFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceFanFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFanFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFanFlexContainerAnnc.java new file mode 100644 index 00000000..b317f4f7 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFanFlexContainerAnnc.java @@ -0,0 +1,82 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceFanAnnc + +A fan is a device that is used to monitor or control the state of a fanning device. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceFanFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceFanFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceFanFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceFanAnnc"; + public static final String SHORT_NAME = "devFnAnnc"; + + public DeviceFanFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceFanFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFloodDetectorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFloodDetectorFlexContainer.java index 4eaf0899..9c513ff6 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFloodDetectorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFloodDetectorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceFloodDetector -A door is a door. -Created: 2018-06-11 12:14:18 + +Created: 2018-06-29 17:19:56 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceFloodDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,7 +38,7 @@ public class DeviceFloodDetectorFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getWaterSensor(); } @@ -48,11 +47,10 @@ public class DeviceFloodDetectorFlexContainer extends AbstractFlexContainer { setWaterSensor(this.waterSensor); } } - - @XmlElement(name="watSr", required=true, type=WaterSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=WaterSensorFlexContainer.SHORT_NAME, required=true, type=WaterSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private WaterSensorFlexContainer waterSensor; - - + public void setWaterSensor(WaterSensorFlexContainer waterSensor) { this.waterSensor = waterSensor; getFlexContainerOrContainerOrSubscription().add(waterSensor); @@ -63,4 +61,4 @@ public class DeviceFloodDetectorFlexContainer extends AbstractFlexContainer { return waterSensor; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFloodDetectorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFloodDetectorFlexContainerAnnc.java index 84e0f61b..e02b3072 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFloodDetectorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFloodDetectorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceFloodDetectorAnnc -A door is a door. -Created: 2018-06-11 12:14:18 + +Created: 2018-06-29 17:19:56 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceFloodDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceFloodDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,12 +37,12 @@ public class DeviceFloodDetectorFlexContainerAnnc extends AbstractFlexContainerA setContainerDefinition("org.onem2m.home.device." + DeviceFloodDetectorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getWaterSensor(); getWaterSensorAnnc(); - } + } public void finalizeDeserialization() { if (this.waterSensor != null) { @@ -50,14 +50,12 @@ public class DeviceFloodDetectorFlexContainerAnnc extends AbstractFlexContainerA } if (this.waterSensorAnnc != null) { setWaterSensorAnnc(this.waterSensorAnnc); - } - + } } - - @XmlElement(name="watSr", required=true, type=WaterSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=WaterSensorFlexContainer.SHORT_NAME, required=true, type=WaterSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private WaterSensorFlexContainer waterSensor; - - + public void setWaterSensor(WaterSensorFlexContainer waterSensor) { this.waterSensor = waterSensor; getFlexContainerOrContainerOrSubscription().add(waterSensor); @@ -68,10 +66,9 @@ public class DeviceFloodDetectorFlexContainerAnnc extends AbstractFlexContainerA return waterSensor; } - @XmlElement(name="watSrAnnc", required=true, type=WaterSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=WaterSensorFlexContainerAnnc.SHORT_NAME, required=true, type=WaterSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private WaterSensorFlexContainerAnnc waterSensorAnnc; - - + public void setWaterSensorAnnc(WaterSensorFlexContainerAnnc waterSensorAnnc) { this.waterSensorAnnc = waterSensorAnnc; getFlexContainerOrContainerOrSubscription().add(waterSensorAnnc); @@ -82,4 +79,4 @@ public class DeviceFloodDetectorFlexContainerAnnc extends AbstractFlexContainerA return waterSensorAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFoodProbeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFoodProbeFlexContainer.java new file mode 100644 index 00000000..2b9045d7 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFoodProbeFlexContainer.java @@ -0,0 +1,64 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceFoodProbe + +A food probe is a device that is used to measure the internal temperature of food. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceFoodProbeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceFoodProbeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceFoodProbeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceFoodProbe"; + public static final String SHORT_NAME = "deFPe"; + + public DeviceFoodProbeFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceFoodProbeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getTemperature(); + } + + public void finalizeDeserialization() { + if (this.temperature != null) { + setTemperature(this.temperature); + } + } + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer temperature; + + public void setTemperature(TemperatureFlexContainer temperature) { + this.temperature = temperature; + getFlexContainerOrContainerOrSubscription().add(temperature); + } + + public TemperatureFlexContainer getTemperature() { + this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return temperature; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFoodProbeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFoodProbeFlexContainerAnnc.java new file mode 100644 index 00000000..59f1171a --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFoodProbeFlexContainerAnnc.java @@ -0,0 +1,82 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceFoodProbeAnnc + +A food probe is a device that is used to measure the internal temperature of food. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceFoodProbeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceFoodProbeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceFoodProbeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceFoodProbeAnnc"; + public static final String SHORT_NAME = "deFPeAnnc"; + + public DeviceFoodProbeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceFoodProbeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getTemperature(); + getTemperatureAnnc(); + } + + public void finalizeDeserialization() { + if (this.temperature != null) { + setTemperature(this.temperature); + } + if (this.temperatureAnnc != null) { + setTemperatureAnnc(this.temperatureAnnc); + } + } + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer temperature; + + public void setTemperature(TemperatureFlexContainer temperature) { + this.temperature = temperature; + getFlexContainerOrContainerOrSubscription().add(temperature); + } + + public TemperatureFlexContainer getTemperature() { + this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return temperature; + } + + @XmlElement(name=TemperatureFlexContainerAnnc.SHORT_NAME, required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainerAnnc temperatureAnnc; + + public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { + this.temperatureAnnc = temperatureAnnc; + getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); + } + + public TemperatureFlexContainerAnnc getTemperatureAnnc() { + this.temperatureAnnc = (TemperatureFlexContainerAnnc) getResourceByName(TemperatureFlexContainerAnnc.SHORT_NAME); + return temperatureAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFreezerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFreezerFlexContainer.java new file mode 100644 index 00000000..97d72e48 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFreezerFlexContainer.java @@ -0,0 +1,64 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceFreezer + +A freezer is a large container like a fridge in which the temperature is kept below freezing point, so that food can be storeed inside of it for long periods. This freezer information model provides capabilities to monitor freezer specific functions and resources. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceFreezerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceFreezerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceFreezerFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceFreezer"; + public static final String SHORT_NAME = "devFr"; + + public DeviceFreezerFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceFreezerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getTemperature(); + } + + public void finalizeDeserialization() { + if (this.temperature != null) { + setTemperature(this.temperature); + } + } + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer temperature; + + public void setTemperature(TemperatureFlexContainer temperature) { + this.temperature = temperature; + getFlexContainerOrContainerOrSubscription().add(temperature); + } + + public TemperatureFlexContainer getTemperature() { + this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return temperature; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFreezerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFreezerFlexContainerAnnc.java new file mode 100644 index 00000000..39111fa1 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceFreezerFlexContainerAnnc.java @@ -0,0 +1,82 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceFreezerAnnc + +A freezer is a large container like a fridge in which the temperature is kept below freezing point, so that food can be storeed inside of it for long periods. This freezer information model provides capabilities to monitor freezer specific functions and resources. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceFreezerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceFreezerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceFreezerFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceFreezerAnnc"; + public static final String SHORT_NAME = "devFrAnnc"; + + public DeviceFreezerFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceFreezerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getTemperature(); + getTemperatureAnnc(); + } + + public void finalizeDeserialization() { + if (this.temperature != null) { + setTemperature(this.temperature); + } + if (this.temperatureAnnc != null) { + setTemperatureAnnc(this.temperatureAnnc); + } + } + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer temperature; + + public void setTemperature(TemperatureFlexContainer temperature) { + this.temperature = temperature; + getFlexContainerOrContainerOrSubscription().add(temperature); + } + + public TemperatureFlexContainer getTemperature() { + this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return temperature; + } + + @XmlElement(name=TemperatureFlexContainerAnnc.SHORT_NAME, required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainerAnnc temperatureAnnc; + + public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { + this.temperatureAnnc = temperatureAnnc; + getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); + } + + public TemperatureFlexContainerAnnc getTemperatureAnnc() { + this.temperatureAnnc = (TemperatureFlexContainerAnnc) getResourceByName(TemperatureFlexContainerAnnc.SHORT_NAME); + return temperatureAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGasValveFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGasValveFlexContainer.java index 7b03d6ea..e720ae63 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGasValveFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGasValveFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceGasValve -A gas valve is a device that is used to open/close a gas valve. +A gas valve is a device that is used to turn the gas supply ON or OFF remotely. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:56 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceGasValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,46 +38,27 @@ public class DeviceGasValveFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { - getFaultDetection(); - getBinarySwitch(); + public void finalizeSerialization() { + getOpenLevel(); } public void finalizeDeserialization() { - if (this.faultDetection != null) { - setFaultDetection(this.faultDetection); + if (this.openLevel != null) { + setOpenLevel(this.openLevel); } - if (this.binarySwitch != null) { - setBinarySwitch(this.binarySwitch); - } - } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private FaultDetectionFlexContainer faultDetection; - - - public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { - this.faultDetection = faultDetection; - getFlexContainerOrContainerOrSubscription().add(faultDetection); } - - public FaultDetectionFlexContainer getFaultDetection() { - this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); - return faultDetection; - } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private BinarySwitchFlexContainer binarySwitch; - - - public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { - this.binarySwitch = binarySwitch; - getFlexContainerOrContainerOrSubscription().add(binarySwitch); + + @XmlElement(name=OpenLevelFlexContainer.SHORT_NAME, required=true, type=OpenLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainer openLevel; + + public void setOpenLevel(OpenLevelFlexContainer openLevel) { + this.openLevel = openLevel; + getFlexContainerOrContainerOrSubscription().add(openLevel); } - public BinarySwitchFlexContainer getBinarySwitch() { - this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); - return binarySwitch; + public OpenLevelFlexContainer getOpenLevel() { + this.openLevel = (OpenLevelFlexContainer) getResourceByName(OpenLevelFlexContainer.SHORT_NAME); + return openLevel; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGasValveFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGasValveFlexContainerAnnc.java index 3634a28d..0fddcf84 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGasValveFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGasValveFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceGasValveAnnc -A gas valve is a device that is used to open/close a gas valve. +A gas valve is a device that is used to turn the gas supply ON or OFF remotely. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:56 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceGasValveFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceGasValveFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,86 +37,46 @@ public class DeviceGasValveFlexContainerAnnc extends AbstractFlexContainerAnnc { setContainerDefinition("org.onem2m.home.device." + DeviceGasValveFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { - getFaultDetection(); - getFaultDetectionAnnc(); - getBinarySwitch(); - getBinarySwitchAnnc(); - } + getOpenLevel(); + getOpenLevelAnnc(); + } public void finalizeDeserialization() { - if (this.faultDetection != null) { - setFaultDetection(this.faultDetection); + if (this.openLevel != null) { + setOpenLevel(this.openLevel); } - if (this.faultDetectionAnnc != null) { - setFaultDetectionAnnc(this.faultDetectionAnnc); - } - - if (this.binarySwitch != null) { - setBinarySwitch(this.binarySwitch); + if (this.openLevelAnnc != null) { + setOpenLevelAnnc(this.openLevelAnnc); } - if (this.binarySwitchAnnc != null) { - setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private FaultDetectionFlexContainer faultDetection; - - - public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { - this.faultDetection = faultDetection; - getFlexContainerOrContainerOrSubscription().add(faultDetection); - } - - public FaultDetectionFlexContainer getFaultDetection() { - this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); - return faultDetection; - } - - @XmlElement(name="fauDnAnnc", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private FaultDetectionFlexContainerAnnc faultDetectionAnnc; - - - public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { - this.faultDetectionAnnc = faultDetectionAnnc; - getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); } - - public FaultDetectionFlexContainerAnnc getFaultDetectionAnnc() { - this.faultDetectionAnnc = (FaultDetectionFlexContainerAnnc) getResourceByName(FaultDetectionFlexContainerAnnc.SHORT_NAME); - return faultDetectionAnnc; - } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private BinarySwitchFlexContainer binarySwitch; - - - public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { - this.binarySwitch = binarySwitch; - getFlexContainerOrContainerOrSubscription().add(binarySwitch); + + @XmlElement(name=OpenLevelFlexContainer.SHORT_NAME, required=true, type=OpenLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainer openLevel; + + public void setOpenLevel(OpenLevelFlexContainer openLevel) { + this.openLevel = openLevel; + getFlexContainerOrContainerOrSubscription().add(openLevel); } - public BinarySwitchFlexContainer getBinarySwitch() { - this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); - return binarySwitch; + public OpenLevelFlexContainer getOpenLevel() { + this.openLevel = (OpenLevelFlexContainer) getResourceByName(OpenLevelFlexContainer.SHORT_NAME); + return openLevel; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - - public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { - this.binarySwitchAnnc = binarySwitchAnnc; - getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + @XmlElement(name=OpenLevelFlexContainerAnnc.SHORT_NAME, required=true, type=OpenLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainerAnnc openLevelAnnc; + + public void setOpenLevelAnnc(OpenLevelFlexContainerAnnc openLevelAnnc) { + this.openLevelAnnc = openLevelAnnc; + getFlexContainerOrContainerOrSubscription().add(openLevelAnnc); } - public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { - this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); - return binarySwitchAnnc; + public OpenLevelFlexContainerAnnc getOpenLevelAnnc() { + this.openLevelAnnc = (OpenLevelFlexContainerAnnc) getResourceByName(OpenLevelFlexContainerAnnc.SHORT_NAME); + return openLevelAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGlucosemeterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGlucosemeterFlexContainer.java new file mode 100644 index 00000000..ee8fa9b3 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGlucosemeterFlexContainer.java @@ -0,0 +1,81 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceGlucosemeter + +A glucometer is a device that can be used to monitor the blood glucose level. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceGlucosemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceGlucosemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceGlucosemeterFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceGlucosemeter"; + public static final String SHORT_NAME = "devGr"; + + public DeviceGlucosemeterFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceGlucosemeterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getGlucometer(); + getBattery(); + } + + public void finalizeDeserialization() { + if (this.glucometer != null) { + setGlucometer(this.glucometer); + } + if (this.battery != null) { + setBattery(this.battery); + } + } + + @XmlElement(name=GlucometerFlexContainer.SHORT_NAME, required=true, type=GlucometerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private GlucometerFlexContainer glucometer; + + public void setGlucometer(GlucometerFlexContainer glucometer) { + this.glucometer = glucometer; + getFlexContainerOrContainerOrSubscription().add(glucometer); + } + + public GlucometerFlexContainer getGlucometer() { + this.glucometer = (GlucometerFlexContainer) getResourceByName(GlucometerFlexContainer.SHORT_NAME); + return glucometer; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGlucosemeterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGlucosemeterFlexContainerAnnc.java new file mode 100644 index 00000000..fe6735fe --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceGlucosemeterFlexContainerAnnc.java @@ -0,0 +1,116 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceGlucosemeterAnnc + +A glucometer is a device that can be used to monitor the blood glucose level. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceGlucosemeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceGlucosemeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceGlucosemeterFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceGlucosemeterAnnc"; + public static final String SHORT_NAME = "devGrAnnc"; + + public DeviceGlucosemeterFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceGlucosemeterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getGlucometer(); + getGlucometerAnnc(); + getBattery(); + getBatteryAnnc(); + } + + public void finalizeDeserialization() { + if (this.glucometer != null) { + setGlucometer(this.glucometer); + } + if (this.glucometerAnnc != null) { + setGlucometerAnnc(this.glucometerAnnc); + } + if (this.battery != null) { + setBattery(this.battery); + } + if (this.batteryAnnc != null) { + setBatteryAnnc(this.batteryAnnc); + } + } + + @XmlElement(name=GlucometerFlexContainer.SHORT_NAME, required=true, type=GlucometerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private GlucometerFlexContainer glucometer; + + public void setGlucometer(GlucometerFlexContainer glucometer) { + this.glucometer = glucometer; + getFlexContainerOrContainerOrSubscription().add(glucometer); + } + + public GlucometerFlexContainer getGlucometer() { + this.glucometer = (GlucometerFlexContainer) getResourceByName(GlucometerFlexContainer.SHORT_NAME); + return glucometer; + } + + @XmlElement(name=GlucometerFlexContainerAnnc.SHORT_NAME, required=true, type=GlucometerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private GlucometerFlexContainerAnnc glucometerAnnc; + + public void setGlucometerAnnc(GlucometerFlexContainerAnnc glucometerAnnc) { + this.glucometerAnnc = glucometerAnnc; + getFlexContainerOrContainerOrSubscription().add(glucometerAnnc); + } + + public GlucometerFlexContainerAnnc getGlucometerAnnc() { + this.glucometerAnnc = (GlucometerFlexContainerAnnc) getResourceByName(GlucometerFlexContainerAnnc.SHORT_NAME); + return glucometerAnnc; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainerAnnc batteryAnnc; + + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { + this.batteryAnnc = batteryAnnc; + getFlexContainerOrContainerOrSubscription().add(batteryAnnc); + } + + public BatteryFlexContainerAnnc getBatteryAnnc() { + this.batteryAnnc = (BatteryFlexContainerAnnc) getResourceByName(BatteryFlexContainerAnnc.SHORT_NAME); + return batteryAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHeartRateMonitorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHeartRateMonitorFlexContainer.java new file mode 100644 index 00000000..334e3357 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHeartRateMonitorFlexContainer.java @@ -0,0 +1,81 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceHeartRateMonitor + +A heart rate monitor is a device that can be used to monitor the heart rate. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceHeartRateMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceHeartRateMonitorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceHeartRateMonitorFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceHeartRateMonitor"; + public static final String SHORT_NAME = "dHRMr"; + + public DeviceHeartRateMonitorFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceHeartRateMonitorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getPulsemeter(); + getBattery(); + } + + public void finalizeDeserialization() { + if (this.pulsemeter != null) { + setPulsemeter(this.pulsemeter); + } + if (this.battery != null) { + setBattery(this.battery); + } + } + + @XmlElement(name=PulsemeterFlexContainer.SHORT_NAME, required=true, type=PulsemeterFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PulsemeterFlexContainer pulsemeter; + + public void setPulsemeter(PulsemeterFlexContainer pulsemeter) { + this.pulsemeter = pulsemeter; + getFlexContainerOrContainerOrSubscription().add(pulsemeter); + } + + public PulsemeterFlexContainer getPulsemeter() { + this.pulsemeter = (PulsemeterFlexContainer) getResourceByName(PulsemeterFlexContainer.SHORT_NAME); + return pulsemeter; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHeartRateMonitorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHeartRateMonitorFlexContainerAnnc.java new file mode 100644 index 00000000..bb975d3d --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHeartRateMonitorFlexContainerAnnc.java @@ -0,0 +1,116 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceHeartRateMonitorAnnc + +A heart rate monitor is a device that can be used to monitor the heart rate. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceHeartRateMonitorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceHeartRateMonitorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceHeartRateMonitorFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceHeartRateMonitorAnnc"; + public static final String SHORT_NAME = "dHRMrAnnc"; + + public DeviceHeartRateMonitorFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceHeartRateMonitorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getPulsemeter(); + getPulsemeterAnnc(); + getBattery(); + getBatteryAnnc(); + } + + public void finalizeDeserialization() { + if (this.pulsemeter != null) { + setPulsemeter(this.pulsemeter); + } + if (this.pulsemeterAnnc != null) { + setPulsemeterAnnc(this.pulsemeterAnnc); + } + if (this.battery != null) { + setBattery(this.battery); + } + if (this.batteryAnnc != null) { + setBatteryAnnc(this.batteryAnnc); + } + } + + @XmlElement(name=PulsemeterFlexContainer.SHORT_NAME, required=true, type=PulsemeterFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PulsemeterFlexContainer pulsemeter; + + public void setPulsemeter(PulsemeterFlexContainer pulsemeter) { + this.pulsemeter = pulsemeter; + getFlexContainerOrContainerOrSubscription().add(pulsemeter); + } + + public PulsemeterFlexContainer getPulsemeter() { + this.pulsemeter = (PulsemeterFlexContainer) getResourceByName(PulsemeterFlexContainer.SHORT_NAME); + return pulsemeter; + } + + @XmlElement(name=PulsemeterFlexContainerAnnc.SHORT_NAME, required=true, type=PulsemeterFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PulsemeterFlexContainerAnnc pulsemeterAnnc; + + public void setPulsemeterAnnc(PulsemeterFlexContainerAnnc pulsemeterAnnc) { + this.pulsemeterAnnc = pulsemeterAnnc; + getFlexContainerOrContainerOrSubscription().add(pulsemeterAnnc); + } + + public PulsemeterFlexContainerAnnc getPulsemeterAnnc() { + this.pulsemeterAnnc = (PulsemeterFlexContainerAnnc) getResourceByName(PulsemeterFlexContainerAnnc.SHORT_NAME); + return pulsemeterAnnc; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainerAnnc batteryAnnc; + + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { + this.batteryAnnc = batteryAnnc; + getFlexContainerOrContainerOrSubscription().add(batteryAnnc); + } + + public BatteryFlexContainerAnnc getBatteryAnnc() { + this.batteryAnnc = (BatteryFlexContainerAnnc) getResourceByName(BatteryFlexContainerAnnc.SHORT_NAME); + return batteryAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHomeCCTVFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHomeCCTVFlexContainer.java new file mode 100644 index 00000000..8076342e --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHomeCCTVFlexContainer.java @@ -0,0 +1,251 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceHomeCCTV + +A home CCTV is a smart home appliance to provide monitoring capabilities when people stay way from their home or a room, or to monitor the environmental status of their home or room. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceHomeCCTVFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceHomeCCTVFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceHomeCCTVFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceHomeCCTV"; + public static final String SHORT_NAME = "dHCCT"; + + public DeviceHomeCCTVFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceHomeCCTVFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getSessionDescription(); + getPlayerControl(); + getRunState(); + getMotionSensor(); + getAirQualitySensor(); + getOzoneMeter(); + getSmokeSensor(); + getAcousticSensor(); + getImpactSensor(); + getFaultDetection(); + getAlarmSpeaker(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.sessionDescription != null) { + setSessionDescription(this.sessionDescription); + } + if (this.playerControl != null) { + setPlayerControl(this.playerControl); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.motionSensor != null) { + setMotionSensor(this.motionSensor); + } + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); + } + if (this.ozoneMeter != null) { + setOzoneMeter(this.ozoneMeter); + } + if (this.smokeSensor != null) { + setSmokeSensor(this.smokeSensor); + } + if (this.acousticSensor != null) { + setAcousticSensor(this.acousticSensor); + } + if (this.impactSensor != null) { + setImpactSensor(this.impactSensor); + } + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.alarmSpeaker != null) { + setAlarmSpeaker(this.alarmSpeaker); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=SessionDescriptionFlexContainer.SHORT_NAME, required=true, type=SessionDescriptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SessionDescriptionFlexContainer sessionDescription; + + public void setSessionDescription(SessionDescriptionFlexContainer sessionDescription) { + this.sessionDescription = sessionDescription; + getFlexContainerOrContainerOrSubscription().add(sessionDescription); + } + + public SessionDescriptionFlexContainer getSessionDescription() { + this.sessionDescription = (SessionDescriptionFlexContainer) getResourceByName(SessionDescriptionFlexContainer.SHORT_NAME); + return sessionDescription; + } + + @XmlElement(name=PlayerControlFlexContainer.SHORT_NAME, required=true, type=PlayerControlFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PlayerControlFlexContainer playerControl; + + public void setPlayerControl(PlayerControlFlexContainer playerControl) { + this.playerControl = playerControl; + getFlexContainerOrContainerOrSubscription().add(playerControl); + } + + public PlayerControlFlexContainer getPlayerControl() { + this.playerControl = (PlayerControlFlexContainer) getResourceByName(PlayerControlFlexContainer.SHORT_NAME); + return playerControl; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=MotionSensorFlexContainer.SHORT_NAME, required=true, type=MotionSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MotionSensorFlexContainer motionSensor; + + public void setMotionSensor(MotionSensorFlexContainer motionSensor) { + this.motionSensor = motionSensor; + getFlexContainerOrContainerOrSubscription().add(motionSensor); + } + + public MotionSensorFlexContainer getMotionSensor() { + this.motionSensor = (MotionSensorFlexContainer) getResourceByName(MotionSensorFlexContainer.SHORT_NAME); + return motionSensor; + } + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); + } + + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; + } + + @XmlElement(name=OzoneMeterFlexContainer.SHORT_NAME, required=true, type=OzoneMeterFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OzoneMeterFlexContainer ozoneMeter; + + public void setOzoneMeter(OzoneMeterFlexContainer ozoneMeter) { + this.ozoneMeter = ozoneMeter; + getFlexContainerOrContainerOrSubscription().add(ozoneMeter); + } + + public OzoneMeterFlexContainer getOzoneMeter() { + this.ozoneMeter = (OzoneMeterFlexContainer) getResourceByName(OzoneMeterFlexContainer.SHORT_NAME); + return ozoneMeter; + } + + @XmlElement(name=SmokeSensorFlexContainer.SHORT_NAME, required=true, type=SmokeSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SmokeSensorFlexContainer smokeSensor; + + public void setSmokeSensor(SmokeSensorFlexContainer smokeSensor) { + this.smokeSensor = smokeSensor; + getFlexContainerOrContainerOrSubscription().add(smokeSensor); + } + + public SmokeSensorFlexContainer getSmokeSensor() { + this.smokeSensor = (SmokeSensorFlexContainer) getResourceByName(SmokeSensorFlexContainer.SHORT_NAME); + return smokeSensor; + } + + @XmlElement(name=AcousticSensorFlexContainer.SHORT_NAME, required=true, type=AcousticSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AcousticSensorFlexContainer acousticSensor; + + public void setAcousticSensor(AcousticSensorFlexContainer acousticSensor) { + this.acousticSensor = acousticSensor; + getFlexContainerOrContainerOrSubscription().add(acousticSensor); + } + + public AcousticSensorFlexContainer getAcousticSensor() { + this.acousticSensor = (AcousticSensorFlexContainer) getResourceByName(AcousticSensorFlexContainer.SHORT_NAME); + return acousticSensor; + } + + @XmlElement(name=ImpactSensorFlexContainer.SHORT_NAME, required=true, type=ImpactSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ImpactSensorFlexContainer impactSensor; + + public void setImpactSensor(ImpactSensorFlexContainer impactSensor) { + this.impactSensor = impactSensor; + getFlexContainerOrContainerOrSubscription().add(impactSensor); + } + + public ImpactSensorFlexContainer getImpactSensor() { + this.impactSensor = (ImpactSensorFlexContainer) getResourceByName(ImpactSensorFlexContainer.SHORT_NAME); + return impactSensor; + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=AlarmSpeakerFlexContainer.SHORT_NAME, required=true, type=AlarmSpeakerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AlarmSpeakerFlexContainer alarmSpeaker; + + public void setAlarmSpeaker(AlarmSpeakerFlexContainer alarmSpeaker) { + this.alarmSpeaker = alarmSpeaker; + getFlexContainerOrContainerOrSubscription().add(alarmSpeaker); + } + + public AlarmSpeakerFlexContainer getAlarmSpeaker() { + this.alarmSpeaker = (AlarmSpeakerFlexContainer) getResourceByName(AlarmSpeakerFlexContainer.SHORT_NAME); + return alarmSpeaker; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHomeCCTVFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHomeCCTVFlexContainerAnnc.java new file mode 100644 index 00000000..6050719c --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHomeCCTVFlexContainerAnnc.java @@ -0,0 +1,456 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceHomeCCTVAnnc + +A home CCTV is a smart home appliance to provide monitoring capabilities when people stay way from their home or a room, or to monitor the environmental status of their home or room. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceHomeCCTVFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceHomeCCTVFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceHomeCCTVFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceHomeCCTVAnnc"; + public static final String SHORT_NAME = "dHCCTAnnc"; + + public DeviceHomeCCTVFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceHomeCCTVFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getSessionDescription(); + getSessionDescriptionAnnc(); + getPlayerControl(); + getPlayerControlAnnc(); + getRunState(); + getRunStateAnnc(); + getMotionSensor(); + getMotionSensorAnnc(); + getAirQualitySensor(); + getAirQualitySensorAnnc(); + getOzoneMeter(); + getOzoneMeterAnnc(); + getSmokeSensor(); + getSmokeSensorAnnc(); + getAcousticSensor(); + getAcousticSensorAnnc(); + getImpactSensor(); + getImpactSensorAnnc(); + getFaultDetection(); + getFaultDetectionAnnc(); + getAlarmSpeaker(); + getAlarmSpeakerAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.sessionDescription != null) { + setSessionDescription(this.sessionDescription); + } + if (this.sessionDescriptionAnnc != null) { + setSessionDescriptionAnnc(this.sessionDescriptionAnnc); + } + if (this.playerControl != null) { + setPlayerControl(this.playerControl); + } + if (this.playerControlAnnc != null) { + setPlayerControlAnnc(this.playerControlAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.motionSensor != null) { + setMotionSensor(this.motionSensor); + } + if (this.motionSensorAnnc != null) { + setMotionSensorAnnc(this.motionSensorAnnc); + } + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); + } + if (this.airQualitySensorAnnc != null) { + setAirQualitySensorAnnc(this.airQualitySensorAnnc); + } + if (this.ozoneMeter != null) { + setOzoneMeter(this.ozoneMeter); + } + if (this.ozoneMeterAnnc != null) { + setOzoneMeterAnnc(this.ozoneMeterAnnc); + } + if (this.smokeSensor != null) { + setSmokeSensor(this.smokeSensor); + } + if (this.smokeSensorAnnc != null) { + setSmokeSensorAnnc(this.smokeSensorAnnc); + } + if (this.acousticSensor != null) { + setAcousticSensor(this.acousticSensor); + } + if (this.acousticSensorAnnc != null) { + setAcousticSensorAnnc(this.acousticSensorAnnc); + } + if (this.impactSensor != null) { + setImpactSensor(this.impactSensor); + } + if (this.impactSensorAnnc != null) { + setImpactSensorAnnc(this.impactSensorAnnc); + } + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.faultDetectionAnnc != null) { + setFaultDetectionAnnc(this.faultDetectionAnnc); + } + if (this.alarmSpeaker != null) { + setAlarmSpeaker(this.alarmSpeaker); + } + if (this.alarmSpeakerAnnc != null) { + setAlarmSpeakerAnnc(this.alarmSpeakerAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=SessionDescriptionFlexContainer.SHORT_NAME, required=true, type=SessionDescriptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SessionDescriptionFlexContainer sessionDescription; + + public void setSessionDescription(SessionDescriptionFlexContainer sessionDescription) { + this.sessionDescription = sessionDescription; + getFlexContainerOrContainerOrSubscription().add(sessionDescription); + } + + public SessionDescriptionFlexContainer getSessionDescription() { + this.sessionDescription = (SessionDescriptionFlexContainer) getResourceByName(SessionDescriptionFlexContainer.SHORT_NAME); + return sessionDescription; + } + + @XmlElement(name=SessionDescriptionFlexContainerAnnc.SHORT_NAME, required=true, type=SessionDescriptionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SessionDescriptionFlexContainerAnnc sessionDescriptionAnnc; + + public void setSessionDescriptionAnnc(SessionDescriptionFlexContainerAnnc sessionDescriptionAnnc) { + this.sessionDescriptionAnnc = sessionDescriptionAnnc; + getFlexContainerOrContainerOrSubscription().add(sessionDescriptionAnnc); + } + + public SessionDescriptionFlexContainerAnnc getSessionDescriptionAnnc() { + this.sessionDescriptionAnnc = (SessionDescriptionFlexContainerAnnc) getResourceByName(SessionDescriptionFlexContainerAnnc.SHORT_NAME); + return sessionDescriptionAnnc; + } + + @XmlElement(name=PlayerControlFlexContainer.SHORT_NAME, required=true, type=PlayerControlFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PlayerControlFlexContainer playerControl; + + public void setPlayerControl(PlayerControlFlexContainer playerControl) { + this.playerControl = playerControl; + getFlexContainerOrContainerOrSubscription().add(playerControl); + } + + public PlayerControlFlexContainer getPlayerControl() { + this.playerControl = (PlayerControlFlexContainer) getResourceByName(PlayerControlFlexContainer.SHORT_NAME); + return playerControl; + } + + @XmlElement(name=PlayerControlFlexContainerAnnc.SHORT_NAME, required=true, type=PlayerControlFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PlayerControlFlexContainerAnnc playerControlAnnc; + + public void setPlayerControlAnnc(PlayerControlFlexContainerAnnc playerControlAnnc) { + this.playerControlAnnc = playerControlAnnc; + getFlexContainerOrContainerOrSubscription().add(playerControlAnnc); + } + + public PlayerControlFlexContainerAnnc getPlayerControlAnnc() { + this.playerControlAnnc = (PlayerControlFlexContainerAnnc) getResourceByName(PlayerControlFlexContainerAnnc.SHORT_NAME); + return playerControlAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=MotionSensorFlexContainer.SHORT_NAME, required=true, type=MotionSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MotionSensorFlexContainer motionSensor; + + public void setMotionSensor(MotionSensorFlexContainer motionSensor) { + this.motionSensor = motionSensor; + getFlexContainerOrContainerOrSubscription().add(motionSensor); + } + + public MotionSensorFlexContainer getMotionSensor() { + this.motionSensor = (MotionSensorFlexContainer) getResourceByName(MotionSensorFlexContainer.SHORT_NAME); + return motionSensor; + } + + @XmlElement(name=MotionSensorFlexContainerAnnc.SHORT_NAME, required=true, type=MotionSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MotionSensorFlexContainerAnnc motionSensorAnnc; + + public void setMotionSensorAnnc(MotionSensorFlexContainerAnnc motionSensorAnnc) { + this.motionSensorAnnc = motionSensorAnnc; + getFlexContainerOrContainerOrSubscription().add(motionSensorAnnc); + } + + public MotionSensorFlexContainerAnnc getMotionSensorAnnc() { + this.motionSensorAnnc = (MotionSensorFlexContainerAnnc) getResourceByName(MotionSensorFlexContainerAnnc.SHORT_NAME); + return motionSensorAnnc; + } + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); + } + + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; + } + + @XmlElement(name=AirQualitySensorFlexContainerAnnc.SHORT_NAME, required=true, type=AirQualitySensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainerAnnc airQualitySensorAnnc; + + public void setAirQualitySensorAnnc(AirQualitySensorFlexContainerAnnc airQualitySensorAnnc) { + this.airQualitySensorAnnc = airQualitySensorAnnc; + getFlexContainerOrContainerOrSubscription().add(airQualitySensorAnnc); + } + + public AirQualitySensorFlexContainerAnnc getAirQualitySensorAnnc() { + this.airQualitySensorAnnc = (AirQualitySensorFlexContainerAnnc) getResourceByName(AirQualitySensorFlexContainerAnnc.SHORT_NAME); + return airQualitySensorAnnc; + } + + @XmlElement(name=OzoneMeterFlexContainer.SHORT_NAME, required=true, type=OzoneMeterFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OzoneMeterFlexContainer ozoneMeter; + + public void setOzoneMeter(OzoneMeterFlexContainer ozoneMeter) { + this.ozoneMeter = ozoneMeter; + getFlexContainerOrContainerOrSubscription().add(ozoneMeter); + } + + public OzoneMeterFlexContainer getOzoneMeter() { + this.ozoneMeter = (OzoneMeterFlexContainer) getResourceByName(OzoneMeterFlexContainer.SHORT_NAME); + return ozoneMeter; + } + + @XmlElement(name=OzoneMeterFlexContainerAnnc.SHORT_NAME, required=true, type=OzoneMeterFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OzoneMeterFlexContainerAnnc ozoneMeterAnnc; + + public void setOzoneMeterAnnc(OzoneMeterFlexContainerAnnc ozoneMeterAnnc) { + this.ozoneMeterAnnc = ozoneMeterAnnc; + getFlexContainerOrContainerOrSubscription().add(ozoneMeterAnnc); + } + + public OzoneMeterFlexContainerAnnc getOzoneMeterAnnc() { + this.ozoneMeterAnnc = (OzoneMeterFlexContainerAnnc) getResourceByName(OzoneMeterFlexContainerAnnc.SHORT_NAME); + return ozoneMeterAnnc; + } + + @XmlElement(name=SmokeSensorFlexContainer.SHORT_NAME, required=true, type=SmokeSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SmokeSensorFlexContainer smokeSensor; + + public void setSmokeSensor(SmokeSensorFlexContainer smokeSensor) { + this.smokeSensor = smokeSensor; + getFlexContainerOrContainerOrSubscription().add(smokeSensor); + } + + public SmokeSensorFlexContainer getSmokeSensor() { + this.smokeSensor = (SmokeSensorFlexContainer) getResourceByName(SmokeSensorFlexContainer.SHORT_NAME); + return smokeSensor; + } + + @XmlElement(name=SmokeSensorFlexContainerAnnc.SHORT_NAME, required=true, type=SmokeSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SmokeSensorFlexContainerAnnc smokeSensorAnnc; + + public void setSmokeSensorAnnc(SmokeSensorFlexContainerAnnc smokeSensorAnnc) { + this.smokeSensorAnnc = smokeSensorAnnc; + getFlexContainerOrContainerOrSubscription().add(smokeSensorAnnc); + } + + public SmokeSensorFlexContainerAnnc getSmokeSensorAnnc() { + this.smokeSensorAnnc = (SmokeSensorFlexContainerAnnc) getResourceByName(SmokeSensorFlexContainerAnnc.SHORT_NAME); + return smokeSensorAnnc; + } + + @XmlElement(name=AcousticSensorFlexContainer.SHORT_NAME, required=true, type=AcousticSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AcousticSensorFlexContainer acousticSensor; + + public void setAcousticSensor(AcousticSensorFlexContainer acousticSensor) { + this.acousticSensor = acousticSensor; + getFlexContainerOrContainerOrSubscription().add(acousticSensor); + } + + public AcousticSensorFlexContainer getAcousticSensor() { + this.acousticSensor = (AcousticSensorFlexContainer) getResourceByName(AcousticSensorFlexContainer.SHORT_NAME); + return acousticSensor; + } + + @XmlElement(name=AcousticSensorFlexContainerAnnc.SHORT_NAME, required=true, type=AcousticSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AcousticSensorFlexContainerAnnc acousticSensorAnnc; + + public void setAcousticSensorAnnc(AcousticSensorFlexContainerAnnc acousticSensorAnnc) { + this.acousticSensorAnnc = acousticSensorAnnc; + getFlexContainerOrContainerOrSubscription().add(acousticSensorAnnc); + } + + public AcousticSensorFlexContainerAnnc getAcousticSensorAnnc() { + this.acousticSensorAnnc = (AcousticSensorFlexContainerAnnc) getResourceByName(AcousticSensorFlexContainerAnnc.SHORT_NAME); + return acousticSensorAnnc; + } + + @XmlElement(name=ImpactSensorFlexContainer.SHORT_NAME, required=true, type=ImpactSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ImpactSensorFlexContainer impactSensor; + + public void setImpactSensor(ImpactSensorFlexContainer impactSensor) { + this.impactSensor = impactSensor; + getFlexContainerOrContainerOrSubscription().add(impactSensor); + } + + public ImpactSensorFlexContainer getImpactSensor() { + this.impactSensor = (ImpactSensorFlexContainer) getResourceByName(ImpactSensorFlexContainer.SHORT_NAME); + return impactSensor; + } + + @XmlElement(name=ImpactSensorFlexContainerAnnc.SHORT_NAME, required=true, type=ImpactSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ImpactSensorFlexContainerAnnc impactSensorAnnc; + + public void setImpactSensorAnnc(ImpactSensorFlexContainerAnnc impactSensorAnnc) { + this.impactSensorAnnc = impactSensorAnnc; + getFlexContainerOrContainerOrSubscription().add(impactSensorAnnc); + } + + public ImpactSensorFlexContainerAnnc getImpactSensorAnnc() { + this.impactSensorAnnc = (ImpactSensorFlexContainerAnnc) getResourceByName(ImpactSensorFlexContainerAnnc.SHORT_NAME); + return impactSensorAnnc; + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainerAnnc faultDetectionAnnc; + + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { + this.faultDetectionAnnc = faultDetectionAnnc; + getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); + } + + public FaultDetectionFlexContainerAnnc getFaultDetectionAnnc() { + this.faultDetectionAnnc = (FaultDetectionFlexContainerAnnc) getResourceByName(FaultDetectionFlexContainerAnnc.SHORT_NAME); + return faultDetectionAnnc; + } + + @XmlElement(name=AlarmSpeakerFlexContainer.SHORT_NAME, required=true, type=AlarmSpeakerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AlarmSpeakerFlexContainer alarmSpeaker; + + public void setAlarmSpeaker(AlarmSpeakerFlexContainer alarmSpeaker) { + this.alarmSpeaker = alarmSpeaker; + getFlexContainerOrContainerOrSubscription().add(alarmSpeaker); + } + + public AlarmSpeakerFlexContainer getAlarmSpeaker() { + this.alarmSpeaker = (AlarmSpeakerFlexContainer) getResourceByName(AlarmSpeakerFlexContainer.SHORT_NAME); + return alarmSpeaker; + } + + @XmlElement(name=AlarmSpeakerFlexContainerAnnc.SHORT_NAME, required=true, type=AlarmSpeakerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AlarmSpeakerFlexContainerAnnc alarmSpeakerAnnc; + + public void setAlarmSpeakerAnnc(AlarmSpeakerFlexContainerAnnc alarmSpeakerAnnc) { + this.alarmSpeakerAnnc = alarmSpeakerAnnc; + getFlexContainerOrContainerOrSubscription().add(alarmSpeakerAnnc); + } + + public AlarmSpeakerFlexContainerAnnc getAlarmSpeakerAnnc() { + this.alarmSpeakerAnnc = (AlarmSpeakerFlexContainerAnnc) getResourceByName(AlarmSpeakerFlexContainerAnnc.SHORT_NAME); + return alarmSpeakerAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHumidifierFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHumidifierFlexContainer.java new file mode 100644 index 00000000..6599b420 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHumidifierFlexContainer.java @@ -0,0 +1,64 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceHumidifier + +A humidifier is a device that is used to monitor or control the state of a humidifying appliance. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceHumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceHumidifierFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceHumidifierFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceHumidifier"; + public static final String SHORT_NAME = "devHr"; + + public DeviceHumidifierFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceHumidifierFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHumidifierFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHumidifierFlexContainerAnnc.java new file mode 100644 index 00000000..b94d4134 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceHumidifierFlexContainerAnnc.java @@ -0,0 +1,82 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceHumidifierAnnc + +A humidifier is a device that is used to monitor or control the state of a humidifying appliance. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceHumidifierFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceHumidifierFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceHumidifierFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceHumidifierAnnc"; + public static final String SHORT_NAME = "devHrAnnc"; + + public DeviceHumidifierFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceHumidifierFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceKettleFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceKettleFlexContainer.java new file mode 100644 index 00000000..0e94d5d9 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceKettleFlexContainer.java @@ -0,0 +1,132 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceKettle + +A kettle is a device that is used to heat water. + +Created: 2018-06-29 17:19:56 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceKettleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceKettleFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceKettle"; + public static final String SHORT_NAME = "devKe"; + + public DeviceKettleFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceKettleFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getFaultDetection(); + getRunState(); + getWaterStatus(); + getBoilingSwitch(); + getKeepWarm(); + } + + public void finalizeDeserialization() { + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.waterStatus != null) { + setWaterStatus(this.waterStatus); + } + if (this.boilingSwitch != null) { + setBoilingSwitch(this.boilingSwitch); + } + if (this.keepWarm != null) { + setKeepWarm(this.keepWarm); + } + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=LiquidRemainingFlexContainer.SHORT_NAME, required=true, type=LiquidRemainingFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private LiquidRemainingFlexContainer waterStatus; + + public void setWaterStatus(LiquidRemainingFlexContainer waterStatus) { + this.waterStatus = waterStatus; + getFlexContainerOrContainerOrSubscription().add(waterStatus); + } + + public LiquidRemainingFlexContainer getWaterStatus() { + this.waterStatus = (LiquidRemainingFlexContainer) getResourceByName(LiquidRemainingFlexContainer.SHORT_NAME); + return waterStatus; + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer boilingSwitch; + + public void setBoilingSwitch(BinarySwitchFlexContainer boilingSwitch) { + this.boilingSwitch = boilingSwitch; + getFlexContainerOrContainerOrSubscription().add(boilingSwitch); + } + + public BinarySwitchFlexContainer getBoilingSwitch() { + this.boilingSwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return boilingSwitch; + } + + @XmlElement(name=KeepWarmFlexContainer.SHORT_NAME, required=true, type=KeepWarmFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private KeepWarmFlexContainer keepWarm; + + public void setKeepWarm(KeepWarmFlexContainer keepWarm) { + this.keepWarm = keepWarm; + getFlexContainerOrContainerOrSubscription().add(keepWarm); + } + + public KeepWarmFlexContainer getKeepWarm() { + this.keepWarm = (KeepWarmFlexContainer) getResourceByName(KeepWarmFlexContainer.SHORT_NAME); + return keepWarm; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceKettleFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceKettleFlexContainerAnnc.java new file mode 100644 index 00000000..36c3040f --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceKettleFlexContainerAnnc.java @@ -0,0 +1,150 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceKettleAnnc + +A kettle is a device that is used to heat water. + +Created: 2018-06-29 17:19:56 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceKettleFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceKettleFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceKettleFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceKettleAnnc"; + public static final String SHORT_NAME = "devKeAnnc"; + + public DeviceKettleFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceKettleFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getFaultDetection(); + getFaultDetectionAnnc(); + getRunState(); + getRunStateAnnc(); + getKeepWarm(); + getKeepWarmAnnc(); + } + + public void finalizeDeserialization() { + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.faultDetectionAnnc != null) { + setFaultDetectionAnnc(this.faultDetectionAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.keepWarm != null) { + setKeepWarm(this.keepWarm); + } + if (this.keepWarmAnnc != null) { + setKeepWarmAnnc(this.keepWarmAnnc); + } + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainerAnnc faultDetectionAnnc; + + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { + this.faultDetectionAnnc = faultDetectionAnnc; + getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); + } + + public FaultDetectionFlexContainerAnnc getFaultDetectionAnnc() { + this.faultDetectionAnnc = (FaultDetectionFlexContainerAnnc) getResourceByName(FaultDetectionFlexContainerAnnc.SHORT_NAME); + return faultDetectionAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=KeepWarmFlexContainer.SHORT_NAME, required=true, type=KeepWarmFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private KeepWarmFlexContainer keepWarm; + + public void setKeepWarm(KeepWarmFlexContainer keepWarm) { + this.keepWarm = keepWarm; + getFlexContainerOrContainerOrSubscription().add(keepWarm); + } + + public KeepWarmFlexContainer getKeepWarm() { + this.keepWarm = (KeepWarmFlexContainer) getResourceByName(KeepWarmFlexContainer.SHORT_NAME); + return keepWarm; + } + + @XmlElement(name=KeepWarmFlexContainerAnnc.SHORT_NAME, required=true, type=KeepWarmFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private KeepWarmFlexContainerAnnc keepWarmAnnc; + + public void setKeepWarmAnnc(KeepWarmFlexContainerAnnc keepWarmAnnc) { + this.keepWarmAnnc = keepWarmAnnc; + getFlexContainerOrContainerOrSubscription().add(keepWarmAnnc); + } + + public KeepWarmFlexContainerAnnc getKeepWarmAnnc() { + this.keepWarmAnnc = (KeepWarmFlexContainerAnnc) getResourceByName(KeepWarmFlexContainerAnnc.SHORT_NAME); + return keepWarmAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceLightFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceLightFlexContainer.java index 91366dab..65cf7d3e 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceLightFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceLightFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceLight -A light is a device that is used to control the state of an illumination device. +A light is a device that is used to control the state of an illumination appliance. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceLightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,10 +38,10 @@ public class DeviceLightFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getFaultDetection(); getBinarySwitch(); - getRunMode(); + getRunState(); getColour(); getColourSaturation(); getBrightness(); @@ -55,8 +54,8 @@ public class DeviceLightFlexContainer extends AbstractFlexContainer { if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); } if (this.colour != null) { setColour(this.colour); @@ -68,11 +67,10 @@ public class DeviceLightFlexContainer extends AbstractFlexContainer { setBrightness(this.brightness); } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -83,10 +81,9 @@ public class DeviceLightFlexContainer extends AbstractFlexContainer { return faultDetection; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -97,24 +94,22 @@ public class DeviceLightFlexContainer extends AbstractFlexContainer { return binarySwitch; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="color", required=true, type=ColourFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ColourFlexContainer.SHORT_NAME, required=true, type=ColourFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ColourFlexContainer colour; - - + public void setColour(ColourFlexContainer colour) { this.colour = colour; getFlexContainerOrContainerOrSubscription().add(colour); @@ -125,10 +120,9 @@ public class DeviceLightFlexContainer extends AbstractFlexContainer { return colour; } - @XmlElement(name="colSn", required=true, type=ColourSaturationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ColourSaturationFlexContainer.SHORT_NAME, required=true, type=ColourSaturationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ColourSaturationFlexContainer colourSaturation; - - + public void setColourSaturation(ColourSaturationFlexContainer colourSaturation) { this.colourSaturation = colourSaturation; getFlexContainerOrContainerOrSubscription().add(colourSaturation); @@ -139,10 +133,9 @@ public class DeviceLightFlexContainer extends AbstractFlexContainer { return colourSaturation; } - @XmlElement(name="brigs", required=true, type=BrightnessFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BrightnessFlexContainer.SHORT_NAME, required=true, type=BrightnessFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BrightnessFlexContainer brightness; - - + public void setBrightness(BrightnessFlexContainer brightness) { this.brightness = brightness; getFlexContainerOrContainerOrSubscription().add(brightness); @@ -153,4 +146,4 @@ public class DeviceLightFlexContainer extends AbstractFlexContainer { return brightness; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceLightFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceLightFlexContainerAnnc.java index e84fc795..ec1e3ee5 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceLightFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceLightFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceLightAnnc -A light is a device that is used to control the state of an illumination device. +A light is a device that is used to control the state of an illumination appliance. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceLightFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceLightFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,22 +37,22 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { setContainerDefinition("org.onem2m.home.device." + DeviceLightFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getFaultDetection(); getFaultDetectionAnnc(); getBinarySwitch(); getBinarySwitchAnnc(); - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); getColour(); getColourAnnc(); getColourSaturation(); getColourSaturationAnnc(); getBrightness(); getBrightnessAnnc(); - } + } public void finalizeDeserialization() { if (this.faultDetection != null) { @@ -60,49 +60,42 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { } if (this.faultDetectionAnnc != null) { setFaultDetectionAnnc(this.faultDetectionAnnc); - } - + } if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } if (this.colour != null) { setColour(this.colour); } if (this.colourAnnc != null) { setColourAnnc(this.colourAnnc); - } - + } if (this.colourSaturation != null) { setColourSaturation(this.colourSaturation); } if (this.colourSaturationAnnc != null) { setColourSaturationAnnc(this.colourSaturationAnnc); - } - + } if (this.brightness != null) { setBrightness(this.brightness); } if (this.brightnessAnnc != null) { setBrightnessAnnc(this.brightnessAnnc); - } - + } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -113,10 +106,9 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { return faultDetection; } - @XmlElement(name="fauDnAnnc", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainerAnnc faultDetectionAnnc; - - + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { this.faultDetectionAnnc = faultDetectionAnnc; getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); @@ -127,10 +119,9 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { return faultDetectionAnnc; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -141,10 +132,9 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -155,38 +145,35 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { return binarySwitchAnnc; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; - - - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="color", required=true, type=ColourFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ColourFlexContainer.SHORT_NAME, required=true, type=ColourFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ColourFlexContainer colour; - - + public void setColour(ColourFlexContainer colour) { this.colour = colour; getFlexContainerOrContainerOrSubscription().add(colour); @@ -197,10 +184,9 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { return colour; } - @XmlElement(name="colorAnnc", required=true, type=ColourFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ColourFlexContainerAnnc.SHORT_NAME, required=true, type=ColourFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ColourFlexContainerAnnc colourAnnc; - - + public void setColourAnnc(ColourFlexContainerAnnc colourAnnc) { this.colourAnnc = colourAnnc; getFlexContainerOrContainerOrSubscription().add(colourAnnc); @@ -211,10 +197,9 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { return colourAnnc; } - @XmlElement(name="colSn", required=true, type=ColourSaturationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ColourSaturationFlexContainer.SHORT_NAME, required=true, type=ColourSaturationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ColourSaturationFlexContainer colourSaturation; - - + public void setColourSaturation(ColourSaturationFlexContainer colourSaturation) { this.colourSaturation = colourSaturation; getFlexContainerOrContainerOrSubscription().add(colourSaturation); @@ -225,10 +210,9 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { return colourSaturation; } - @XmlElement(name="colSnAnnc", required=true, type=ColourSaturationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ColourSaturationFlexContainerAnnc.SHORT_NAME, required=true, type=ColourSaturationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ColourSaturationFlexContainerAnnc colourSaturationAnnc; - - + public void setColourSaturationAnnc(ColourSaturationFlexContainerAnnc colourSaturationAnnc) { this.colourSaturationAnnc = colourSaturationAnnc; getFlexContainerOrContainerOrSubscription().add(colourSaturationAnnc); @@ -239,10 +223,9 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { return colourSaturationAnnc; } - @XmlElement(name="brigs", required=true, type=BrightnessFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BrightnessFlexContainer.SHORT_NAME, required=true, type=BrightnessFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BrightnessFlexContainer brightness; - - + public void setBrightness(BrightnessFlexContainer brightness) { this.brightness = brightness; getFlexContainerOrContainerOrSubscription().add(brightness); @@ -253,10 +236,9 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { return brightness; } - @XmlElement(name="brigsAnnc", required=true, type=BrightnessFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BrightnessFlexContainerAnnc.SHORT_NAME, required=true, type=BrightnessFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BrightnessFlexContainerAnnc brightnessAnnc; - - + public void setBrightnessAnnc(BrightnessFlexContainerAnnc brightnessAnnc) { this.brightnessAnnc = brightnessAnnc; getFlexContainerOrContainerOrSubscription().add(brightnessAnnc); @@ -267,4 +249,4 @@ public class DeviceLightFlexContainerAnnc extends AbstractFlexContainerAnnc { return brightnessAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMicrogenerationFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMicrogenerationFlexContainer.java index f08eb10c..e765973d 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMicrogenerationFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMicrogenerationFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceMicrogeneration -A microgeneration is a Home Energy Management System (HEMS) device that is used to create energy. Examples of microgeneration devices are photovoltaics device or fuel cells. +A microgeneration is a Home Energy Management System (HEMS) device that is used to generate energy. Examples of microgeneration devices are photovoltaics device or fuel cells. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceMicrogenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,10 +38,10 @@ public class DeviceMicrogenerationFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getFaultDetection(); getBinarySwitch(); - getRunMode(); + getRunState(); getEnergyGeneration(); } @@ -53,18 +52,17 @@ public class DeviceMicrogenerationFlexContainer extends AbstractFlexContainer { if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); } if (this.energyGeneration != null) { setEnergyGeneration(this.energyGeneration); } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -75,10 +73,9 @@ public class DeviceMicrogenerationFlexContainer extends AbstractFlexContainer { return faultDetection; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -89,24 +86,22 @@ public class DeviceMicrogenerationFlexContainer extends AbstractFlexContainer { return binarySwitch; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="eneGn", required=true, type=EnergyGenerationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=EnergyGenerationFlexContainer.SHORT_NAME, required=true, type=EnergyGenerationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private EnergyGenerationFlexContainer energyGeneration; - - + public void setEnergyGeneration(EnergyGenerationFlexContainer energyGeneration) { this.energyGeneration = energyGeneration; getFlexContainerOrContainerOrSubscription().add(energyGeneration); @@ -117,4 +112,4 @@ public class DeviceMicrogenerationFlexContainer extends AbstractFlexContainer { return energyGeneration; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMicrogenerationFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMicrogenerationFlexContainerAnnc.java index e436bd82..19d6382a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMicrogenerationFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMicrogenerationFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceMicrogenerationAnnc -A microgeneration is a Home Energy Management System (HEMS) device that is used to create energy. Examples of microgeneration devices are photovoltaics device or fuel cells. +A microgeneration is a Home Energy Management System (HEMS) device that is used to generate energy. Examples of microgeneration devices are photovoltaics device or fuel cells. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceMicrogenerationFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceMicrogenerationFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,18 +37,18 @@ public class DeviceMicrogenerationFlexContainerAnnc extends AbstractFlexContaine setContainerDefinition("org.onem2m.home.device." + DeviceMicrogenerationFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getFaultDetection(); getFaultDetectionAnnc(); getBinarySwitch(); getBinarySwitchAnnc(); - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); getEnergyGeneration(); getEnergyGenerationAnnc(); - } + } public void finalizeDeserialization() { if (this.faultDetection != null) { @@ -56,35 +56,30 @@ public class DeviceMicrogenerationFlexContainerAnnc extends AbstractFlexContaine } if (this.faultDetectionAnnc != null) { setFaultDetectionAnnc(this.faultDetectionAnnc); - } - + } if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } if (this.energyGeneration != null) { setEnergyGeneration(this.energyGeneration); } if (this.energyGenerationAnnc != null) { setEnergyGenerationAnnc(this.energyGenerationAnnc); - } - + } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -95,10 +90,9 @@ public class DeviceMicrogenerationFlexContainerAnnc extends AbstractFlexContaine return faultDetection; } - @XmlElement(name="fauDnAnnc", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainerAnnc faultDetectionAnnc; - - + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { this.faultDetectionAnnc = faultDetectionAnnc; getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); @@ -109,10 +103,9 @@ public class DeviceMicrogenerationFlexContainerAnnc extends AbstractFlexContaine return faultDetectionAnnc; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -123,10 +116,9 @@ public class DeviceMicrogenerationFlexContainerAnnc extends AbstractFlexContaine return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -137,38 +129,35 @@ public class DeviceMicrogenerationFlexContainerAnnc extends AbstractFlexContaine return binarySwitchAnnc; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; - - - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="eneGn", required=true, type=EnergyGenerationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=EnergyGenerationFlexContainer.SHORT_NAME, required=true, type=EnergyGenerationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private EnergyGenerationFlexContainer energyGeneration; - - + public void setEnergyGeneration(EnergyGenerationFlexContainer energyGeneration) { this.energyGeneration = energyGeneration; getFlexContainerOrContainerOrSubscription().add(energyGeneration); @@ -179,10 +168,9 @@ public class DeviceMicrogenerationFlexContainerAnnc extends AbstractFlexContaine return energyGeneration; } - @XmlElement(name="eneGnAnnc", required=true, type=EnergyGenerationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=EnergyGenerationFlexContainerAnnc.SHORT_NAME, required=true, type=EnergyGenerationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private EnergyGenerationFlexContainerAnnc energyGenerationAnnc; - - + public void setEnergyGenerationAnnc(EnergyGenerationFlexContainerAnnc energyGenerationAnnc) { this.energyGenerationAnnc = energyGenerationAnnc; getFlexContainerOrContainerOrSubscription().add(energyGenerationAnnc); @@ -193,4 +181,4 @@ public class DeviceMicrogenerationFlexContainerAnnc extends AbstractFlexContaine return energyGenerationAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMotionDetectorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMotionDetectorFlexContainer.java index d188db5b..394f773d 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMotionDetectorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMotionDetectorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceMotionDetector -A MotionDetector is a device that triggers alarm in case of motion detection. -Created: 2018-06-11 12:14:18 + +Created: 2018-07-04 10:25:10 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceMotionDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,7 +38,7 @@ public class DeviceMotionDetectorFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getMotionSensor(); } @@ -48,11 +47,10 @@ public class DeviceMotionDetectorFlexContainer extends AbstractFlexContainer { setMotionSensor(this.motionSensor); } } - - @XmlElement(name="motSr", required=true, type=MotionSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=MotionSensorFlexContainer.SHORT_NAME, required=true, type=MotionSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private MotionSensorFlexContainer motionSensor; - - + public void setMotionSensor(MotionSensorFlexContainer motionSensor) { this.motionSensor = motionSensor; getFlexContainerOrContainerOrSubscription().add(motionSensor); @@ -63,4 +61,4 @@ public class DeviceMotionDetectorFlexContainer extends AbstractFlexContainer { return motionSensor; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMotionDetectorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMotionDetectorFlexContainerAnnc.java index 61c5b8b7..4c42196b 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMotionDetectorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMotionDetectorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceMotionDetectorAnnc -A MotionDetector is a device that triggers alarm in case of motion detection. -Created: 2018-06-11 12:14:18 + +Created: 2018-07-04 10:25:10 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceMotionDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceMotionDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,12 +37,12 @@ public class DeviceMotionDetectorFlexContainerAnnc extends AbstractFlexContainer setContainerDefinition("org.onem2m.home.device." + DeviceMotionDetectorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getMotionSensor(); getMotionSensorAnnc(); - } + } public void finalizeDeserialization() { if (this.motionSensor != null) { @@ -50,14 +50,12 @@ public class DeviceMotionDetectorFlexContainerAnnc extends AbstractFlexContainer } if (this.motionSensorAnnc != null) { setMotionSensorAnnc(this.motionSensorAnnc); - } - + } } - - @XmlElement(name="motSr", required=true, type=MotionSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=MotionSensorFlexContainer.SHORT_NAME, required=true, type=MotionSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private MotionSensorFlexContainer motionSensor; - - + public void setMotionSensor(MotionSensorFlexContainer motionSensor) { this.motionSensor = motionSensor; getFlexContainerOrContainerOrSubscription().add(motionSensor); @@ -68,10 +66,9 @@ public class DeviceMotionDetectorFlexContainerAnnc extends AbstractFlexContainer return motionSensor; } - @XmlElement(name="motSrAnnc", required=true, type=MotionSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=MotionSensorFlexContainerAnnc.SHORT_NAME, required=true, type=MotionSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private MotionSensorFlexContainerAnnc motionSensorAnnc; - - + public void setMotionSensorAnnc(MotionSensorFlexContainerAnnc motionSensorAnnc) { this.motionSensorAnnc = motionSensorAnnc; getFlexContainerOrContainerOrSubscription().add(motionSensorAnnc); @@ -82,4 +79,4 @@ public class DeviceMotionDetectorFlexContainerAnnc extends AbstractFlexContainer return motionSensorAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMultiFunctionPrinterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMultiFunctionPrinterFlexContainer.java new file mode 100644 index 00000000..77bd91be --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMultiFunctionPrinterFlexContainer.java @@ -0,0 +1,132 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceMultiFunctionPrinter + +A Multi Function Printer (MFP) is an office machine which incorporates the functionality of multiple devices in one, so as to have a smaller footprint in home or office. A typical MFP may act as a combination of printer, scanner and more. This MFP information model provides capabilities to control and monitor MFP specific functions and resources. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceMultiFunctionPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceMultiFunctionPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceMultiFunctionPrinterFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceMultiFunctionPrinter"; + public static final String SHORT_NAME = "dMFPr"; + + public DeviceMultiFunctionPrinterFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceMultiFunctionPrinterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getPrinterRunState(); + getScannerRunState(); + getAutoDocumentFeeder(); + getPrintQueue(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.printerRunState != null) { + setPrinterRunState(this.printerRunState); + } + if (this.scannerRunState != null) { + setScannerRunState(this.scannerRunState); + } + if (this.autoDocumentFeeder != null) { + setAutoDocumentFeeder(this.autoDocumentFeeder); + } + if (this.printQueue != null) { + setPrintQueue(this.printQueue); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer printerRunState; + + public void setPrinterRunState(RunStateFlexContainer printerRunState) { + this.printerRunState = printerRunState; + getFlexContainerOrContainerOrSubscription().add(printerRunState); + } + + public RunStateFlexContainer getPrinterRunState() { + this.printerRunState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return printerRunState; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer scannerRunState; + + public void setScannerRunState(RunStateFlexContainer scannerRunState) { + this.scannerRunState = scannerRunState; + getFlexContainerOrContainerOrSubscription().add(scannerRunState); + } + + public RunStateFlexContainer getScannerRunState() { + this.scannerRunState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return scannerRunState; + } + + @XmlElement(name=AutoDocumentFeederFlexContainer.SHORT_NAME, required=true, type=AutoDocumentFeederFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AutoDocumentFeederFlexContainer autoDocumentFeeder; + + public void setAutoDocumentFeeder(AutoDocumentFeederFlexContainer autoDocumentFeeder) { + this.autoDocumentFeeder = autoDocumentFeeder; + getFlexContainerOrContainerOrSubscription().add(autoDocumentFeeder); + } + + public AutoDocumentFeederFlexContainer getAutoDocumentFeeder() { + this.autoDocumentFeeder = (AutoDocumentFeederFlexContainer) getResourceByName(AutoDocumentFeederFlexContainer.SHORT_NAME); + return autoDocumentFeeder; + } + + @XmlElement(name=PrintQueueFlexContainer.SHORT_NAME, required=true, type=PrintQueueFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PrintQueueFlexContainer printQueue; + + public void setPrintQueue(PrintQueueFlexContainer printQueue) { + this.printQueue = printQueue; + getFlexContainerOrContainerOrSubscription().add(printQueue); + } + + public PrintQueueFlexContainer getPrintQueue() { + this.printQueue = (PrintQueueFlexContainer) getResourceByName(PrintQueueFlexContainer.SHORT_NAME); + return printQueue; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMultiFunctionPrinterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMultiFunctionPrinterFlexContainerAnnc.java new file mode 100644 index 00000000..b788234d --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceMultiFunctionPrinterFlexContainerAnnc.java @@ -0,0 +1,150 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceMultiFunctionPrinterAnnc + +A Multi Function Printer (MFP) is an office machine which incorporates the functionality of multiple devices in one, so as to have a smaller footprint in home or office. A typical MFP may act as a combination of printer, scanner and more. This MFP information model provides capabilities to control and monitor MFP specific functions and resources. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceMultiFunctionPrinterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceMultiFunctionPrinterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceMultiFunctionPrinterFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceMultiFunctionPrinterAnnc"; + public static final String SHORT_NAME = "dMFPrAnnc"; + + public DeviceMultiFunctionPrinterFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceMultiFunctionPrinterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getAutoDocumentFeeder(); + getAutoDocumentFeederAnnc(); + getPrintQueue(); + getPrintQueueAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.autoDocumentFeeder != null) { + setAutoDocumentFeeder(this.autoDocumentFeeder); + } + if (this.autoDocumentFeederAnnc != null) { + setAutoDocumentFeederAnnc(this.autoDocumentFeederAnnc); + } + if (this.printQueue != null) { + setPrintQueue(this.printQueue); + } + if (this.printQueueAnnc != null) { + setPrintQueueAnnc(this.printQueueAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=AutoDocumentFeederFlexContainer.SHORT_NAME, required=true, type=AutoDocumentFeederFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AutoDocumentFeederFlexContainer autoDocumentFeeder; + + public void setAutoDocumentFeeder(AutoDocumentFeederFlexContainer autoDocumentFeeder) { + this.autoDocumentFeeder = autoDocumentFeeder; + getFlexContainerOrContainerOrSubscription().add(autoDocumentFeeder); + } + + public AutoDocumentFeederFlexContainer getAutoDocumentFeeder() { + this.autoDocumentFeeder = (AutoDocumentFeederFlexContainer) getResourceByName(AutoDocumentFeederFlexContainer.SHORT_NAME); + return autoDocumentFeeder; + } + + @XmlElement(name=AutoDocumentFeederFlexContainerAnnc.SHORT_NAME, required=true, type=AutoDocumentFeederFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AutoDocumentFeederFlexContainerAnnc autoDocumentFeederAnnc; + + public void setAutoDocumentFeederAnnc(AutoDocumentFeederFlexContainerAnnc autoDocumentFeederAnnc) { + this.autoDocumentFeederAnnc = autoDocumentFeederAnnc; + getFlexContainerOrContainerOrSubscription().add(autoDocumentFeederAnnc); + } + + public AutoDocumentFeederFlexContainerAnnc getAutoDocumentFeederAnnc() { + this.autoDocumentFeederAnnc = (AutoDocumentFeederFlexContainerAnnc) getResourceByName(AutoDocumentFeederFlexContainerAnnc.SHORT_NAME); + return autoDocumentFeederAnnc; + } + + @XmlElement(name=PrintQueueFlexContainer.SHORT_NAME, required=true, type=PrintQueueFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PrintQueueFlexContainer printQueue; + + public void setPrintQueue(PrintQueueFlexContainer printQueue) { + this.printQueue = printQueue; + getFlexContainerOrContainerOrSubscription().add(printQueue); + } + + public PrintQueueFlexContainer getPrintQueue() { + this.printQueue = (PrintQueueFlexContainer) getResourceByName(PrintQueueFlexContainer.SHORT_NAME); + return printQueue; + } + + @XmlElement(name=PrintQueueFlexContainerAnnc.SHORT_NAME, required=true, type=PrintQueueFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PrintQueueFlexContainerAnnc printQueueAnnc; + + public void setPrintQueueAnnc(PrintQueueFlexContainerAnnc printQueueAnnc) { + this.printQueueAnnc = printQueueAnnc; + getFlexContainerOrContainerOrSubscription().add(printQueueAnnc); + } + + public PrintQueueFlexContainerAnnc getPrintQueueAnnc() { + this.printQueueAnnc = (PrintQueueFlexContainerAnnc) getResourceByName(PrintQueueFlexContainerAnnc.SHORT_NAME); + return printQueueAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceNumberDeviceFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceNumberDeviceFlexContainer.java deleted file mode 100644 index 0865e05b..00000000 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceNumberDeviceFlexContainer.java +++ /dev/null @@ -1,66 +0,0 @@ -/* -******************************************************************************** - * Copyright (c) 2014, 2017 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - ******************************************************************************** - -Device : DeviceNumberDevice - - - -Created: 2017-09-28 17:26:40 -*/ - -package org.eclipse.om2m.commons.resource.flexcontainerspec; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - - -@XmlRootElement(name = DeviceNumberDeviceFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = DeviceNumberDeviceFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") -public class DeviceNumberDeviceFlexContainer extends AbstractFlexContainer { - - public static final String LONG_NAME = "deviceNumberDevice"; - public static final String SHORT_NAME = "deNDe"; - - public DeviceNumberDeviceFlexContainer () { - setContainerDefinition("org.onem2m.home.device." + DeviceNumberDeviceFlexContainer.LONG_NAME); - setLongName(LONG_NAME); - setShortName(SHORT_NAME); - } - - public void finalizeSerialization() { - getNumberValue(); - } - - public void finalizeDeserialization() { - if (this.numberValue != null) { - setNumberValue(this.numberValue); - } - } - - @XmlElement(name="numVe", required=true, type=NumberValueFlexContainer.class) - private NumberValueFlexContainer numberValue; - - - public void setNumberValue(NumberValueFlexContainer numberValue) { - this.numberValue = numberValue; - getFlexContainerOrContainerOrSubscription().add(numberValue); - } - - public NumberValueFlexContainer getNumberValue() { - this.numberValue = (NumberValueFlexContainer) getResourceByName(NumberValueFlexContainer.SHORT_NAME); - return numberValue; - } - -} \ No newline at end of file diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceNumberDeviceFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceNumberDeviceFlexContainerAnnc.java deleted file mode 100644 index c7dbaacf..00000000 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceNumberDeviceFlexContainerAnnc.java +++ /dev/null @@ -1,85 +0,0 @@ -/* -******************************************************************************** - * Copyright (c) 2014, 2017 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - ******************************************************************************** - -Device : DeviceNumberDeviceAnnc - - - -Created: 2017-09-28 17:26:40 -*/ - -package org.eclipse.om2m.commons.resource.flexcontainerspec; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - - -@XmlRootElement(name = DeviceNumberDeviceFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = DeviceNumberDeviceFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") -public class DeviceNumberDeviceFlexContainerAnnc extends AbstractFlexContainerAnnc { - - public static final String LONG_NAME = "deviceNumberDeviceAnnc"; - public static final String SHORT_NAME = "deNDeAnnc"; - - public DeviceNumberDeviceFlexContainerAnnc () { - setContainerDefinition("org.onem2m.home.device." + DeviceNumberDeviceFlexContainer.LONG_NAME); - setLongName(LONG_NAME); - setShortName(SHORT_NAME); - } - - public void finalizeSerialization() { - getNumberValue(); - getNumberValueAnnc(); - } - - public void finalizeDeserialization() { - if (this.numberValue != null) { - setNumberValue(this.numberValue); - } - if (this.numberValueAnnc != null) { - setNumberValueAnnc(this.numberValueAnnc); - } - - } - - @XmlElement(name="numVe", required=true, type=NumberValueFlexContainerAnnc.class) - private NumberValueFlexContainer numberValue; - - - public void setNumberValue(NumberValueFlexContainer numberValue) { - this.numberValue = numberValue; - getFlexContainerOrContainerOrSubscription().add(numberValue); - } - - public NumberValueFlexContainer getNumberValue() { - this.numberValue = (NumberValueFlexContainer) getResourceByName(NumberValueFlexContainer.SHORT_NAME); - return numberValue; - } - - @XmlElement(name="numVeAnnc", required=true, type=NumberValueFlexContainerAnnc.class) - private NumberValueFlexContainerAnnc numberValueAnnc; - - - public void setNumberValueAnnc(NumberValueFlexContainerAnnc numberValueAnnc) { - this.numberValueAnnc = numberValueAnnc; - getFlexContainerOrContainerOrSubscription().add(numberValueAnnc); - } - - public NumberValueFlexContainerAnnc getNumberValueAnnc() { - this.numberValueAnnc = (NumberValueFlexContainerAnnc) getResourceByName(NumberValueFlexContainerAnnc.SHORT_NAME); - return numberValueAnnc; - } - -} \ No newline at end of file diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOutdoorLampFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOutdoorLampFlexContainer.java new file mode 100644 index 00000000..32b99ad7 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOutdoorLampFlexContainer.java @@ -0,0 +1,166 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceOutdoorLamp + +An outdoor lamp is a smart home appliance to provide lights and information for outside of home with smart sensing capabilities such as ultraviolet sensing. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceOutdoorLampFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceOutdoorLampFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceOutdoorLampFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceOutdoorLamp"; + public static final String SHORT_NAME = "deOLp"; + + public DeviceOutdoorLampFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceOutdoorLampFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBrightness(); + getMotionSensor(); + getAirQualitySensor(); + getUvSensor(); + getTimer(); + getFaultDetection(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.brightness != null) { + setBrightness(this.brightness); + } + if (this.motionSensor != null) { + setMotionSensor(this.motionSensor); + } + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); + } + if (this.uvSensor != null) { + setUvSensor(this.uvSensor); + } + if (this.timer != null) { + setTimer(this.timer); + } + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BrightnessFlexContainer.SHORT_NAME, required=true, type=BrightnessFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BrightnessFlexContainer brightness; + + public void setBrightness(BrightnessFlexContainer brightness) { + this.brightness = brightness; + getFlexContainerOrContainerOrSubscription().add(brightness); + } + + public BrightnessFlexContainer getBrightness() { + this.brightness = (BrightnessFlexContainer) getResourceByName(BrightnessFlexContainer.SHORT_NAME); + return brightness; + } + + @XmlElement(name=MotionSensorFlexContainer.SHORT_NAME, required=true, type=MotionSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MotionSensorFlexContainer motionSensor; + + public void setMotionSensor(MotionSensorFlexContainer motionSensor) { + this.motionSensor = motionSensor; + getFlexContainerOrContainerOrSubscription().add(motionSensor); + } + + public MotionSensorFlexContainer getMotionSensor() { + this.motionSensor = (MotionSensorFlexContainer) getResourceByName(MotionSensorFlexContainer.SHORT_NAME); + return motionSensor; + } + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); + } + + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; + } + + @XmlElement(name=UvSensorFlexContainer.SHORT_NAME, required=true, type=UvSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private UvSensorFlexContainer uvSensor; + + public void setUvSensor(UvSensorFlexContainer uvSensor) { + this.uvSensor = uvSensor; + getFlexContainerOrContainerOrSubscription().add(uvSensor); + } + + public UvSensorFlexContainer getUvSensor() { + this.uvSensor = (UvSensorFlexContainer) getResourceByName(UvSensorFlexContainer.SHORT_NAME); + return uvSensor; + } + + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer timer; + + public void setTimer(TimerFlexContainer timer) { + this.timer = timer; + getFlexContainerOrContainerOrSubscription().add(timer); + } + + public TimerFlexContainer getTimer() { + this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return timer; + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOutdoorLampFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOutdoorLampFlexContainerAnnc.java new file mode 100644 index 00000000..c2cfca5c --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOutdoorLampFlexContainerAnnc.java @@ -0,0 +1,286 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceOutdoorLampAnnc + +An outdoor lamp is a smart home appliance to provide lights and information for outside of home with smart sensing capabilities such as ultraviolet sensing. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceOutdoorLampFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceOutdoorLampFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceOutdoorLampFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceOutdoorLampAnnc"; + public static final String SHORT_NAME = "deOLpAnnc"; + + public DeviceOutdoorLampFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceOutdoorLampFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getBrightness(); + getBrightnessAnnc(); + getMotionSensor(); + getMotionSensorAnnc(); + getAirQualitySensor(); + getAirQualitySensorAnnc(); + getUvSensor(); + getUvSensorAnnc(); + getTimer(); + getTimerAnnc(); + getFaultDetection(); + getFaultDetectionAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.brightness != null) { + setBrightness(this.brightness); + } + if (this.brightnessAnnc != null) { + setBrightnessAnnc(this.brightnessAnnc); + } + if (this.motionSensor != null) { + setMotionSensor(this.motionSensor); + } + if (this.motionSensorAnnc != null) { + setMotionSensorAnnc(this.motionSensorAnnc); + } + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); + } + if (this.airQualitySensorAnnc != null) { + setAirQualitySensorAnnc(this.airQualitySensorAnnc); + } + if (this.uvSensor != null) { + setUvSensor(this.uvSensor); + } + if (this.uvSensorAnnc != null) { + setUvSensorAnnc(this.uvSensorAnnc); + } + if (this.timer != null) { + setTimer(this.timer); + } + if (this.timerAnnc != null) { + setTimerAnnc(this.timerAnnc); + } + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.faultDetectionAnnc != null) { + setFaultDetectionAnnc(this.faultDetectionAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=BrightnessFlexContainer.SHORT_NAME, required=true, type=BrightnessFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BrightnessFlexContainer brightness; + + public void setBrightness(BrightnessFlexContainer brightness) { + this.brightness = brightness; + getFlexContainerOrContainerOrSubscription().add(brightness); + } + + public BrightnessFlexContainer getBrightness() { + this.brightness = (BrightnessFlexContainer) getResourceByName(BrightnessFlexContainer.SHORT_NAME); + return brightness; + } + + @XmlElement(name=BrightnessFlexContainerAnnc.SHORT_NAME, required=true, type=BrightnessFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BrightnessFlexContainerAnnc brightnessAnnc; + + public void setBrightnessAnnc(BrightnessFlexContainerAnnc brightnessAnnc) { + this.brightnessAnnc = brightnessAnnc; + getFlexContainerOrContainerOrSubscription().add(brightnessAnnc); + } + + public BrightnessFlexContainerAnnc getBrightnessAnnc() { + this.brightnessAnnc = (BrightnessFlexContainerAnnc) getResourceByName(BrightnessFlexContainerAnnc.SHORT_NAME); + return brightnessAnnc; + } + + @XmlElement(name=MotionSensorFlexContainer.SHORT_NAME, required=true, type=MotionSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MotionSensorFlexContainer motionSensor; + + public void setMotionSensor(MotionSensorFlexContainer motionSensor) { + this.motionSensor = motionSensor; + getFlexContainerOrContainerOrSubscription().add(motionSensor); + } + + public MotionSensorFlexContainer getMotionSensor() { + this.motionSensor = (MotionSensorFlexContainer) getResourceByName(MotionSensorFlexContainer.SHORT_NAME); + return motionSensor; + } + + @XmlElement(name=MotionSensorFlexContainerAnnc.SHORT_NAME, required=true, type=MotionSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MotionSensorFlexContainerAnnc motionSensorAnnc; + + public void setMotionSensorAnnc(MotionSensorFlexContainerAnnc motionSensorAnnc) { + this.motionSensorAnnc = motionSensorAnnc; + getFlexContainerOrContainerOrSubscription().add(motionSensorAnnc); + } + + public MotionSensorFlexContainerAnnc getMotionSensorAnnc() { + this.motionSensorAnnc = (MotionSensorFlexContainerAnnc) getResourceByName(MotionSensorFlexContainerAnnc.SHORT_NAME); + return motionSensorAnnc; + } + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); + } + + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; + } + + @XmlElement(name=AirQualitySensorFlexContainerAnnc.SHORT_NAME, required=true, type=AirQualitySensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainerAnnc airQualitySensorAnnc; + + public void setAirQualitySensorAnnc(AirQualitySensorFlexContainerAnnc airQualitySensorAnnc) { + this.airQualitySensorAnnc = airQualitySensorAnnc; + getFlexContainerOrContainerOrSubscription().add(airQualitySensorAnnc); + } + + public AirQualitySensorFlexContainerAnnc getAirQualitySensorAnnc() { + this.airQualitySensorAnnc = (AirQualitySensorFlexContainerAnnc) getResourceByName(AirQualitySensorFlexContainerAnnc.SHORT_NAME); + return airQualitySensorAnnc; + } + + @XmlElement(name=UvSensorFlexContainer.SHORT_NAME, required=true, type=UvSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private UvSensorFlexContainer uvSensor; + + public void setUvSensor(UvSensorFlexContainer uvSensor) { + this.uvSensor = uvSensor; + getFlexContainerOrContainerOrSubscription().add(uvSensor); + } + + public UvSensorFlexContainer getUvSensor() { + this.uvSensor = (UvSensorFlexContainer) getResourceByName(UvSensorFlexContainer.SHORT_NAME); + return uvSensor; + } + + @XmlElement(name=UvSensorFlexContainerAnnc.SHORT_NAME, required=true, type=UvSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private UvSensorFlexContainerAnnc uvSensorAnnc; + + public void setUvSensorAnnc(UvSensorFlexContainerAnnc uvSensorAnnc) { + this.uvSensorAnnc = uvSensorAnnc; + getFlexContainerOrContainerOrSubscription().add(uvSensorAnnc); + } + + public UvSensorFlexContainerAnnc getUvSensorAnnc() { + this.uvSensorAnnc = (UvSensorFlexContainerAnnc) getResourceByName(UvSensorFlexContainerAnnc.SHORT_NAME); + return uvSensorAnnc; + } + + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainer timer; + + public void setTimer(TimerFlexContainer timer) { + this.timer = timer; + getFlexContainerOrContainerOrSubscription().add(timer); + } + + public TimerFlexContainer getTimer() { + this.timer = (TimerFlexContainer) getResourceByName(TimerFlexContainer.SHORT_NAME); + return timer; + } + + @XmlElement(name=TimerFlexContainerAnnc.SHORT_NAME, required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TimerFlexContainerAnnc timerAnnc; + + public void setTimerAnnc(TimerFlexContainerAnnc timerAnnc) { + this.timerAnnc = timerAnnc; + getFlexContainerOrContainerOrSubscription().add(timerAnnc); + } + + public TimerFlexContainerAnnc getTimerAnnc() { + this.timerAnnc = (TimerFlexContainerAnnc) getResourceByName(TimerFlexContainerAnnc.SHORT_NAME); + return timerAnnc; + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainerAnnc faultDetectionAnnc; + + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { + this.faultDetectionAnnc = faultDetectionAnnc; + getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); + } + + public FaultDetectionFlexContainerAnnc getFaultDetectionAnnc() { + this.faultDetectionAnnc = (FaultDetectionFlexContainerAnnc) getResourceByName(FaultDetectionFlexContainerAnnc.SHORT_NAME); + return faultDetectionAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOvenFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOvenFlexContainer.java index f923fc51..f109b2c0 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOvenFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOvenFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceOven An oven is a home appliance used to roast and heat food in a complete stove. This information model is applicable to different types of ovens: gas ovens, electrical ovens, steam ovens, microwave ovens, etc. This information model provides capabilities to interact with specific functions and resources of ovens. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceOvenFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,9 +38,9 @@ public class DeviceOvenFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getBinarySwitch(); - getRunMode(); + getRunState(); getTimer(); getTemperature(); } @@ -50,8 +49,8 @@ public class DeviceOvenFlexContainer extends AbstractFlexContainer { if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); } if (this.timer != null) { setTimer(this.timer); @@ -60,11 +59,10 @@ public class DeviceOvenFlexContainer extends AbstractFlexContainer { setTemperature(this.temperature); } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -75,24 +73,22 @@ public class DeviceOvenFlexContainer extends AbstractFlexContainer { return binarySwitch; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="timer", required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainer timer; - - + public void setTimer(TimerFlexContainer timer) { this.timer = timer; getFlexContainerOrContainerOrSubscription().add(timer); @@ -103,10 +99,9 @@ public class DeviceOvenFlexContainer extends AbstractFlexContainer { return timer; } - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainer temperature; - - + public void setTemperature(TemperatureFlexContainer temperature) { this.temperature = temperature; getFlexContainerOrContainerOrSubscription().add(temperature); @@ -117,4 +112,4 @@ public class DeviceOvenFlexContainer extends AbstractFlexContainer { return temperature; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOvenFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOvenFlexContainerAnnc.java index 420a3c3f..0e2c5bd8 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOvenFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceOvenFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceOvenAnnc An oven is a home appliance used to roast and heat food in a complete stove. This information model is applicable to different types of ovens: gas ovens, electrical ovens, steam ovens, microwave ovens, etc. This information model provides capabilities to interact with specific functions and resources of ovens. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceOvenFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceOvenFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,18 +37,18 @@ public class DeviceOvenFlexContainerAnnc extends AbstractFlexContainerAnnc { setContainerDefinition("org.onem2m.home.device." + DeviceOvenFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getBinarySwitch(); getBinarySwitchAnnc(); - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); getTimer(); getTimerAnnc(); getTemperature(); getTemperatureAnnc(); - } + } public void finalizeDeserialization() { if (this.binarySwitch != null) { @@ -56,35 +56,30 @@ public class DeviceOvenFlexContainerAnnc extends AbstractFlexContainerAnnc { } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } if (this.timer != null) { setTimer(this.timer); } if (this.timerAnnc != null) { setTimerAnnc(this.timerAnnc); - } - + } if (this.temperature != null) { setTemperature(this.temperature); } if (this.temperatureAnnc != null) { setTemperatureAnnc(this.temperatureAnnc); - } - + } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -95,10 +90,9 @@ public class DeviceOvenFlexContainerAnnc extends AbstractFlexContainerAnnc { return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -109,38 +103,35 @@ public class DeviceOvenFlexContainerAnnc extends AbstractFlexContainerAnnc { return binarySwitchAnnc; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; - - - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="timer", required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainer timer; - - + public void setTimer(TimerFlexContainer timer) { this.timer = timer; getFlexContainerOrContainerOrSubscription().add(timer); @@ -151,10 +142,9 @@ public class DeviceOvenFlexContainerAnnc extends AbstractFlexContainerAnnc { return timer; } - @XmlElement(name="timerAnnc", required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainerAnnc.SHORT_NAME, required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainerAnnc timerAnnc; - - + public void setTimerAnnc(TimerFlexContainerAnnc timerAnnc) { this.timerAnnc = timerAnnc; getFlexContainerOrContainerOrSubscription().add(timerAnnc); @@ -165,10 +155,9 @@ public class DeviceOvenFlexContainerAnnc extends AbstractFlexContainerAnnc { return timerAnnc; } - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainer temperature; - - + public void setTemperature(TemperatureFlexContainer temperature) { this.temperature = temperature; getFlexContainerOrContainerOrSubscription().add(temperature); @@ -179,10 +168,9 @@ public class DeviceOvenFlexContainerAnnc extends AbstractFlexContainerAnnc { return temperature; } - @XmlElement(name="tempeAnnc", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TemperatureFlexContainerAnnc.SHORT_NAME, required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainerAnnc temperatureAnnc; - - + public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { this.temperatureAnnc = temperatureAnnc; getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); @@ -193,4 +181,4 @@ public class DeviceOvenFlexContainerAnnc extends AbstractFlexContainerAnnc { return temperatureAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePrinterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePrinterFlexContainer.java new file mode 100644 index 00000000..5b14a129 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePrinterFlexContainer.java @@ -0,0 +1,98 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DevicePrinter + +A printer is a device that is used to monitor or control the state of a printing appliance. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DevicePrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DevicePrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DevicePrinterFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "devicePrinter"; + public static final String SHORT_NAME = "devPr"; + + public DevicePrinterFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DevicePrinterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getRunState(); + getPrintQueue(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.printQueue != null) { + setPrintQueue(this.printQueue); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=PrintQueueFlexContainer.SHORT_NAME, required=true, type=PrintQueueFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PrintQueueFlexContainer printQueue; + + public void setPrintQueue(PrintQueueFlexContainer printQueue) { + this.printQueue = printQueue; + getFlexContainerOrContainerOrSubscription().add(printQueue); + } + + public PrintQueueFlexContainer getPrintQueue() { + this.printQueue = (PrintQueueFlexContainer) getResourceByName(PrintQueueFlexContainer.SHORT_NAME); + return printQueue; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePrinterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePrinterFlexContainerAnnc.java new file mode 100644 index 00000000..170cd0b8 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePrinterFlexContainerAnnc.java @@ -0,0 +1,150 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DevicePrinterAnnc + +A printer is a device that is used to monitor or control the state of a printing appliance. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DevicePrinterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DevicePrinterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DevicePrinterFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "devicePrinterAnnc"; + public static final String SHORT_NAME = "devPrAnnc"; + + public DevicePrinterFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DevicePrinterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getRunState(); + getRunStateAnnc(); + getPrintQueue(); + getPrintQueueAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.printQueue != null) { + setPrintQueue(this.printQueue); + } + if (this.printQueueAnnc != null) { + setPrintQueueAnnc(this.printQueueAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=PrintQueueFlexContainer.SHORT_NAME, required=true, type=PrintQueueFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PrintQueueFlexContainer printQueue; + + public void setPrintQueue(PrintQueueFlexContainer printQueue) { + this.printQueue = printQueue; + getFlexContainerOrContainerOrSubscription().add(printQueue); + } + + public PrintQueueFlexContainer getPrintQueue() { + this.printQueue = (PrintQueueFlexContainer) getResourceByName(PrintQueueFlexContainer.SHORT_NAME); + return printQueue; + } + + @XmlElement(name=PrintQueueFlexContainerAnnc.SHORT_NAME, required=true, type=PrintQueueFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PrintQueueFlexContainerAnnc printQueueAnnc; + + public void setPrintQueueAnnc(PrintQueueFlexContainerAnnc printQueueAnnc) { + this.printQueueAnnc = printQueueAnnc; + getFlexContainerOrContainerOrSubscription().add(printQueueAnnc); + } + + public PrintQueueFlexContainerAnnc getPrintQueueAnnc() { + this.printQueueAnnc = (PrintQueueFlexContainerAnnc) getResourceByName(PrintQueueFlexContainerAnnc.SHORT_NAME); + return printQueueAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePulseOximeterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePulseOximeterFlexContainer.java new file mode 100644 index 00000000..11f06b3f --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePulseOximeterFlexContainer.java @@ -0,0 +1,98 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DevicePulseOximeter + +A pulseoximeter is a device that can be used to monitor the blood characteristics. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DevicePulseOximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DevicePulseOximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DevicePulseOximeterFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "devicePulseOximeter"; + public static final String SHORT_NAME = "dePOr"; + + public DevicePulseOximeterFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DevicePulseOximeterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getPulsemeter(); + getOximeter(); + getBattery(); + } + + public void finalizeDeserialization() { + if (this.pulsemeter != null) { + setPulsemeter(this.pulsemeter); + } + if (this.oximeter != null) { + setOximeter(this.oximeter); + } + if (this.battery != null) { + setBattery(this.battery); + } + } + + @XmlElement(name=PulsemeterFlexContainer.SHORT_NAME, required=true, type=PulsemeterFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PulsemeterFlexContainer pulsemeter; + + public void setPulsemeter(PulsemeterFlexContainer pulsemeter) { + this.pulsemeter = pulsemeter; + getFlexContainerOrContainerOrSubscription().add(pulsemeter); + } + + public PulsemeterFlexContainer getPulsemeter() { + this.pulsemeter = (PulsemeterFlexContainer) getResourceByName(PulsemeterFlexContainer.SHORT_NAME); + return pulsemeter; + } + + @XmlElement(name=OximeterFlexContainer.SHORT_NAME, required=true, type=OximeterFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OximeterFlexContainer oximeter; + + public void setOximeter(OximeterFlexContainer oximeter) { + this.oximeter = oximeter; + getFlexContainerOrContainerOrSubscription().add(oximeter); + } + + public OximeterFlexContainer getOximeter() { + this.oximeter = (OximeterFlexContainer) getResourceByName(OximeterFlexContainer.SHORT_NAME); + return oximeter; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePulseOximeterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePulseOximeterFlexContainerAnnc.java new file mode 100644 index 00000000..2d65e1ae --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DevicePulseOximeterFlexContainerAnnc.java @@ -0,0 +1,150 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DevicePulseOximeterAnnc + +A pulseoximeter is a device that can be used to monitor the blood characteristics. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DevicePulseOximeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DevicePulseOximeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DevicePulseOximeterFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "devicePulseOximeterAnnc"; + public static final String SHORT_NAME = "dePOrAnnc"; + + public DevicePulseOximeterFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DevicePulseOximeterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getPulsemeter(); + getPulsemeterAnnc(); + getOximeter(); + getOximeterAnnc(); + getBattery(); + getBatteryAnnc(); + } + + public void finalizeDeserialization() { + if (this.pulsemeter != null) { + setPulsemeter(this.pulsemeter); + } + if (this.pulsemeterAnnc != null) { + setPulsemeterAnnc(this.pulsemeterAnnc); + } + if (this.oximeter != null) { + setOximeter(this.oximeter); + } + if (this.oximeterAnnc != null) { + setOximeterAnnc(this.oximeterAnnc); + } + if (this.battery != null) { + setBattery(this.battery); + } + if (this.batteryAnnc != null) { + setBatteryAnnc(this.batteryAnnc); + } + } + + @XmlElement(name=PulsemeterFlexContainer.SHORT_NAME, required=true, type=PulsemeterFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PulsemeterFlexContainer pulsemeter; + + public void setPulsemeter(PulsemeterFlexContainer pulsemeter) { + this.pulsemeter = pulsemeter; + getFlexContainerOrContainerOrSubscription().add(pulsemeter); + } + + public PulsemeterFlexContainer getPulsemeter() { + this.pulsemeter = (PulsemeterFlexContainer) getResourceByName(PulsemeterFlexContainer.SHORT_NAME); + return pulsemeter; + } + + @XmlElement(name=PulsemeterFlexContainerAnnc.SHORT_NAME, required=true, type=PulsemeterFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PulsemeterFlexContainerAnnc pulsemeterAnnc; + + public void setPulsemeterAnnc(PulsemeterFlexContainerAnnc pulsemeterAnnc) { + this.pulsemeterAnnc = pulsemeterAnnc; + getFlexContainerOrContainerOrSubscription().add(pulsemeterAnnc); + } + + public PulsemeterFlexContainerAnnc getPulsemeterAnnc() { + this.pulsemeterAnnc = (PulsemeterFlexContainerAnnc) getResourceByName(PulsemeterFlexContainerAnnc.SHORT_NAME); + return pulsemeterAnnc; + } + + @XmlElement(name=OximeterFlexContainer.SHORT_NAME, required=true, type=OximeterFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OximeterFlexContainer oximeter; + + public void setOximeter(OximeterFlexContainer oximeter) { + this.oximeter = oximeter; + getFlexContainerOrContainerOrSubscription().add(oximeter); + } + + public OximeterFlexContainer getOximeter() { + this.oximeter = (OximeterFlexContainer) getResourceByName(OximeterFlexContainer.SHORT_NAME); + return oximeter; + } + + @XmlElement(name=OximeterFlexContainerAnnc.SHORT_NAME, required=true, type=OximeterFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OximeterFlexContainerAnnc oximeterAnnc; + + public void setOximeterAnnc(OximeterFlexContainerAnnc oximeterAnnc) { + this.oximeterAnnc = oximeterAnnc; + getFlexContainerOrContainerOrSubscription().add(oximeterAnnc); + } + + public OximeterFlexContainerAnnc getOximeterAnnc() { + this.oximeterAnnc = (OximeterFlexContainerAnnc) getResourceByName(OximeterFlexContainerAnnc.SHORT_NAME); + return oximeterAnnc; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainerAnnc batteryAnnc; + + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { + this.batteryAnnc = batteryAnnc; + getFlexContainerOrContainerOrSubscription().add(batteryAnnc); + } + + public BatteryFlexContainerAnnc getBatteryAnnc() { + this.batteryAnnc = (BatteryFlexContainerAnnc) getResourceByName(BatteryFlexContainerAnnc.SHORT_NAME); + return batteryAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRefrigeratorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRefrigeratorFlexContainer.java index 8572400a..49e9a5df 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRefrigeratorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRefrigeratorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceRefrigerator A refrigerator is a home appliance used to store food at temperatures which are a few degrees above the freezing point of water. This information model provides capabilities to interact with specific functions and resource of refrigerators. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceRefrigeratorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +38,16 @@ public class DeviceRefrigeratorFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getBinarySwitch(); getPowerSave(); getDoorStatus(); + getFrozenTemperature(); + getFridgeTemperature(); + getCustomTemperature(); getRefrigeration(); + getControlPanelLock(); + getWaterFilterInfo(); } public void finalizeDeserialization() { @@ -56,15 +60,29 @@ public class DeviceRefrigeratorFlexContainer extends AbstractFlexContainer { if (this.doorStatus != null) { setDoorStatus(this.doorStatus); } + if (this.frozenTemperature != null) { + setFrozenTemperature(this.frozenTemperature); + } + if (this.fridgeTemperature != null) { + setFridgeTemperature(this.fridgeTemperature); + } + if (this.customTemperature != null) { + setCustomTemperature(this.customTemperature); + } if (this.refrigeration != null) { setRefrigeration(this.refrigeration); } + if (this.controlPanelLock != null) { + setControlPanelLock(this.controlPanelLock); + } + if (this.waterFilterInfo != null) { + setWaterFilterInfo(this.waterFilterInfo); + } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -75,10 +93,9 @@ public class DeviceRefrigeratorFlexContainer extends AbstractFlexContainer { return binarySwitch; } - @XmlElement(name="powSe", required=true, type=PowerSaveFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=PowerSaveFlexContainer.SHORT_NAME, required=true, type=PowerSaveFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private PowerSaveFlexContainer powerSave; - - + public void setPowerSave(PowerSaveFlexContainer powerSave) { this.powerSave = powerSave; getFlexContainerOrContainerOrSubscription().add(powerSave); @@ -89,10 +106,9 @@ public class DeviceRefrigeratorFlexContainer extends AbstractFlexContainer { return powerSave; } - @XmlElement(name="dooSs", required=true, type=DoorStatusFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=DoorStatusFlexContainer.SHORT_NAME, required=true, type=DoorStatusFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private DoorStatusFlexContainer doorStatus; - - + public void setDoorStatus(DoorStatusFlexContainer doorStatus) { this.doorStatus = doorStatus; getFlexContainerOrContainerOrSubscription().add(doorStatus); @@ -103,10 +119,48 @@ public class DeviceRefrigeratorFlexContainer extends AbstractFlexContainer { return doorStatus; } - @XmlElement(name="refrn", required=true, type=RefrigerationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RefrigerationFlexContainer refrigeration; + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer frozenTemperature; + + public void setFrozenTemperature(TemperatureFlexContainer frozenTemperature) { + this.frozenTemperature = frozenTemperature; + getFlexContainerOrContainerOrSubscription().add(frozenTemperature); + } + public TemperatureFlexContainer getFrozenTemperature() { + this.frozenTemperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return frozenTemperature; + } + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer fridgeTemperature; + + public void setFridgeTemperature(TemperatureFlexContainer fridgeTemperature) { + this.fridgeTemperature = fridgeTemperature; + getFlexContainerOrContainerOrSubscription().add(fridgeTemperature); + } + + public TemperatureFlexContainer getFridgeTemperature() { + this.fridgeTemperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return fridgeTemperature; + } + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer customTemperature; + + public void setCustomTemperature(TemperatureFlexContainer customTemperature) { + this.customTemperature = customTemperature; + getFlexContainerOrContainerOrSubscription().add(customTemperature); + } + + public TemperatureFlexContainer getCustomTemperature() { + this.customTemperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return customTemperature; + } + + @XmlElement(name=RefrigerationFlexContainer.SHORT_NAME, required=true, type=RefrigerationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RefrigerationFlexContainer refrigeration; + public void setRefrigeration(RefrigerationFlexContainer refrigeration) { this.refrigeration = refrigeration; getFlexContainerOrContainerOrSubscription().add(refrigeration); @@ -117,4 +171,30 @@ public class DeviceRefrigeratorFlexContainer extends AbstractFlexContainer { return refrigeration; } -} \ No newline at end of file + @XmlElement(name=LockFlexContainer.SHORT_NAME, required=true, type=LockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private LockFlexContainer controlPanelLock; + + public void setControlPanelLock(LockFlexContainer controlPanelLock) { + this.controlPanelLock = controlPanelLock; + getFlexContainerOrContainerOrSubscription().add(controlPanelLock); + } + + public LockFlexContainer getControlPanelLock() { + this.controlPanelLock = (LockFlexContainer) getResourceByName(LockFlexContainer.SHORT_NAME); + return controlPanelLock; + } + + @XmlElement(name=FilterInfoFlexContainer.SHORT_NAME, required=true, type=FilterInfoFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FilterInfoFlexContainer waterFilterInfo; + + public void setWaterFilterInfo(FilterInfoFlexContainer waterFilterInfo) { + this.waterFilterInfo = waterFilterInfo; + getFlexContainerOrContainerOrSubscription().add(waterFilterInfo); + } + + public FilterInfoFlexContainer getWaterFilterInfo() { + this.waterFilterInfo = (FilterInfoFlexContainer) getResourceByName(FilterInfoFlexContainer.SHORT_NAME); + return waterFilterInfo; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRefrigeratorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRefrigeratorFlexContainerAnnc.java index d145f18b..d244749e 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRefrigeratorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRefrigeratorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceRefrigeratorAnnc A refrigerator is a home appliance used to store food at temperatures which are a few degrees above the freezing point of water. This information model provides capabilities to interact with specific functions and resource of refrigerators. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceRefrigeratorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceRefrigeratorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,7 +37,7 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn setContainerDefinition("org.onem2m.home.device." + DeviceRefrigeratorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getBinarySwitch(); @@ -48,7 +48,7 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn getDoorStatusAnnc(); getRefrigeration(); getRefrigerationAnnc(); - } + } public void finalizeDeserialization() { if (this.binarySwitch != null) { @@ -56,35 +56,30 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - + } if (this.powerSave != null) { setPowerSave(this.powerSave); } if (this.powerSaveAnnc != null) { setPowerSaveAnnc(this.powerSaveAnnc); - } - + } if (this.doorStatus != null) { setDoorStatus(this.doorStatus); } if (this.doorStatusAnnc != null) { setDoorStatusAnnc(this.doorStatusAnnc); - } - + } if (this.refrigeration != null) { setRefrigeration(this.refrigeration); } if (this.refrigerationAnnc != null) { setRefrigerationAnnc(this.refrigerationAnnc); - } - + } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -95,10 +90,9 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -109,10 +103,9 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn return binarySwitchAnnc; } - @XmlElement(name="powSe", required=true, type=PowerSaveFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=PowerSaveFlexContainer.SHORT_NAME, required=true, type=PowerSaveFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private PowerSaveFlexContainer powerSave; - - + public void setPowerSave(PowerSaveFlexContainer powerSave) { this.powerSave = powerSave; getFlexContainerOrContainerOrSubscription().add(powerSave); @@ -123,10 +116,9 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn return powerSave; } - @XmlElement(name="powSeAnnc", required=true, type=PowerSaveFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=PowerSaveFlexContainerAnnc.SHORT_NAME, required=true, type=PowerSaveFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private PowerSaveFlexContainerAnnc powerSaveAnnc; - - + public void setPowerSaveAnnc(PowerSaveFlexContainerAnnc powerSaveAnnc) { this.powerSaveAnnc = powerSaveAnnc; getFlexContainerOrContainerOrSubscription().add(powerSaveAnnc); @@ -137,10 +129,9 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn return powerSaveAnnc; } - @XmlElement(name="dooSs", required=true, type=DoorStatusFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=DoorStatusFlexContainer.SHORT_NAME, required=true, type=DoorStatusFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private DoorStatusFlexContainer doorStatus; - - + public void setDoorStatus(DoorStatusFlexContainer doorStatus) { this.doorStatus = doorStatus; getFlexContainerOrContainerOrSubscription().add(doorStatus); @@ -151,10 +142,9 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn return doorStatus; } - @XmlElement(name="dooSsAnnc", required=true, type=DoorStatusFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=DoorStatusFlexContainerAnnc.SHORT_NAME, required=true, type=DoorStatusFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private DoorStatusFlexContainerAnnc doorStatusAnnc; - - + public void setDoorStatusAnnc(DoorStatusFlexContainerAnnc doorStatusAnnc) { this.doorStatusAnnc = doorStatusAnnc; getFlexContainerOrContainerOrSubscription().add(doorStatusAnnc); @@ -165,10 +155,9 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn return doorStatusAnnc; } - @XmlElement(name="refrn", required=true, type=RefrigerationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=RefrigerationFlexContainer.SHORT_NAME, required=true, type=RefrigerationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private RefrigerationFlexContainer refrigeration; - - + public void setRefrigeration(RefrigerationFlexContainer refrigeration) { this.refrigeration = refrigeration; getFlexContainerOrContainerOrSubscription().add(refrigeration); @@ -179,10 +168,9 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn return refrigeration; } - @XmlElement(name="refrnAnnc", required=true, type=RefrigerationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=RefrigerationFlexContainerAnnc.SHORT_NAME, required=true, type=RefrigerationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private RefrigerationFlexContainerAnnc refrigerationAnnc; - - + public void setRefrigerationAnnc(RefrigerationFlexContainerAnnc refrigerationAnnc) { this.refrigerationAnnc = refrigerationAnnc; getFlexContainerOrContainerOrSubscription().add(refrigerationAnnc); @@ -193,4 +181,4 @@ public class DeviceRefrigeratorFlexContainerAnnc extends AbstractFlexContainerAn return refrigerationAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRobotCleanerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRobotCleanerFlexContainer.java index 83496728..40c0273d 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRobotCleanerFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRobotCleanerFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceRobotCleaner A robot cleaner is an autonomous robotic vacuum cleaner that has intelligent programming and a limited vacuum cleaning system. This robot cleaner information model provides capabilities to control and monitor robot cleaner specific functions and resources. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceRobotCleanerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,9 +38,11 @@ public class DeviceRobotCleanerFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getBinarySwitch(); - getRunMode(); + getRunState(); + getRobotCleanerJobMode(); + getRobotCleanerOperationMode(); getBattery(); getTimer(); } @@ -50,8 +51,14 @@ public class DeviceRobotCleanerFlexContainer extends AbstractFlexContainer { if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); + } + if (this.robotCleanerJobMode != null) { + setRobotCleanerJobMode(this.robotCleanerJobMode); + } + if (this.robotCleanerOperationMode != null) { + setRobotCleanerOperationMode(this.robotCleanerOperationMode); } if (this.battery != null) { setBattery(this.battery); @@ -60,11 +67,10 @@ public class DeviceRobotCleanerFlexContainer extends AbstractFlexContainer { setTimer(this.timer); } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -75,24 +81,48 @@ public class DeviceRobotCleanerFlexContainer extends AbstractFlexContainer { return binarySwitch; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RobotCleanerJobModeFlexContainer.SHORT_NAME, required=true, type=RobotCleanerJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RobotCleanerJobModeFlexContainer robotCleanerJobMode; + + public void setRobotCleanerJobMode(RobotCleanerJobModeFlexContainer robotCleanerJobMode) { + this.robotCleanerJobMode = robotCleanerJobMode; + getFlexContainerOrContainerOrSubscription().add(robotCleanerJobMode); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RobotCleanerJobModeFlexContainer getRobotCleanerJobMode() { + this.robotCleanerJobMode = (RobotCleanerJobModeFlexContainer) getResourceByName(RobotCleanerJobModeFlexContainer.SHORT_NAME); + return robotCleanerJobMode; } - @XmlElement(name="batty", required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private BatteryFlexContainer battery; + @XmlElement(name=OperationModeFlexContainer.SHORT_NAME, required=true, type=OperationModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OperationModeFlexContainer robotCleanerOperationMode; + + public void setRobotCleanerOperationMode(OperationModeFlexContainer robotCleanerOperationMode) { + this.robotCleanerOperationMode = robotCleanerOperationMode; + getFlexContainerOrContainerOrSubscription().add(robotCleanerOperationMode); + } + public OperationModeFlexContainer getRobotCleanerOperationMode() { + this.robotCleanerOperationMode = (OperationModeFlexContainer) getResourceByName(OperationModeFlexContainer.SHORT_NAME); + return robotCleanerOperationMode; + } + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + public void setBattery(BatteryFlexContainer battery) { this.battery = battery; getFlexContainerOrContainerOrSubscription().add(battery); @@ -103,10 +133,9 @@ public class DeviceRobotCleanerFlexContainer extends AbstractFlexContainer { return battery; } - @XmlElement(name="timer", required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainer timer; - - + public void setTimer(TimerFlexContainer timer) { this.timer = timer; getFlexContainerOrContainerOrSubscription().add(timer); @@ -117,4 +146,4 @@ public class DeviceRobotCleanerFlexContainer extends AbstractFlexContainer { return timer; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRobotCleanerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRobotCleanerFlexContainerAnnc.java index 3c3c9f3f..2cd894bd 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRobotCleanerFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceRobotCleanerFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceRobotCleanerAnnc A robot cleaner is an autonomous robotic vacuum cleaner that has intelligent programming and a limited vacuum cleaning system. This robot cleaner information model provides capabilities to control and monitor robot cleaner specific functions and resources. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceRobotCleanerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceRobotCleanerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,18 +37,20 @@ public class DeviceRobotCleanerFlexContainerAnnc extends AbstractFlexContainerAn setContainerDefinition("org.onem2m.home.device." + DeviceRobotCleanerFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getBinarySwitch(); getBinarySwitchAnnc(); - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); + getRobotCleanerJobMode(); + getRobotCleanerJobModeAnnc(); getBattery(); getBatteryAnnc(); getTimer(); getTimerAnnc(); - } + } public void finalizeDeserialization() { if (this.binarySwitch != null) { @@ -56,35 +58,36 @@ public class DeviceRobotCleanerFlexContainerAnnc extends AbstractFlexContainerAn } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.robotCleanerJobMode != null) { + setRobotCleanerJobMode(this.robotCleanerJobMode); + } + if (this.robotCleanerJobModeAnnc != null) { + setRobotCleanerJobModeAnnc(this.robotCleanerJobModeAnnc); + } if (this.battery != null) { setBattery(this.battery); } if (this.batteryAnnc != null) { setBatteryAnnc(this.batteryAnnc); - } - + } if (this.timer != null) { setTimer(this.timer); } if (this.timerAnnc != null) { setTimerAnnc(this.timerAnnc); - } - + } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -95,10 +98,9 @@ public class DeviceRobotCleanerFlexContainerAnnc extends AbstractFlexContainerAn return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -109,38 +111,61 @@ public class DeviceRobotCleanerFlexContainerAnnc extends AbstractFlexContainerAn return binarySwitchAnnc; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; + @XmlElement(name=RobotCleanerJobModeFlexContainer.SHORT_NAME, required=true, type=RobotCleanerJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RobotCleanerJobModeFlexContainer robotCleanerJobMode; + + public void setRobotCleanerJobMode(RobotCleanerJobModeFlexContainer robotCleanerJobMode) { + this.robotCleanerJobMode = robotCleanerJobMode; + getFlexContainerOrContainerOrSubscription().add(robotCleanerJobMode); + } + public RobotCleanerJobModeFlexContainer getRobotCleanerJobMode() { + this.robotCleanerJobMode = (RobotCleanerJobModeFlexContainer) getResourceByName(RobotCleanerJobModeFlexContainer.SHORT_NAME); + return robotCleanerJobMode; + } - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=RobotCleanerJobModeFlexContainerAnnc.SHORT_NAME, required=true, type=RobotCleanerJobModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RobotCleanerJobModeFlexContainerAnnc robotCleanerJobModeAnnc; + + public void setRobotCleanerJobModeAnnc(RobotCleanerJobModeFlexContainerAnnc robotCleanerJobModeAnnc) { + this.robotCleanerJobModeAnnc = robotCleanerJobModeAnnc; + getFlexContainerOrContainerOrSubscription().add(robotCleanerJobModeAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public RobotCleanerJobModeFlexContainerAnnc getRobotCleanerJobModeAnnc() { + this.robotCleanerJobModeAnnc = (RobotCleanerJobModeFlexContainerAnnc) getResourceByName(RobotCleanerJobModeFlexContainerAnnc.SHORT_NAME); + return robotCleanerJobModeAnnc; } - @XmlElement(name="batty", required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BatteryFlexContainer battery; - - + public void setBattery(BatteryFlexContainer battery) { this.battery = battery; getFlexContainerOrContainerOrSubscription().add(battery); @@ -151,10 +176,9 @@ public class DeviceRobotCleanerFlexContainerAnnc extends AbstractFlexContainerAn return battery; } - @XmlElement(name="battyAnnc", required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BatteryFlexContainerAnnc batteryAnnc; - - + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { this.batteryAnnc = batteryAnnc; getFlexContainerOrContainerOrSubscription().add(batteryAnnc); @@ -165,10 +189,9 @@ public class DeviceRobotCleanerFlexContainerAnnc extends AbstractFlexContainerAn return batteryAnnc; } - @XmlElement(name="timer", required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainer timer; - - + public void setTimer(TimerFlexContainer timer) { this.timer = timer; getFlexContainerOrContainerOrSubscription().add(timer); @@ -179,10 +202,9 @@ public class DeviceRobotCleanerFlexContainerAnnc extends AbstractFlexContainerAn return timer; } - @XmlElement(name="timerAnnc", required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainerAnnc.SHORT_NAME, required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainerAnnc timerAnnc; - - + public void setTimerAnnc(TimerFlexContainerAnnc timerAnnc) { this.timerAnnc = timerAnnc; getFlexContainerOrContainerOrSubscription().add(timerAnnc); @@ -193,4 +215,4 @@ public class DeviceRobotCleanerFlexContainerAnnc extends AbstractFlexContainerAn return timerAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceScannerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceScannerFlexContainer.java new file mode 100644 index 00000000..89ae8d70 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceScannerFlexContainer.java @@ -0,0 +1,98 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceScanner + +A scanner is a device that optically scans images, printed text, handwriting or an object, and converts it to a digital image. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceScannerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceScannerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceScannerFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceScanner"; + public static final String SHORT_NAME = "devSr"; + + public DeviceScannerFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceScannerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getRunState(); + getAutoDocumentFeeder(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.autoDocumentFeeder != null) { + setAutoDocumentFeeder(this.autoDocumentFeeder); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=AutoDocumentFeederFlexContainer.SHORT_NAME, required=true, type=AutoDocumentFeederFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AutoDocumentFeederFlexContainer autoDocumentFeeder; + + public void setAutoDocumentFeeder(AutoDocumentFeederFlexContainer autoDocumentFeeder) { + this.autoDocumentFeeder = autoDocumentFeeder; + getFlexContainerOrContainerOrSubscription().add(autoDocumentFeeder); + } + + public AutoDocumentFeederFlexContainer getAutoDocumentFeeder() { + this.autoDocumentFeeder = (AutoDocumentFeederFlexContainer) getResourceByName(AutoDocumentFeederFlexContainer.SHORT_NAME); + return autoDocumentFeeder; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceScannerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceScannerFlexContainerAnnc.java new file mode 100644 index 00000000..dc0ca6e8 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceScannerFlexContainerAnnc.java @@ -0,0 +1,150 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceScannerAnnc + +A scanner is a device that optically scans images, printed text, handwriting or an object, and converts it to a digital image. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceScannerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceScannerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceScannerFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceScannerAnnc"; + public static final String SHORT_NAME = "devSrAnnc"; + + public DeviceScannerFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceScannerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getRunState(); + getRunStateAnnc(); + getAutoDocumentFeeder(); + getAutoDocumentFeederAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.autoDocumentFeeder != null) { + setAutoDocumentFeeder(this.autoDocumentFeeder); + } + if (this.autoDocumentFeederAnnc != null) { + setAutoDocumentFeederAnnc(this.autoDocumentFeederAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=AutoDocumentFeederFlexContainer.SHORT_NAME, required=true, type=AutoDocumentFeederFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AutoDocumentFeederFlexContainer autoDocumentFeeder; + + public void setAutoDocumentFeeder(AutoDocumentFeederFlexContainer autoDocumentFeeder) { + this.autoDocumentFeeder = autoDocumentFeeder; + getFlexContainerOrContainerOrSubscription().add(autoDocumentFeeder); + } + + public AutoDocumentFeederFlexContainer getAutoDocumentFeeder() { + this.autoDocumentFeeder = (AutoDocumentFeederFlexContainer) getResourceByName(AutoDocumentFeederFlexContainer.SHORT_NAME); + return autoDocumentFeeder; + } + + @XmlElement(name=AutoDocumentFeederFlexContainerAnnc.SHORT_NAME, required=true, type=AutoDocumentFeederFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AutoDocumentFeederFlexContainerAnnc autoDocumentFeederAnnc; + + public void setAutoDocumentFeederAnnc(AutoDocumentFeederFlexContainerAnnc autoDocumentFeederAnnc) { + this.autoDocumentFeederAnnc = autoDocumentFeederAnnc; + getFlexContainerOrContainerOrSubscription().add(autoDocumentFeederAnnc); + } + + public AutoDocumentFeederFlexContainerAnnc getAutoDocumentFeederAnnc() { + this.autoDocumentFeederAnnc = (AutoDocumentFeederFlexContainerAnnc) getResourceByName(AutoDocumentFeederFlexContainerAnnc.SHORT_NAME); + return autoDocumentFeederAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSecurityPanelFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSecurityPanelFlexContainer.java new file mode 100644 index 00000000..7c69c7f8 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSecurityPanelFlexContainer.java @@ -0,0 +1,64 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceSecurityPanel + +A security pannel is a device that can change the security mode of, for example, an alarm system. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceSecurityPanelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceSecurityPanelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceSecurityPanelFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceSecurityPanel"; + public static final String SHORT_NAME = "deSPl"; + + public DeviceSecurityPanelFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceSecurityPanelFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getSecurityMode(); + } + + public void finalizeDeserialization() { + if (this.securityMode != null) { + setSecurityMode(this.securityMode); + } + } + + @XmlElement(name=SecurityModeFlexContainer.SHORT_NAME, required=true, type=SecurityModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SecurityModeFlexContainer securityMode; + + public void setSecurityMode(SecurityModeFlexContainer securityMode) { + this.securityMode = securityMode; + getFlexContainerOrContainerOrSubscription().add(securityMode); + } + + public SecurityModeFlexContainer getSecurityMode() { + this.securityMode = (SecurityModeFlexContainer) getResourceByName(SecurityModeFlexContainer.SHORT_NAME); + return securityMode; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSecurityPanelFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSecurityPanelFlexContainerAnnc.java new file mode 100644 index 00000000..9a708bd7 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSecurityPanelFlexContainerAnnc.java @@ -0,0 +1,82 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceSecurityPanelAnnc + +A security pannel is a device that can change the security mode of, for example, an alarm system. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceSecurityPanelFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceSecurityPanelFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceSecurityPanelFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceSecurityPanelAnnc"; + public static final String SHORT_NAME = "deSPlAnnc"; + + public DeviceSecurityPanelFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceSecurityPanelFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getSecurityMode(); + getSecurityModeAnnc(); + } + + public void finalizeDeserialization() { + if (this.securityMode != null) { + setSecurityMode(this.securityMode); + } + if (this.securityModeAnnc != null) { + setSecurityModeAnnc(this.securityModeAnnc); + } + } + + @XmlElement(name=SecurityModeFlexContainer.SHORT_NAME, required=true, type=SecurityModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SecurityModeFlexContainer securityMode; + + public void setSecurityMode(SecurityModeFlexContainer securityMode) { + this.securityMode = securityMode; + getFlexContainerOrContainerOrSubscription().add(securityMode); + } + + public SecurityModeFlexContainer getSecurityMode() { + this.securityMode = (SecurityModeFlexContainer) getResourceByName(SecurityModeFlexContainer.SHORT_NAME); + return securityMode; + } + + @XmlElement(name=SecurityModeFlexContainerAnnc.SHORT_NAME, required=true, type=SecurityModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SecurityModeFlexContainerAnnc securityModeAnnc; + + public void setSecurityModeAnnc(SecurityModeFlexContainerAnnc securityModeAnnc) { + this.securityModeAnnc = securityModeAnnc; + getFlexContainerOrContainerOrSubscription().add(securityModeAnnc); + } + + public SecurityModeFlexContainerAnnc getSecurityModeAnnc() { + this.securityModeAnnc = (SecurityModeFlexContainerAnnc) getResourceByName(SecurityModeFlexContainerAnnc.SHORT_NAME); + return securityModeAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSetTopBoxFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSetTopBoxFlexContainer.java new file mode 100644 index 00000000..6264212b --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSetTopBoxFlexContainer.java @@ -0,0 +1,132 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceSetTopBox + +A set top box is a device that in general contains a TV tuner input and displays output to a TV. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceSetTopBoxFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceSetTopBoxFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceSetTopBoxFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceSetTopBox"; + public static final String SHORT_NAME = "dSTBx"; + + public DeviceSetTopBoxFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceSetTopBoxFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getAudioVolume(); + getChannel(); + getMediaInput(); + getMediaOutput(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.audioVolume != null) { + setAudioVolume(this.audioVolume); + } + if (this.channel != null) { + setChannel(this.channel); + } + if (this.mediaInput != null) { + setMediaInput(this.mediaInput); + } + if (this.mediaOutput != null) { + setMediaOutput(this.mediaOutput); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=AudioVolumeFlexContainer.SHORT_NAME, required=true, type=AudioVolumeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AudioVolumeFlexContainer audioVolume; + + public void setAudioVolume(AudioVolumeFlexContainer audioVolume) { + this.audioVolume = audioVolume; + getFlexContainerOrContainerOrSubscription().add(audioVolume); + } + + public AudioVolumeFlexContainer getAudioVolume() { + this.audioVolume = (AudioVolumeFlexContainer) getResourceByName(AudioVolumeFlexContainer.SHORT_NAME); + return audioVolume; + } + + @XmlElement(name=TelevisionChannelFlexContainer.SHORT_NAME, required=true, type=TelevisionChannelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TelevisionChannelFlexContainer channel; + + public void setChannel(TelevisionChannelFlexContainer channel) { + this.channel = channel; + getFlexContainerOrContainerOrSubscription().add(channel); + } + + public TelevisionChannelFlexContainer getChannel() { + this.channel = (TelevisionChannelFlexContainer) getResourceByName(TelevisionChannelFlexContainer.SHORT_NAME); + return channel; + } + + @XmlElement(name=MediaSelectFlexContainer.SHORT_NAME, required=true, type=MediaSelectFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MediaSelectFlexContainer mediaInput; + + public void setMediaInput(MediaSelectFlexContainer mediaInput) { + this.mediaInput = mediaInput; + getFlexContainerOrContainerOrSubscription().add(mediaInput); + } + + public MediaSelectFlexContainer getMediaInput() { + this.mediaInput = (MediaSelectFlexContainer) getResourceByName(MediaSelectFlexContainer.SHORT_NAME); + return mediaInput; + } + + @XmlElement(name=MediaSelectFlexContainer.SHORT_NAME, required=true, type=MediaSelectFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MediaSelectFlexContainer mediaOutput; + + public void setMediaOutput(MediaSelectFlexContainer mediaOutput) { + this.mediaOutput = mediaOutput; + getFlexContainerOrContainerOrSubscription().add(mediaOutput); + } + + public MediaSelectFlexContainer getMediaOutput() { + this.mediaOutput = (MediaSelectFlexContainer) getResourceByName(MediaSelectFlexContainer.SHORT_NAME); + return mediaOutput; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSetTopBoxFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSetTopBoxFlexContainerAnnc.java new file mode 100644 index 00000000..1985de9d --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSetTopBoxFlexContainerAnnc.java @@ -0,0 +1,116 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceSetTopBoxAnnc + +A set top box is a device that in general contains a TV tuner input and displays output to a TV. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceSetTopBoxFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceSetTopBoxFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceSetTopBoxFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceSetTopBoxAnnc"; + public static final String SHORT_NAME = "dSTBxAnnc"; + + public DeviceSetTopBoxFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceSetTopBoxFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getAudioVolume(); + getAudioVolumeAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.audioVolume != null) { + setAudioVolume(this.audioVolume); + } + if (this.audioVolumeAnnc != null) { + setAudioVolumeAnnc(this.audioVolumeAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=AudioVolumeFlexContainer.SHORT_NAME, required=true, type=AudioVolumeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AudioVolumeFlexContainer audioVolume; + + public void setAudioVolume(AudioVolumeFlexContainer audioVolume) { + this.audioVolume = audioVolume; + getFlexContainerOrContainerOrSubscription().add(audioVolume); + } + + public AudioVolumeFlexContainer getAudioVolume() { + this.audioVolume = (AudioVolumeFlexContainer) getResourceByName(AudioVolumeFlexContainer.SHORT_NAME); + return audioVolume; + } + + @XmlElement(name=AudioVolumeFlexContainerAnnc.SHORT_NAME, required=true, type=AudioVolumeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AudioVolumeFlexContainerAnnc audioVolumeAnnc; + + public void setAudioVolumeAnnc(AudioVolumeFlexContainerAnnc audioVolumeAnnc) { + this.audioVolumeAnnc = audioVolumeAnnc; + getFlexContainerOrContainerOrSubscription().add(audioVolumeAnnc); + } + + public AudioVolumeFlexContainerAnnc getAudioVolumeAnnc() { + this.audioVolumeAnnc = (AudioVolumeFlexContainerAnnc) getResourceByName(AudioVolumeFlexContainerAnnc.SHORT_NAME); + return audioVolumeAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartElectricMeterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartElectricMeterFlexContainer.java index 0300c105..7e638174 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartElectricMeterFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartElectricMeterFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceSmartElectricMeter A smart electric meter is a metering device that is used to measure consumption data for electrictricity. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceSmartElectricMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,10 +38,10 @@ public class DeviceSmartElectricMeterFlexContainer extends AbstractFlexContainer setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getFaultDetection(); getBinarySwitch(); - getRunMode(); + getRunState(); getClock(); getEnergyConsumption(); getEnergyGeneration(); @@ -55,8 +54,8 @@ public class DeviceSmartElectricMeterFlexContainer extends AbstractFlexContainer if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); } if (this.clock != null) { setClock(this.clock); @@ -68,11 +67,10 @@ public class DeviceSmartElectricMeterFlexContainer extends AbstractFlexContainer setEnergyGeneration(this.energyGeneration); } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -83,10 +81,9 @@ public class DeviceSmartElectricMeterFlexContainer extends AbstractFlexContainer return faultDetection; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -97,24 +94,22 @@ public class DeviceSmartElectricMeterFlexContainer extends AbstractFlexContainer return binarySwitch; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="clock", required=true, type=ClockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ClockFlexContainer.SHORT_NAME, required=true, type=ClockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ClockFlexContainer clock; - - + public void setClock(ClockFlexContainer clock) { this.clock = clock; getFlexContainerOrContainerOrSubscription().add(clock); @@ -125,10 +120,9 @@ public class DeviceSmartElectricMeterFlexContainer extends AbstractFlexContainer return clock; } - @XmlElement(name="eneCn", required=true, type=EnergyConsumptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=EnergyConsumptionFlexContainer.SHORT_NAME, required=true, type=EnergyConsumptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private EnergyConsumptionFlexContainer energyConsumption; - - + public void setEnergyConsumption(EnergyConsumptionFlexContainer energyConsumption) { this.energyConsumption = energyConsumption; getFlexContainerOrContainerOrSubscription().add(energyConsumption); @@ -139,10 +133,9 @@ public class DeviceSmartElectricMeterFlexContainer extends AbstractFlexContainer return energyConsumption; } - @XmlElement(name="eneGn", required=true, type=EnergyGenerationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=EnergyGenerationFlexContainer.SHORT_NAME, required=true, type=EnergyGenerationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private EnergyGenerationFlexContainer energyGeneration; - - + public void setEnergyGeneration(EnergyGenerationFlexContainer energyGeneration) { this.energyGeneration = energyGeneration; getFlexContainerOrContainerOrSubscription().add(energyGeneration); @@ -153,4 +146,4 @@ public class DeviceSmartElectricMeterFlexContainer extends AbstractFlexContainer return energyGeneration; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartElectricMeterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartElectricMeterFlexContainerAnnc.java index 53b4a818..986785f6 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartElectricMeterFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartElectricMeterFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceSmartElectricMeterAnnc A smart electric meter is a metering device that is used to measure consumption data for electrictricity. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceSmartElectricMeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceSmartElectricMeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,22 +37,22 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta setContainerDefinition("org.onem2m.home.device." + DeviceSmartElectricMeterFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getFaultDetection(); getFaultDetectionAnnc(); getBinarySwitch(); getBinarySwitchAnnc(); - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); getClock(); getClockAnnc(); getEnergyConsumption(); getEnergyConsumptionAnnc(); getEnergyGeneration(); getEnergyGenerationAnnc(); - } + } public void finalizeDeserialization() { if (this.faultDetection != null) { @@ -60,49 +60,42 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta } if (this.faultDetectionAnnc != null) { setFaultDetectionAnnc(this.faultDetectionAnnc); - } - + } if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } if (this.clock != null) { setClock(this.clock); } if (this.clockAnnc != null) { setClockAnnc(this.clockAnnc); - } - + } if (this.energyConsumption != null) { setEnergyConsumption(this.energyConsumption); } if (this.energyConsumptionAnnc != null) { setEnergyConsumptionAnnc(this.energyConsumptionAnnc); - } - + } if (this.energyGeneration != null) { setEnergyGeneration(this.energyGeneration); } if (this.energyGenerationAnnc != null) { setEnergyGenerationAnnc(this.energyGenerationAnnc); - } - + } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -113,10 +106,9 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta return faultDetection; } - @XmlElement(name="fauDnAnnc", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainerAnnc faultDetectionAnnc; - - + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { this.faultDetectionAnnc = faultDetectionAnnc; getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); @@ -127,10 +119,9 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta return faultDetectionAnnc; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -141,10 +132,9 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -155,38 +145,35 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta return binarySwitchAnnc; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; - - - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="clock", required=true, type=ClockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ClockFlexContainer.SHORT_NAME, required=true, type=ClockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ClockFlexContainer clock; - - + public void setClock(ClockFlexContainer clock) { this.clock = clock; getFlexContainerOrContainerOrSubscription().add(clock); @@ -197,10 +184,9 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta return clock; } - @XmlElement(name="clockAnnc", required=true, type=ClockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ClockFlexContainerAnnc.SHORT_NAME, required=true, type=ClockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ClockFlexContainerAnnc clockAnnc; - - + public void setClockAnnc(ClockFlexContainerAnnc clockAnnc) { this.clockAnnc = clockAnnc; getFlexContainerOrContainerOrSubscription().add(clockAnnc); @@ -211,10 +197,9 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta return clockAnnc; } - @XmlElement(name="eneCn", required=true, type=EnergyConsumptionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=EnergyConsumptionFlexContainer.SHORT_NAME, required=true, type=EnergyConsumptionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private EnergyConsumptionFlexContainer energyConsumption; - - + public void setEnergyConsumption(EnergyConsumptionFlexContainer energyConsumption) { this.energyConsumption = energyConsumption; getFlexContainerOrContainerOrSubscription().add(energyConsumption); @@ -225,10 +210,9 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta return energyConsumption; } - @XmlElement(name="eneCnAnnc", required=true, type=EnergyConsumptionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=EnergyConsumptionFlexContainerAnnc.SHORT_NAME, required=true, type=EnergyConsumptionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private EnergyConsumptionFlexContainerAnnc energyConsumptionAnnc; - - + public void setEnergyConsumptionAnnc(EnergyConsumptionFlexContainerAnnc energyConsumptionAnnc) { this.energyConsumptionAnnc = energyConsumptionAnnc; getFlexContainerOrContainerOrSubscription().add(energyConsumptionAnnc); @@ -239,10 +223,9 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta return energyConsumptionAnnc; } - @XmlElement(name="eneGn", required=true, type=EnergyGenerationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=EnergyGenerationFlexContainer.SHORT_NAME, required=true, type=EnergyGenerationFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private EnergyGenerationFlexContainer energyGeneration; - - + public void setEnergyGeneration(EnergyGenerationFlexContainer energyGeneration) { this.energyGeneration = energyGeneration; getFlexContainerOrContainerOrSubscription().add(energyGeneration); @@ -253,10 +236,9 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta return energyGeneration; } - @XmlElement(name="eneGnAnnc", required=true, type=EnergyGenerationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=EnergyGenerationFlexContainerAnnc.SHORT_NAME, required=true, type=EnergyGenerationFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private EnergyGenerationFlexContainerAnnc energyGenerationAnnc; - - + public void setEnergyGenerationAnnc(EnergyGenerationFlexContainerAnnc energyGenerationAnnc) { this.energyGenerationAnnc = energyGenerationAnnc; getFlexContainerOrContainerOrSubscription().add(energyGenerationAnnc); @@ -267,4 +249,4 @@ public class DeviceSmartElectricMeterFlexContainerAnnc extends AbstractFlexConta return energyGenerationAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartPlugFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartPlugFlexContainer.java new file mode 100644 index 00000000..6b7a78e5 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartPlugFlexContainer.java @@ -0,0 +1,98 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceSmartPlug + +A smart plug is a device that can turn on and off a connected appliance. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceSmartPlugFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceSmartPlugFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceSmartPlugFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceSmartPlug"; + public static final String SHORT_NAME = "deSPg"; + + public DeviceSmartPlugFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceSmartPlugFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getFaultDetection(); + getRemoteControlEnable(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.remoteControlEnable != null) { + setRemoteControlEnable(this.remoteControlEnable); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=RemoteControlEnableFlexContainer.SHORT_NAME, required=true, type=RemoteControlEnableFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RemoteControlEnableFlexContainer remoteControlEnable; + + public void setRemoteControlEnable(RemoteControlEnableFlexContainer remoteControlEnable) { + this.remoteControlEnable = remoteControlEnable; + getFlexContainerOrContainerOrSubscription().add(remoteControlEnable); + } + + public RemoteControlEnableFlexContainer getRemoteControlEnable() { + this.remoteControlEnable = (RemoteControlEnableFlexContainer) getResourceByName(RemoteControlEnableFlexContainer.SHORT_NAME); + return remoteControlEnable; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartPlugFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartPlugFlexContainerAnnc.java new file mode 100644 index 00000000..aa960010 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmartPlugFlexContainerAnnc.java @@ -0,0 +1,150 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceSmartPlugAnnc + +A smart plug is a device that can turn on and off a connected appliance. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceSmartPlugFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceSmartPlugFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceSmartPlugFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceSmartPlugAnnc"; + public static final String SHORT_NAME = "deSPgAnnc"; + + public DeviceSmartPlugFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceSmartPlugFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getFaultDetection(); + getFaultDetectionAnnc(); + getRemoteControlEnable(); + getRemoteControlEnableAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.faultDetectionAnnc != null) { + setFaultDetectionAnnc(this.faultDetectionAnnc); + } + if (this.remoteControlEnable != null) { + setRemoteControlEnable(this.remoteControlEnable); + } + if (this.remoteControlEnableAnnc != null) { + setRemoteControlEnableAnnc(this.remoteControlEnableAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainerAnnc faultDetectionAnnc; + + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { + this.faultDetectionAnnc = faultDetectionAnnc; + getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); + } + + public FaultDetectionFlexContainerAnnc getFaultDetectionAnnc() { + this.faultDetectionAnnc = (FaultDetectionFlexContainerAnnc) getResourceByName(FaultDetectionFlexContainerAnnc.SHORT_NAME); + return faultDetectionAnnc; + } + + @XmlElement(name=RemoteControlEnableFlexContainer.SHORT_NAME, required=true, type=RemoteControlEnableFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RemoteControlEnableFlexContainer remoteControlEnable; + + public void setRemoteControlEnable(RemoteControlEnableFlexContainer remoteControlEnable) { + this.remoteControlEnable = remoteControlEnable; + getFlexContainerOrContainerOrSubscription().add(remoteControlEnable); + } + + public RemoteControlEnableFlexContainer getRemoteControlEnable() { + this.remoteControlEnable = (RemoteControlEnableFlexContainer) getResourceByName(RemoteControlEnableFlexContainer.SHORT_NAME); + return remoteControlEnable; + } + + @XmlElement(name=RemoteControlEnableFlexContainerAnnc.SHORT_NAME, required=true, type=RemoteControlEnableFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RemoteControlEnableFlexContainerAnnc remoteControlEnableAnnc; + + public void setRemoteControlEnableAnnc(RemoteControlEnableFlexContainerAnnc remoteControlEnableAnnc) { + this.remoteControlEnableAnnc = remoteControlEnableAnnc; + getFlexContainerOrContainerOrSubscription().add(remoteControlEnableAnnc); + } + + public RemoteControlEnableFlexContainerAnnc getRemoteControlEnableAnnc() { + this.remoteControlEnableAnnc = (RemoteControlEnableFlexContainerAnnc) getResourceByName(RemoteControlEnableFlexContainerAnnc.SHORT_NAME); + return remoteControlEnableAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmokeDetectorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmokeDetectorFlexContainer.java index 20c1fa90..37dbbd9d 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmokeDetectorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmokeDetectorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceSmokeDetector -A SmokeDetector is a device that triggers alarm in case of fire detection. -Created: 2018-06-11 12:14:18 + +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceSmokeDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,7 +38,7 @@ public class DeviceSmokeDetectorFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getSmokeSensor(); } @@ -48,11 +47,10 @@ public class DeviceSmokeDetectorFlexContainer extends AbstractFlexContainer { setSmokeSensor(this.smokeSensor); } } - - @XmlElement(name="smoSr", required=true, type=SmokeSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=SmokeSensorFlexContainer.SHORT_NAME, required=true, type=SmokeSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private SmokeSensorFlexContainer smokeSensor; - - + public void setSmokeSensor(SmokeSensorFlexContainer smokeSensor) { this.smokeSensor = smokeSensor; getFlexContainerOrContainerOrSubscription().add(smokeSensor); @@ -63,4 +61,4 @@ public class DeviceSmokeDetectorFlexContainer extends AbstractFlexContainer { return smokeSensor; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmokeDetectorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmokeDetectorFlexContainerAnnc.java index 69fb0af2..68150465 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmokeDetectorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSmokeDetectorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceSmokeDetectorAnnc -A SmokeDetector is a device that triggers alarm in case of fire detection. -Created: 2018-06-11 12:14:18 + +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceSmokeDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceSmokeDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,12 +37,12 @@ public class DeviceSmokeDetectorFlexContainerAnnc extends AbstractFlexContainerA setContainerDefinition("org.onem2m.home.device." + DeviceSmokeDetectorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getSmokeSensor(); getSmokeSensorAnnc(); - } + } public void finalizeDeserialization() { if (this.smokeSensor != null) { @@ -50,14 +50,12 @@ public class DeviceSmokeDetectorFlexContainerAnnc extends AbstractFlexContainerA } if (this.smokeSensorAnnc != null) { setSmokeSensorAnnc(this.smokeSensorAnnc); - } - + } } - - @XmlElement(name="smoSr", required=true, type=SmokeSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=SmokeSensorFlexContainer.SHORT_NAME, required=true, type=SmokeSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private SmokeSensorFlexContainer smokeSensor; - - + public void setSmokeSensor(SmokeSensorFlexContainer smokeSensor) { this.smokeSensor = smokeSensor; getFlexContainerOrContainerOrSubscription().add(smokeSensor); @@ -68,10 +66,9 @@ public class DeviceSmokeDetectorFlexContainerAnnc extends AbstractFlexContainerA return smokeSensor; } - @XmlElement(name="smoSrAnnc", required=true, type=SmokeSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=SmokeSensorFlexContainerAnnc.SHORT_NAME, required=true, type=SmokeSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private SmokeSensorFlexContainerAnnc smokeSensorAnnc; - - + public void setSmokeSensorAnnc(SmokeSensorFlexContainerAnnc smokeSensorAnnc) { this.smokeSensorAnnc = smokeSensorAnnc; getFlexContainerOrContainerOrSubscription().add(smokeSensorAnnc); @@ -82,4 +79,4 @@ public class DeviceSmokeDetectorFlexContainerAnnc extends AbstractFlexContainerA return smokeSensorAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSteamClosetFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSteamClosetFlexContainer.java new file mode 100644 index 00000000..1c3219ab --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSteamClosetFlexContainer.java @@ -0,0 +1,115 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceSteamCloset + +A deviceSteamCloset is a home appliance that de-wrinkles, sanitizes and dries to clean fabrics similar to a dry cleaner. This information model provides capabilities to interact with specific functions and resources of the steam closet. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceSteamClosetFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceSteamClosetFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceSteamClosetFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceSteamCloset"; + public static final String SHORT_NAME = "deSCt"; + + public DeviceSteamClosetFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceSteamClosetFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getRunState(); + getSteamClosetJobMode(); + getSteamClosetOperationMode(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.steamClosetJobMode != null) { + setSteamClosetJobMode(this.steamClosetJobMode); + } + if (this.steamClosetOperationMode != null) { + setSteamClosetOperationMode(this.steamClosetOperationMode); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=SteamClosetJobModeFlexContainer.SHORT_NAME, required=true, type=SteamClosetJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SteamClosetJobModeFlexContainer steamClosetJobMode; + + public void setSteamClosetJobMode(SteamClosetJobModeFlexContainer steamClosetJobMode) { + this.steamClosetJobMode = steamClosetJobMode; + getFlexContainerOrContainerOrSubscription().add(steamClosetJobMode); + } + + public SteamClosetJobModeFlexContainer getSteamClosetJobMode() { + this.steamClosetJobMode = (SteamClosetJobModeFlexContainer) getResourceByName(SteamClosetJobModeFlexContainer.SHORT_NAME); + return steamClosetJobMode; + } + + @XmlElement(name=OperationModeFlexContainer.SHORT_NAME, required=true, type=OperationModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OperationModeFlexContainer steamClosetOperationMode; + + public void setSteamClosetOperationMode(OperationModeFlexContainer steamClosetOperationMode) { + this.steamClosetOperationMode = steamClosetOperationMode; + getFlexContainerOrContainerOrSubscription().add(steamClosetOperationMode); + } + + public OperationModeFlexContainer getSteamClosetOperationMode() { + this.steamClosetOperationMode = (OperationModeFlexContainer) getResourceByName(OperationModeFlexContainer.SHORT_NAME); + return steamClosetOperationMode; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSteamClosetFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSteamClosetFlexContainerAnnc.java new file mode 100644 index 00000000..9c908349 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSteamClosetFlexContainerAnnc.java @@ -0,0 +1,150 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceSteamClosetAnnc + +A deviceSteamCloset is a home appliance that de-wrinkles, sanitizes and dries to clean fabrics similar to a dry cleaner. This information model provides capabilities to interact with specific functions and resources of the steam closet. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceSteamClosetFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceSteamClosetFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceSteamClosetFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceSteamClosetAnnc"; + public static final String SHORT_NAME = "deSCtAnnc"; + + public DeviceSteamClosetFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceSteamClosetFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getRunState(); + getRunStateAnnc(); + getSteamClosetJobMode(); + getSteamClosetJobModeAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.steamClosetJobMode != null) { + setSteamClosetJobMode(this.steamClosetJobMode); + } + if (this.steamClosetJobModeAnnc != null) { + setSteamClosetJobModeAnnc(this.steamClosetJobModeAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=SteamClosetJobModeFlexContainer.SHORT_NAME, required=true, type=SteamClosetJobModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SteamClosetJobModeFlexContainer steamClosetJobMode; + + public void setSteamClosetJobMode(SteamClosetJobModeFlexContainer steamClosetJobMode) { + this.steamClosetJobMode = steamClosetJobMode; + getFlexContainerOrContainerOrSubscription().add(steamClosetJobMode); + } + + public SteamClosetJobModeFlexContainer getSteamClosetJobMode() { + this.steamClosetJobMode = (SteamClosetJobModeFlexContainer) getResourceByName(SteamClosetJobModeFlexContainer.SHORT_NAME); + return steamClosetJobMode; + } + + @XmlElement(name=SteamClosetJobModeFlexContainerAnnc.SHORT_NAME, required=true, type=SteamClosetJobModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private SteamClosetJobModeFlexContainerAnnc steamClosetJobModeAnnc; + + public void setSteamClosetJobModeAnnc(SteamClosetJobModeFlexContainerAnnc steamClosetJobModeAnnc) { + this.steamClosetJobModeAnnc = steamClosetJobModeAnnc; + getFlexContainerOrContainerOrSubscription().add(steamClosetJobModeAnnc); + } + + public SteamClosetJobModeFlexContainerAnnc getSteamClosetJobModeAnnc() { + this.steamClosetJobModeAnnc = (SteamClosetJobModeFlexContainerAnnc) getResourceByName(SteamClosetJobModeFlexContainerAnnc.SHORT_NAME); + return steamClosetJobModeAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceStorageBatteryFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceStorageBatteryFlexContainer.java index 8f86c73f..6bb93e84 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceStorageBatteryFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceStorageBatteryFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceStorageBattery -A storage battery is a HEMS device that is used to provide the home with electrical energy. +A storage battery is a Home Energy Management System HEMS device that is used to provide the home with electrical energy. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceStorageBatteryFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,10 +38,10 @@ public class DeviceStorageBatteryFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getFaultDetection(); getBinarySwitch(); - getRunMode(); + getRunState(); getBattery(); } @@ -53,18 +52,17 @@ public class DeviceStorageBatteryFlexContainer extends AbstractFlexContainer { if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); } if (this.battery != null) { setBattery(this.battery); } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -75,10 +73,9 @@ public class DeviceStorageBatteryFlexContainer extends AbstractFlexContainer { return faultDetection; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -89,24 +86,22 @@ public class DeviceStorageBatteryFlexContainer extends AbstractFlexContainer { return binarySwitch; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="batty", required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BatteryFlexContainer battery; - - + public void setBattery(BatteryFlexContainer battery) { this.battery = battery; getFlexContainerOrContainerOrSubscription().add(battery); @@ -117,4 +112,4 @@ public class DeviceStorageBatteryFlexContainer extends AbstractFlexContainer { return battery; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceStorageBatteryFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceStorageBatteryFlexContainerAnnc.java index f2465947..32b840d0 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceStorageBatteryFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceStorageBatteryFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceStorageBatteryAnnc -A storage battery is a HEMS device that is used to provide the home with electrical energy. +A storage battery is a Home Energy Management System HEMS device that is used to provide the home with electrical energy. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceStorageBatteryFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceStorageBatteryFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,18 +37,18 @@ public class DeviceStorageBatteryFlexContainerAnnc extends AbstractFlexContainer setContainerDefinition("org.onem2m.home.device." + DeviceStorageBatteryFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getFaultDetection(); getFaultDetectionAnnc(); getBinarySwitch(); getBinarySwitchAnnc(); - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); getBattery(); getBatteryAnnc(); - } + } public void finalizeDeserialization() { if (this.faultDetection != null) { @@ -56,35 +56,30 @@ public class DeviceStorageBatteryFlexContainerAnnc extends AbstractFlexContainer } if (this.faultDetectionAnnc != null) { setFaultDetectionAnnc(this.faultDetectionAnnc); - } - + } if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } if (this.battery != null) { setBattery(this.battery); } if (this.batteryAnnc != null) { setBatteryAnnc(this.batteryAnnc); - } - + } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -95,10 +90,9 @@ public class DeviceStorageBatteryFlexContainerAnnc extends AbstractFlexContainer return faultDetection; } - @XmlElement(name="fauDnAnnc", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainerAnnc faultDetectionAnnc; - - + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { this.faultDetectionAnnc = faultDetectionAnnc; getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); @@ -109,10 +103,9 @@ public class DeviceStorageBatteryFlexContainerAnnc extends AbstractFlexContainer return faultDetectionAnnc; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -123,10 +116,9 @@ public class DeviceStorageBatteryFlexContainerAnnc extends AbstractFlexContainer return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -137,38 +129,35 @@ public class DeviceStorageBatteryFlexContainerAnnc extends AbstractFlexContainer return binarySwitchAnnc; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; - - - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="batty", required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BatteryFlexContainer battery; - - + public void setBattery(BatteryFlexContainer battery) { this.battery = battery; getFlexContainerOrContainerOrSubscription().add(battery); @@ -179,10 +168,9 @@ public class DeviceStorageBatteryFlexContainerAnnc extends AbstractFlexContainer return battery; } - @XmlElement(name="battyAnnc", required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BatteryFlexContainerAnnc batteryAnnc; - - + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { this.batteryAnnc = batteryAnnc; getFlexContainerOrContainerOrSubscription().add(batteryAnnc); @@ -193,4 +181,4 @@ public class DeviceStorageBatteryFlexContainerAnnc extends AbstractFlexContainer return batteryAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSwitchFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSwitchFlexContainer.java new file mode 100644 index 00000000..747a030e --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSwitchFlexContainer.java @@ -0,0 +1,64 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceSwitch + + + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceSwitchFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceSwitchFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceSwitch"; + public static final String SHORT_NAME = "devSh"; + + public DeviceSwitchFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceSwitchFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getPushButton(); + } + + public void finalizeDeserialization() { + if (this.pushButton != null) { + setPushButton(this.pushButton); + } + } + + @XmlElement(name=PushButtonFlexContainer.SHORT_NAME, required=true, type=PushButtonFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PushButtonFlexContainer pushButton; + + public void setPushButton(PushButtonFlexContainer pushButton) { + this.pushButton = pushButton; + getFlexContainerOrContainerOrSubscription().add(pushButton); + } + + public PushButtonFlexContainer getPushButton() { + this.pushButton = (PushButtonFlexContainer) getResourceByName(PushButtonFlexContainer.SHORT_NAME); + return pushButton; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSwitchFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSwitchFlexContainerAnnc.java new file mode 100644 index 00000000..4c848ed5 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceSwitchFlexContainerAnnc.java @@ -0,0 +1,82 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceSwitchAnnc + + + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceSwitchFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceSwitchFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceSwitchFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceSwitchAnnc"; + public static final String SHORT_NAME = "devShAnnc"; + + public DeviceSwitchFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceSwitchFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getPushButton(); + getPushButtonAnnc(); + } + + public void finalizeDeserialization() { + if (this.pushButton != null) { + setPushButton(this.pushButton); + } + if (this.pushButtonAnnc != null) { + setPushButtonAnnc(this.pushButtonAnnc); + } + } + + @XmlElement(name=PushButtonFlexContainer.SHORT_NAME, required=true, type=PushButtonFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PushButtonFlexContainer pushButton; + + public void setPushButton(PushButtonFlexContainer pushButton) { + this.pushButton = pushButton; + getFlexContainerOrContainerOrSubscription().add(pushButton); + } + + public PushButtonFlexContainer getPushButton() { + this.pushButton = (PushButtonFlexContainer) getResourceByName(PushButtonFlexContainer.SHORT_NAME); + return pushButton; + } + + @XmlElement(name=PushButtonFlexContainerAnnc.SHORT_NAME, required=true, type=PushButtonFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PushButtonFlexContainerAnnc pushButtonAnnc; + + public void setPushButtonAnnc(PushButtonFlexContainerAnnc pushButtonAnnc) { + this.pushButtonAnnc = pushButtonAnnc; + getFlexContainerOrContainerOrSubscription().add(pushButtonAnnc); + } + + public PushButtonFlexContainerAnnc getPushButtonAnnc() { + this.pushButtonAnnc = (PushButtonFlexContainerAnnc) getResourceByName(PushButtonFlexContainerAnnc.SHORT_NAME); + return pushButtonAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTelevisionFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTelevisionFlexContainer.java index 59319122..f88b1ce1 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTelevisionFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTelevisionFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceTelevision -A stelevision (TV) is a home appliance used to show audio and visual content such as broadcasting programs and network streaming. This TV information model provides capabilities to control and monitor TV specific resources. +A television (TV) is a home appliance used to show audio and visual content such as broadcasting programs and network streaming. This TV information model provides capabilities to control and monitor TV specific resources. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceTelevisionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +38,13 @@ public class DeviceTelevisionFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getBinarySwitch(); getAudioVolume(); getTelevisionChannel(); - getAudioVideoInput(); + getPlayerControl(); + getMediaInput(); + getMediaOutput(); } public void finalizeDeserialization() { @@ -56,15 +57,20 @@ public class DeviceTelevisionFlexContainer extends AbstractFlexContainer { if (this.televisionChannel != null) { setTelevisionChannel(this.televisionChannel); } - if (this.audioVideoInput != null) { - setAudioVideoInput(this.audioVideoInput); + if (this.playerControl != null) { + setPlayerControl(this.playerControl); + } + if (this.mediaInput != null) { + setMediaInput(this.mediaInput); + } + if (this.mediaOutput != null) { + setMediaOutput(this.mediaOutput); } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -75,10 +81,9 @@ public class DeviceTelevisionFlexContainer extends AbstractFlexContainer { return binarySwitch; } - @XmlElement(name="audVe", required=true, type=AudioVolumeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=AudioVolumeFlexContainer.SHORT_NAME, required=true, type=AudioVolumeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private AudioVolumeFlexContainer audioVolume; - - + public void setAudioVolume(AudioVolumeFlexContainer audioVolume) { this.audioVolume = audioVolume; getFlexContainerOrContainerOrSubscription().add(audioVolume); @@ -89,10 +94,9 @@ public class DeviceTelevisionFlexContainer extends AbstractFlexContainer { return audioVolume; } - @XmlElement(name="telCl", required=true, type=TelevisionChannelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TelevisionChannelFlexContainer.SHORT_NAME, required=true, type=TelevisionChannelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TelevisionChannelFlexContainer televisionChannel; - - + public void setTelevisionChannel(TelevisionChannelFlexContainer televisionChannel) { this.televisionChannel = televisionChannel; getFlexContainerOrContainerOrSubscription().add(televisionChannel); @@ -103,18 +107,43 @@ public class DeviceTelevisionFlexContainer extends AbstractFlexContainer { return televisionChannel; } - @XmlElement(name="auVIt", required=true, type=AudioVideoInputFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private AudioVideoInputFlexContainer audioVideoInput; + @XmlElement(name=PlayerControlFlexContainer.SHORT_NAME, required=true, type=PlayerControlFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PlayerControlFlexContainer playerControl; + + public void setPlayerControl(PlayerControlFlexContainer playerControl) { + this.playerControl = playerControl; + getFlexContainerOrContainerOrSubscription().add(playerControl); + } + public PlayerControlFlexContainer getPlayerControl() { + this.playerControl = (PlayerControlFlexContainer) getResourceByName(PlayerControlFlexContainer.SHORT_NAME); + return playerControl; + } + + @XmlElement(name=MediaSelectFlexContainer.SHORT_NAME, required=true, type=MediaSelectFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MediaSelectFlexContainer mediaInput; + + public void setMediaInput(MediaSelectFlexContainer mediaInput) { + this.mediaInput = mediaInput; + getFlexContainerOrContainerOrSubscription().add(mediaInput); + } + + public MediaSelectFlexContainer getMediaInput() { + this.mediaInput = (MediaSelectFlexContainer) getResourceByName(MediaSelectFlexContainer.SHORT_NAME); + return mediaInput; + } - public void setAudioVideoInput(AudioVideoInputFlexContainer audioVideoInput) { - this.audioVideoInput = audioVideoInput; - getFlexContainerOrContainerOrSubscription().add(audioVideoInput); + @XmlElement(name=MediaSelectFlexContainer.SHORT_NAME, required=true, type=MediaSelectFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private MediaSelectFlexContainer mediaOutput; + + public void setMediaOutput(MediaSelectFlexContainer mediaOutput) { + this.mediaOutput = mediaOutput; + getFlexContainerOrContainerOrSubscription().add(mediaOutput); } - public AudioVideoInputFlexContainer getAudioVideoInput() { - this.audioVideoInput = (AudioVideoInputFlexContainer) getResourceByName(AudioVideoInputFlexContainer.SHORT_NAME); - return audioVideoInput; + public MediaSelectFlexContainer getMediaOutput() { + this.mediaOutput = (MediaSelectFlexContainer) getResourceByName(MediaSelectFlexContainer.SHORT_NAME); + return mediaOutput; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTelevisionFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTelevisionFlexContainerAnnc.java index 0b0b9298..d344319c 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTelevisionFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTelevisionFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceTelevisionAnnc -A stelevision (TV) is a home appliance used to show audio and visual content such as broadcasting programs and network streaming. This TV information model provides capabilities to control and monitor TV specific resources. +A television (TV) is a home appliance used to show audio and visual content such as broadcasting programs and network streaming. This TV information model provides capabilities to control and monitor TV specific resources. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceTelevisionFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceTelevisionFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,7 +37,7 @@ public class DeviceTelevisionFlexContainerAnnc extends AbstractFlexContainerAnnc setContainerDefinition("org.onem2m.home.device." + DeviceTelevisionFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getBinarySwitch(); @@ -46,9 +46,9 @@ public class DeviceTelevisionFlexContainerAnnc extends AbstractFlexContainerAnnc getAudioVolumeAnnc(); getTelevisionChannel(); getTelevisionChannelAnnc(); - getAudioVideoInput(); - getAudioVideoInputAnnc(); - } + getPlayerControl(); + getPlayerControlAnnc(); + } public void finalizeDeserialization() { if (this.binarySwitch != null) { @@ -56,35 +56,30 @@ public class DeviceTelevisionFlexContainerAnnc extends AbstractFlexContainerAnnc } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - + } if (this.audioVolume != null) { setAudioVolume(this.audioVolume); } if (this.audioVolumeAnnc != null) { setAudioVolumeAnnc(this.audioVolumeAnnc); - } - + } if (this.televisionChannel != null) { setTelevisionChannel(this.televisionChannel); } if (this.televisionChannelAnnc != null) { setTelevisionChannelAnnc(this.televisionChannelAnnc); - } - - if (this.audioVideoInput != null) { - setAudioVideoInput(this.audioVideoInput); } - if (this.audioVideoInputAnnc != null) { - setAudioVideoInputAnnc(this.audioVideoInputAnnc); - } - + if (this.playerControl != null) { + setPlayerControl(this.playerControl); + } + if (this.playerControlAnnc != null) { + setPlayerControlAnnc(this.playerControlAnnc); + } } - - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -95,10 +90,9 @@ public class DeviceTelevisionFlexContainerAnnc extends AbstractFlexContainerAnnc return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -109,10 +103,9 @@ public class DeviceTelevisionFlexContainerAnnc extends AbstractFlexContainerAnnc return binarySwitchAnnc; } - @XmlElement(name="audVe", required=true, type=AudioVolumeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=AudioVolumeFlexContainer.SHORT_NAME, required=true, type=AudioVolumeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private AudioVolumeFlexContainer audioVolume; - - + public void setAudioVolume(AudioVolumeFlexContainer audioVolume) { this.audioVolume = audioVolume; getFlexContainerOrContainerOrSubscription().add(audioVolume); @@ -123,10 +116,9 @@ public class DeviceTelevisionFlexContainerAnnc extends AbstractFlexContainerAnnc return audioVolume; } - @XmlElement(name="audVeAnnc", required=true, type=AudioVolumeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=AudioVolumeFlexContainerAnnc.SHORT_NAME, required=true, type=AudioVolumeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private AudioVolumeFlexContainerAnnc audioVolumeAnnc; - - + public void setAudioVolumeAnnc(AudioVolumeFlexContainerAnnc audioVolumeAnnc) { this.audioVolumeAnnc = audioVolumeAnnc; getFlexContainerOrContainerOrSubscription().add(audioVolumeAnnc); @@ -137,10 +129,9 @@ public class DeviceTelevisionFlexContainerAnnc extends AbstractFlexContainerAnnc return audioVolumeAnnc; } - @XmlElement(name="telCl", required=true, type=TelevisionChannelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TelevisionChannelFlexContainer.SHORT_NAME, required=true, type=TelevisionChannelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TelevisionChannelFlexContainer televisionChannel; - - + public void setTelevisionChannel(TelevisionChannelFlexContainer televisionChannel) { this.televisionChannel = televisionChannel; getFlexContainerOrContainerOrSubscription().add(televisionChannel); @@ -151,10 +142,9 @@ public class DeviceTelevisionFlexContainerAnnc extends AbstractFlexContainerAnnc return televisionChannel; } - @XmlElement(name="telClAnnc", required=true, type=TelevisionChannelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TelevisionChannelFlexContainerAnnc.SHORT_NAME, required=true, type=TelevisionChannelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TelevisionChannelFlexContainerAnnc televisionChannelAnnc; - - + public void setTelevisionChannelAnnc(TelevisionChannelFlexContainerAnnc televisionChannelAnnc) { this.televisionChannelAnnc = televisionChannelAnnc; getFlexContainerOrContainerOrSubscription().add(televisionChannelAnnc); @@ -165,32 +155,30 @@ public class DeviceTelevisionFlexContainerAnnc extends AbstractFlexContainerAnnc return televisionChannelAnnc; } - @XmlElement(name="auVIt", required=true, type=AudioVideoInputFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private AudioVideoInputFlexContainer audioVideoInput; - - - public void setAudioVideoInput(AudioVideoInputFlexContainer audioVideoInput) { - this.audioVideoInput = audioVideoInput; - getFlexContainerOrContainerOrSubscription().add(audioVideoInput); + @XmlElement(name=PlayerControlFlexContainer.SHORT_NAME, required=true, type=PlayerControlFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PlayerControlFlexContainer playerControl; + + public void setPlayerControl(PlayerControlFlexContainer playerControl) { + this.playerControl = playerControl; + getFlexContainerOrContainerOrSubscription().add(playerControl); } - public AudioVideoInputFlexContainer getAudioVideoInput() { - this.audioVideoInput = (AudioVideoInputFlexContainer) getResourceByName(AudioVideoInputFlexContainer.SHORT_NAME); - return audioVideoInput; + public PlayerControlFlexContainer getPlayerControl() { + this.playerControl = (PlayerControlFlexContainer) getResourceByName(PlayerControlFlexContainer.SHORT_NAME); + return playerControl; } - @XmlElement(name="auVItAnnc", required=true, type=AudioVideoInputFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private AudioVideoInputFlexContainerAnnc audioVideoInputAnnc; - - - public void setAudioVideoInputAnnc(AudioVideoInputFlexContainerAnnc audioVideoInputAnnc) { - this.audioVideoInputAnnc = audioVideoInputAnnc; - getFlexContainerOrContainerOrSubscription().add(audioVideoInputAnnc); + @XmlElement(name=PlayerControlFlexContainerAnnc.SHORT_NAME, required=true, type=PlayerControlFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PlayerControlFlexContainerAnnc playerControlAnnc; + + public void setPlayerControlAnnc(PlayerControlFlexContainerAnnc playerControlAnnc) { + this.playerControlAnnc = playerControlAnnc; + getFlexContainerOrContainerOrSubscription().add(playerControlAnnc); } - public AudioVideoInputFlexContainerAnnc getAudioVideoInputAnnc() { - this.audioVideoInputAnnc = (AudioVideoInputFlexContainerAnnc) getResourceByName(AudioVideoInputFlexContainerAnnc.SHORT_NAME); - return audioVideoInputAnnc; + public PlayerControlFlexContainerAnnc getPlayerControlAnnc() { + this.playerControlAnnc = (PlayerControlFlexContainerAnnc) getResourceByName(PlayerControlFlexContainerAnnc.SHORT_NAME); + return playerControlAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTemperatureDetectorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTemperatureDetectorFlexContainer.java index c56a3777..eee28abd 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTemperatureDetectorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTemperatureDetectorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceTemperatureDetector -A SwitchButton is a device that provides button. -Created: 2018-06-11 12:14:18 + +Created: 2018-06-29 17:19:56 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceTemperatureDetectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,38 +38,19 @@ public class DeviceTemperatureDetectorFlexContainer extends AbstractFlexContaine setShortName(SHORT_NAME); } - public void finalizeSerialization() { - getAlarmSensor(); + public void finalizeSerialization() { getTemperature(); } public void finalizeDeserialization() { - if (this.alarmSensor != null) { - setAlarmSensor(this.alarmSensor); - } if (this.temperature != null) { setTemperature(this.temperature); } } - - @XmlElement(name="alSer", required=true, type=AlarmSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private AlarmSensorFlexContainer alarmSensor; - - - public void setAlarmSensor(AlarmSensorFlexContainer alarmSensor) { - this.alarmSensor = alarmSensor; - getFlexContainerOrContainerOrSubscription().add(alarmSensor); - } - - public AlarmSensorFlexContainer getAlarmSensor() { - this.alarmSensor = (AlarmSensorFlexContainer) getResourceByName(AlarmSensorFlexContainer.SHORT_NAME); - return alarmSensor; - } - - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainer temperature; - - + public void setTemperature(TemperatureFlexContainer temperature) { this.temperature = temperature; getFlexContainerOrContainerOrSubscription().add(temperature); @@ -81,4 +61,4 @@ public class DeviceTemperatureDetectorFlexContainer extends AbstractFlexContaine return temperature; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTemperatureDetectorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTemperatureDetectorFlexContainerAnnc.java index 4543a44a..f7dbaf43 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTemperatureDetectorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceTemperatureDetectorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceTemperatureDetectorAnnc -A SwitchButton is a device that provides button. -Created: 2018-06-11 12:14:18 + +Created: 2018-06-29 17:19:56 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceTemperatureDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceTemperatureDetectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,64 +37,25 @@ public class DeviceTemperatureDetectorFlexContainerAnnc extends AbstractFlexCont setContainerDefinition("org.onem2m.home.device." + DeviceTemperatureDetectorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { - getAlarmSensor(); - getAlarmSensorAnnc(); getTemperature(); getTemperatureAnnc(); - } + } public void finalizeDeserialization() { - if (this.alarmSensor != null) { - setAlarmSensor(this.alarmSensor); - } - if (this.alarmSensorAnnc != null) { - setAlarmSensorAnnc(this.alarmSensorAnnc); - } - if (this.temperature != null) { setTemperature(this.temperature); } if (this.temperatureAnnc != null) { setTemperatureAnnc(this.temperatureAnnc); - } - - } - - @XmlElement(name="alSer", required=true, type=AlarmSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private AlarmSensorFlexContainer alarmSensor; - - - public void setAlarmSensor(AlarmSensorFlexContainer alarmSensor) { - this.alarmSensor = alarmSensor; - getFlexContainerOrContainerOrSubscription().add(alarmSensor); - } - - public AlarmSensorFlexContainer getAlarmSensor() { - this.alarmSensor = (AlarmSensorFlexContainer) getResourceByName(AlarmSensorFlexContainer.SHORT_NAME); - return alarmSensor; - } - - @XmlElement(name="alSerAnnc", required=true, type=AlarmSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private AlarmSensorFlexContainerAnnc alarmSensorAnnc; - - - public void setAlarmSensorAnnc(AlarmSensorFlexContainerAnnc alarmSensorAnnc) { - this.alarmSensorAnnc = alarmSensorAnnc; - getFlexContainerOrContainerOrSubscription().add(alarmSensorAnnc); - } - - public AlarmSensorFlexContainerAnnc getAlarmSensorAnnc() { - this.alarmSensorAnnc = (AlarmSensorFlexContainerAnnc) getResourceByName(AlarmSensorFlexContainerAnnc.SHORT_NAME); - return alarmSensorAnnc; + } } - - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainer temperature; - - + public void setTemperature(TemperatureFlexContainer temperature) { this.temperature = temperature; getFlexContainerOrContainerOrSubscription().add(temperature); @@ -105,10 +66,9 @@ public class DeviceTemperatureDetectorFlexContainerAnnc extends AbstractFlexCont return temperature; } - @XmlElement(name="tempeAnnc", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TemperatureFlexContainerAnnc.SHORT_NAME, required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainerAnnc temperatureAnnc; - - + public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { this.temperatureAnnc = temperatureAnnc; getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); @@ -119,4 +79,4 @@ public class DeviceTemperatureDetectorFlexContainerAnnc extends AbstractFlexCont return temperatureAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermometerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermometerFlexContainer.java new file mode 100644 index 00000000..822d4ae3 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermometerFlexContainer.java @@ -0,0 +1,81 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceThermometer + +A thermometer is a device that can be used to check, for example, the body or other temperatures. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceThermometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceThermometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceThermometerFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceThermometer"; + public static final String SHORT_NAME = "devTr"; + + public DeviceThermometerFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceThermometerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getTemperature(); + getBattery(); + } + + public void finalizeDeserialization() { + if (this.temperature != null) { + setTemperature(this.temperature); + } + if (this.battery != null) { + setBattery(this.battery); + } + } + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer temperature; + + public void setTemperature(TemperatureFlexContainer temperature) { + this.temperature = temperature; + getFlexContainerOrContainerOrSubscription().add(temperature); + } + + public TemperatureFlexContainer getTemperature() { + this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return temperature; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermometerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermometerFlexContainerAnnc.java new file mode 100644 index 00000000..0e57b41d --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermometerFlexContainerAnnc.java @@ -0,0 +1,116 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceThermometerAnnc + +A thermometer is a device that can be used to check, for example, the body or other temperatures. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceThermometerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceThermometerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceThermometerFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceThermometerAnnc"; + public static final String SHORT_NAME = "devTrAnnc"; + + public DeviceThermometerFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceThermometerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getTemperature(); + getTemperatureAnnc(); + getBattery(); + getBatteryAnnc(); + } + + public void finalizeDeserialization() { + if (this.temperature != null) { + setTemperature(this.temperature); + } + if (this.temperatureAnnc != null) { + setTemperatureAnnc(this.temperatureAnnc); + } + if (this.battery != null) { + setBattery(this.battery); + } + if (this.batteryAnnc != null) { + setBatteryAnnc(this.batteryAnnc); + } + } + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer temperature; + + public void setTemperature(TemperatureFlexContainer temperature) { + this.temperature = temperature; + getFlexContainerOrContainerOrSubscription().add(temperature); + } + + public TemperatureFlexContainer getTemperature() { + this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return temperature; + } + + @XmlElement(name=TemperatureFlexContainerAnnc.SHORT_NAME, required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainerAnnc temperatureAnnc; + + public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { + this.temperatureAnnc = temperatureAnnc; + getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); + } + + public TemperatureFlexContainerAnnc getTemperatureAnnc() { + this.temperatureAnnc = (TemperatureFlexContainerAnnc) getResourceByName(TemperatureFlexContainerAnnc.SHORT_NAME); + return temperatureAnnc; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainerAnnc batteryAnnc; + + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { + this.batteryAnnc = batteryAnnc; + getFlexContainerOrContainerOrSubscription().add(batteryAnnc); + } + + public BatteryFlexContainerAnnc getBatteryAnnc() { + this.batteryAnnc = (BatteryFlexContainerAnnc) getResourceByName(BatteryFlexContainerAnnc.SHORT_NAME); + return batteryAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermostatFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermostatFlexContainer.java index 94a99d20..6ad7743a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermostatFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermostatFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceThermostat -A thermostat is used to control the ambient temperature of rooms within for example a house. This information model provides capabilities to interact with specific functions of thermostats. +A thermostat is used to control the ambient temperature of rooms within, for example, a house. This information model provides capabilities to interact with specific functions of thermostats. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceThermostatFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,15 +38,15 @@ public class DeviceThermostatFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { - getRunMode(); + public void finalizeSerialization() { + getRunState(); getTimer(); getTemperature(); } public void finalizeDeserialization() { - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); } if (this.timer != null) { setTimer(this.timer); @@ -56,25 +55,23 @@ public class DeviceThermostatFlexContainer extends AbstractFlexContainer { setTemperature(this.temperature); } } - - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="timer", required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainer timer; - - + public void setTimer(TimerFlexContainer timer) { this.timer = timer; getFlexContainerOrContainerOrSubscription().add(timer); @@ -85,10 +82,9 @@ public class DeviceThermostatFlexContainer extends AbstractFlexContainer { return timer; } - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainer temperature; - - + public void setTemperature(TemperatureFlexContainer temperature) { this.temperature = temperature; getFlexContainerOrContainerOrSubscription().add(temperature); @@ -99,4 +95,4 @@ public class DeviceThermostatFlexContainer extends AbstractFlexContainer { return temperature; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermostatFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermostatFlexContainerAnnc.java index 6d955a66..7281521b 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermostatFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThermostatFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceThermostatAnnc -A thermostat is used to control the ambient temperature of rooms within for example a house. This information model provides capabilities to interact with specific functions of thermostats. +A thermostat is used to control the ambient temperature of rooms within, for example, a house. This information model provides capabilities to interact with specific functions of thermostats. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceThermostatFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceThermostatFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,73 +37,67 @@ public class DeviceThermostatFlexContainerAnnc extends AbstractFlexContainerAnnc setContainerDefinition("org.onem2m.home.device." + DeviceThermostatFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); getTimer(); getTimerAnnc(); getTemperature(); getTemperatureAnnc(); - } + } public void finalizeDeserialization() { - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - if (this.timer != null) { setTimer(this.timer); } if (this.timerAnnc != null) { setTimerAnnc(this.timerAnnc); - } - + } if (this.temperature != null) { setTemperature(this.temperature); } if (this.temperatureAnnc != null) { setTemperatureAnnc(this.temperatureAnnc); - } - + } } - - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; - - - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="timer", required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainer.SHORT_NAME, required=true, type=TimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainer timer; - - + public void setTimer(TimerFlexContainer timer) { this.timer = timer; getFlexContainerOrContainerOrSubscription().add(timer); @@ -114,10 +108,9 @@ public class DeviceThermostatFlexContainerAnnc extends AbstractFlexContainerAnnc return timer; } - @XmlElement(name="timerAnnc", required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TimerFlexContainerAnnc.SHORT_NAME, required=true, type=TimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TimerFlexContainerAnnc timerAnnc; - - + public void setTimerAnnc(TimerFlexContainerAnnc timerAnnc) { this.timerAnnc = timerAnnc; getFlexContainerOrContainerOrSubscription().add(timerAnnc); @@ -128,10 +121,9 @@ public class DeviceThermostatFlexContainerAnnc extends AbstractFlexContainerAnnc return timerAnnc; } - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainer temperature; - - + public void setTemperature(TemperatureFlexContainer temperature) { this.temperature = temperature; getFlexContainerOrContainerOrSubscription().add(temperature); @@ -142,10 +134,9 @@ public class DeviceThermostatFlexContainerAnnc extends AbstractFlexContainerAnnc return temperature; } - @XmlElement(name="tempeAnnc", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=TemperatureFlexContainerAnnc.SHORT_NAME, required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private TemperatureFlexContainerAnnc temperatureAnnc; - - + public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { this.temperatureAnnc = temperatureAnnc; getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); @@ -156,4 +147,4 @@ public class DeviceThermostatFlexContainerAnnc extends AbstractFlexContainerAnnc return temperatureAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThreeDPrinterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThreeDPrinterFlexContainer.java new file mode 100644 index 00000000..eda3167f --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThreeDPrinterFlexContainer.java @@ -0,0 +1,149 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceThreeDPrinter + +A 3D printer is a smart home appliance to provide 3D printing capabilities. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceThreeDPrinterFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceThreeDPrinter"; + public static final String SHORT_NAME = "dTDPr"; + + public DeviceThreeDPrinterFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceThreeDPrinterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getFaultDetection(); + getThreeDPrinter(); + getRunState(); + getTemperature(); + getPrintQueue(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.threeDPrinter != null) { + setThreeDPrinter(this.threeDPrinter); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.temperature != null) { + setTemperature(this.temperature); + } + if (this.printQueue != null) { + setPrintQueue(this.printQueue); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=ThreeDPrinterFlexContainer.SHORT_NAME, required=true, type=ThreeDPrinterFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ThreeDPrinterFlexContainer threeDPrinter; + + public void setThreeDPrinter(ThreeDPrinterFlexContainer threeDPrinter) { + this.threeDPrinter = threeDPrinter; + getFlexContainerOrContainerOrSubscription().add(threeDPrinter); + } + + public ThreeDPrinterFlexContainer getThreeDPrinter() { + this.threeDPrinter = (ThreeDPrinterFlexContainer) getResourceByName(ThreeDPrinterFlexContainer.SHORT_NAME); + return threeDPrinter; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer temperature; + + public void setTemperature(TemperatureFlexContainer temperature) { + this.temperature = temperature; + getFlexContainerOrContainerOrSubscription().add(temperature); + } + + public TemperatureFlexContainer getTemperature() { + this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return temperature; + } + + @XmlElement(name=PrintQueueFlexContainer.SHORT_NAME, required=true, type=PrintQueueFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PrintQueueFlexContainer printQueue; + + public void setPrintQueue(PrintQueueFlexContainer printQueue) { + this.printQueue = printQueue; + getFlexContainerOrContainerOrSubscription().add(printQueue); + } + + public PrintQueueFlexContainer getPrintQueue() { + this.printQueue = (PrintQueueFlexContainer) getResourceByName(PrintQueueFlexContainer.SHORT_NAME); + return printQueue; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThreeDPrinterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThreeDPrinterFlexContainerAnnc.java new file mode 100644 index 00000000..1651bd80 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceThreeDPrinterFlexContainerAnnc.java @@ -0,0 +1,252 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceThreeDPrinterAnnc + +A 3D printer is a smart home appliance to provide 3D printing capabilities. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceThreeDPrinterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceThreeDPrinterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceThreeDPrinterFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceThreeDPrinterAnnc"; + public static final String SHORT_NAME = "dTDPrAnnc"; + + public DeviceThreeDPrinterFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceThreeDPrinterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getBinarySwitch(); + getBinarySwitchAnnc(); + getFaultDetection(); + getFaultDetectionAnnc(); + getThreeDPrinter(); + getThreeDPrinterAnnc(); + getRunState(); + getRunStateAnnc(); + getTemperature(); + getTemperatureAnnc(); + getPrintQueue(); + getPrintQueueAnnc(); + } + + public void finalizeDeserialization() { + if (this.binarySwitch != null) { + setBinarySwitch(this.binarySwitch); + } + if (this.binarySwitchAnnc != null) { + setBinarySwitchAnnc(this.binarySwitchAnnc); + } + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.faultDetectionAnnc != null) { + setFaultDetectionAnnc(this.faultDetectionAnnc); + } + if (this.threeDPrinter != null) { + setThreeDPrinter(this.threeDPrinter); + } + if (this.threeDPrinterAnnc != null) { + setThreeDPrinterAnnc(this.threeDPrinterAnnc); + } + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } + if (this.temperature != null) { + setTemperature(this.temperature); + } + if (this.temperatureAnnc != null) { + setTemperatureAnnc(this.temperatureAnnc); + } + if (this.printQueue != null) { + setPrintQueue(this.printQueue); + } + if (this.printQueueAnnc != null) { + setPrintQueueAnnc(this.printQueueAnnc); + } + } + + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainer binarySwitch; + + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { + this.binarySwitch = binarySwitch; + getFlexContainerOrContainerOrSubscription().add(binarySwitch); + } + + public BinarySwitchFlexContainer getBinarySwitch() { + this.binarySwitch = (BinarySwitchFlexContainer) getResourceByName(BinarySwitchFlexContainer.SHORT_NAME); + return binarySwitch; + } + + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BinarySwitchFlexContainerAnnc binarySwitchAnnc; + + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { + this.binarySwitchAnnc = binarySwitchAnnc; + getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); + } + + public BinarySwitchFlexContainerAnnc getBinarySwitchAnnc() { + this.binarySwitchAnnc = (BinarySwitchFlexContainerAnnc) getResourceByName(BinarySwitchFlexContainerAnnc.SHORT_NAME); + return binarySwitchAnnc; + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainerAnnc faultDetectionAnnc; + + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { + this.faultDetectionAnnc = faultDetectionAnnc; + getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); + } + + public FaultDetectionFlexContainerAnnc getFaultDetectionAnnc() { + this.faultDetectionAnnc = (FaultDetectionFlexContainerAnnc) getResourceByName(FaultDetectionFlexContainerAnnc.SHORT_NAME); + return faultDetectionAnnc; + } + + @XmlElement(name=ThreeDPrinterFlexContainer.SHORT_NAME, required=true, type=ThreeDPrinterFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ThreeDPrinterFlexContainer threeDPrinter; + + public void setThreeDPrinter(ThreeDPrinterFlexContainer threeDPrinter) { + this.threeDPrinter = threeDPrinter; + getFlexContainerOrContainerOrSubscription().add(threeDPrinter); + } + + public ThreeDPrinterFlexContainer getThreeDPrinter() { + this.threeDPrinter = (ThreeDPrinterFlexContainer) getResourceByName(ThreeDPrinterFlexContainer.SHORT_NAME); + return threeDPrinter; + } + + @XmlElement(name=ThreeDPrinterFlexContainerAnnc.SHORT_NAME, required=true, type=ThreeDPrinterFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ThreeDPrinterFlexContainerAnnc threeDPrinterAnnc; + + public void setThreeDPrinterAnnc(ThreeDPrinterFlexContainerAnnc threeDPrinterAnnc) { + this.threeDPrinterAnnc = threeDPrinterAnnc; + getFlexContainerOrContainerOrSubscription().add(threeDPrinterAnnc); + } + + public ThreeDPrinterFlexContainerAnnc getThreeDPrinterAnnc() { + this.threeDPrinterAnnc = (ThreeDPrinterFlexContainerAnnc) getResourceByName(ThreeDPrinterFlexContainerAnnc.SHORT_NAME); + return threeDPrinterAnnc; + } + + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); + } + + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; + } + + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); + } + + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; + } + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer temperature; + + public void setTemperature(TemperatureFlexContainer temperature) { + this.temperature = temperature; + getFlexContainerOrContainerOrSubscription().add(temperature); + } + + public TemperatureFlexContainer getTemperature() { + this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return temperature; + } + + @XmlElement(name=TemperatureFlexContainerAnnc.SHORT_NAME, required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainerAnnc temperatureAnnc; + + public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { + this.temperatureAnnc = temperatureAnnc; + getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); + } + + public TemperatureFlexContainerAnnc getTemperatureAnnc() { + this.temperatureAnnc = (TemperatureFlexContainerAnnc) getResourceByName(TemperatureFlexContainerAnnc.SHORT_NAME); + return temperatureAnnc; + } + + @XmlElement(name=PrintQueueFlexContainer.SHORT_NAME, required=true, type=PrintQueueFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PrintQueueFlexContainer printQueue; + + public void setPrintQueue(PrintQueueFlexContainer printQueue) { + this.printQueue = printQueue; + getFlexContainerOrContainerOrSubscription().add(printQueue); + } + + public PrintQueueFlexContainer getPrintQueue() { + this.printQueue = (PrintQueueFlexContainer) getResourceByName(PrintQueueFlexContainer.SHORT_NAME); + return printQueue; + } + + @XmlElement(name=PrintQueueFlexContainerAnnc.SHORT_NAME, required=true, type=PrintQueueFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PrintQueueFlexContainerAnnc printQueueAnnc; + + public void setPrintQueueAnnc(PrintQueueFlexContainerAnnc printQueueAnnc) { + this.printQueueAnnc = printQueueAnnc; + getFlexContainerOrContainerOrSubscription().add(printQueueAnnc); + } + + public PrintQueueFlexContainerAnnc getPrintQueueAnnc() { + this.printQueueAnnc = (PrintQueueFlexContainerAnnc) getResourceByName(PrintQueueFlexContainerAnnc.SHORT_NAME); + return printQueueAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWarningFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWarningFlexContainer.java new file mode 100644 index 00000000..57b48dd0 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWarningFlexContainer.java @@ -0,0 +1,81 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceWarning + +A warning device. + +Created: 2018-06-29 17:19:56 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceWarningFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceWarningFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceWarningFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceWarning"; + public static final String SHORT_NAME = "devWg"; + + public DeviceWarningFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceWarningFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getFaultDetection(); + getAlarmSpeaker(); + } + + public void finalizeDeserialization() { + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.alarmSpeaker != null) { + setAlarmSpeaker(this.alarmSpeaker); + } + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=AlarmSpeakerFlexContainer.SHORT_NAME, required=true, type=AlarmSpeakerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AlarmSpeakerFlexContainer alarmSpeaker; + + public void setAlarmSpeaker(AlarmSpeakerFlexContainer alarmSpeaker) { + this.alarmSpeaker = alarmSpeaker; + getFlexContainerOrContainerOrSubscription().add(alarmSpeaker); + } + + public AlarmSpeakerFlexContainer getAlarmSpeaker() { + this.alarmSpeaker = (AlarmSpeakerFlexContainer) getResourceByName(AlarmSpeakerFlexContainer.SHORT_NAME); + return alarmSpeaker; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWarningFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWarningFlexContainerAnnc.java new file mode 100644 index 00000000..a8d3ebea --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWarningFlexContainerAnnc.java @@ -0,0 +1,116 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceWarningAnnc + +A warning device. + +Created: 2018-06-29 17:19:56 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceWarningFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceWarningFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceWarningFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceWarningAnnc"; + public static final String SHORT_NAME = "devWgAnnc"; + + public DeviceWarningFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceWarningFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getFaultDetection(); + getFaultDetectionAnnc(); + getAlarmSpeaker(); + getAlarmSpeakerAnnc(); + } + + public void finalizeDeserialization() { + if (this.faultDetection != null) { + setFaultDetection(this.faultDetection); + } + if (this.faultDetectionAnnc != null) { + setFaultDetectionAnnc(this.faultDetectionAnnc); + } + if (this.alarmSpeaker != null) { + setAlarmSpeaker(this.alarmSpeaker); + } + if (this.alarmSpeakerAnnc != null) { + setAlarmSpeakerAnnc(this.alarmSpeakerAnnc); + } + } + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainer faultDetection; + + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { + this.faultDetection = faultDetection; + getFlexContainerOrContainerOrSubscription().add(faultDetection); + } + + public FaultDetectionFlexContainer getFaultDetection() { + this.faultDetection = (FaultDetectionFlexContainer) getResourceByName(FaultDetectionFlexContainer.SHORT_NAME); + return faultDetection; + } + + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private FaultDetectionFlexContainerAnnc faultDetectionAnnc; + + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { + this.faultDetectionAnnc = faultDetectionAnnc; + getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); + } + + public FaultDetectionFlexContainerAnnc getFaultDetectionAnnc() { + this.faultDetectionAnnc = (FaultDetectionFlexContainerAnnc) getResourceByName(FaultDetectionFlexContainerAnnc.SHORT_NAME); + return faultDetectionAnnc; + } + + @XmlElement(name=AlarmSpeakerFlexContainer.SHORT_NAME, required=true, type=AlarmSpeakerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AlarmSpeakerFlexContainer alarmSpeaker; + + public void setAlarmSpeaker(AlarmSpeakerFlexContainer alarmSpeaker) { + this.alarmSpeaker = alarmSpeaker; + getFlexContainerOrContainerOrSubscription().add(alarmSpeaker); + } + + public AlarmSpeakerFlexContainer getAlarmSpeaker() { + this.alarmSpeaker = (AlarmSpeakerFlexContainer) getResourceByName(AlarmSpeakerFlexContainer.SHORT_NAME); + return alarmSpeaker; + } + + @XmlElement(name=AlarmSpeakerFlexContainerAnnc.SHORT_NAME, required=true, type=AlarmSpeakerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AlarmSpeakerFlexContainerAnnc alarmSpeakerAnnc; + + public void setAlarmSpeakerAnnc(AlarmSpeakerFlexContainerAnnc alarmSpeakerAnnc) { + this.alarmSpeakerAnnc = alarmSpeakerAnnc; + getFlexContainerOrContainerOrSubscription().add(alarmSpeakerAnnc); + } + + public AlarmSpeakerFlexContainerAnnc getAlarmSpeakerAnnc() { + this.alarmSpeakerAnnc = (AlarmSpeakerFlexContainerAnnc) getResourceByName(AlarmSpeakerFlexContainerAnnc.SHORT_NAME); + return alarmSpeakerAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterHeaterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterHeaterFlexContainer.java index 1e7c231b..e28c2f25 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterHeaterFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterHeaterFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceWaterHeater A water heater is a device that is used to provide hot water through home facilities. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceWaterHeaterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,10 +38,10 @@ public class DeviceWaterHeaterFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { + public void finalizeSerialization() { getFaultDetection(); getBinarySwitch(); - getRunMode(); + getRunState(); getClock(); getBoiler(); getHotWaterSupply(); @@ -55,8 +54,8 @@ public class DeviceWaterHeaterFlexContainer extends AbstractFlexContainer { if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } - if (this.runMode != null) { - setRunMode(this.runMode); + if (this.runState != null) { + setRunState(this.runState); } if (this.clock != null) { setClock(this.clock); @@ -68,11 +67,10 @@ public class DeviceWaterHeaterFlexContainer extends AbstractFlexContainer { setHotWaterSupply(this.hotWaterSupply); } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -83,10 +81,9 @@ public class DeviceWaterHeaterFlexContainer extends AbstractFlexContainer { return faultDetection; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -97,24 +94,22 @@ public class DeviceWaterHeaterFlexContainer extends AbstractFlexContainer { return binarySwitch; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="clock", required=true, type=ClockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ClockFlexContainer.SHORT_NAME, required=true, type=ClockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ClockFlexContainer clock; - - + public void setClock(ClockFlexContainer clock) { this.clock = clock; getFlexContainerOrContainerOrSubscription().add(clock); @@ -125,10 +120,9 @@ public class DeviceWaterHeaterFlexContainer extends AbstractFlexContainer { return clock; } - @XmlElement(name="boilr", required=true, type=BoilerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BoilerFlexContainer.SHORT_NAME, required=true, type=BoilerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BoilerFlexContainer boiler; - - + public void setBoiler(BoilerFlexContainer boiler) { this.boiler = boiler; getFlexContainerOrContainerOrSubscription().add(boiler); @@ -139,10 +133,9 @@ public class DeviceWaterHeaterFlexContainer extends AbstractFlexContainer { return boiler; } - @XmlElement(name="hoWSy", required=true, type=HotWaterSupplyFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=HotWaterSupplyFlexContainer.SHORT_NAME, required=true, type=HotWaterSupplyFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private HotWaterSupplyFlexContainer hotWaterSupply; - - + public void setHotWaterSupply(HotWaterSupplyFlexContainer hotWaterSupply) { this.hotWaterSupply = hotWaterSupply; getFlexContainerOrContainerOrSubscription().add(hotWaterSupply); @@ -153,4 +146,4 @@ public class DeviceWaterHeaterFlexContainer extends AbstractFlexContainer { return hotWaterSupply; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterHeaterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterHeaterFlexContainerAnnc.java index 259ad812..c5ef1d12 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterHeaterFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterHeaterFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,7 +11,7 @@ Device : DeviceWaterHeaterAnnc A water heater is a device that is used to provide hot water through home facilities. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceWaterHeaterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceWaterHeaterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,22 +37,22 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn setContainerDefinition("org.onem2m.home.device." + DeviceWaterHeaterFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { getFaultDetection(); getFaultDetectionAnnc(); getBinarySwitch(); getBinarySwitchAnnc(); - getRunMode(); - getRunModeAnnc(); + getRunState(); + getRunStateAnnc(); getClock(); getClockAnnc(); getBoiler(); getBoilerAnnc(); getHotWaterSupply(); getHotWaterSupplyAnnc(); - } + } public void finalizeDeserialization() { if (this.faultDetection != null) { @@ -60,49 +60,42 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn } if (this.faultDetectionAnnc != null) { setFaultDetectionAnnc(this.faultDetectionAnnc); - } - + } if (this.binarySwitch != null) { setBinarySwitch(this.binarySwitch); } if (this.binarySwitchAnnc != null) { setBinarySwitchAnnc(this.binarySwitchAnnc); - } - - if (this.runMode != null) { - setRunMode(this.runMode); } - if (this.runModeAnnc != null) { - setRunModeAnnc(this.runModeAnnc); - } - + if (this.runState != null) { + setRunState(this.runState); + } + if (this.runStateAnnc != null) { + setRunStateAnnc(this.runStateAnnc); + } if (this.clock != null) { setClock(this.clock); } if (this.clockAnnc != null) { setClockAnnc(this.clockAnnc); - } - + } if (this.boiler != null) { setBoiler(this.boiler); } if (this.boilerAnnc != null) { setBoilerAnnc(this.boilerAnnc); - } - + } if (this.hotWaterSupply != null) { setHotWaterSupply(this.hotWaterSupply); } if (this.hotWaterSupplyAnnc != null) { setHotWaterSupplyAnnc(this.hotWaterSupplyAnnc); - } - + } } - - @XmlElement(name="fauDn", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + + @XmlElement(name=FaultDetectionFlexContainer.SHORT_NAME, required=true, type=FaultDetectionFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainer faultDetection; - - + public void setFaultDetection(FaultDetectionFlexContainer faultDetection) { this.faultDetection = faultDetection; getFlexContainerOrContainerOrSubscription().add(faultDetection); @@ -113,10 +106,9 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn return faultDetection; } - @XmlElement(name="fauDnAnnc", required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=FaultDetectionFlexContainerAnnc.SHORT_NAME, required=true, type=FaultDetectionFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private FaultDetectionFlexContainerAnnc faultDetectionAnnc; - - + public void setFaultDetectionAnnc(FaultDetectionFlexContainerAnnc faultDetectionAnnc) { this.faultDetectionAnnc = faultDetectionAnnc; getFlexContainerOrContainerOrSubscription().add(faultDetectionAnnc); @@ -127,10 +119,9 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn return faultDetectionAnnc; } - @XmlElement(name="binSh", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainer.SHORT_NAME, required=true, type=BinarySwitchFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainer binarySwitch; - - + public void setBinarySwitch(BinarySwitchFlexContainer binarySwitch) { this.binarySwitch = binarySwitch; getFlexContainerOrContainerOrSubscription().add(binarySwitch); @@ -141,10 +132,9 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn return binarySwitch; } - @XmlElement(name="binShAnnc", required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BinarySwitchFlexContainerAnnc.SHORT_NAME, required=true, type=BinarySwitchFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BinarySwitchFlexContainerAnnc binarySwitchAnnc; - - + public void setBinarySwitchAnnc(BinarySwitchFlexContainerAnnc binarySwitchAnnc) { this.binarySwitchAnnc = binarySwitchAnnc; getFlexContainerOrContainerOrSubscription().add(binarySwitchAnnc); @@ -155,38 +145,35 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn return binarySwitchAnnc; } - @XmlElement(name="runMe", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainer runMode; - - - public void setRunMode(RunModeFlexContainer runMode) { - this.runMode = runMode; - getFlexContainerOrContainerOrSubscription().add(runMode); + @XmlElement(name=RunStateFlexContainer.SHORT_NAME, required=true, type=RunStateFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainer runState; + + public void setRunState(RunStateFlexContainer runState) { + this.runState = runState; + getFlexContainerOrContainerOrSubscription().add(runState); } - public RunModeFlexContainer getRunMode() { - this.runMode = (RunModeFlexContainer) getResourceByName(RunModeFlexContainer.SHORT_NAME); - return runMode; + public RunStateFlexContainer getRunState() { + this.runState = (RunStateFlexContainer) getResourceByName(RunStateFlexContainer.SHORT_NAME); + return runState; } - @XmlElement(name="runMeAnnc", required=true, type=RunModeFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RunModeFlexContainerAnnc runModeAnnc; - - - public void setRunModeAnnc(RunModeFlexContainerAnnc runModeAnnc) { - this.runModeAnnc = runModeAnnc; - getFlexContainerOrContainerOrSubscription().add(runModeAnnc); + @XmlElement(name=RunStateFlexContainerAnnc.SHORT_NAME, required=true, type=RunStateFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private RunStateFlexContainerAnnc runStateAnnc; + + public void setRunStateAnnc(RunStateFlexContainerAnnc runStateAnnc) { + this.runStateAnnc = runStateAnnc; + getFlexContainerOrContainerOrSubscription().add(runStateAnnc); } - public RunModeFlexContainerAnnc getRunModeAnnc() { - this.runModeAnnc = (RunModeFlexContainerAnnc) getResourceByName(RunModeFlexContainerAnnc.SHORT_NAME); - return runModeAnnc; + public RunStateFlexContainerAnnc getRunStateAnnc() { + this.runStateAnnc = (RunStateFlexContainerAnnc) getResourceByName(RunStateFlexContainerAnnc.SHORT_NAME); + return runStateAnnc; } - @XmlElement(name="clock", required=true, type=ClockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ClockFlexContainer.SHORT_NAME, required=true, type=ClockFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ClockFlexContainer clock; - - + public void setClock(ClockFlexContainer clock) { this.clock = clock; getFlexContainerOrContainerOrSubscription().add(clock); @@ -197,10 +184,9 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn return clock; } - @XmlElement(name="clockAnnc", required=true, type=ClockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=ClockFlexContainerAnnc.SHORT_NAME, required=true, type=ClockFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ClockFlexContainerAnnc clockAnnc; - - + public void setClockAnnc(ClockFlexContainerAnnc clockAnnc) { this.clockAnnc = clockAnnc; getFlexContainerOrContainerOrSubscription().add(clockAnnc); @@ -211,10 +197,9 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn return clockAnnc; } - @XmlElement(name="boilr", required=true, type=BoilerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BoilerFlexContainer.SHORT_NAME, required=true, type=BoilerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BoilerFlexContainer boiler; - - + public void setBoiler(BoilerFlexContainer boiler) { this.boiler = boiler; getFlexContainerOrContainerOrSubscription().add(boiler); @@ -225,10 +210,9 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn return boiler; } - @XmlElement(name="boilrAnnc", required=true, type=BoilerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=BoilerFlexContainerAnnc.SHORT_NAME, required=true, type=BoilerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private BoilerFlexContainerAnnc boilerAnnc; - - + public void setBoilerAnnc(BoilerFlexContainerAnnc boilerAnnc) { this.boilerAnnc = boilerAnnc; getFlexContainerOrContainerOrSubscription().add(boilerAnnc); @@ -239,10 +223,9 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn return boilerAnnc; } - @XmlElement(name="hoWSy", required=true, type=HotWaterSupplyFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=HotWaterSupplyFlexContainer.SHORT_NAME, required=true, type=HotWaterSupplyFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private HotWaterSupplyFlexContainer hotWaterSupply; - - + public void setHotWaterSupply(HotWaterSupplyFlexContainer hotWaterSupply) { this.hotWaterSupply = hotWaterSupply; getFlexContainerOrContainerOrSubscription().add(hotWaterSupply); @@ -253,10 +236,9 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn return hotWaterSupply; } - @XmlElement(name="hoWSyAnnc", required=true, type=HotWaterSupplyFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + @XmlElement(name=HotWaterSupplyFlexContainerAnnc.SHORT_NAME, required=true, type=HotWaterSupplyFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private HotWaterSupplyFlexContainerAnnc hotWaterSupplyAnnc; - - + public void setHotWaterSupplyAnnc(HotWaterSupplyFlexContainerAnnc hotWaterSupplyAnnc) { this.hotWaterSupplyAnnc = hotWaterSupplyAnnc; getFlexContainerOrContainerOrSubscription().add(hotWaterSupplyAnnc); @@ -267,4 +249,4 @@ public class DeviceWaterHeaterFlexContainerAnnc extends AbstractFlexContainerAnn return hotWaterSupplyAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterValveFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterValveFlexContainer.java index 203aabca..92651166 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterValveFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterValveFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceWaterValve -A WaterValve is a device that controls liquid flux. +A water valve is a device that is used to turn the water supply ON or OFF remotely. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceWaterValveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,28 +38,27 @@ public class DeviceWaterValveFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { - getWaterLevel(); + public void finalizeSerialization() { + getOpenLevel(); } public void finalizeDeserialization() { - if (this.waterLevel != null) { - setWaterLevel(this.waterLevel); + if (this.openLevel != null) { + setOpenLevel(this.openLevel); } } - - @XmlElement(name="watLl", required=true, type=LiquidLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainer waterLevel; - - - public void setWaterLevel(LiquidLevelFlexContainer waterLevel) { - this.waterLevel = waterLevel; - getFlexContainerOrContainerOrSubscription().add(waterLevel); + + @XmlElement(name=OpenLevelFlexContainer.SHORT_NAME, required=true, type=OpenLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainer openLevel; + + public void setOpenLevel(OpenLevelFlexContainer openLevel) { + this.openLevel = openLevel; + getFlexContainerOrContainerOrSubscription().add(openLevel); } - public LiquidLevelFlexContainer getWaterLevel() { - this.waterLevel = (LiquidLevelFlexContainer) getResourceByName(LiquidLevelFlexContainer.SHORT_NAME); - return waterLevel; + public OpenLevelFlexContainer getOpenLevel() { + this.openLevel = (OpenLevelFlexContainer) getResourceByName(OpenLevelFlexContainer.SHORT_NAME); + return openLevel; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterValveFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterValveFlexContainerAnnc.java index 8401a0e2..f53b34c7 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterValveFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWaterValveFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceWaterValveAnnc -A WaterValve is a device that controls liquid flux. +A water valve is a device that is used to turn the water supply ON or OFF remotely. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:55 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceWaterValveFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceWaterValveFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,49 +37,46 @@ public class DeviceWaterValveFlexContainerAnnc extends AbstractFlexContainerAnnc setContainerDefinition("org.onem2m.home.device." + DeviceWaterValveFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { - getWaterLevel(); - getWaterLevelAnnc(); - } + getOpenLevel(); + getOpenLevelAnnc(); + } public void finalizeDeserialization() { - if (this.waterLevel != null) { - setWaterLevel(this.waterLevel); + if (this.openLevel != null) { + setOpenLevel(this.openLevel); + } + if (this.openLevelAnnc != null) { + setOpenLevelAnnc(this.openLevelAnnc); } - if (this.waterLevelAnnc != null) { - setWaterLevelAnnc(this.waterLevelAnnc); - } - } - - @XmlElement(name="watLl", required=true, type=LiquidLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainer waterLevel; - - - public void setWaterLevel(LiquidLevelFlexContainer waterLevel) { - this.waterLevel = waterLevel; - getFlexContainerOrContainerOrSubscription().add(waterLevel); + + @XmlElement(name=OpenLevelFlexContainer.SHORT_NAME, required=true, type=OpenLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainer openLevel; + + public void setOpenLevel(OpenLevelFlexContainer openLevel) { + this.openLevel = openLevel; + getFlexContainerOrContainerOrSubscription().add(openLevel); } - public LiquidLevelFlexContainer getWaterLevel() { - this.waterLevel = (LiquidLevelFlexContainer) getResourceByName(LiquidLevelFlexContainer.SHORT_NAME); - return waterLevel; + public OpenLevelFlexContainer getOpenLevel() { + this.openLevel = (OpenLevelFlexContainer) getResourceByName(OpenLevelFlexContainer.SHORT_NAME); + return openLevel; } - @XmlElement(name="watLlAnnc", required=true, type=LiquidLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private LiquidLevelFlexContainerAnnc waterLevelAnnc; - - - public void setWaterLevelAnnc(LiquidLevelFlexContainerAnnc waterLevelAnnc) { - this.waterLevelAnnc = waterLevelAnnc; - getFlexContainerOrContainerOrSubscription().add(waterLevelAnnc); + @XmlElement(name=OpenLevelFlexContainerAnnc.SHORT_NAME, required=true, type=OpenLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainerAnnc openLevelAnnc; + + public void setOpenLevelAnnc(OpenLevelFlexContainerAnnc openLevelAnnc) { + this.openLevelAnnc = openLevelAnnc; + getFlexContainerOrContainerOrSubscription().add(openLevelAnnc); } - public LiquidLevelFlexContainerAnnc getWaterLevelAnnc() { - this.waterLevelAnnc = (LiquidLevelFlexContainerAnnc) getResourceByName(LiquidLevelFlexContainerAnnc.SHORT_NAME); - return waterLevelAnnc; + public OpenLevelFlexContainerAnnc getOpenLevelAnnc() { + this.openLevelAnnc = (OpenLevelFlexContainerAnnc) getResourceByName(OpenLevelFlexContainerAnnc.SHORT_NAME); + return openLevelAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeatherStationFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeatherStationFlexContainer.java index 66794b19..afd6f49b 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeatherStationFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeatherStationFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceWeatherStation -A WeatherStation is a device that provides weather information. -Created: 2018-06-11 12:14:18 + +Created: 2018-07-04 10:25:10 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DeviceWeatherStationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,100 +38,129 @@ public class DeviceWeatherStationFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { - getTemperature(); - getRelativeHumidity(); - getAtmosphericPressureSensor(); - getNoise(); - getExtendedCarbonDioxideSensor(); + public void finalizeSerialization() { + getIndoorTemperature(); + getOutdoorTemperature(); + getAirQualitySensor(); + getAcousticSensor(); + getAnemometer(); + getBarometer(); + getUvSensor(); } public void finalizeDeserialization() { - if (this.temperature != null) { - setTemperature(this.temperature); + if (this.indoorTemperature != null) { + setIndoorTemperature(this.indoorTemperature); + } + if (this.outdoorTemperature != null) { + setOutdoorTemperature(this.outdoorTemperature); + } + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); } - if (this.relativeHumidity != null) { - setRelativeHumidity(this.relativeHumidity); + if (this.acousticSensor != null) { + setAcousticSensor(this.acousticSensor); } - if (this.atmosphericPressureSensor != null) { - setAtmosphericPressureSensor(this.atmosphericPressureSensor); + if (this.anemometer != null) { + setAnemometer(this.anemometer); } - if (this.noise != null) { - setNoise(this.noise); + if (this.barometer != null) { + setBarometer(this.barometer); } - if (this.extendedCarbonDioxideSensor != null) { - setExtendedCarbonDioxideSensor(this.extendedCarbonDioxideSensor); + if (this.uvSensor != null) { + setUvSensor(this.uvSensor); } } - - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TemperatureFlexContainer temperature; - - - public void setTemperature(TemperatureFlexContainer temperature) { - this.temperature = temperature; - getFlexContainerOrContainerOrSubscription().add(temperature); + + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer indoorTemperature; + + public void setIndoorTemperature(TemperatureFlexContainer indoorTemperature) { + this.indoorTemperature = indoorTemperature; + getFlexContainerOrContainerOrSubscription().add(indoorTemperature); } - public TemperatureFlexContainer getTemperature() { - this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); - return temperature; + public TemperatureFlexContainer getIndoorTemperature() { + this.indoorTemperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return indoorTemperature; } - @XmlElement(name="relHy", required=true, type=RelativeHumidityFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RelativeHumidityFlexContainer relativeHumidity; - - - public void setRelativeHumidity(RelativeHumidityFlexContainer relativeHumidity) { - this.relativeHumidity = relativeHumidity; - getFlexContainerOrContainerOrSubscription().add(relativeHumidity); + @XmlElement(name=TemperatureFlexContainer.SHORT_NAME, required=true, type=TemperatureFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private TemperatureFlexContainer outdoorTemperature; + + public void setOutdoorTemperature(TemperatureFlexContainer outdoorTemperature) { + this.outdoorTemperature = outdoorTemperature; + getFlexContainerOrContainerOrSubscription().add(outdoorTemperature); } - public RelativeHumidityFlexContainer getRelativeHumidity() { - this.relativeHumidity = (RelativeHumidityFlexContainer) getResourceByName(RelativeHumidityFlexContainer.SHORT_NAME); - return relativeHumidity; + public TemperatureFlexContainer getOutdoorTemperature() { + this.outdoorTemperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); + return outdoorTemperature; } - @XmlElement(name="atPSr", required=true, type=AtmosphericPressureSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private AtmosphericPressureSensorFlexContainer atmosphericPressureSensor; - - - public void setAtmosphericPressureSensor(AtmosphericPressureSensorFlexContainer atmosphericPressureSensor) { - this.atmosphericPressureSensor = atmosphericPressureSensor; - getFlexContainerOrContainerOrSubscription().add(atmosphericPressureSensor); + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); } - public AtmosphericPressureSensorFlexContainer getAtmosphericPressureSensor() { - this.atmosphericPressureSensor = (AtmosphericPressureSensorFlexContainer) getResourceByName(AtmosphericPressureSensorFlexContainer.SHORT_NAME); - return atmosphericPressureSensor; + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; } - @XmlElement(name="noise", required=true, type=NoiseFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private NoiseFlexContainer noise; + @XmlElement(name=AcousticSensorFlexContainer.SHORT_NAME, required=true, type=AcousticSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AcousticSensorFlexContainer acousticSensor; + + public void setAcousticSensor(AcousticSensorFlexContainer acousticSensor) { + this.acousticSensor = acousticSensor; + getFlexContainerOrContainerOrSubscription().add(acousticSensor); + } + public AcousticSensorFlexContainer getAcousticSensor() { + this.acousticSensor = (AcousticSensorFlexContainer) getResourceByName(AcousticSensorFlexContainer.SHORT_NAME); + return acousticSensor; + } - public void setNoise(NoiseFlexContainer noise) { - this.noise = noise; - getFlexContainerOrContainerOrSubscription().add(noise); + @XmlElement(name=AnemometerFlexContainer.SHORT_NAME, required=true, type=AnemometerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AnemometerFlexContainer anemometer; + + public void setAnemometer(AnemometerFlexContainer anemometer) { + this.anemometer = anemometer; + getFlexContainerOrContainerOrSubscription().add(anemometer); } - public NoiseFlexContainer getNoise() { - this.noise = (NoiseFlexContainer) getResourceByName(NoiseFlexContainer.SHORT_NAME); - return noise; + public AnemometerFlexContainer getAnemometer() { + this.anemometer = (AnemometerFlexContainer) getResourceByName(AnemometerFlexContainer.SHORT_NAME); + return anemometer; } - @XmlElement(name="eCDSr", required=true, type=ExtendedCarbonDioxideSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private ExtendedCarbonDioxideSensorFlexContainer extendedCarbonDioxideSensor; + @XmlElement(name=BarometerFlexContainer.SHORT_NAME, required=true, type=BarometerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BarometerFlexContainer barometer; + + public void setBarometer(BarometerFlexContainer barometer) { + this.barometer = barometer; + getFlexContainerOrContainerOrSubscription().add(barometer); + } + public BarometerFlexContainer getBarometer() { + this.barometer = (BarometerFlexContainer) getResourceByName(BarometerFlexContainer.SHORT_NAME); + return barometer; + } - public void setExtendedCarbonDioxideSensor(ExtendedCarbonDioxideSensorFlexContainer extendedCarbonDioxideSensor) { - this.extendedCarbonDioxideSensor = extendedCarbonDioxideSensor; - getFlexContainerOrContainerOrSubscription().add(extendedCarbonDioxideSensor); + @XmlElement(name=UvSensorFlexContainer.SHORT_NAME, required=true, type=UvSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private UvSensorFlexContainer uvSensor; + + public void setUvSensor(UvSensorFlexContainer uvSensor) { + this.uvSensor = uvSensor; + getFlexContainerOrContainerOrSubscription().add(uvSensor); } - public ExtendedCarbonDioxideSensorFlexContainer getExtendedCarbonDioxideSensor() { - this.extendedCarbonDioxideSensor = (ExtendedCarbonDioxideSensorFlexContainer) getResourceByName(ExtendedCarbonDioxideSensorFlexContainer.SHORT_NAME); - return extendedCarbonDioxideSensor; + public UvSensorFlexContainer getUvSensor() { + this.uvSensor = (UvSensorFlexContainer) getResourceByName(UvSensorFlexContainer.SHORT_NAME); + return uvSensor; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeatherStationFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeatherStationFlexContainerAnnc.java index c607a232..d5a1648a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeatherStationFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeatherStationFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ Device : DeviceWeatherStationAnnc -A WeatherStation is a device that provides weather information. -Created: 2018-06-11 12:14:18 + +Created: 2018-07-04 10:25:10 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,10 +21,10 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; - @XmlRootElement(name = DeviceWeatherStationFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = DeviceWeatherStationFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @@ -37,197 +37,182 @@ public class DeviceWeatherStationFlexContainerAnnc extends AbstractFlexContainer setContainerDefinition("org.onem2m.home.device." + DeviceWeatherStationFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); - } + } public void finalizeSerialization() { - getTemperature(); - getTemperatureAnnc(); - getRelativeHumidity(); - getRelativeHumidityAnnc(); - getAtmosphericPressureSensor(); - getAtmosphericPressureSensorAnnc(); - getNoise(); - getNoiseAnnc(); - getExtendedCarbonDioxideSensor(); - getExtendedCarbonDioxideSensorAnnc(); - } + getAirQualitySensor(); + getAirQualitySensorAnnc(); + getAcousticSensor(); + getAcousticSensorAnnc(); + getAnemometer(); + getAnemometerAnnc(); + getBarometer(); + getBarometerAnnc(); + getUvSensor(); + getUvSensorAnnc(); + } public void finalizeDeserialization() { - if (this.temperature != null) { - setTemperature(this.temperature); + if (this.airQualitySensor != null) { + setAirQualitySensor(this.airQualitySensor); } - if (this.temperatureAnnc != null) { - setTemperatureAnnc(this.temperatureAnnc); - } - - if (this.relativeHumidity != null) { - setRelativeHumidity(this.relativeHumidity); + if (this.airQualitySensorAnnc != null) { + setAirQualitySensorAnnc(this.airQualitySensorAnnc); } - if (this.relativeHumidityAnnc != null) { - setRelativeHumidityAnnc(this.relativeHumidityAnnc); - } - - if (this.atmosphericPressureSensor != null) { - setAtmosphericPressureSensor(this.atmosphericPressureSensor); + if (this.acousticSensor != null) { + setAcousticSensor(this.acousticSensor); } - if (this.atmosphericPressureSensorAnnc != null) { - setAtmosphericPressureSensorAnnc(this.atmosphericPressureSensorAnnc); - } - - if (this.noise != null) { - setNoise(this.noise); + if (this.acousticSensorAnnc != null) { + setAcousticSensorAnnc(this.acousticSensorAnnc); } - if (this.noiseAnnc != null) { - setNoiseAnnc(this.noiseAnnc); - } - - if (this.extendedCarbonDioxideSensor != null) { - setExtendedCarbonDioxideSensor(this.extendedCarbonDioxideSensor); + if (this.anemometer != null) { + setAnemometer(this.anemometer); + } + if (this.anemometerAnnc != null) { + setAnemometerAnnc(this.anemometerAnnc); + } + if (this.barometer != null) { + setBarometer(this.barometer); + } + if (this.barometerAnnc != null) { + setBarometerAnnc(this.barometerAnnc); + } + if (this.uvSensor != null) { + setUvSensor(this.uvSensor); + } + if (this.uvSensorAnnc != null) { + setUvSensorAnnc(this.uvSensorAnnc); } - if (this.extendedCarbonDioxideSensorAnnc != null) { - setExtendedCarbonDioxideSensorAnnc(this.extendedCarbonDioxideSensorAnnc); - } - } - - @XmlElement(name="tempe", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TemperatureFlexContainer temperature; - - - public void setTemperature(TemperatureFlexContainer temperature) { - this.temperature = temperature; - getFlexContainerOrContainerOrSubscription().add(temperature); + + @XmlElement(name=AirQualitySensorFlexContainer.SHORT_NAME, required=true, type=AirQualitySensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainer airQualitySensor; + + public void setAirQualitySensor(AirQualitySensorFlexContainer airQualitySensor) { + this.airQualitySensor = airQualitySensor; + getFlexContainerOrContainerOrSubscription().add(airQualitySensor); } - public TemperatureFlexContainer getTemperature() { - this.temperature = (TemperatureFlexContainer) getResourceByName(TemperatureFlexContainer.SHORT_NAME); - return temperature; + public AirQualitySensorFlexContainer getAirQualitySensor() { + this.airQualitySensor = (AirQualitySensorFlexContainer) getResourceByName(AirQualitySensorFlexContainer.SHORT_NAME); + return airQualitySensor; } - @XmlElement(name="tempeAnnc", required=true, type=TemperatureFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private TemperatureFlexContainerAnnc temperatureAnnc; - - - public void setTemperatureAnnc(TemperatureFlexContainerAnnc temperatureAnnc) { - this.temperatureAnnc = temperatureAnnc; - getFlexContainerOrContainerOrSubscription().add(temperatureAnnc); + @XmlElement(name=AirQualitySensorFlexContainerAnnc.SHORT_NAME, required=true, type=AirQualitySensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AirQualitySensorFlexContainerAnnc airQualitySensorAnnc; + + public void setAirQualitySensorAnnc(AirQualitySensorFlexContainerAnnc airQualitySensorAnnc) { + this.airQualitySensorAnnc = airQualitySensorAnnc; + getFlexContainerOrContainerOrSubscription().add(airQualitySensorAnnc); } - public TemperatureFlexContainerAnnc getTemperatureAnnc() { - this.temperatureAnnc = (TemperatureFlexContainerAnnc) getResourceByName(TemperatureFlexContainerAnnc.SHORT_NAME); - return temperatureAnnc; + public AirQualitySensorFlexContainerAnnc getAirQualitySensorAnnc() { + this.airQualitySensorAnnc = (AirQualitySensorFlexContainerAnnc) getResourceByName(AirQualitySensorFlexContainerAnnc.SHORT_NAME); + return airQualitySensorAnnc; } - @XmlElement(name="relHy", required=true, type=RelativeHumidityFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RelativeHumidityFlexContainer relativeHumidity; - - - public void setRelativeHumidity(RelativeHumidityFlexContainer relativeHumidity) { - this.relativeHumidity = relativeHumidity; - getFlexContainerOrContainerOrSubscription().add(relativeHumidity); + @XmlElement(name=AcousticSensorFlexContainer.SHORT_NAME, required=true, type=AcousticSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AcousticSensorFlexContainer acousticSensor; + + public void setAcousticSensor(AcousticSensorFlexContainer acousticSensor) { + this.acousticSensor = acousticSensor; + getFlexContainerOrContainerOrSubscription().add(acousticSensor); } - public RelativeHumidityFlexContainer getRelativeHumidity() { - this.relativeHumidity = (RelativeHumidityFlexContainer) getResourceByName(RelativeHumidityFlexContainer.SHORT_NAME); - return relativeHumidity; + public AcousticSensorFlexContainer getAcousticSensor() { + this.acousticSensor = (AcousticSensorFlexContainer) getResourceByName(AcousticSensorFlexContainer.SHORT_NAME); + return acousticSensor; } - @XmlElement(name="relHyAnnc", required=true, type=RelativeHumidityFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private RelativeHumidityFlexContainerAnnc relativeHumidityAnnc; - - - public void setRelativeHumidityAnnc(RelativeHumidityFlexContainerAnnc relativeHumidityAnnc) { - this.relativeHumidityAnnc = relativeHumidityAnnc; - getFlexContainerOrContainerOrSubscription().add(relativeHumidityAnnc); + @XmlElement(name=AcousticSensorFlexContainerAnnc.SHORT_NAME, required=true, type=AcousticSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AcousticSensorFlexContainerAnnc acousticSensorAnnc; + + public void setAcousticSensorAnnc(AcousticSensorFlexContainerAnnc acousticSensorAnnc) { + this.acousticSensorAnnc = acousticSensorAnnc; + getFlexContainerOrContainerOrSubscription().add(acousticSensorAnnc); } - public RelativeHumidityFlexContainerAnnc getRelativeHumidityAnnc() { - this.relativeHumidityAnnc = (RelativeHumidityFlexContainerAnnc) getResourceByName(RelativeHumidityFlexContainerAnnc.SHORT_NAME); - return relativeHumidityAnnc; + public AcousticSensorFlexContainerAnnc getAcousticSensorAnnc() { + this.acousticSensorAnnc = (AcousticSensorFlexContainerAnnc) getResourceByName(AcousticSensorFlexContainerAnnc.SHORT_NAME); + return acousticSensorAnnc; } - @XmlElement(name="atPSr", required=true, type=AtmosphericPressureSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private AtmosphericPressureSensorFlexContainer atmosphericPressureSensor; - - - public void setAtmosphericPressureSensor(AtmosphericPressureSensorFlexContainer atmosphericPressureSensor) { - this.atmosphericPressureSensor = atmosphericPressureSensor; - getFlexContainerOrContainerOrSubscription().add(atmosphericPressureSensor); + @XmlElement(name=AnemometerFlexContainer.SHORT_NAME, required=true, type=AnemometerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AnemometerFlexContainer anemometer; + + public void setAnemometer(AnemometerFlexContainer anemometer) { + this.anemometer = anemometer; + getFlexContainerOrContainerOrSubscription().add(anemometer); } - public AtmosphericPressureSensorFlexContainer getAtmosphericPressureSensor() { - this.atmosphericPressureSensor = (AtmosphericPressureSensorFlexContainer) getResourceByName(AtmosphericPressureSensorFlexContainer.SHORT_NAME); - return atmosphericPressureSensor; + public AnemometerFlexContainer getAnemometer() { + this.anemometer = (AnemometerFlexContainer) getResourceByName(AnemometerFlexContainer.SHORT_NAME); + return anemometer; } - @XmlElement(name="atPSrAnnc", required=true, type=AtmosphericPressureSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private AtmosphericPressureSensorFlexContainerAnnc atmosphericPressureSensorAnnc; - - - public void setAtmosphericPressureSensorAnnc(AtmosphericPressureSensorFlexContainerAnnc atmosphericPressureSensorAnnc) { - this.atmosphericPressureSensorAnnc = atmosphericPressureSensorAnnc; - getFlexContainerOrContainerOrSubscription().add(atmosphericPressureSensorAnnc); + @XmlElement(name=AnemometerFlexContainerAnnc.SHORT_NAME, required=true, type=AnemometerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AnemometerFlexContainerAnnc anemometerAnnc; + + public void setAnemometerAnnc(AnemometerFlexContainerAnnc anemometerAnnc) { + this.anemometerAnnc = anemometerAnnc; + getFlexContainerOrContainerOrSubscription().add(anemometerAnnc); } - public AtmosphericPressureSensorFlexContainerAnnc getAtmosphericPressureSensorAnnc() { - this.atmosphericPressureSensorAnnc = (AtmosphericPressureSensorFlexContainerAnnc) getResourceByName(AtmosphericPressureSensorFlexContainerAnnc.SHORT_NAME); - return atmosphericPressureSensorAnnc; + public AnemometerFlexContainerAnnc getAnemometerAnnc() { + this.anemometerAnnc = (AnemometerFlexContainerAnnc) getResourceByName(AnemometerFlexContainerAnnc.SHORT_NAME); + return anemometerAnnc; } - @XmlElement(name="noise", required=true, type=NoiseFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private NoiseFlexContainer noise; - - - public void setNoise(NoiseFlexContainer noise) { - this.noise = noise; - getFlexContainerOrContainerOrSubscription().add(noise); + @XmlElement(name=BarometerFlexContainer.SHORT_NAME, required=true, type=BarometerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BarometerFlexContainer barometer; + + public void setBarometer(BarometerFlexContainer barometer) { + this.barometer = barometer; + getFlexContainerOrContainerOrSubscription().add(barometer); } - public NoiseFlexContainer getNoise() { - this.noise = (NoiseFlexContainer) getResourceByName(NoiseFlexContainer.SHORT_NAME); - return noise; + public BarometerFlexContainer getBarometer() { + this.barometer = (BarometerFlexContainer) getResourceByName(BarometerFlexContainer.SHORT_NAME); + return barometer; } - @XmlElement(name="noiseAnnc", required=true, type=NoiseFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private NoiseFlexContainerAnnc noiseAnnc; - - - public void setNoiseAnnc(NoiseFlexContainerAnnc noiseAnnc) { - this.noiseAnnc = noiseAnnc; - getFlexContainerOrContainerOrSubscription().add(noiseAnnc); + @XmlElement(name=BarometerFlexContainerAnnc.SHORT_NAME, required=true, type=BarometerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BarometerFlexContainerAnnc barometerAnnc; + + public void setBarometerAnnc(BarometerFlexContainerAnnc barometerAnnc) { + this.barometerAnnc = barometerAnnc; + getFlexContainerOrContainerOrSubscription().add(barometerAnnc); } - public NoiseFlexContainerAnnc getNoiseAnnc() { - this.noiseAnnc = (NoiseFlexContainerAnnc) getResourceByName(NoiseFlexContainerAnnc.SHORT_NAME); - return noiseAnnc; + public BarometerFlexContainerAnnc getBarometerAnnc() { + this.barometerAnnc = (BarometerFlexContainerAnnc) getResourceByName(BarometerFlexContainerAnnc.SHORT_NAME); + return barometerAnnc; } - @XmlElement(name="eCDSr", required=true, type=ExtendedCarbonDioxideSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private ExtendedCarbonDioxideSensorFlexContainer extendedCarbonDioxideSensor; - - - public void setExtendedCarbonDioxideSensor(ExtendedCarbonDioxideSensorFlexContainer extendedCarbonDioxideSensor) { - this.extendedCarbonDioxideSensor = extendedCarbonDioxideSensor; - getFlexContainerOrContainerOrSubscription().add(extendedCarbonDioxideSensor); + @XmlElement(name=UvSensorFlexContainer.SHORT_NAME, required=true, type=UvSensorFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private UvSensorFlexContainer uvSensor; + + public void setUvSensor(UvSensorFlexContainer uvSensor) { + this.uvSensor = uvSensor; + getFlexContainerOrContainerOrSubscription().add(uvSensor); } - public ExtendedCarbonDioxideSensorFlexContainer getExtendedCarbonDioxideSensor() { - this.extendedCarbonDioxideSensor = (ExtendedCarbonDioxideSensorFlexContainer) getResourceByName(ExtendedCarbonDioxideSensorFlexContainer.SHORT_NAME); - return extendedCarbonDioxideSensor; + public UvSensorFlexContainer getUvSensor() { + this.uvSensor = (UvSensorFlexContainer) getResourceByName(UvSensorFlexContainer.SHORT_NAME); + return uvSensor; } - @XmlElement(name="eCDSrAnnc", required=true, type=ExtendedCarbonDioxideSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private ExtendedCarbonDioxideSensorFlexContainerAnnc extendedCarbonDioxideSensorAnnc; - - - public void setExtendedCarbonDioxideSensorAnnc(ExtendedCarbonDioxideSensorFlexContainerAnnc extendedCarbonDioxideSensorAnnc) { - this.extendedCarbonDioxideSensorAnnc = extendedCarbonDioxideSensorAnnc; - getFlexContainerOrContainerOrSubscription().add(extendedCarbonDioxideSensorAnnc); + @XmlElement(name=UvSensorFlexContainerAnnc.SHORT_NAME, required=true, type=UvSensorFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private UvSensorFlexContainerAnnc uvSensorAnnc; + + public void setUvSensorAnnc(UvSensorFlexContainerAnnc uvSensorAnnc) { + this.uvSensorAnnc = uvSensorAnnc; + getFlexContainerOrContainerOrSubscription().add(uvSensorAnnc); } - public ExtendedCarbonDioxideSensorFlexContainerAnnc getExtendedCarbonDioxideSensorAnnc() { - this.extendedCarbonDioxideSensorAnnc = (ExtendedCarbonDioxideSensorFlexContainerAnnc) getResourceByName(ExtendedCarbonDioxideSensorFlexContainerAnnc.SHORT_NAME); - return extendedCarbonDioxideSensorAnnc; + public UvSensorFlexContainerAnnc getUvSensorAnnc() { + this.uvSensorAnnc = (UvSensorFlexContainerAnnc) getResourceByName(UvSensorFlexContainerAnnc.SHORT_NAME); + return uvSensorAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.java new file mode 100644 index 00000000..dba4391f --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.java @@ -0,0 +1,115 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceWeightScaleAndBodyCompositionAnalyser + +A weight scale and body composition analyser is a device that can be used to monitor the weight and body composition. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceWeightScaleAndBodyCompositionAnalyser"; + public static final String SHORT_NAME = "dWSAB"; + + public DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getWeight(); + getBodyCompositionAnalyser(); + getBioElectricalImpedanceAnalysis(); + getBattery(); + } + + public void finalizeDeserialization() { + if (this.weight != null) { + setWeight(this.weight); + } + if (this.bodyCompositionAnalyser != null) { + setBodyCompositionAnalyser(this.bodyCompositionAnalyser); + } + if (this.bioElectricalImpedanceAnalysis != null) { + setBioElectricalImpedanceAnalysis(this.bioElectricalImpedanceAnalysis); + } + if (this.battery != null) { + setBattery(this.battery); + } + } + + @XmlElement(name=WeightFlexContainer.SHORT_NAME, required=true, type=WeightFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private WeightFlexContainer weight; + + public void setWeight(WeightFlexContainer weight) { + this.weight = weight; + getFlexContainerOrContainerOrSubscription().add(weight); + } + + public WeightFlexContainer getWeight() { + this.weight = (WeightFlexContainer) getResourceByName(WeightFlexContainer.SHORT_NAME); + return weight; + } + + @XmlElement(name=BodyCompositionAnalyserFlexContainer.SHORT_NAME, required=true, type=BodyCompositionAnalyserFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BodyCompositionAnalyserFlexContainer bodyCompositionAnalyser; + + public void setBodyCompositionAnalyser(BodyCompositionAnalyserFlexContainer bodyCompositionAnalyser) { + this.bodyCompositionAnalyser = bodyCompositionAnalyser; + getFlexContainerOrContainerOrSubscription().add(bodyCompositionAnalyser); + } + + public BodyCompositionAnalyserFlexContainer getBodyCompositionAnalyser() { + this.bodyCompositionAnalyser = (BodyCompositionAnalyserFlexContainer) getResourceByName(BodyCompositionAnalyserFlexContainer.SHORT_NAME); + return bodyCompositionAnalyser; + } + + @XmlElement(name=BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME, required=true, type=BioElectricalImpedanceAnalysisFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BioElectricalImpedanceAnalysisFlexContainer bioElectricalImpedanceAnalysis; + + public void setBioElectricalImpedanceAnalysis(BioElectricalImpedanceAnalysisFlexContainer bioElectricalImpedanceAnalysis) { + this.bioElectricalImpedanceAnalysis = bioElectricalImpedanceAnalysis; + getFlexContainerOrContainerOrSubscription().add(bioElectricalImpedanceAnalysis); + } + + public BioElectricalImpedanceAnalysisFlexContainer getBioElectricalImpedanceAnalysis() { + this.bioElectricalImpedanceAnalysis = (BioElectricalImpedanceAnalysisFlexContainer) getResourceByName(BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME); + return bioElectricalImpedanceAnalysis; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc.java new file mode 100644 index 00000000..90a25f77 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc.java @@ -0,0 +1,184 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceWeightScaleAndBodyCompositionAnalyserAnnc + +A weight scale and body composition analyser is a device that can be used to monitor the weight and body composition. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceWeightScaleAndBodyCompositionAnalyserAnnc"; + public static final String SHORT_NAME = "dWSABAnnc"; + + public DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getWeight(); + getWeightAnnc(); + getBodyCompositionAnalyser(); + getBodyCompositionAnalyserAnnc(); + getBioElectricalImpedanceAnalysis(); + getBioElectricalImpedanceAnalysisAnnc(); + getBattery(); + getBatteryAnnc(); + } + + public void finalizeDeserialization() { + if (this.weight != null) { + setWeight(this.weight); + } + if (this.weightAnnc != null) { + setWeightAnnc(this.weightAnnc); + } + if (this.bodyCompositionAnalyser != null) { + setBodyCompositionAnalyser(this.bodyCompositionAnalyser); + } + if (this.bodyCompositionAnalyserAnnc != null) { + setBodyCompositionAnalyserAnnc(this.bodyCompositionAnalyserAnnc); + } + if (this.bioElectricalImpedanceAnalysis != null) { + setBioElectricalImpedanceAnalysis(this.bioElectricalImpedanceAnalysis); + } + if (this.bioElectricalImpedanceAnalysisAnnc != null) { + setBioElectricalImpedanceAnalysisAnnc(this.bioElectricalImpedanceAnalysisAnnc); + } + if (this.battery != null) { + setBattery(this.battery); + } + if (this.batteryAnnc != null) { + setBatteryAnnc(this.batteryAnnc); + } + } + + @XmlElement(name=WeightFlexContainer.SHORT_NAME, required=true, type=WeightFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private WeightFlexContainer weight; + + public void setWeight(WeightFlexContainer weight) { + this.weight = weight; + getFlexContainerOrContainerOrSubscription().add(weight); + } + + public WeightFlexContainer getWeight() { + this.weight = (WeightFlexContainer) getResourceByName(WeightFlexContainer.SHORT_NAME); + return weight; + } + + @XmlElement(name=WeightFlexContainerAnnc.SHORT_NAME, required=true, type=WeightFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private WeightFlexContainerAnnc weightAnnc; + + public void setWeightAnnc(WeightFlexContainerAnnc weightAnnc) { + this.weightAnnc = weightAnnc; + getFlexContainerOrContainerOrSubscription().add(weightAnnc); + } + + public WeightFlexContainerAnnc getWeightAnnc() { + this.weightAnnc = (WeightFlexContainerAnnc) getResourceByName(WeightFlexContainerAnnc.SHORT_NAME); + return weightAnnc; + } + + @XmlElement(name=BodyCompositionAnalyserFlexContainer.SHORT_NAME, required=true, type=BodyCompositionAnalyserFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BodyCompositionAnalyserFlexContainer bodyCompositionAnalyser; + + public void setBodyCompositionAnalyser(BodyCompositionAnalyserFlexContainer bodyCompositionAnalyser) { + this.bodyCompositionAnalyser = bodyCompositionAnalyser; + getFlexContainerOrContainerOrSubscription().add(bodyCompositionAnalyser); + } + + public BodyCompositionAnalyserFlexContainer getBodyCompositionAnalyser() { + this.bodyCompositionAnalyser = (BodyCompositionAnalyserFlexContainer) getResourceByName(BodyCompositionAnalyserFlexContainer.SHORT_NAME); + return bodyCompositionAnalyser; + } + + @XmlElement(name=BodyCompositionAnalyserFlexContainerAnnc.SHORT_NAME, required=true, type=BodyCompositionAnalyserFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BodyCompositionAnalyserFlexContainerAnnc bodyCompositionAnalyserAnnc; + + public void setBodyCompositionAnalyserAnnc(BodyCompositionAnalyserFlexContainerAnnc bodyCompositionAnalyserAnnc) { + this.bodyCompositionAnalyserAnnc = bodyCompositionAnalyserAnnc; + getFlexContainerOrContainerOrSubscription().add(bodyCompositionAnalyserAnnc); + } + + public BodyCompositionAnalyserFlexContainerAnnc getBodyCompositionAnalyserAnnc() { + this.bodyCompositionAnalyserAnnc = (BodyCompositionAnalyserFlexContainerAnnc) getResourceByName(BodyCompositionAnalyserFlexContainerAnnc.SHORT_NAME); + return bodyCompositionAnalyserAnnc; + } + + @XmlElement(name=BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME, required=true, type=BioElectricalImpedanceAnalysisFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BioElectricalImpedanceAnalysisFlexContainer bioElectricalImpedanceAnalysis; + + public void setBioElectricalImpedanceAnalysis(BioElectricalImpedanceAnalysisFlexContainer bioElectricalImpedanceAnalysis) { + this.bioElectricalImpedanceAnalysis = bioElectricalImpedanceAnalysis; + getFlexContainerOrContainerOrSubscription().add(bioElectricalImpedanceAnalysis); + } + + public BioElectricalImpedanceAnalysisFlexContainer getBioElectricalImpedanceAnalysis() { + this.bioElectricalImpedanceAnalysis = (BioElectricalImpedanceAnalysisFlexContainer) getResourceByName(BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME); + return bioElectricalImpedanceAnalysis; + } + + @XmlElement(name=BioElectricalImpedanceAnalysisFlexContainerAnnc.SHORT_NAME, required=true, type=BioElectricalImpedanceAnalysisFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BioElectricalImpedanceAnalysisFlexContainerAnnc bioElectricalImpedanceAnalysisAnnc; + + public void setBioElectricalImpedanceAnalysisAnnc(BioElectricalImpedanceAnalysisFlexContainerAnnc bioElectricalImpedanceAnalysisAnnc) { + this.bioElectricalImpedanceAnalysisAnnc = bioElectricalImpedanceAnalysisAnnc; + getFlexContainerOrContainerOrSubscription().add(bioElectricalImpedanceAnalysisAnnc); + } + + public BioElectricalImpedanceAnalysisFlexContainerAnnc getBioElectricalImpedanceAnalysisAnnc() { + this.bioElectricalImpedanceAnalysisAnnc = (BioElectricalImpedanceAnalysisFlexContainerAnnc) getResourceByName(BioElectricalImpedanceAnalysisFlexContainerAnnc.SHORT_NAME); + return bioElectricalImpedanceAnalysisAnnc; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainerAnnc batteryAnnc; + + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { + this.batteryAnnc = batteryAnnc; + getFlexContainerOrContainerOrSubscription().add(batteryAnnc); + } + + public BatteryFlexContainerAnnc getBatteryAnnc() { + this.batteryAnnc = (BatteryFlexContainerAnnc) getResourceByName(BatteryFlexContainerAnnc.SHORT_NAME); + return batteryAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWindowShadeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWindowShadeFlexContainer.java new file mode 100644 index 00000000..bb8e84ff --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWindowShadeFlexContainer.java @@ -0,0 +1,81 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceWindowShade + +The window shade is an appliance that provides the ability to cover windows. This device type includes but not limited to roller shades, drapes, and tilt-only blinds. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = DeviceWindowShadeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceWindowShadeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceWindowShadeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "deviceWindowShade"; + public static final String SHORT_NAME = "deWSe"; + + public DeviceWindowShadeFlexContainer () { + setContainerDefinition("org.onem2m.home.device." + DeviceWindowShadeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getOpenLevel(); + getBattery(); + } + + public void finalizeDeserialization() { + if (this.openLevel != null) { + setOpenLevel(this.openLevel); + } + if (this.battery != null) { + setBattery(this.battery); + } + } + + @XmlElement(name=OpenLevelFlexContainer.SHORT_NAME, required=true, type=OpenLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainer openLevel; + + public void setOpenLevel(OpenLevelFlexContainer openLevel) { + this.openLevel = openLevel; + getFlexContainerOrContainerOrSubscription().add(openLevel); + } + + public OpenLevelFlexContainer getOpenLevel() { + this.openLevel = (OpenLevelFlexContainer) getResourceByName(OpenLevelFlexContainer.SHORT_NAME); + return openLevel; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWindowShadeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWindowShadeFlexContainerAnnc.java new file mode 100644 index 00000000..25b51120 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DeviceWindowShadeFlexContainerAnnc.java @@ -0,0 +1,116 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Device : DeviceWindowShadeAnnc + +The window shade is an appliance that provides the ability to cover windows. This device type includes but not limited to roller shades, drapes, and tilt-only blinds. + +Created: 2018-06-29 17:19:55 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DeviceWindowShadeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DeviceWindowShadeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DeviceWindowShadeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "deviceWindowShadeAnnc"; + public static final String SHORT_NAME = "deWSeAnnc"; + + public DeviceWindowShadeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.device." + DeviceWindowShadeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getOpenLevel(); + getOpenLevelAnnc(); + getBattery(); + getBatteryAnnc(); + } + + public void finalizeDeserialization() { + if (this.openLevel != null) { + setOpenLevel(this.openLevel); + } + if (this.openLevelAnnc != null) { + setOpenLevelAnnc(this.openLevelAnnc); + } + if (this.battery != null) { + setBattery(this.battery); + } + if (this.batteryAnnc != null) { + setBatteryAnnc(this.batteryAnnc); + } + } + + @XmlElement(name=OpenLevelFlexContainer.SHORT_NAME, required=true, type=OpenLevelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainer openLevel; + + public void setOpenLevel(OpenLevelFlexContainer openLevel) { + this.openLevel = openLevel; + getFlexContainerOrContainerOrSubscription().add(openLevel); + } + + public OpenLevelFlexContainer getOpenLevel() { + this.openLevel = (OpenLevelFlexContainer) getResourceByName(OpenLevelFlexContainer.SHORT_NAME); + return openLevel; + } + + @XmlElement(name=OpenLevelFlexContainerAnnc.SHORT_NAME, required=true, type=OpenLevelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenLevelFlexContainerAnnc openLevelAnnc; + + public void setOpenLevelAnnc(OpenLevelFlexContainerAnnc openLevelAnnc) { + this.openLevelAnnc = openLevelAnnc; + getFlexContainerOrContainerOrSubscription().add(openLevelAnnc); + } + + public OpenLevelFlexContainerAnnc getOpenLevelAnnc() { + this.openLevelAnnc = (OpenLevelFlexContainerAnnc) getResourceByName(OpenLevelFlexContainerAnnc.SHORT_NAME); + return openLevelAnnc; + } + + @XmlElement(name=BatteryFlexContainer.SHORT_NAME, required=true, type=BatteryFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainer battery; + + public void setBattery(BatteryFlexContainer battery) { + this.battery = battery; + getFlexContainerOrContainerOrSubscription().add(battery); + } + + public BatteryFlexContainer getBattery() { + this.battery = (BatteryFlexContainer) getResourceByName(BatteryFlexContainer.SHORT_NAME); + return battery; + } + + @XmlElement(name=BatteryFlexContainerAnnc.SHORT_NAME, required=true, type=BatteryFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private BatteryFlexContainerAnnc batteryAnnc; + + public void setBatteryAnnc(BatteryFlexContainerAnnc batteryAnnc) { + this.batteryAnnc = batteryAnnc; + getFlexContainerOrContainerOrSubscription().add(batteryAnnc); + } + + public BatteryFlexContainerAnnc getBatteryAnnc() { + this.batteryAnnc = (BatteryFlexContainerAnnc) getResourceByName(BatteryFlexContainerAnnc.SHORT_NAME); + return batteryAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DishWasherJobModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DishWasherJobModeFlexContainer.java new file mode 100644 index 00000000..890e0c9c --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DishWasherJobModeFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : DishWasherJobMode + +This ModuleClasses provides capabilities to control and monitor the job modes of a dishWasher. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = DishWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DishWasherJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DishWasherJobModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "dishWasherJobMode"; + public static final String SHORT_NAME = "dWJMe"; + + public DishWasherJobModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + DishWasherJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentJobModeName = new CustomAttribute(); + currentJobModeName.setLongName("currentJobModeName"); + currentJobModeName.setShortName("cJMNe"); + currentJobModeName.setType("xs:string"); + getCustomAttributes().add(currentJobModeName); + CustomAttribute currentJobMode = new CustomAttribute(); + currentJobMode.setLongName("currentJobMode"); + currentJobMode.setShortName("cuJMe"); + currentJobMode.setType("hd:enumDishWasherJobMode"); + getCustomAttributes().add(currentJobMode); + CustomAttribute jobModes = new CustomAttribute(); + jobModes.setLongName("jobModes"); + jobModes.setShortName("jobMs"); + jobModes.setType("[hd:enumDishWasherJobMode]"); + getCustomAttributes().add(jobModes); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DishWasherJobModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DishWasherJobModeFlexContainerAnnc.java new file mode 100644 index 00000000..2f66c82b --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DishWasherJobModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : DishWasherJobModeAnnc + +This ModuleClasses provides capabilities to control and monitor the job modes of a dishWasher. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = DishWasherJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = DishWasherJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class DishWasherJobModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "dishWasherJobModeAnnc"; + public static final String SHORT_NAME = "dWJMeAnnc"; + + public DishWasherJobModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + DishWasherJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DoorStatusFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DoorStatusFlexContainer.java index 2c6b1c30..d2a1b3b8 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DoorStatusFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DoorStatusFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : DoorStatus -This ModuleClass provides the status of a door. It is intended to be part of a larger object such as a refrigerator and an oven that might have multiple doors. +This ModuleClass provides the status of a door. It is intended to be part of a device such as a refrigerator and an oven that might have multiple doors. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = DoorStatusFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,33 @@ public class DoorStatusFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "doorStatus"; public static final String SHORT_NAME = "dooSs"; - + public DoorStatusFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + DoorStatusFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute doorState = new CustomAttribute(); + doorState.setLongName("doorState"); + doorState.setShortName("dooSe"); + doorState.setType("hd:enumDoorState"); + getCustomAttributes().add(doorState); + CustomAttribute openAlarm = new CustomAttribute(); + openAlarm.setLongName("openAlarm"); + openAlarm.setShortName("opeAm"); + openAlarm.setType("xs:boolean"); + getCustomAttributes().add(openAlarm); + CustomAttribute openDuration = new CustomAttribute(); + openDuration.setLongName("openDuration"); + openDuration.setShortName("opeDn"); + openDuration.setType("xs:datetime"); + getCustomAttributes().add(openDuration); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DoorStatusFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DoorStatusFlexContainerAnnc.java index 0ace1b91..9b2faf96 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DoorStatusFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DoorStatusFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : DoorStatusAnnc -This ModuleClass provides the status of a door. It is intended to be part of a larger object such as a refrigerator and an oven that might have multiple doors. +This ModuleClass provides the status of a door. It is intended to be part of a device such as a refrigerator and an oven that might have multiple doors. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = DoorStatusFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class DoorStatusFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownChannelFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownChannelFlexContainer.java index a789d4b9..ed6769e1 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownChannelFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownChannelFlexContainer.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : downChannel +Action : DownChannel -Change the current channel to the previous channel in the stored list of available channels. If the current channel is the first one in the list, the new set channel may be the last one in the list. +Change the current channel to the previous channel in the stored list of available channels. If the current channel is the first one in the list, the new set channel may be the last one in the list. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DownChannelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class DownChannelFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownChannelFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownChannelFlexContainerAnnc.java index 8abd1c01..c6bd96a9 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownChannelFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownChannelFlexContainerAnnc.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : downChannel +Action : DownChannelAnnc -Change the current channel to the previous channel in the stored list of available channels. If the current channel is the first one in the list, the new set channel may be the last one in the list. +Change the current channel to the previous channel in the stored list of available channels. If the current channel is the first one in the list, the new set channel may be the last one in the list. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = DownChannelFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class DownChannelFlexContainerAnnc extends AbstractFlexContainerAnnc { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } - -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownVolumeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownVolumeFlexContainer.java index bb6ae92d..1496d91a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownVolumeFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownVolumeFlexContainer.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : downVolume +Action : DownVolume Decrease volume by the amount of the stepValue down to 0. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = DownVolumeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class DownVolumeFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownVolumeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownVolumeFlexContainerAnnc.java index 2d6b2a11..3f318169 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownVolumeFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/DownVolumeFlexContainerAnnc.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : downVolume +Action : DownVolumeAnnc Decrease volume by the amount of the stepValue down to 0. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = DownVolumeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class DownVolumeFlexContainerAnnc extends AbstractFlexContainerAnnc { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } - -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ElectricVehicleConnectorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ElectricVehicleConnectorFlexContainer.java index 12752cc1..09e12ab8 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ElectricVehicleConnectorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ElectricVehicleConnectorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : ElectricVehicleConnector -This ModuleClass provides the information about charging/discharging devices for electric vehicles. +This ModuleClass provides information about charging/discharging devices for electric vehicles. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = ElectricVehicleConnectorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,33 @@ public class ElectricVehicleConnectorFlexContainer extends AbstractFlexContainer public static final String LONG_NAME = "electricVehicleConnector"; public static final String SHORT_NAME = "elVCr"; - + public ElectricVehicleConnectorFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + ElectricVehicleConnectorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute chargingCapacity = new CustomAttribute(); + chargingCapacity.setLongName("chargingCapacity"); + chargingCapacity.setShortName("chaCy"); + chargingCapacity.setType("xs:integer"); + getCustomAttributes().add(chargingCapacity); + CustomAttribute dischargingCapacity = new CustomAttribute(); + dischargingCapacity.setLongName("dischargingCapacity"); + dischargingCapacity.setShortName("disCy"); + dischargingCapacity.setType("xs:integer"); + getCustomAttributes().add(dischargingCapacity); + CustomAttribute status = new CustomAttribute(); + status.setLongName("status"); + status.setShortName("sus"); + status.setType("xs:boolean"); + getCustomAttributes().add(status); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ElectricVehicleConnectorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ElectricVehicleConnectorFlexContainerAnnc.java index e3399d72..cc8e0246 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ElectricVehicleConnectorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ElectricVehicleConnectorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : ElectricVehicleConnectorAnnc -This ModuleClass provides the information about charging/discharging devices for electric vehicles. +This ModuleClass provides information about charging/discharging devices for electric vehicles. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = ElectricVehicleConnectorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class ElectricVehicleConnectorFlexContainerAnnc extends AbstractFlexConta setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyConsumptionFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyConsumptionFlexContainer.java index dc0b7430..69e2f893 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyConsumptionFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyConsumptionFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : EnergyConsumption -This ModuleClass describes the energy consumed by the device since power up. One particular use case for energyConsumption ModuleClass is smart meter. +This ModuleClass describes the measured energy consumed by the device since power up. One particular use case for the energyConsumption ModuleClass is a smart meter -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = EnergyConsumptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,63 @@ public class EnergyConsumptionFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "energyConsumption"; public static final String SHORT_NAME = "eneCn"; - + public EnergyConsumptionFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + EnergyConsumptionFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute roundingEnergyConsumption = new CustomAttribute(); + roundingEnergyConsumption.setLongName("roundingEnergyConsumption"); + roundingEnergyConsumption.setShortName("roECn"); + roundingEnergyConsumption.setType("xs:integer"); + getCustomAttributes().add(roundingEnergyConsumption); + CustomAttribute current = new CustomAttribute(); + current.setLongName("current"); + current.setShortName("currt"); + current.setType("xs:float"); + getCustomAttributes().add(current); + CustomAttribute absoluteEnergyConsumption = new CustomAttribute(); + absoluteEnergyConsumption.setLongName("absoluteEnergyConsumption"); + absoluteEnergyConsumption.setShortName("abECn"); + absoluteEnergyConsumption.setType("xs:float"); + getCustomAttributes().add(absoluteEnergyConsumption); + CustomAttribute multiplyingFactors = new CustomAttribute(); + multiplyingFactors.setLongName("multiplyingFactors"); + multiplyingFactors.setShortName("mulFs"); + multiplyingFactors.setType("xs:integer"); + getCustomAttributes().add(multiplyingFactors); + CustomAttribute power = new CustomAttribute(); + power.setLongName("power"); + power.setShortName("power"); + power.setType("xs:float"); + getCustomAttributes().add(power); + CustomAttribute measuringScope = new CustomAttribute(); + measuringScope.setLongName("measuringScope"); + measuringScope.setShortName("meaSe"); + measuringScope.setType("xs:string"); + getCustomAttributes().add(measuringScope); + CustomAttribute significantDigits = new CustomAttribute(); + significantDigits.setLongName("significantDigits"); + significantDigits.setShortName("sigDs"); + significantDigits.setType("xs:integer"); + getCustomAttributes().add(significantDigits); + CustomAttribute voltage = new CustomAttribute(); + voltage.setLongName("voltage"); + voltage.setShortName("volte"); + voltage.setType("xs:float"); + getCustomAttributes().add(voltage); + CustomAttribute frequency = new CustomAttribute(); + frequency.setLongName("frequency"); + frequency.setShortName("freqy"); + frequency.setType("xs:float"); + getCustomAttributes().add(frequency); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyConsumptionFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyConsumptionFlexContainerAnnc.java index a90ed2b3..9f618eee 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyConsumptionFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyConsumptionFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : EnergyConsumptionAnnc -This ModuleClass describes the energy consumed by the device since power up. One particular use case for energyConsumption ModuleClass is smart meter. +This ModuleClass describes the measured energy consumed by the device since power up. One particular use case for the energyConsumption ModuleClass is a smart meter -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = EnergyConsumptionFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class EnergyConsumptionFlexContainerAnnc extends AbstractFlexContainerAnn setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyGenerationFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyGenerationFlexContainer.java index 86b6e4d9..b801de55 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyGenerationFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyGenerationFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : EnergyGeneration -This ModuleClass provides the information about generation data on electric generator devices such as a photo voltaic power system, fuel cells, or microgeneration. +This ModuleClass provides information about generation data on electric generator devices such as a photo voltaic power system, fuel cells, or microgeneration -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = EnergyGenerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,43 @@ public class EnergyGenerationFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "energyGeneration"; public static final String SHORT_NAME = "eneGn"; - + public EnergyGenerationFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + EnergyGenerationFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute generationSource = new CustomAttribute(); + generationSource.setLongName("generationSource"); + generationSource.setShortName("genSe"); + generationSource.setType("xs:string"); + getCustomAttributes().add(generationSource); + CustomAttribute multiplyingFactors = new CustomAttribute(); + multiplyingFactors.setLongName("multiplyingFactors"); + multiplyingFactors.setShortName("mulFs"); + multiplyingFactors.setType("xs:integer"); + getCustomAttributes().add(multiplyingFactors); + CustomAttribute significantDigits = new CustomAttribute(); + significantDigits.setLongName("significantDigits"); + significantDigits.setShortName("sigDs"); + significantDigits.setType("xs:integer"); + getCustomAttributes().add(significantDigits); + CustomAttribute powerGenerationData = new CustomAttribute(); + powerGenerationData.setLongName("powerGenerationData"); + powerGenerationData.setShortName("poGDa"); + powerGenerationData.setType("xs:float"); + getCustomAttributes().add(powerGenerationData); + CustomAttribute roundingEnergyGeneration = new CustomAttribute(); + roundingEnergyGeneration.setLongName("roundingEnergyGeneration"); + roundingEnergyGeneration.setShortName("roEGn"); + roundingEnergyGeneration.setType("xs:integer"); + getCustomAttributes().add(roundingEnergyGeneration); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyGenerationFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyGenerationFlexContainerAnnc.java index 35ae1493..dda10d6e 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyGenerationFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/EnergyGenerationFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : EnergyGenerationAnnc -This ModuleClass provides the information about generation data on electric generator devices such as a photo voltaic power system, fuel cells, or microgeneration. +This ModuleClass provides information about generation data on electric generator devices such as a photo voltaic power system, fuel cells, or microgeneration -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = EnergyGenerationFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class EnergyGenerationFlexContainerAnnc extends AbstractFlexContainerAnnc setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FaultDetectionFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FaultDetectionFlexContainer.java index 346d9f5a..b9f7bb54 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FaultDetectionFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FaultDetectionFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : FaultDetection -This ModuleClass provides the information about whether a fault has occurred in the actual device. +This ModuleClass provides information about whether a fault has occurred in a device. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = FaultDetectionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,33 @@ public class FaultDetectionFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "faultDetection"; public static final String SHORT_NAME = "fauDn"; - + public FaultDetectionFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + FaultDetectionFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute code = new CustomAttribute(); + code.setLongName("code"); + code.setShortName("code"); + code.setType("xs:integer"); + getCustomAttributes().add(code); + CustomAttribute description = new CustomAttribute(); + description.setLongName("description"); + description.setShortName("dc"); + description.setType("xs:string"); + getCustomAttributes().add(description); + CustomAttribute status = new CustomAttribute(); + status.setLongName("status"); + status.setShortName("sus"); + status.setType("xs:boolean"); + getCustomAttributes().add(status); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FaultDetectionFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FaultDetectionFlexContainerAnnc.java index 68aa4264..a9e20fa2 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FaultDetectionFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FaultDetectionFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : FaultDetectionAnnc -This ModuleClass provides the information about whether a fault has occurred in the actual device. +This ModuleClass provides information about whether a fault has occurred in a device. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = FaultDetectionFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class FaultDetectionFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FilterInfoFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FilterInfoFlexContainer.java new file mode 100644 index 00000000..b3479506 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FilterInfoFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : FilterInfo + +This ModuleClass provides capabilities for monitoring filter information of a device. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = FilterInfoFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = FilterInfoFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class FilterInfoFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "filterInfo"; + public static final String SHORT_NAME = "filIo"; + + public FilterInfoFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + FilterInfoFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute code = new CustomAttribute(); + code.setLongName("code"); + code.setShortName("code"); + code.setType("xs:integer"); + getCustomAttributes().add(code); + CustomAttribute filterLifetime = new CustomAttribute(); + filterLifetime.setLongName("filterLifetime"); + filterLifetime.setShortName("filLe"); + filterLifetime.setType("xs:integer"); + getCustomAttributes().add(filterLifetime); + CustomAttribute status = new CustomAttribute(); + status.setLongName("status"); + status.setShortName("sus"); + status.setType("xs:boolean"); + getCustomAttributes().add(status); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FilterInfoFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FilterInfoFlexContainerAnnc.java new file mode 100644 index 00000000..5220c3c2 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FilterInfoFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : FilterInfoAnnc + +This ModuleClass provides capabilities for monitoring filter information of a device. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = FilterInfoFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = FilterInfoFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class FilterInfoFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "filterInfoAnnc"; + public static final String SHORT_NAME = "filIoAnnc"; + + public FilterInfoFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + FilterInfoFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FlexContainerFactory.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FlexContainerFactory.java index f03394da..05a3b0f1 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FlexContainerFactory.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FlexContainerFactory.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,381 +9,51 @@ FlexContainerFactory : FlexContainerFactory - - -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:56 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; -import org.eclipse.om2m.commons.resource.FlexContainer; -import org.eclipse.om2m.commons.resource.FlexContainerAnnc; import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.FlexContainer; +import org.eclipse.om2m.commons.resource.FlexContainerAnnc; public class FlexContainerFactory { + + static private final String PREFIX = "create"; + static private final ObjectFactory factory = ObjectFactory.getInstance(); + public static AbstractFlexContainer getSpecializationFlexContainer(String shortName) { - switch(shortName) { - case AlarmSpeakerFlexContainer.SHORT_NAME: - return new AlarmSpeakerFlexContainer(); - case AudioVideoInputFlexContainer.SHORT_NAME: - return new AudioVideoInputFlexContainer(); - case AudioVolumeFlexContainer.SHORT_NAME: - return new AudioVolumeFlexContainer(); - case UpVolumeFlexContainer.SHORT_NAME: - return new UpVolumeFlexContainer(); - case DownVolumeFlexContainer.SHORT_NAME: - return new DownVolumeFlexContainer(); - case BatteryFlexContainer.SHORT_NAME: - return new BatteryFlexContainer(); - case BinarySwitchFlexContainer.SHORT_NAME: - return new BinarySwitchFlexContainer(); - case ToggleFlexContainer.SHORT_NAME: - return new ToggleFlexContainer(); - case BioElectricalImpedanceAnalysisFlexContainer.SHORT_NAME: - return new BioElectricalImpedanceAnalysisFlexContainer(); - case BoilerFlexContainer.SHORT_NAME: - return new BoilerFlexContainer(); - case BrightnessFlexContainer.SHORT_NAME: - return new BrightnessFlexContainer(); - case ClockFlexContainer.SHORT_NAME: - return new ClockFlexContainer(); - case ColourFlexContainer.SHORT_NAME: - return new ColourFlexContainer(); - case ColourSaturationFlexContainer.SHORT_NAME: - return new ColourSaturationFlexContainer(); - case DoorStatusFlexContainer.SHORT_NAME: - return new DoorStatusFlexContainer(); - case ElectricVehicleConnectorFlexContainer.SHORT_NAME: - return new ElectricVehicleConnectorFlexContainer(); - case EnergyConsumptionFlexContainer.SHORT_NAME: - return new EnergyConsumptionFlexContainer(); - case EnergyGenerationFlexContainer.SHORT_NAME: - return new EnergyGenerationFlexContainer(); - case FaultDetectionFlexContainer.SHORT_NAME: - return new FaultDetectionFlexContainer(); - case HeightFlexContainer.SHORT_NAME: - return new HeightFlexContainer(); - case HotWaterSupplyFlexContainer.SHORT_NAME: - return new HotWaterSupplyFlexContainer(); - case KeypadFlexContainer.SHORT_NAME: - return new KeypadFlexContainer(); - case MotionSensorFlexContainer.SHORT_NAME: - return new MotionSensorFlexContainer(); - case OximeterFlexContainer.SHORT_NAME: - return new OximeterFlexContainer(); - case PowerSaveFlexContainer.SHORT_NAME: - return new PowerSaveFlexContainer(); - case PushButtonFlexContainer.SHORT_NAME: - return new PushButtonFlexContainer(); - case RecorderFlexContainer.SHORT_NAME: - return new RecorderFlexContainer(); - case RefrigerationFlexContainer.SHORT_NAME: - return new RefrigerationFlexContainer(); - case RelativeHumidityFlexContainer.SHORT_NAME: - return new RelativeHumidityFlexContainer(); - case RinseLevelFlexContainer.SHORT_NAME: - return new RinseLevelFlexContainer(); - case RunModeFlexContainer.SHORT_NAME: - return new RunModeFlexContainer(); - case SignalStrengthFlexContainer.SHORT_NAME: - return new SignalStrengthFlexContainer(); - case SmokeSensorFlexContainer.SHORT_NAME: - return new SmokeSensorFlexContainer(); - case SpinLevelFlexContainer.SHORT_NAME: - return new SpinLevelFlexContainer(); - case TelevisionChannelFlexContainer.SHORT_NAME: - return new TelevisionChannelFlexContainer(); - case UpChannelFlexContainer.SHORT_NAME: - return new UpChannelFlexContainer(); - case DownChannelFlexContainer.SHORT_NAME: - return new DownChannelFlexContainer(); - case TemperatureFlexContainer.SHORT_NAME: - return new TemperatureFlexContainer(); - case TemperatureAlarmFlexContainer.SHORT_NAME: - return new TemperatureAlarmFlexContainer(); - case TimerFlexContainer.SHORT_NAME: - return new TimerFlexContainer(); - case ActivateClockTimerFlexContainer.SHORT_NAME: - return new ActivateClockTimerFlexContainer(); - case DeactivateClockTimerFlexContainer.SHORT_NAME: - return new DeactivateClockTimerFlexContainer(); - case TurboFlexContainer.SHORT_NAME: - return new TurboFlexContainer(); - case WaterFlowFlexContainer.SHORT_NAME: - return new WaterFlowFlexContainer(); - case WaterLevelFlexContainer.SHORT_NAME: - return new WaterLevelFlexContainer(); - case WaterSensorFlexContainer.SHORT_NAME: - return new WaterSensorFlexContainer(); - case WeightFlexContainer.SHORT_NAME: - return new WeightFlexContainer(); - case WindFlexContainer.SHORT_NAME: - return new WindFlexContainer(); - case StreamingFlexContainer.SHORT_NAME: - return new StreamingFlexContainer(); - case PersonSensorFlexContainer.SHORT_NAME: - return new PersonSensorFlexContainer(); - case BrewingFlexContainer.SHORT_NAME: - return new BrewingFlexContainer(); - case LiquidLevelFlexContainer.SHORT_NAME: - return new LiquidLevelFlexContainer(); - case GrinderFlexContainer.SHORT_NAME: - return new GrinderFlexContainer(); - case FoamingFlexContainer.SHORT_NAME: - return new FoamingFlexContainer(); - case KeepWarmFlexContainer.SHORT_NAME: - return new KeepWarmFlexContainer(); - case ContactSensorFlexContainer.SHORT_NAME: - return new ContactSensorFlexContainer(); - case AlarmSensorFlexContainer.SHORT_NAME: - return new AlarmSensorFlexContainer(); - case LockFlexContainer.SHORT_NAME: - return new LockFlexContainer(); - case AtmosphericPressureSensorFlexContainer.SHORT_NAME: - return new AtmosphericPressureSensorFlexContainer(); - case NoiseFlexContainer.SHORT_NAME: - return new NoiseFlexContainer(); - case ExtendedCarbonDioxideSensorFlexContainer.SHORT_NAME: - return new ExtendedCarbonDioxideSensorFlexContainer(); - case DeviceAirConditionerFlexContainer.SHORT_NAME: - return new DeviceAirConditionerFlexContainer(); - case DeviceClothesWasherFlexContainer.SHORT_NAME: - return new DeviceClothesWasherFlexContainer(); - case DeviceElectricVehicleChargerFlexContainer.SHORT_NAME: - return new DeviceElectricVehicleChargerFlexContainer(); - case DeviceLightFlexContainer.SHORT_NAME: - return new DeviceLightFlexContainer(); - case DeviceMicrogenerationFlexContainer.SHORT_NAME: - return new DeviceMicrogenerationFlexContainer(); - case DeviceOvenFlexContainer.SHORT_NAME: - return new DeviceOvenFlexContainer(); - case DeviceRefrigeratorFlexContainer.SHORT_NAME: - return new DeviceRefrigeratorFlexContainer(); - case DeviceRobotCleanerFlexContainer.SHORT_NAME: - return new DeviceRobotCleanerFlexContainer(); - case DeviceSmartElectricMeterFlexContainer.SHORT_NAME: - return new DeviceSmartElectricMeterFlexContainer(); - case DeviceStorageBatteryFlexContainer.SHORT_NAME: - return new DeviceStorageBatteryFlexContainer(); - case DeviceTelevisionFlexContainer.SHORT_NAME: - return new DeviceTelevisionFlexContainer(); - case DeviceThermostatFlexContainer.SHORT_NAME: - return new DeviceThermostatFlexContainer(); - case DeviceWaterHeaterFlexContainer.SHORT_NAME: - return new DeviceWaterHeaterFlexContainer(); - case DeviceCameraFlexContainer.SHORT_NAME: - return new DeviceCameraFlexContainer(); - case DeviceCoffeeMachineFlexContainer.SHORT_NAME: - return new DeviceCoffeeMachineFlexContainer(); - case DeviceContactDetectorFlexContainer.SHORT_NAME: - return new DeviceContactDetectorFlexContainer(); - case DeviceDoorFlexContainer.SHORT_NAME: - return new DeviceDoorFlexContainer(); - case DeviceFloodDetectorFlexContainer.SHORT_NAME: - return new DeviceFloodDetectorFlexContainer(); - case DeviceGasValveFlexContainer.SHORT_NAME: - return new DeviceGasValveFlexContainer(); - case DeviceMotionDetectorFlexContainer.SHORT_NAME: - return new DeviceMotionDetectorFlexContainer(); - case DeviceSmokeDetectorFlexContainer.SHORT_NAME: - return new DeviceSmokeDetectorFlexContainer(); - case DeviceSmokeExtractorFlexContainer.SHORT_NAME: - return new DeviceSmokeExtractorFlexContainer(); - case DeviceSwitchButtonFlexContainer.SHORT_NAME: - return new DeviceSwitchButtonFlexContainer(); - case DeviceTemperatureDetectorFlexContainer.SHORT_NAME: - return new DeviceTemperatureDetectorFlexContainer(); - case DeviceWarningDeviceFlexContainer.SHORT_NAME: - return new DeviceWarningDeviceFlexContainer(); - case DeviceWaterValveFlexContainer.SHORT_NAME: - return new DeviceWaterValveFlexContainer(); - case DeviceWeatherStationFlexContainer.SHORT_NAME: - return new DeviceWeatherStationFlexContainer(); + try { + String method = PREFIX + Character.toUpperCase(shortName.charAt(0)) + shortName.substring(1); + return (AbstractFlexContainer) invoke(method); + } catch (Exception e) { + try { + return (AbstractFlexContainer) invoke(PREFIX + shortName); + } catch (Exception e2) { + return new FlexContainer(); + } } - return new FlexContainer(); } - + public static AbstractFlexContainerAnnc getSpecializationFlexContainerAnnc(String shortName) { - switch(shortName) { - case AlarmSpeakerFlexContainerAnnc.SHORT_NAME: - return new AlarmSpeakerFlexContainerAnnc(); - case AudioVideoInputFlexContainerAnnc.SHORT_NAME: - return new AudioVideoInputFlexContainerAnnc(); - case AudioVolumeFlexContainerAnnc.SHORT_NAME: - return new AudioVolumeFlexContainerAnnc(); - case UpVolumeFlexContainerAnnc.SHORT_NAME: - return new UpVolumeFlexContainerAnnc(); - case DownVolumeFlexContainerAnnc.SHORT_NAME: - return new DownVolumeFlexContainerAnnc(); - case BatteryFlexContainerAnnc.SHORT_NAME: - return new BatteryFlexContainerAnnc(); - case BinarySwitchFlexContainerAnnc.SHORT_NAME: - return new BinarySwitchFlexContainerAnnc(); - case ToggleFlexContainerAnnc.SHORT_NAME: - return new ToggleFlexContainerAnnc(); - case BioElectricalImpedanceAnalysisFlexContainerAnnc.SHORT_NAME: - return new BioElectricalImpedanceAnalysisFlexContainerAnnc(); - case BoilerFlexContainerAnnc.SHORT_NAME: - return new BoilerFlexContainerAnnc(); - case BrightnessFlexContainerAnnc.SHORT_NAME: - return new BrightnessFlexContainerAnnc(); - case ClockFlexContainerAnnc.SHORT_NAME: - return new ClockFlexContainerAnnc(); - case ColourFlexContainerAnnc.SHORT_NAME: - return new ColourFlexContainerAnnc(); - case ColourSaturationFlexContainerAnnc.SHORT_NAME: - return new ColourSaturationFlexContainerAnnc(); - case DoorStatusFlexContainerAnnc.SHORT_NAME: - return new DoorStatusFlexContainerAnnc(); - case ElectricVehicleConnectorFlexContainerAnnc.SHORT_NAME: - return new ElectricVehicleConnectorFlexContainerAnnc(); - case EnergyConsumptionFlexContainerAnnc.SHORT_NAME: - return new EnergyConsumptionFlexContainerAnnc(); - case EnergyGenerationFlexContainerAnnc.SHORT_NAME: - return new EnergyGenerationFlexContainerAnnc(); - case FaultDetectionFlexContainerAnnc.SHORT_NAME: - return new FaultDetectionFlexContainerAnnc(); - case HeightFlexContainerAnnc.SHORT_NAME: - return new HeightFlexContainerAnnc(); - case HotWaterSupplyFlexContainerAnnc.SHORT_NAME: - return new HotWaterSupplyFlexContainerAnnc(); - case KeypadFlexContainerAnnc.SHORT_NAME: - return new KeypadFlexContainerAnnc(); - case MotionSensorFlexContainerAnnc.SHORT_NAME: - return new MotionSensorFlexContainerAnnc(); - case OximeterFlexContainerAnnc.SHORT_NAME: - return new OximeterFlexContainerAnnc(); - case PowerSaveFlexContainerAnnc.SHORT_NAME: - return new PowerSaveFlexContainerAnnc(); - case PushButtonFlexContainerAnnc.SHORT_NAME: - return new PushButtonFlexContainerAnnc(); - case RecorderFlexContainerAnnc.SHORT_NAME: - return new RecorderFlexContainerAnnc(); - case RefrigerationFlexContainerAnnc.SHORT_NAME: - return new RefrigerationFlexContainerAnnc(); - case RelativeHumidityFlexContainerAnnc.SHORT_NAME: - return new RelativeHumidityFlexContainerAnnc(); - case RinseLevelFlexContainerAnnc.SHORT_NAME: - return new RinseLevelFlexContainerAnnc(); - case RunModeFlexContainerAnnc.SHORT_NAME: - return new RunModeFlexContainerAnnc(); - case SignalStrengthFlexContainerAnnc.SHORT_NAME: - return new SignalStrengthFlexContainerAnnc(); - case SmokeSensorFlexContainerAnnc.SHORT_NAME: - return new SmokeSensorFlexContainerAnnc(); - case SpinLevelFlexContainerAnnc.SHORT_NAME: - return new SpinLevelFlexContainerAnnc(); - case TelevisionChannelFlexContainerAnnc.SHORT_NAME: - return new TelevisionChannelFlexContainerAnnc(); - case UpChannelFlexContainerAnnc.SHORT_NAME: - return new UpChannelFlexContainerAnnc(); - case DownChannelFlexContainerAnnc.SHORT_NAME: - return new DownChannelFlexContainerAnnc(); - case TemperatureFlexContainerAnnc.SHORT_NAME: - return new TemperatureFlexContainerAnnc(); - case TemperatureAlarmFlexContainerAnnc.SHORT_NAME: - return new TemperatureAlarmFlexContainerAnnc(); - case TimerFlexContainerAnnc.SHORT_NAME: - return new TimerFlexContainerAnnc(); - case ActivateClockTimerFlexContainerAnnc.SHORT_NAME: - return new ActivateClockTimerFlexContainerAnnc(); - case DeactivateClockTimerFlexContainerAnnc.SHORT_NAME: - return new DeactivateClockTimerFlexContainerAnnc(); - case TurboFlexContainerAnnc.SHORT_NAME: - return new TurboFlexContainerAnnc(); - case WaterFlowFlexContainerAnnc.SHORT_NAME: - return new WaterFlowFlexContainerAnnc(); - case WaterLevelFlexContainerAnnc.SHORT_NAME: - return new WaterLevelFlexContainerAnnc(); - case WaterSensorFlexContainerAnnc.SHORT_NAME: - return new WaterSensorFlexContainerAnnc(); - case WeightFlexContainerAnnc.SHORT_NAME: - return new WeightFlexContainerAnnc(); - case WindFlexContainerAnnc.SHORT_NAME: - return new WindFlexContainerAnnc(); - case StreamingFlexContainerAnnc.SHORT_NAME: - return new StreamingFlexContainerAnnc(); - case PersonSensorFlexContainerAnnc.SHORT_NAME: - return new PersonSensorFlexContainerAnnc(); - case BrewingFlexContainerAnnc.SHORT_NAME: - return new BrewingFlexContainerAnnc(); - case LiquidLevelFlexContainerAnnc.SHORT_NAME: - return new LiquidLevelFlexContainerAnnc(); - case GrinderFlexContainerAnnc.SHORT_NAME: - return new GrinderFlexContainerAnnc(); - case FoamingFlexContainerAnnc.SHORT_NAME: - return new FoamingFlexContainerAnnc(); - case KeepWarmFlexContainerAnnc.SHORT_NAME: - return new KeepWarmFlexContainerAnnc(); - case ContactSensorFlexContainerAnnc.SHORT_NAME: - return new ContactSensorFlexContainerAnnc(); - case AlarmSensorFlexContainerAnnc.SHORT_NAME: - return new AlarmSensorFlexContainerAnnc(); - case LockFlexContainerAnnc.SHORT_NAME: - return new LockFlexContainerAnnc(); - case AtmosphericPressureSensorFlexContainerAnnc.SHORT_NAME: - return new AtmosphericPressureSensorFlexContainerAnnc(); - case NoiseFlexContainerAnnc.SHORT_NAME: - return new NoiseFlexContainerAnnc(); - case ExtendedCarbonDioxideSensorFlexContainerAnnc.SHORT_NAME: - return new ExtendedCarbonDioxideSensorFlexContainerAnnc(); - case DeviceAirConditionerFlexContainerAnnc.SHORT_NAME: - return new DeviceAirConditionerFlexContainerAnnc(); - case DeviceClothesWasherFlexContainerAnnc.SHORT_NAME: - return new DeviceClothesWasherFlexContainerAnnc(); - case DeviceElectricVehicleChargerFlexContainerAnnc.SHORT_NAME: - return new DeviceElectricVehicleChargerFlexContainerAnnc(); - case DeviceLightFlexContainerAnnc.SHORT_NAME: - return new DeviceLightFlexContainerAnnc(); - case DeviceMicrogenerationFlexContainerAnnc.SHORT_NAME: - return new DeviceMicrogenerationFlexContainerAnnc(); - case DeviceOvenFlexContainerAnnc.SHORT_NAME: - return new DeviceOvenFlexContainerAnnc(); - case DeviceRefrigeratorFlexContainerAnnc.SHORT_NAME: - return new DeviceRefrigeratorFlexContainerAnnc(); - case DeviceRobotCleanerFlexContainerAnnc.SHORT_NAME: - return new DeviceRobotCleanerFlexContainerAnnc(); - case DeviceSmartElectricMeterFlexContainerAnnc.SHORT_NAME: - return new DeviceSmartElectricMeterFlexContainerAnnc(); - case DeviceStorageBatteryFlexContainerAnnc.SHORT_NAME: - return new DeviceStorageBatteryFlexContainerAnnc(); - case DeviceTelevisionFlexContainerAnnc.SHORT_NAME: - return new DeviceTelevisionFlexContainerAnnc(); - case DeviceThermostatFlexContainerAnnc.SHORT_NAME: - return new DeviceThermostatFlexContainerAnnc(); - case DeviceWaterHeaterFlexContainerAnnc.SHORT_NAME: - return new DeviceWaterHeaterFlexContainerAnnc(); - case DeviceCameraFlexContainerAnnc.SHORT_NAME: - return new DeviceCameraFlexContainerAnnc(); - case DeviceCoffeeMachineFlexContainerAnnc.SHORT_NAME: - return new DeviceCoffeeMachineFlexContainerAnnc(); - case DeviceContactDetectorFlexContainerAnnc.SHORT_NAME: - return new DeviceContactDetectorFlexContainerAnnc(); - case DeviceDoorFlexContainerAnnc.SHORT_NAME: - return new DeviceDoorFlexContainerAnnc(); - case DeviceFloodDetectorFlexContainerAnnc.SHORT_NAME: - return new DeviceFloodDetectorFlexContainerAnnc(); - case DeviceGasValveFlexContainerAnnc.SHORT_NAME: - return new DeviceGasValveFlexContainerAnnc(); - case DeviceMotionDetectorFlexContainerAnnc.SHORT_NAME: - return new DeviceMotionDetectorFlexContainerAnnc(); - case DeviceSmokeDetectorFlexContainerAnnc.SHORT_NAME: - return new DeviceSmokeDetectorFlexContainerAnnc(); - case DeviceSmokeExtractorFlexContainerAnnc.SHORT_NAME: - return new DeviceSmokeExtractorFlexContainerAnnc(); - case DeviceSwitchButtonFlexContainerAnnc.SHORT_NAME: - return new DeviceSwitchButtonFlexContainerAnnc(); - case DeviceTemperatureDetectorFlexContainerAnnc.SHORT_NAME: - return new DeviceTemperatureDetectorFlexContainerAnnc(); - case DeviceWarningDeviceFlexContainerAnnc.SHORT_NAME: - return new DeviceWarningDeviceFlexContainerAnnc(); - case DeviceWaterValveFlexContainerAnnc.SHORT_NAME: - return new DeviceWaterValveFlexContainerAnnc(); - case DeviceWeatherStationFlexContainerAnnc.SHORT_NAME: - return new DeviceWeatherStationFlexContainerAnnc(); + try { + String method = PREFIX + Character.toUpperCase(shortName.charAt(0)) + shortName.substring(1); + return (AbstractFlexContainerAnnc) invoke(method); + } catch (Exception e) { + try { + return (AbstractFlexContainerAnnc) invoke(PREFIX + shortName); + } catch (Exception e2) { + return new FlexContainerAnnc(); + } } - return new FlexContainerAnnc(); } -} \ No newline at end of file + + private static final Object invoke(final String method) throws Exception { + return ObjectFactory.class.getMethod(method, new Class[0]) + .invoke(factory, new Object[0]); + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FoamingFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FoamingFlexContainer.java index 86b31180..bf992ebe 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FoamingFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FoamingFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Foaming -This ModuleClass manages foaming feature. +This ModuleClass provides capabilities to control and monitor desired parameters of foam e.g. for foaming milk. It is initially intended to be part of a device that prepare drinks with milk (for example a coffee machine or hot chocolate machine). -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = FoamingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class FoamingFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "foaming"; public static final String SHORT_NAME = "foamg"; - + public FoamingFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + FoamingFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute foamingStrength = new CustomAttribute(); + foamingStrength.setLongName("foamingStrength"); + foamingStrength.setShortName("foaSh"); + foamingStrength.setType("hd:enumFoamStrength"); + getCustomAttributes().add(foamingStrength); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FoamingFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FoamingFlexContainerAnnc.java index 20d10ae4..546cb21c 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FoamingFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/FoamingFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : FoamingAnnc -This ModuleClass manages foaming feature. +This ModuleClass provides capabilities to control and monitor desired parameters of foam e.g. for foaming milk. It is initially intended to be part of a device that prepare drinks with milk (for example a coffee machine or hot chocolate machine). -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = FoamingFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class FoamingFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GeoLocationFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GeoLocationFlexContainer.java new file mode 100644 index 00000000..348204eb --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GeoLocationFlexContainer.java @@ -0,0 +1,98 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : GeoLocation + +This ModuleClass provides the capability to get or set geo-location information. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = GeoLocationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = GeoLocationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class GeoLocationFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "geoLocation"; + public static final String SHORT_NAME = "geoLn"; + + public GeoLocationFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + GeoLocationFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute altitude = new CustomAttribute(); + altitude.setLongName("altitude"); + altitude.setShortName("altie"); + altitude.setType("xs:float"); + getCustomAttributes().add(altitude); + CustomAttribute verticalAccuracy = new CustomAttribute(); + verticalAccuracy.setLongName("verticalAccuracy"); + verticalAccuracy.setShortName("verAy"); + verticalAccuracy.setType("xs:float"); + getCustomAttributes().add(verticalAccuracy); + CustomAttribute heading = new CustomAttribute(); + heading.setLongName("heading"); + heading.setShortName("headg"); + heading.setType("xs:float"); + getCustomAttributes().add(heading); + CustomAttribute targetLongitude = new CustomAttribute(); + targetLongitude.setLongName("targetLongitude"); + targetLongitude.setShortName("tarL0"); + targetLongitude.setType("xs:float"); + getCustomAttributes().add(targetLongitude); + CustomAttribute headingAccuracy = new CustomAttribute(); + headingAccuracy.setLongName("headingAccuracy"); + headingAccuracy.setShortName("heaAy"); + headingAccuracy.setType("xs:float"); + getCustomAttributes().add(headingAccuracy); + CustomAttribute latitude = new CustomAttribute(); + latitude.setLongName("latitude"); + latitude.setShortName("latie"); + latitude.setType("xs:float"); + getCustomAttributes().add(latitude); + CustomAttribute horizontalAccuracy = new CustomAttribute(); + horizontalAccuracy.setLongName("horizontalAccuracy"); + horizontalAccuracy.setShortName("horAy"); + horizontalAccuracy.setType("xs:float"); + getCustomAttributes().add(horizontalAccuracy); + CustomAttribute targetLatitude = new CustomAttribute(); + targetLatitude.setLongName("targetLatitude"); + targetLatitude.setShortName("tarLe"); + targetLatitude.setType("xs:float"); + getCustomAttributes().add(targetLatitude); + CustomAttribute targetAltitude = new CustomAttribute(); + targetAltitude.setLongName("targetAltitude"); + targetAltitude.setShortName("tarAe"); + targetAltitude.setType("xs:float"); + getCustomAttributes().add(targetAltitude); + CustomAttribute longitude = new CustomAttribute(); + longitude.setLongName("longitude"); + longitude.setShortName("longe"); + longitude.setType("xs:float"); + getCustomAttributes().add(longitude); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GeoLocationFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GeoLocationFlexContainerAnnc.java new file mode 100644 index 00000000..12ced8a3 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GeoLocationFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : GeoLocationAnnc + +This ModuleClass provides the capability to get or set geo-location information. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = GeoLocationFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = GeoLocationFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class GeoLocationFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "geoLocationAnnc"; + public static final String SHORT_NAME = "geoLnAnnc"; + + public GeoLocationFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + GeoLocationFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GlucometerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GlucometerFlexContainer.java new file mode 100644 index 00000000..ae268fee --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GlucometerFlexContainer.java @@ -0,0 +1,98 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : Glucometer + +This ModuleClass provides the capability to report the measurement of glucose characteristics. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = GlucometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = GlucometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class GlucometerFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "glucometer"; + public static final String SHORT_NAME = "glucr"; + + public GlucometerFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + GlucometerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute contextLocation = new CustomAttribute(); + contextLocation.setLongName("contextLocation"); + contextLocation.setShortName("conLn"); + contextLocation.setType("xs:string"); + getCustomAttributes().add(contextLocation); + CustomAttribute contextCarbohydratesSource = new CustomAttribute(); + contextCarbohydratesSource.setLongName("contextCarbohydratesSource"); + contextCarbohydratesSource.setShortName("coCSe"); + contextCarbohydratesSource.setType("xs:string"); + getCustomAttributes().add(contextCarbohydratesSource); + CustomAttribute contextExercise = new CustomAttribute(); + contextExercise.setLongName("contextExercise"); + contextExercise.setShortName("conEe"); + contextExercise.setType("xs:float"); + getCustomAttributes().add(contextExercise); + CustomAttribute contextTester = new CustomAttribute(); + contextTester.setLongName("contextTester"); + contextTester.setShortName("conTr"); + contextTester.setType("xs:string"); + getCustomAttributes().add(contextTester); + CustomAttribute contextMedication = new CustomAttribute(); + contextMedication.setLongName("contextMedication"); + contextMedication.setShortName("conMn"); + contextMedication.setType("xs:float"); + getCustomAttributes().add(contextMedication); + CustomAttribute contextMeal = new CustomAttribute(); + contextMeal.setLongName("contextMeal"); + contextMeal.setShortName("conMl"); + contextMeal.setType("xs:string"); + getCustomAttributes().add(contextMeal); + CustomAttribute concentration = new CustomAttribute(); + concentration.setLongName("concentration"); + concentration.setShortName("concn"); + concentration.setType("xs:float"); + getCustomAttributes().add(concentration); + CustomAttribute contextCarbohydratesAmount = new CustomAttribute(); + contextCarbohydratesAmount.setLongName("contextCarbohydratesAmount"); + contextCarbohydratesAmount.setShortName("coCAt"); + contextCarbohydratesAmount.setType("xs:float"); + getCustomAttributes().add(contextCarbohydratesAmount); + CustomAttribute contextHealth = new CustomAttribute(); + contextHealth.setLongName("contextHealth"); + contextHealth.setShortName("conHh"); + contextHealth.setType("xs:string"); + getCustomAttributes().add(contextHealth); + CustomAttribute hba1c = new CustomAttribute(); + hba1c.setLongName("hba1c"); + hba1c.setShortName("hba1c"); + hba1c.setType("xs:float"); + getCustomAttributes().add(hba1c); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GlucometerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GlucometerFlexContainerAnnc.java new file mode 100644 index 00000000..7ed529ea --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GlucometerFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : GlucometerAnnc + +This ModuleClass provides the capability to report the measurement of glucose characteristics. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = GlucometerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = GlucometerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class GlucometerFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "glucometerAnnc"; + public static final String SHORT_NAME = "glucrAnnc"; + + public GlucometerFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + GlucometerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GrinderFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GrinderFlexContainer.java index 49638303..a4b6c082 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GrinderFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GrinderFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Grinder -This ModuleClass manages grinder feature. +This ModuleClass is for controlling a grinder, for example in a coffee machine. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = GrinderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,33 @@ public class GrinderFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "grinder"; public static final String SHORT_NAME = "grinr"; - + public GrinderFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + GrinderFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute grainsRemaining = new CustomAttribute(); + grainsRemaining.setLongName("grainsRemaining"); + grainsRemaining.setShortName("graRg"); + grainsRemaining.setType("hd:enumGrainsLevel"); + getCustomAttributes().add(grainsRemaining); + CustomAttribute useGrinder = new CustomAttribute(); + useGrinder.setLongName("useGrinder"); + useGrinder.setShortName("useGr"); + useGrinder.setType("xs:boolean"); + getCustomAttributes().add(useGrinder); + CustomAttribute coarseness = new CustomAttribute(); + coarseness.setLongName("coarseness"); + coarseness.setShortName("coars"); + coarseness.setType("hd:enumGrindCoarseness"); + getCustomAttributes().add(coarseness); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GrinderFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GrinderFlexContainerAnnc.java index 76a28bdd..ebc9e74f 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GrinderFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/GrinderFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : GrinderAnnc -This ModuleClass manages grinder feature. +This ModuleClass is for controlling a grinder, for example in a coffee machine. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = GrinderFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class GrinderFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HangupFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HangupFlexContainer.java new file mode 100644 index 00000000..c9d83074 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HangupFlexContainer.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : Hangup + +Hangup an established call. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = HangupFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = HangupFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class HangupFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "hangup"; + public static final String SHORT_NAME = "hangp"; + + public HangupFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass.phonecall." + HangupFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HangupFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HangupFlexContainerAnnc.java new file mode 100644 index 00000000..796f3158 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HangupFlexContainerAnnc.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : HangupAnnc + +Hangup an established call. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = HangupFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = HangupFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class HangupFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "hangupAnnc"; + public static final String SHORT_NAME = "hangpAnnc"; + + public HangupFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass.phonecall." + HangupFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeatingZoneFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeatingZoneFlexContainer.java new file mode 100644 index 00000000..1379dee1 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeatingZoneFlexContainer.java @@ -0,0 +1,58 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : HeatingZone + +This ModuleClass provides the capabilities to monitor the status of the heating zone, for example for a cooktop. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = HeatingZoneFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = HeatingZoneFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class HeatingZoneFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "heatingZone"; + public static final String SHORT_NAME = "heaZe"; + + public HeatingZoneFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + HeatingZoneFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute heatingLevel = new CustomAttribute(); + heatingLevel.setLongName("heatingLevel"); + heatingLevel.setShortName("heaLl"); + heatingLevel.setType("xs:integer"); + getCustomAttributes().add(heatingLevel); + CustomAttribute maxHeatingLevel = new CustomAttribute(); + maxHeatingLevel.setLongName("maxHeatingLevel"); + maxHeatingLevel.setShortName("maHLl"); + maxHeatingLevel.setType("xs:integer"); + getCustomAttributes().add(maxHeatingLevel); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeatingZoneFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeatingZoneFlexContainerAnnc.java new file mode 100644 index 00000000..f865e91a --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeatingZoneFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : HeatingZoneAnnc + +This ModuleClass provides the capabilities to monitor the status of the heating zone, for example for a cooktop. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = HeatingZoneFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = HeatingZoneFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class HeatingZoneFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "heatingZoneAnnc"; + public static final String SHORT_NAME = "heaZeAnnc"; + + public HeatingZoneFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + HeatingZoneFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeightFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeightFlexContainer.java index 2490c233..0dde7c9d 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeightFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeightFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Height -This ModuleClass provides the capability to report the measurement of height. +This ModuleClass provides the capability to report the measurement of height. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = HeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class HeightFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "height"; public static final String SHORT_NAME = "heigt"; - + public HeightFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + HeightFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute height = new CustomAttribute(); + height.setLongName("height"); + height.setShortName("heigt"); + height.setType("xs:float"); + getCustomAttributes().add(height); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeightFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeightFlexContainerAnnc.java index 51da26f7..8a5d7efe 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeightFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HeightFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : HeightAnnc -This ModuleClass provides the capability to report the measurement of height. +This ModuleClass provides the capability to report the measurement of height. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = HeightFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class HeightFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HotWaterSupplyFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HotWaterSupplyFlexContainer.java index 85fd9d41..652fbacc 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HotWaterSupplyFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HotWaterSupplyFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : HotWaterSupply -This ModuleClass provides the information about the status of supplying hot water into tanks or bath tubes. +This ModuleClass provides the information about the status of supplying hot water into tanks or bath tubes. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = HotWaterSupplyFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class HotWaterSupplyFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "hotWaterSupply"; public static final String SHORT_NAME = "hoWSy"; - + public HotWaterSupplyFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + HotWaterSupplyFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute bath = new CustomAttribute(); + bath.setLongName("bath"); + bath.setShortName("bath"); + bath.setType("xs:boolean"); + getCustomAttributes().add(bath); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HotWaterSupplyFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HotWaterSupplyFlexContainerAnnc.java index 6c127571..170c1685 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HotWaterSupplyFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/HotWaterSupplyFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : HotWaterSupplyAnnc -This ModuleClass provides the information about the status of supplying hot water into tanks or bath tubes. +This ModuleClass provides the information about the status of supplying hot water into tanks or bath tubes. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = HotWaterSupplyFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class HotWaterSupplyFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ImpactSensorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ImpactSensorFlexContainer.java new file mode 100644 index 00000000..a0135ebf --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ImpactSensorFlexContainer.java @@ -0,0 +1,68 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ImpactSensor + +This ModuleClass describes the capabilities on an impact sensor. The impact is a high force or shock over a short time period and the impactSensor detects this. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = ImpactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ImpactSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ImpactSensorFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "impactSensor"; + public static final String SHORT_NAME = "impSr"; + + public ImpactSensorFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + ImpactSensorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute impactLevel = new CustomAttribute(); + impactLevel.setLongName("impactLevel"); + impactLevel.setShortName("impLl"); + impactLevel.setType("xs:float"); + getCustomAttributes().add(impactLevel); + CustomAttribute impactDirectionVertical = new CustomAttribute(); + impactDirectionVertical.setLongName("impactDirectionVertical"); + impactDirectionVertical.setShortName("imDVl"); + impactDirectionVertical.setType("xs:float"); + getCustomAttributes().add(impactDirectionVertical); + CustomAttribute impactDirectionHorizontal = new CustomAttribute(); + impactDirectionHorizontal.setLongName("impactDirectionHorizontal"); + impactDirectionHorizontal.setShortName("imDHl"); + impactDirectionHorizontal.setType("xs:float"); + getCustomAttributes().add(impactDirectionHorizontal); + CustomAttribute impactStatus = new CustomAttribute(); + impactStatus.setLongName("impactStatus"); + impactStatus.setShortName("impSs"); + impactStatus.setType("xs:boolean"); + getCustomAttributes().add(impactStatus); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ImpactSensorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ImpactSensorFlexContainerAnnc.java new file mode 100644 index 00000000..5d72b893 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ImpactSensorFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ImpactSensorAnnc + +This ModuleClass describes the capabilities on an impact sensor. The impact is a high force or shock over a short time period and the impactSensor detects this. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = ImpactSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ImpactSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ImpactSensorFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "impactSensorAnnc"; + public static final String SHORT_NAME = "impSrAnnc"; + + public ImpactSensorFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + ImpactSensorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/IncrementNumberValueFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/IncrementNumberValueFlexContainer.java index 8e080f2b..b30b6526 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/IncrementNumberValueFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/IncrementNumberValueFlexContainer.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : incrementNumberValue +Action : IncrementNumberValue Increment the "numberValue" by the value of "stepValue", up to the value of "maxValue". -Created: 2017-09-28 17:26:40 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = IncrementNumberValueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class IncrementNumberValueFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/IncrementNumberValueFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/IncrementNumberValueFlexContainerAnnc.java index adb490ca..268f5d35 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/IncrementNumberValueFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/IncrementNumberValueFlexContainerAnnc.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : incrementNumberValue +Action : IncrementNumberValueAnnc Increment the "numberValue" by the value of "stepValue", up to the value of "maxValue". -Created: 2017-09-28 17:26:40 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = IncrementNumberValueFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class IncrementNumberValueFlexContainerAnnc extends AbstractFlexContainer setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } - -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeepWarmFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeepWarmFlexContainer.java index 86262a16..22d768b1 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeepWarmFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeepWarmFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : KeepWarm -This ModuleClass manages keepWarm feature. +This module allows to control the ?keep warm? feature in devices like coffe machines, kettles etc. It allows to keep water warm for a desired time. This ModuleClass inherits from binarySwitch (see clause 5.3.12) to store setting for the ?keep warm? feature. If the "powerState" data point in a keepWarmSwitch is "True" then the ?keep warm? function will be performed just after boiling (or heating) process is finished (otherwise this function will not be applied). -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = KeepWarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class KeepWarmFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "keepWarm"; public static final String SHORT_NAME = "keeWm"; - + public KeepWarmFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + KeepWarmFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute time = new CustomAttribute(); + time.setLongName("time"); + time.setShortName("time"); + time.setType("xs:integer"); + getCustomAttributes().add(time); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeepWarmFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeepWarmFlexContainerAnnc.java index 9fbbbd6a..b8bf3261 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeepWarmFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeepWarmFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : KeepWarmAnnc -This ModuleClass manages keepWarm feature. +This module allows to control the ?keep warm? feature in devices like coffe machines, kettles etc. It allows to keep water warm for a desired time. This ModuleClass inherits from binarySwitch (see clause 5.3.12) to store setting for the ?keep warm? feature. If the "powerState" data point in a keepWarmSwitch is "True" then the ?keep warm? function will be performed just after boiling (or heating) process is finished (otherwise this function will not be applied). -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = KeepWarmFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class KeepWarmFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeypadFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeypadFlexContainer.java index d832eeff..3e7c6d52 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeypadFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeypadFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Keypad -This ModuleClass provides the capability to require a user defined service through the key-in number. For example, a user can define key 1 as "require a takeout from restaurant XXX with combo meal 1". The IoT service provider or user can define the services. +This ModuleClass provides the capability to require a user defined service through the key-in number. For example, a user can define key 1 as "require a takeout from restaurant XXX with combo meal 1". The IoT service provider or user can define the services. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = KeypadFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class KeypadFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "keypad"; public static final String SHORT_NAME = "keypd"; - + public KeypadFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + KeypadFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute keyNumber = new CustomAttribute(); + keyNumber.setLongName("keyNumber"); + keyNumber.setShortName("keyNr"); + keyNumber.setType("xs:integer"); + getCustomAttributes().add(keyNumber); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeypadFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeypadFlexContainerAnnc.java index b4858f81..7bc26bdd 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeypadFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/KeypadFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : KeypadAnnc -This ModuleClass provides the capability to require a user defined service through the key-in number. For example, a user can define key 1 as "require a takeout from restaurant XXX with combo meal 1". The IoT service provider or user can define the services. +This ModuleClass provides the capability to require a user defined service through the key-in number. For example, a user can define key 1 as "require a takeout from restaurant XXX with combo meal 1". The IoT service provider or user can define the services. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = KeypadFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class KeypadFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidLevelFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidLevelFlexContainer.java index 3a816e1c..930f50a5 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidLevelFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidLevelFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : LiquidLevel -This ModuleClass manages a level of liquid. +This ModuleClass provides the desired level of water (or other liquid) for an appliance, for example the desired level of milk for a cup of coffee from a coffee machine. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = LiquidLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class LiquidLevelFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "liquidLevel"; public static final String SHORT_NAME = "liqLl"; - + public LiquidLevelFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + LiquidLevelFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute liquidLevel = new CustomAttribute(); + liquidLevel.setLongName("liquidLevel"); + liquidLevel.setShortName("liqLl"); + liquidLevel.setType("hd:enumLiquidLevel"); + getCustomAttributes().add(liquidLevel); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidLevelFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidLevelFlexContainerAnnc.java index 51ed87ca..e56f86d9 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidLevelFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidLevelFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : LiquidLevelAnnc -This ModuleClass manages a level of liquid. +This ModuleClass provides the desired level of water (or other liquid) for an appliance, for example the desired level of milk for a cup of coffee from a coffee machine. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = LiquidLevelFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class LiquidLevelFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidRemainingFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidRemainingFlexContainer.java new file mode 100644 index 00000000..7263cee2 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidRemainingFlexContainer.java @@ -0,0 +1,53 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : LiquidRemaining + +This ModuleClass provides the status of water level (or other liquid) for an appliance, for example the level of remaining milk in a coffee machine. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = LiquidRemainingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = LiquidRemainingFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class LiquidRemainingFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "liquidRemaining"; + public static final String SHORT_NAME = "liqRg"; + + public LiquidRemainingFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + LiquidRemainingFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute liquidRemaining = new CustomAttribute(); + liquidRemaining.setLongName("liquidRemaining"); + liquidRemaining.setShortName("liqRg"); + liquidRemaining.setType("hd:enumLiquidLevel"); + getCustomAttributes().add(liquidRemaining); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidRemainingFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidRemainingFlexContainerAnnc.java new file mode 100644 index 00000000..75cb72fd --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LiquidRemainingFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : LiquidRemainingAnnc + +This ModuleClass provides the status of water level (or other liquid) for an appliance, for example the level of remaining milk in a coffee machine. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = LiquidRemainingFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = LiquidRemainingFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class LiquidRemainingFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "liquidRemainingAnnc"; + public static final String SHORT_NAME = "liqRgAnnc"; + + public LiquidRemainingFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + LiquidRemainingFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LockFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LockFlexContainer.java index b7a145d8..3006546a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LockFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LockFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Lock -This ModuleClass manages lock feature. +This ModuleClass provides the function to lock and unlock an object. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = LockFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class LockFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "lock"; public static final String SHORT_NAME = "lock"; - + public LockFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + LockFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute lock = new CustomAttribute(); + lock.setLongName("lock"); + lock.setShortName("lock"); + lock.setType("xs:boolean"); + getCustomAttributes().add(lock); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LockFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LockFlexContainerAnnc.java index 06622244..bbb97068 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LockFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/LockFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : LockAnnc -This ModuleClass manages lock feature. +This ModuleClass provides the function to lock and unlock an object. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = LockFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class LockFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MediaSelectFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MediaSelectFlexContainer.java new file mode 100644 index 00000000..4a413712 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MediaSelectFlexContainer.java @@ -0,0 +1,73 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : MediaSelect + +This ModuleClass provides capabilities to control and monitor media input and output of device such as TV or SetTopBox. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = MediaSelectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = MediaSelectFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class MediaSelectFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "mediaSelect"; + public static final String SHORT_NAME = "medSt"; + + public MediaSelectFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + MediaSelectFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute supportedMediaSources = new CustomAttribute(); + supportedMediaSources.setLongName("supportedMediaSources"); + supportedMediaSources.setShortName("suMSs"); + supportedMediaSources.setType("[hd:enumSupportedMediaSource]"); + getCustomAttributes().add(supportedMediaSources); + CustomAttribute mediaType = new CustomAttribute(); + mediaType.setLongName("mediaType"); + mediaType.setShortName("medTe"); + mediaType.setType("hd:enumSupportedMediaSource"); + getCustomAttributes().add(mediaType); + CustomAttribute mediaID = new CustomAttribute(); + mediaID.setLongName("mediaID"); + mediaID.setShortName("medID"); + mediaID.setType("xs:integer"); + getCustomAttributes().add(mediaID); + CustomAttribute mediaName = new CustomAttribute(); + mediaName.setLongName("mediaName"); + mediaName.setShortName("medNe"); + mediaName.setType("xs:string"); + getCustomAttributes().add(mediaName); + CustomAttribute status = new CustomAttribute(); + status.setLongName("status"); + status.setShortName("sus"); + status.setType("xs:boolean"); + getCustomAttributes().add(status); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MediaSelectFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MediaSelectFlexContainerAnnc.java new file mode 100644 index 00000000..8f622e56 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MediaSelectFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : MediaSelectAnnc + +This ModuleClass provides capabilities to control and monitor media input and output of device such as TV or SetTopBox. + +Created: 2018-06-29 17:19:52 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = MediaSelectFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = MediaSelectFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class MediaSelectFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "mediaSelectAnnc"; + public static final String SHORT_NAME = "medStAnnc"; + + public MediaSelectFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + MediaSelectFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MotionSensorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MotionSensorFlexContainer.java index f09593f6..7f1576cc 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MotionSensorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MotionSensorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : MotionSensor -This ModuleClass provides the capabilities to indicates the occurrence of a motion and raises an alarm if the triggering criterion is met. +This ModuleClass provides the capabilities to indicate the occurrence of motion and raising of an alarm if the triggering criterion is met. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = MotionSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,33 @@ public class MotionSensorFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "motionSensor"; public static final String SHORT_NAME = "motSr"; - + public MotionSensorFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + MotionSensorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute silentTime = new CustomAttribute(); + silentTime.setLongName("silentTime"); + silentTime.setShortName("silTe"); + silentTime.setType("xs:integer"); + getCustomAttributes().add(silentTime); + CustomAttribute alarm = new CustomAttribute(); + alarm.setLongName("alarm"); + alarm.setShortName("alarm"); + alarm.setType("xs:boolean"); + getCustomAttributes().add(alarm); + CustomAttribute sensitivity = new CustomAttribute(); + sensitivity.setLongName("sensitivity"); + sensitivity.setShortName("sensy"); + sensitivity.setType("xs:integer"); + getCustomAttributes().add(sensitivity); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MotionSensorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MotionSensorFlexContainerAnnc.java index 07476b47..0ab02f60 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MotionSensorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/MotionSensorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : MotionSensorAnnc -This ModuleClass provides the capabilities to indicates the occurrence of a motion and raises an alarm if the triggering criterion is met. +This ModuleClass provides the capabilities to indicate the occurrence of motion and raising of an alarm if the triggering criterion is met. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = MotionSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class MotionSensorFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NextTrackFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NextTrackFlexContainer.java new file mode 100644 index 00000000..99747073 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NextTrackFlexContainer.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : NextTrack + +Go forward to a next chapter, section or similar marker in the media. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = NextTrackFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = NextTrackFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class NextTrackFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "nextTrack"; + public static final String SHORT_NAME = "nexTk"; + + public NextTrackFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass.playercontrol." + NextTrackFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NextTrackFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NextTrackFlexContainerAnnc.java new file mode 100644 index 00000000..424493de --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NextTrackFlexContainerAnnc.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : NextTrackAnnc + +Go forward to a next chapter, section or similar marker in the media. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = NextTrackFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = NextTrackFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class NextTrackFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "nextTrackAnnc"; + public static final String SHORT_NAME = "nexTkAnnc"; + + public NextTrackFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass.playercontrol." + NextTrackFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NumberValueFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NumberValueFlexContainer.java index 12538cae..045969e8 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NumberValueFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NumberValueFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ ModuleClass : NumberValue -This ModuleClass adds the functionalities to represent a number. It also has capabilities for controlled increment and decrement a counter. It can be used to present a number-related functionality in a technology where there is only a weak semantic specification of that functionality. +This ModuleClass provides the capabilities to represent a number. It also has capabilities for controlled increment and decrement a counter. It can be used to present a number-related functionality in a technology where there is only a weak semantic specification of that functionality. -Created: 2017-09-28 17:26:40 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,9 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = NumberValueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,71 +32,94 @@ public class NumberValueFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "numberValue"; public static final String SHORT_NAME = "numVe"; - + public NumberValueFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + NumberValueFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute minValue = new CustomAttribute(); + minValue.setLongName("minValue"); + minValue.setShortName("minVe"); + minValue.setType("xs:float"); + getCustomAttributes().add(minValue); + CustomAttribute maxValue = new CustomAttribute(); + maxValue.setLongName("maxValue"); + maxValue.setShortName("maxVe"); + maxValue.setType("xs:float"); + getCustomAttributes().add(maxValue); + CustomAttribute defaultValue = new CustomAttribute(); + defaultValue.setLongName("defaultValue"); + defaultValue.setShortName("defVe"); + defaultValue.setType("xs:float"); + getCustomAttributes().add(defaultValue); + CustomAttribute step = new CustomAttribute(); + step.setLongName("step"); + step.setShortName("step"); + step.setType("xs:float"); + getCustomAttributes().add(step); + CustomAttribute numberValue = new CustomAttribute(); + numberValue.setLongName("numberValue"); + numberValue.setShortName("numVe"); + numberValue.setType("xs:float"); + getCustomAttributes().add(numberValue); } - - public void finalizeSerialization() { - getDecrementNumberValue(); - getIncrementNumberValue(); - getResetNumberValue(); - } - - public void finalizeDeserialization() { - if (this.decrementNumberValue != null) { - setDecrementNumberValue(decrementNumberValue); - } - if (this.incrementNumberValue != null) { - setIncrementNumberValue(incrementNumberValue); - } - if (this.resetNumberValue != null) { - setResetNumberValue(resetNumberValue); - } - } - - @XmlElement(name=DecrementNumberValueFlexContainer.SHORT_NAME, required=true, type=DecrementNumberValueFlexContainer.class) + + + @XmlElement(name=DecrementNumberValueFlexContainer.SHORT_NAME, required=true, type=DecrementNumberValueFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private DecrementNumberValueFlexContainer decrementNumberValue; - - public void setDecrementNumberValue(DecrementNumberValueFlexContainer decrementNumberValue) { - this.decrementNumberValue = decrementNumberValue; - getFlexContainerOrContainerOrSubscription().add(decrementNumberValue); - } - public DecrementNumberValueFlexContainer getDecrementNumberValue() { this.decrementNumberValue = (DecrementNumberValueFlexContainer) getResourceByName(DecrementNumberValueFlexContainer.SHORT_NAME); return decrementNumberValue; } - @XmlElement(name=IncrementNumberValueFlexContainer.SHORT_NAME, required=true, type=IncrementNumberValueFlexContainer.class) - private IncrementNumberValueFlexContainer incrementNumberValue; - - - public void setIncrementNumberValue(IncrementNumberValueFlexContainer incrementNumberValue) { - this.incrementNumberValue = incrementNumberValue; - getFlexContainerOrContainerOrSubscription().add(incrementNumberValue); + public void setDecrementNumberValue(DecrementNumberValueFlexContainer newAction) { + this.decrementNumberValue = newAction; + getFlexContainerOrContainerOrSubscription().add(decrementNumberValue); } + + @XmlElement(name=IncrementNumberValueFlexContainer.SHORT_NAME, required=true, type=IncrementNumberValueFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private IncrementNumberValueFlexContainer incrementNumberValue; public IncrementNumberValueFlexContainer getIncrementNumberValue() { this.incrementNumberValue = (IncrementNumberValueFlexContainer) getResourceByName(IncrementNumberValueFlexContainer.SHORT_NAME); return incrementNumberValue; } - @XmlElement(name=ResetNumberValueFlexContainer.SHORT_NAME, required=true, type=ResetNumberValueFlexContainer.class) + public void setIncrementNumberValue(IncrementNumberValueFlexContainer newAction) { + this.incrementNumberValue = newAction; + getFlexContainerOrContainerOrSubscription().add(incrementNumberValue); + } + + @XmlElement(name=ResetNumberValueFlexContainer.SHORT_NAME, required=true, type=ResetNumberValueFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ResetNumberValueFlexContainer resetNumberValue; + public ResetNumberValueFlexContainer getResetNumberValue() { + this.resetNumberValue = (ResetNumberValueFlexContainer) getResourceByName(ResetNumberValueFlexContainer.SHORT_NAME); + return resetNumberValue; + } - public void setResetNumberValue(ResetNumberValueFlexContainer resetNumberValue) { - this.resetNumberValue = resetNumberValue; + public void setResetNumberValue(ResetNumberValueFlexContainer newAction) { + this.resetNumberValue = newAction; getFlexContainerOrContainerOrSubscription().add(resetNumberValue); } + + public void finalizeSerialization() { + getDecrementNumberValue(); + getIncrementNumberValue(); + getResetNumberValue(); + } - public ResetNumberValueFlexContainer getResetNumberValue() { - this.resetNumberValue = (ResetNumberValueFlexContainer) getResourceByName(ResetNumberValueFlexContainer.SHORT_NAME); - return resetNumberValue; + public void finalizeDeserialization() { + if (this.decrementNumberValue != null) { + setDecrementNumberValue(this.decrementNumberValue); + } + if (this.incrementNumberValue != null) { + setIncrementNumberValue(this.incrementNumberValue); + } + if (this.resetNumberValue != null) { + setResetNumberValue(this.resetNumberValue); + } } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NumberValueFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NumberValueFlexContainerAnnc.java index 9b283841..43cfdd4b 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NumberValueFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/NumberValueFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ ModuleClass : NumberValueAnnc -This ModuleClass adds the functionalities to represent a number. It also has capabilities for controlled increment and decrement a counter. It can be used to present a number-related functionality in a technology where there is only a weak semantic specification of that functionality. +This ModuleClass provides the capabilities to represent a number. It also has capabilities for controlled increment and decrement a counter. It can be used to present a number-related functionality in a technology where there is only a weak semantic specification of that functionality. -Created: 2017-09-28 17:26:40 +Created: 2018-06-29 17:19:52 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = NumberValueFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,28 +37,27 @@ public class NumberValueFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { - getDecrementNumberValueAnnc(); - getIncrementNumberValueAnnc(); - getResetNumberValueAnnc(); + getDecrementNumberValueAnnc(); + getIncrementNumberValueAnnc(); + getResetNumberValueAnnc(); } public void finalizeDeserialization() { - if (this.decrementNumberValueAnnc != null) { - setDecrementNumberValueAnnc(decrementNumberValueAnnc); + if (this.decrementNumberValueAnnc != null){ + setDecrementNumberValueAnnc(decrementNumberValueAnnc); } - if (this.incrementNumberValueAnnc != null) { - setIncrementNumberValueAnnc(incrementNumberValueAnnc); + if (this.incrementNumberValueAnnc != null){ + setIncrementNumberValueAnnc(incrementNumberValueAnnc); } - if (this.resetNumberValueAnnc != null) { - setResetNumberValueAnnc(resetNumberValueAnnc); + if (this.resetNumberValueAnnc != null){ + setResetNumberValueAnnc(resetNumberValueAnnc); } } - @XmlElement(name=DecrementNumberValueFlexContainerAnnc.SHORT_NAME, required=true, type=DecrementNumberValueFlexContainerAnnc.class) - private DecrementNumberValueFlexContainerAnnc decrementNumberValueAnnc; - + @XmlElement(name=DecrementNumberValueFlexContainerAnnc.SHORT_NAME, required=true, type=DecrementNumberValueFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private DecrementNumberValueFlexContainerAnnc decrementNumberValueAnnc; public void setDecrementNumberValueAnnc(DecrementNumberValueFlexContainerAnnc decrementNumberValueAnnc) { this.decrementNumberValueAnnc = decrementNumberValueAnnc; @@ -70,10 +68,8 @@ public class NumberValueFlexContainerAnnc extends AbstractFlexContainerAnnc { this.decrementNumberValueAnnc = (DecrementNumberValueFlexContainerAnnc) getResourceByName(DecrementNumberValueFlexContainerAnnc.SHORT_NAME); return decrementNumberValueAnnc; } - - @XmlElement(name=IncrementNumberValueFlexContainerAnnc.SHORT_NAME, required=true, type=IncrementNumberValueFlexContainerAnnc.class) - private IncrementNumberValueFlexContainerAnnc incrementNumberValueAnnc; - + @XmlElement(name=IncrementNumberValueFlexContainerAnnc.SHORT_NAME, required=true, type=IncrementNumberValueFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private IncrementNumberValueFlexContainerAnnc incrementNumberValueAnnc; public void setIncrementNumberValueAnnc(IncrementNumberValueFlexContainerAnnc incrementNumberValueAnnc) { this.incrementNumberValueAnnc = incrementNumberValueAnnc; @@ -84,10 +80,8 @@ public class NumberValueFlexContainerAnnc extends AbstractFlexContainerAnnc { this.incrementNumberValueAnnc = (IncrementNumberValueFlexContainerAnnc) getResourceByName(IncrementNumberValueFlexContainerAnnc.SHORT_NAME); return incrementNumberValueAnnc; } - - @XmlElement(name=ResetNumberValueFlexContainerAnnc.SHORT_NAME, required=true, type=ResetNumberValueFlexContainerAnnc.class) - private ResetNumberValueFlexContainerAnnc resetNumberValueAnnc; - + @XmlElement(name=ResetNumberValueFlexContainerAnnc.SHORT_NAME, required=true, type=ResetNumberValueFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ResetNumberValueFlexContainerAnnc resetNumberValueAnnc; public void setResetNumberValueAnnc(ResetNumberValueFlexContainerAnnc resetNumberValueAnnc) { this.resetNumberValueAnnc = resetNumberValueAnnc; @@ -99,4 +93,4 @@ public class NumberValueFlexContainerAnnc extends AbstractFlexContainerAnnc { return resetNumberValueAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ObjectFactory.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ObjectFactory.java index 8a06acb4..035be4a3 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ObjectFactory.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ObjectFactory.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,722 +9,1355 @@ ObjectFactory : ObjectFactory - - -Created: 2018-06-11 12:14:18 +Created: 2018-07-04 10:25:10 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlRegistry; + import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRegistry public class ObjectFactory { - public AbstractFlexContainer createalaSr() { - return new AlarmSpeakerFlexContainer(); + static public ObjectFactory instance = new ObjectFactory(); + + static public ObjectFactory getInstance() { + return instance; } - public AbstractFlexContainerAnnc createalaSrAnnc() { - return new AlarmSpeakerFlexContainerAnnc(); + private ObjectFactory() { } - public AbstractFlexContainer createAuVIt() { - return new AudioVideoInputFlexContainer(); + public AbstractFlexContainer createdeWSn() { + return new DeviceWeatherStationFlexContainer(); } - public AbstractFlexContainerAnnc createAuVItAnnc() { - return new AudioVideoInputFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeWSnAnnc() { + return new DeviceWeatherStationFlexContainerAnnc(); } - public AbstractFlexContainer createAudVe() { - return new AudioVolumeFlexContainer(); + public AbstractFlexContainer createdeSPg() { + return new DeviceSmartPlugFlexContainer(); } - public AbstractFlexContainerAnnc createAudVeAnnc() { - return new AudioVolumeFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeSPgAnnc() { + return new DeviceSmartPlugFlexContainerAnnc(); } - public AbstractFlexContainer createUpoVe() { - return new UpVolumeFlexContainer(); + public AbstractFlexContainer createconSr() { + return new ContactSensorFlexContainer(); } - public AbstractFlexContainerAnnc createUpoVeAnnc() { - return new UpVolumeFlexContainerAnnc(); + public AbstractFlexContainerAnnc createconSrAnnc() { + return new ContactSensorFlexContainerAnnc(); } - public AbstractFlexContainer createDowVe() { - return new DownVolumeFlexContainer(); + public AbstractFlexContainer createoximr() { + return new OximeterFlexContainer(); } - public AbstractFlexContainerAnnc createDowVeAnnc() { - return new DownVolumeFlexContainerAnnc(); + public AbstractFlexContainerAnnc createoximrAnnc() { + return new OximeterFlexContainerAnnc(); } - public AbstractFlexContainer createBatty() { - return new BatteryFlexContainer(); + public AbstractFlexContainer createdowCl() { + return new DownChannelFlexContainer(); } - public AbstractFlexContainerAnnc createBattyAnnc() { - return new BatteryFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdowClAnnc() { + return new DownChannelFlexContainerAnnc(); } - public AbstractFlexContainer createBinSh() { - return new BinarySwitchFlexContainer(); + public AbstractFlexContainer createdeDWr() { + return new DeviceDishWasherFlexContainer(); } - public AbstractFlexContainerAnnc createBinShAnnc() { - return new BinarySwitchFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeDWrAnnc() { + return new DeviceDishWasherFlexContainerAnnc(); } - public AbstractFlexContainer createTogge() { - return new ToggleFlexContainer(); + public AbstractFlexContainer createmotSr() { + return new MotionSensorFlexContainer(); } - public AbstractFlexContainerAnnc createToggeAnnc() { - return new ToggleFlexContainerAnnc(); + public AbstractFlexContainerAnnc createmotSrAnnc() { + return new MotionSensorFlexContainerAnnc(); } - public AbstractFlexContainer createBEIAs() { - return new BioElectricalImpedanceAnalysisFlexContainer(); + public AbstractFlexContainer createdeWVe() { + return new DeviceWaterValveFlexContainer(); } - public AbstractFlexContainerAnnc createBEIAsAnnc() { - return new BioElectricalImpedanceAnalysisFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeWVeAnnc() { + return new DeviceWaterValveFlexContainerAnnc(); } - public AbstractFlexContainer createBoilr() { - return new BoilerFlexContainer(); + public AbstractFlexContainer createsmoSr() { + return new SmokeSensorFlexContainer(); } - public AbstractFlexContainerAnnc createBoilrAnnc() { - return new BoilerFlexContainerAnnc(); + public AbstractFlexContainerAnnc createsmoSrAnnc() { + return new SmokeSensorFlexContainerAnnc(); } - public AbstractFlexContainer createBrigs() { - return new BrightnessFlexContainer(); + public AbstractFlexContainer createmedSt() { + return new MediaSelectFlexContainer(); } - public AbstractFlexContainerAnnc createBrigsAnnc() { - return new BrightnessFlexContainerAnnc(); + public AbstractFlexContainerAnnc createmedStAnnc() { + return new MediaSelectFlexContainerAnnc(); } - public AbstractFlexContainer createClock() { - return new ClockFlexContainer(); + public AbstractFlexContainer createdePOr() { + return new DevicePulseOximeterFlexContainer(); } - public AbstractFlexContainerAnnc createClockAnnc() { - return new ClockFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdePOrAnnc() { + return new DevicePulseOximeterFlexContainerAnnc(); } - public AbstractFlexContainer createColor() { - return new ColourFlexContainer(); + public AbstractFlexContainer createelVCr() { + return new ElectricVehicleConnectorFlexContainer(); } - public AbstractFlexContainerAnnc createColorAnnc() { - return new ColourFlexContainerAnnc(); + public AbstractFlexContainerAnnc createelVCrAnnc() { + return new ElectricVehicleConnectorFlexContainerAnnc(); } - public AbstractFlexContainer createColSn() { - return new ColourSaturationFlexContainer(); + public AbstractFlexContainer createpreTk() { + return new PreviousTrackFlexContainer(); } - public AbstractFlexContainerAnnc createColSnAnnc() { - return new ColourSaturationFlexContainerAnnc(); + public AbstractFlexContainerAnnc createpreTkAnnc() { + return new PreviousTrackFlexContainerAnnc(); } - public AbstractFlexContainer createDooSs() { - return new DoorStatusFlexContainer(); + public AbstractFlexContainer createdeWHr() { + return new DeviceWaterHeaterFlexContainer(); } - public AbstractFlexContainerAnnc createDooSsAnnc() { - return new DoorStatusFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeWHrAnnc() { + return new DeviceWaterHeaterFlexContainerAnnc(); } - public AbstractFlexContainer createElVCr() { - return new ElectricVehicleConnectorFlexContainer(); + public AbstractFlexContainer createalaSr() { + return new AlarmSpeakerFlexContainer(); } - public AbstractFlexContainerAnnc createElVCrAnnc() { - return new ElectricVehicleConnectorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createalaSrAnnc() { + return new AlarmSpeakerFlexContainerAnnc(); } - public AbstractFlexContainer createEneCn() { - return new EnergyConsumptionFlexContainer(); + public AbstractFlexContainer createlock() { + return new LockFlexContainer(); } - public AbstractFlexContainerAnnc createEneCnAnnc() { - return new EnergyConsumptionFlexContainerAnnc(); + public AbstractFlexContainerAnnc createlockAnnc() { + return new LockFlexContainerAnnc(); } - public AbstractFlexContainer createEneGn() { - return new EnergyGenerationFlexContainer(); + public AbstractFlexContainer createaPJMe() { + return new AirPurifierJobModeFlexContainer(); } - public AbstractFlexContainerAnnc createEneGnAnnc() { - return new EnergyGenerationFlexContainerAnnc(); + public AbstractFlexContainerAnnc createaPJMeAnnc() { + return new AirPurifierJobModeFlexContainerAnnc(); } - public AbstractFlexContainer createFauDn() { - return new FaultDetectionFlexContainer(); + public AbstractFlexContainer createdevHr() { + return new DeviceHumidifierFlexContainer(); } - public AbstractFlexContainerAnnc createFauDnAnnc() { - return new FaultDetectionFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdevHrAnnc() { + return new DeviceHumidifierFlexContainerAnnc(); } - public AbstractFlexContainer createHeigt() { + public AbstractFlexContainer createheigt() { return new HeightFlexContainer(); } - public AbstractFlexContainerAnnc createHeigtAnnc() { + public AbstractFlexContainerAnnc createheigtAnnc() { return new HeightFlexContainerAnnc(); } - public AbstractFlexContainer createHoWSy() { - return new HotWaterSupplyFlexContainer(); + public AbstractFlexContainer createdWSAB() { + return new DeviceWeightScaleAndBodyCompositionAnalyserFlexContainer(); } - public AbstractFlexContainerAnnc createHoWSyAnnc() { - return new HotWaterSupplyFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdWSABAnnc() { + return new DeviceWeightScaleAndBodyCompositionAnalyserFlexContainerAnnc(); } - public AbstractFlexContainer createKeypd() { - return new KeypadFlexContainer(); + public AbstractFlexContainer createupoVe() { + return new UpVolumeFlexContainer(); } - public AbstractFlexContainerAnnc createKeypdAnnc() { - return new KeypadFlexContainerAnnc(); + public AbstractFlexContainerAnnc createupoVeAnnc() { + return new UpVolumeFlexContainerAnnc(); } - public AbstractFlexContainer createMotSr() { - return new MotionSensorFlexContainer(); + public AbstractFlexContainer createoveSr() { + return new OvercurrentSensorFlexContainer(); } - public AbstractFlexContainerAnnc createMotSrAnnc() { - return new MotionSensorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createoveSrAnnc() { + return new OvercurrentSensorFlexContainerAnnc(); } - public AbstractFlexContainer createOximr() { - return new OximeterFlexContainer(); + public AbstractFlexContainer createdeCTr() { + return new DeactivateClockTimerFlexContainer(); } - public AbstractFlexContainerAnnc createOximrAnnc() { - return new OximeterFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeCTrAnnc() { + return new DeactivateClockTimerFlexContainerAnnc(); } - public AbstractFlexContainer createPowSe() { - return new PowerSaveFlexContainer(); + public AbstractFlexContainer createdeMDr() { + return new DeviceMotionDetectorFlexContainer(); } - public AbstractFlexContainerAnnc createPowSeAnnc() { - return new PowerSaveFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeMDrAnnc() { + return new DeviceMotionDetectorFlexContainerAnnc(); } - public AbstractFlexContainer createPusBn() { - return new PushButtonFlexContainer(); + public AbstractFlexContainer createsecMe() { + return new SecurityModeFlexContainer(); } - public AbstractFlexContainerAnnc createPusBnAnnc() { - return new PushButtonFlexContainerAnnc(); + public AbstractFlexContainerAnnc createsecMeAnnc() { + return new SecurityModeFlexContainerAnnc(); } - public AbstractFlexContainer createRecor() { - return new RecorderFlexContainer(); + public AbstractFlexContainer createboCAr() { + return new BodyCompositionAnalyserFlexContainer(); } - public AbstractFlexContainerAnnc createRecorAnnc() { - return new RecorderFlexContainerAnnc(); + public AbstractFlexContainerAnnc createboCArAnnc() { + return new BodyCompositionAnalyserFlexContainerAnnc(); } - public AbstractFlexContainer createRefrn() { - return new RefrigerationFlexContainer(); + public AbstractFlexContainer createdCDr() { + return new DeviceContactDetectorFlexContainer(); } - public AbstractFlexContainerAnnc createRefrnAnnc() { - return new RefrigerationFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdCDrAnnc() { + return new DeviceContactDetectorFlexContainerAnnc(); } - public AbstractFlexContainer createRelHy() { - return new RelativeHumidityFlexContainer(); + public AbstractFlexContainer createdeSBy() { + return new DeviceStorageBatteryFlexContainer(); } - public AbstractFlexContainerAnnc createRelHyAnnc() { - return new RelativeHumidityFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeSByAnnc() { + return new DeviceStorageBatteryFlexContainerAnnc(); } - public AbstractFlexContainer createRinLl() { - return new RinseLevelFlexContainer(); + public AbstractFlexContainer createfilIo() { + return new FilterInfoFlexContainer(); } - public AbstractFlexContainerAnnc createRinLlAnnc() { - return new RinseLevelFlexContainerAnnc(); + public AbstractFlexContainerAnnc createfilIoAnnc() { + return new FilterInfoFlexContainerAnnc(); } - public AbstractFlexContainer createRunMe() { - return new RunModeFlexContainer(); + public AbstractFlexContainer createstaDt() { + return new Start3DprintFlexContainer(); } - public AbstractFlexContainerAnnc createRunMeAnnc() { - return new RunModeFlexContainerAnnc(); + public AbstractFlexContainerAnnc createstaDtAnnc() { + return new Start3DprintFlexContainerAnnc(); } - public AbstractFlexContainer createSigSh() { - return new SignalStrengthFlexContainer(); + public AbstractFlexContainer createdevDr() { + return new DeviceDehumidifierFlexContainer(); } - public AbstractFlexContainerAnnc createSigShAnnc() { - return new SignalStrengthFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdevDrAnnc() { + return new DeviceDehumidifierFlexContainerAnnc(); } - public AbstractFlexContainer createSmoSr() { - return new SmokeSensorFlexContainer(); + public AbstractFlexContainer createcWJMO() { + return new ClothesWasherJobModeOptionFlexContainer(); } - public AbstractFlexContainerAnnc createSmoSrAnnc() { - return new SmokeSensorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createcWJMOAnnc() { + return new ClothesWasherJobModeOptionFlexContainerAnnc(); } - public AbstractFlexContainer createSpiLl() { - return new SpinLevelFlexContainer(); + public AbstractFlexContainer createkeeWm() { + return new KeepWarmFlexContainer(); } - public AbstractFlexContainerAnnc createSpiLlAnnc() { - return new SpinLevelFlexContainerAnnc(); + public AbstractFlexContainerAnnc createkeeWmAnnc() { + return new KeepWarmFlexContainerAnnc(); } - public AbstractFlexContainer createTelCl() { - return new TelevisionChannelFlexContainer(); + public AbstractFlexContainer createperSr() { + return new PersonSensorFlexContainer(); } - public AbstractFlexContainerAnnc createTelClAnnc() { - return new TelevisionChannelFlexContainerAnnc(); + public AbstractFlexContainerAnnc createperSrAnnc() { + return new PersonSensorFlexContainerAnnc(); } - public AbstractFlexContainer createUphCl() { - return new UpChannelFlexContainer(); + public AbstractFlexContainer createdeOLp() { + return new DeviceOutdoorLampFlexContainer(); } - public AbstractFlexContainerAnnc createUphClAnnc() { - return new UpChannelFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeOLpAnnc() { + return new DeviceOutdoorLampFlexContainerAnnc(); } - public AbstractFlexContainer createDowCl() { - return new DownChannelFlexContainer(); + public AbstractFlexContainer createcWJMe() { + return new ClothesWasherJobModeFlexContainer(); } - public AbstractFlexContainerAnnc createDowClAnnc() { - return new DownChannelFlexContainerAnnc(); + public AbstractFlexContainerAnnc createcWJMeAnnc() { + return new ClothesWasherJobModeFlexContainerAnnc(); } - public AbstractFlexContainer createTempe() { - return new TemperatureFlexContainer(); + public AbstractFlexContainer createdevTr() { + return new DeviceThermometerFlexContainer(); } - public AbstractFlexContainerAnnc createTempeAnnc() { - return new TemperatureFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdevTrAnnc() { + return new DeviceThermometerFlexContainerAnnc(); } - public AbstractFlexContainer createTemAm() { - return new TemperatureAlarmFlexContainer(); + public AbstractFlexContainer createdevWg() { + return new DeviceWarningFlexContainer(); } - public AbstractFlexContainerAnnc createTemAmAnnc() { - return new TemperatureAlarmFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdevWgAnnc() { + return new DeviceWarningFlexContainerAnnc(); } - public AbstractFlexContainer createTimer() { - return new TimerFlexContainer(); + public AbstractFlexContainer createrunSe() { + return new RunStateFlexContainer(); } - public AbstractFlexContainerAnnc createTimerAnnc() { - return new TimerFlexContainerAnnc(); + public AbstractFlexContainerAnnc createrunSeAnnc() { + return new RunStateFlexContainerAnnc(); } - public AbstractFlexContainer createAcCTr() { - return new ActivateClockTimerFlexContainer(); + public AbstractFlexContainer createdeFDr() { + return new DeviceFloodDetectorFlexContainer(); } - public AbstractFlexContainerAnnc createAcCTrAnnc() { - return new ActivateClockTimerFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeFDrAnnc() { + return new DeviceFloodDetectorFlexContainerAnnc(); } - public AbstractFlexContainer createDeCTr() { - return new DeactivateClockTimerFlexContainer(); + public AbstractFlexContainer createopeLl() { + return new OpenLevelFlexContainer(); } - public AbstractFlexContainerAnnc createDeCTrAnnc() { - return new DeactivateClockTimerFlexContainerAnnc(); + public AbstractFlexContainerAnnc createopeLlAnnc() { + return new OpenLevelFlexContainerAnnc(); } - public AbstractFlexContainer createTurbo() { - return new TurboFlexContainer(); + public AbstractFlexContainer createdevCa() { + return new DeviceCameraFlexContainer(); } - public AbstractFlexContainerAnnc createTurboAnnc() { - return new TurboFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdevCaAnnc() { + return new DeviceCameraFlexContainerAnnc(); } - public AbstractFlexContainer createWatFw() { - return new WaterFlowFlexContainer(); + public AbstractFlexContainer createairFw() { + return new AirFlowFlexContainer(); } - public AbstractFlexContainerAnnc createWatFwAnnc() { - return new WaterFlowFlexContainerAnnc(); + public AbstractFlexContainerAnnc createairFwAnnc() { + return new AirFlowFlexContainerAnnc(); } - public AbstractFlexContainer createWatLl() { - return new WaterLevelFlexContainer(); + public AbstractFlexContainer createdevTt() { + return new DeviceThermostatFlexContainer(); } - public AbstractFlexContainerAnnc createWatLlAnnc() { - return new WaterLevelFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdevTtAnnc() { + return new DeviceThermostatFlexContainerAnnc(); } - public AbstractFlexContainer createWatSr() { - return new WaterSensorFlexContainer(); + public AbstractFlexContainer createbat() { + return new BatteryFlexContainer(); } - public AbstractFlexContainerAnnc createWatSrAnnc() { - return new WaterSensorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createbatAnnc() { + return new BatteryFlexContainerAnnc(); } - public AbstractFlexContainer createWeigt() { - return new WeightFlexContainer(); + public AbstractFlexContainer createrCJMe() { + return new RobotCleanerJobModeFlexContainer(); } - public AbstractFlexContainerAnnc createWeigtAnnc() { - return new WeightFlexContainerAnnc(); + public AbstractFlexContainerAnnc createrCJMeAnnc() { + return new RobotCleanerJobModeFlexContainerAnnc(); } - public AbstractFlexContainer createWind() { - return new WindFlexContainer(); + public AbstractFlexContainer createliqRg() { + return new LiquidRemainingFlexContainer(); } - public AbstractFlexContainerAnnc createWindAnnc() { - return new WindFlexContainerAnnc(); + public AbstractFlexContainerAnnc createliqRgAnnc() { + return new LiquidRemainingFlexContainerAnnc(); } - public AbstractFlexContainer createStreg() { - return new StreamingFlexContainer(); + public AbstractFlexContainer createphoCl() { + return new PhoneCallFlexContainer(); } - public AbstractFlexContainerAnnc createStregAnnc() { - return new StreamingFlexContainerAnnc(); + public AbstractFlexContainerAnnc createphoClAnnc() { + return new PhoneCallFlexContainerAnnc(); } - public AbstractFlexContainer createPerSr() { - return new PersonSensorFlexContainer(); + public AbstractFlexContainer createdeCHd() { + return new DeviceCookerHoodFlexContainer(); } - public AbstractFlexContainerAnnc createPerSrAnnc() { - return new PersonSensorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeCHdAnnc() { + return new DeviceCookerHoodFlexContainerAnnc(); } - public AbstractFlexContainer createBrewg() { - return new BrewingFlexContainer(); + public AbstractFlexContainer createdWJMe() { + return new DishWasherJobModeFlexContainer(); } - public AbstractFlexContainerAnnc createBrewgAnnc() { - return new BrewingFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdWJMeAnnc() { + return new DishWasherJobModeFlexContainerAnnc(); } - public AbstractFlexContainer createLiqLl() { - return new LiquidLevelFlexContainer(); + public AbstractFlexContainer createboilr() { + return new BoilerFlexContainer(); } - public AbstractFlexContainerAnnc createLiqLlAnnc() { - return new LiquidLevelFlexContainerAnnc(); + public AbstractFlexContainerAnnc createboilrAnnc() { + return new BoilerFlexContainerAnnc(); } - public AbstractFlexContainer createGrinr() { - return new GrinderFlexContainer(); + public AbstractFlexContainer createbinSh() { + return new BinarySwitchFlexContainer(); } - public AbstractFlexContainerAnnc createGrinrAnnc() { - return new GrinderFlexContainerAnnc(); + public AbstractFlexContainerAnnc createbinShAnnc() { + return new BinarySwitchFlexContainerAnnc(); } - public AbstractFlexContainer createFoamg() { - return new FoamingFlexContainer(); + public AbstractFlexContainer createwatSr() { + return new WaterSensorFlexContainer(); } - public AbstractFlexContainerAnnc createFoamgAnnc() { - return new FoamingFlexContainerAnnc(); + public AbstractFlexContainerAnnc createwatSrAnnc() { + return new WaterSensorFlexContainerAnnc(); } - public AbstractFlexContainer createKeeWm() { - return new KeepWarmFlexContainer(); + public AbstractFlexContainer createacoSr() { + return new AcousticSensorFlexContainer(); } - public AbstractFlexContainerAnnc createKeeWmAnnc() { - return new KeepWarmFlexContainerAnnc(); + public AbstractFlexContainerAnnc createacoSrAnnc() { + return new AcousticSensorFlexContainerAnnc(); } - public AbstractFlexContainer createConSr() { - return new ContactSensorFlexContainer(); + public AbstractFlexContainer createtempe() { + return new TemperatureFlexContainer(); } - public AbstractFlexContainerAnnc createConSrAnnc() { - return new ContactSensorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createtempeAnnc() { + return new TemperatureFlexContainerAnnc(); + } + + public AbstractFlexContainer createdowVe() { + return new DownVolumeFlexContainer(); } - public AbstractFlexContainer createalSer() { - return new AlarmSensorFlexContainer(); + public AbstractFlexContainerAnnc createdowVeAnnc() { + return new DownVolumeFlexContainerAnnc(); } - public AbstractFlexContainerAnnc createalSerAnnc() { - return new AlarmSensorFlexContainerAnnc(); + public AbstractFlexContainer createdeJMe() { + return new DehumidifierJobModeFlexContainer(); } - public AbstractFlexContainer createLock() { - return new LockFlexContainer(); + public AbstractFlexContainerAnnc createdeJMeAnnc() { + return new DehumidifierJobModeFlexContainerAnnc(); } - public AbstractFlexContainerAnnc createLockAnnc() { - return new LockFlexContainerAnnc(); + public AbstractFlexContainer createdevFn() { + return new DeviceFanFlexContainer(); } - public AbstractFlexContainer createAtPSr() { - return new AtmosphericPressureSensorFlexContainer(); + public AbstractFlexContainerAnnc createdevFnAnnc() { + return new DeviceFanFlexContainerAnnc(); } - public AbstractFlexContainerAnnc createAtPSrAnnc() { - return new AtmosphericPressureSensorFlexContainerAnnc(); + public AbstractFlexContainer createclose() { + return new CloseFlexContainer(); } - public AbstractFlexContainer createNoise() { - return new NoiseFlexContainer(); + public AbstractFlexContainerAnnc createcloseAnnc() { + return new CloseFlexContainerAnnc(); } - public AbstractFlexContainerAnnc createNoiseAnnc() { - return new NoiseFlexContainerAnnc(); + public AbstractFlexContainer createdSTBx() { + return new DeviceSetTopBoxFlexContainer(); } - public AbstractFlexContainer createECDSr() { - return new ExtendedCarbonDioxideSensorFlexContainer(); + public AbstractFlexContainerAnnc createdSTBxAnnc() { + return new DeviceSetTopBoxFlexContainerAnnc(); } - public AbstractFlexContainerAnnc createECDSrAnnc() { - return new ExtendedCarbonDioxideSensorFlexContainerAnnc(); + public AbstractFlexContainer createeneCn() { + return new EnergyConsumptionFlexContainer(); } - public AbstractFlexContainer createDeACr() { - return new DeviceAirConditionerFlexContainer(); + public AbstractFlexContainerAnnc createeneCnAnnc() { + return new EnergyConsumptionFlexContainerAnnc(); } - public AbstractFlexContainerAnnc createDeACrAnnc() { - return new DeviceAirConditionerFlexContainerAnnc(); + public AbstractFlexContainer createsphyr() { + return new SphygmomanometerFlexContainer(); + } + + public AbstractFlexContainerAnnc createsphyrAnnc() { + return new SphygmomanometerFlexContainerAnnc(); + } + + public AbstractFlexContainer createdeAPr() { + return new DeviceAirPurifierFlexContainer(); + } + + public AbstractFlexContainerAnnc createdeAPrAnnc() { + return new DeviceAirPurifierFlexContainerAnnc(); + } + + public AbstractFlexContainer createdHRMr() { + return new DeviceHeartRateMonitorFlexContainer(); + } + + public AbstractFlexContainerAnnc createdHRMrAnnc() { + return new DeviceHeartRateMonitorFlexContainerAnnc(); + } + + public AbstractFlexContainer createozoMr() { + return new OzoneMeterFlexContainer(); + } + + public AbstractFlexContainerAnnc createozoMrAnnc() { + return new OzoneMeterFlexContainerAnnc(); + } + + public AbstractFlexContainer createsigSh() { + return new SignalStrengthFlexContainer(); + } + + public AbstractFlexContainerAnnc createsigShAnnc() { + return new SignalStrengthFlexContainerAnnc(); + } + + public AbstractFlexContainer createbinOt() { + return new BinaryObjectFlexContainer(); + } + + public AbstractFlexContainerAnnc createbinOtAnnc() { + return new BinaryObjectFlexContainerAnnc(); } - public AbstractFlexContainer createDeCWr() { + public AbstractFlexContainer createdeCWr() { return new DeviceClothesWasherFlexContainer(); } - public AbstractFlexContainerAnnc createDeCWrAnnc() { + public AbstractFlexContainerAnnc createdeCWrAnnc() { return new DeviceClothesWasherFlexContainerAnnc(); } - public AbstractFlexContainer createDEVCr() { - return new DeviceElectricVehicleChargerFlexContainer(); + public AbstractFlexContainer createtogge() { + return new ToggleFlexContainer(); } - public AbstractFlexContainerAnnc createDEVCrAnnc() { - return new DeviceElectricVehicleChargerFlexContainerAnnc(); + public AbstractFlexContainerAnnc createtoggeAnnc() { + return new ToggleFlexContainerAnnc(); } - public AbstractFlexContainer createDevLt() { - return new DeviceLightFlexContainer(); + public AbstractFlexContainer createdeFPe() { + return new DeviceFoodProbeFlexContainer(); } - public AbstractFlexContainerAnnc createDevLtAnnc() { - return new DeviceLightFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeFPeAnnc() { + return new DeviceFoodProbeFlexContainerAnnc(); } - public AbstractFlexContainer createDevMn() { - return new DeviceMicrogenerationFlexContainer(); + public AbstractFlexContainer createheaZe() { + return new HeatingZoneFlexContainer(); } - public AbstractFlexContainerAnnc createDevMnAnnc() { - return new DeviceMicrogenerationFlexContainerAnnc(); + public AbstractFlexContainerAnnc createheaZeAnnc() { + return new HeatingZoneFlexContainerAnnc(); } - public AbstractFlexContainer createDevOn() { - return new DeviceOvenFlexContainer(); + public AbstractFlexContainer createcall() { + return new CallFlexContainer(); } - public AbstractFlexContainerAnnc createDevOnAnnc() { - return new DeviceOvenFlexContainerAnnc(); + public AbstractFlexContainerAnnc createcallAnnc() { + return new CallFlexContainerAnnc(); } - public AbstractFlexContainer createDevRr() { - return new DeviceRefrigeratorFlexContainer(); + public AbstractFlexContainer createinNVe() { + return new IncrementNumberValueFlexContainer(); } - public AbstractFlexContainerAnnc createDevRrAnnc() { - return new DeviceRefrigeratorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createinNVeAnnc() { + return new IncrementNumberValueFlexContainerAnnc(); } - public AbstractFlexContainer createDeRCr() { - return new DeviceRobotCleanerFlexContainer(); + public AbstractFlexContainer createdCWDr() { + return new DeviceClothesWasherDryerFlexContainer(); } - public AbstractFlexContainerAnnc createDeRCrAnnc() { - return new DeviceRobotCleanerFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdCWDrAnnc() { + return new DeviceClothesWasherDryerFlexContainerAnnc(); + } + + public AbstractFlexContainer createanswr() { + return new AnswerFlexContainer(); } - public AbstractFlexContainer createDSEMr() { + public AbstractFlexContainerAnnc createanswrAnnc() { + return new AnswerFlexContainerAnnc(); + } + + public AbstractFlexContainer createdSEMr() { return new DeviceSmartElectricMeterFlexContainer(); } - public AbstractFlexContainerAnnc createDSEMrAnnc() { + public AbstractFlexContainerAnnc createdSEMrAnnc() { return new DeviceSmartElectricMeterFlexContainerAnnc(); } - public AbstractFlexContainer createDeSBy() { - return new DeviceStorageBatteryFlexContainer(); + public AbstractFlexContainer createthDPr() { + return new ThreeDPrinterFlexContainer(); } - public AbstractFlexContainerAnnc createDeSByAnnc() { - return new DeviceStorageBatteryFlexContainerAnnc(); + public AbstractFlexContainerAnnc createthDPrAnnc() { + return new ThreeDPrinterFlexContainerAnnc(); } - public AbstractFlexContainer createDevTn() { - return new DeviceTelevisionFlexContainer(); + public AbstractFlexContainer createdevPr() { + return new DevicePrinterFlexContainer(); } - public AbstractFlexContainerAnnc createDevTnAnnc() { - return new DeviceTelevisionFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdevPrAnnc() { + return new DevicePrinterFlexContainerAnnc(); } - public AbstractFlexContainer createDevTt() { - return new DeviceThermostatFlexContainer(); + public AbstractFlexContainer createdeWSe() { + return new DeviceWindowShadeFlexContainer(); } - public AbstractFlexContainerAnnc createDevTtAnnc() { - return new DeviceThermostatFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeWSeAnnc() { + return new DeviceWindowShadeFlexContainerAnnc(); } - public AbstractFlexContainer createDeWHr() { - return new DeviceWaterHeaterFlexContainer(); + public AbstractFlexContainer createdeSDr() { + return new DeviceSmokeDetectorFlexContainer(); } - public AbstractFlexContainerAnnc createDeWHrAnnc() { - return new DeviceWaterHeaterFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeSDrAnnc() { + return new DeviceSmokeDetectorFlexContainerAnnc(); } - public AbstractFlexContainer createDevCa() { - return new DeviceCameraFlexContainer(); + public AbstractFlexContainer createdevKe() { + return new DeviceKettleFlexContainer(); } - public AbstractFlexContainerAnnc createDevCaAnnc() { - return new DeviceCameraFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdevKeAnnc() { + return new DeviceKettleFlexContainerAnnc(); } - public AbstractFlexContainer createDeCMe() { - return new DeviceCoffeeMachineFlexContainer(); + public AbstractFlexContainer createpowS0() { + return new PowerSaveFlexContainer(); } - public AbstractFlexContainerAnnc createDeCMeAnnc() { - return new DeviceCoffeeMachineFlexContainerAnnc(); + public AbstractFlexContainerAnnc createpowS0Annc() { + return new PowerSaveFlexContainerAnnc(); } - public AbstractFlexContainer createDeCDr() { - return new DeviceContactDetectorFlexContainer(); + public AbstractFlexContainer createopen() { + return new OpenFlexContainer(); } - public AbstractFlexContainerAnnc createDeCDrAnnc() { - return new DeviceContactDetectorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createopenAnnc() { + return new OpenFlexContainerAnnc(); } - public AbstractFlexContainer createDevDr() { - return new DeviceDoorFlexContainer(); + public AbstractFlexContainer createliqLl() { + return new LiquidLevelFlexContainer(); } - public AbstractFlexContainerAnnc createDevDrAnnc() { - return new DeviceDoorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createliqLlAnnc() { + return new LiquidLevelFlexContainerAnnc(); } - public AbstractFlexContainer createDeFDr() { - return new DeviceFloodDetectorFlexContainer(); + public AbstractFlexContainer createtemAm() { + return new TemperatureAlarmFlexContainer(); } - public AbstractFlexContainerAnnc createDeFDrAnnc() { - return new DeviceFloodDetectorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createtemAmAnnc() { + return new TemperatureAlarmFlexContainerAnnc(); } - public AbstractFlexContainer createDeGVe() { - return new DeviceGasValveFlexContainer(); + public AbstractFlexContainer createcDJMe() { + return new ClothesDryerJobModeFlexContainer(); } - public AbstractFlexContainerAnnc createDeGVeAnnc() { - return new DeviceGasValveFlexContainerAnnc(); + public AbstractFlexContainerAnnc createcDJMeAnnc() { + return new ClothesDryerJobModeFlexContainerAnnc(); } - public AbstractFlexContainer createDeMDr() { - return new DeviceMotionDetectorFlexContainer(); + public AbstractFlexContainer createturbo() { + return new TurboFlexContainer(); } - public AbstractFlexContainerAnnc createDeMDrAnnc() { - return new DeviceMotionDetectorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createturboAnnc() { + return new TurboFlexContainerAnnc(); } - public AbstractFlexContainer createDeSDr() { - return new DeviceSmokeDetectorFlexContainer(); + public AbstractFlexContainer createaCJMe() { + return new AirConJobModeFlexContainer(); } - public AbstractFlexContainerAnnc createDeSDrAnnc() { - return new DeviceSmokeDetectorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createaCJMeAnnc() { + return new AirConJobModeFlexContainerAnnc(); } - public AbstractFlexContainer createDeSEr() { - return new DeviceSmokeExtractorFlexContainer(); + public AbstractFlexContainer createeneGn() { + return new EnergyGenerationFlexContainer(); } - public AbstractFlexContainerAnnc createDeSErAnnc() { - return new DeviceSmokeExtractorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createeneGnAnnc() { + return new EnergyGenerationFlexContainerAnnc(); } - public AbstractFlexContainer createDeSBn() { - return new DeviceSwitchButtonFlexContainer(); + public AbstractFlexContainer createkeypd() { + return new KeypadFlexContainer(); } - public AbstractFlexContainerAnnc createDeSBnAnnc() { - return new DeviceSwitchButtonFlexContainerAnnc(); + public AbstractFlexContainerAnnc createkeypdAnnc() { + return new KeypadFlexContainerAnnc(); } - public AbstractFlexContainer createDeTDr() { - return new DeviceTemperatureDetectorFlexContainer(); + public AbstractFlexContainer createdeDLk() { + return new DeviceDoorLockFlexContainer(); } - public AbstractFlexContainerAnnc createDeTDrAnnc() { - return new DeviceTemperatureDetectorFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeDLkAnnc() { + return new DeviceDoorLockFlexContainerAnnc(); } - public AbstractFlexContainer createDeWDe() { - return new DeviceWarningDeviceFlexContainer(); + public AbstractFlexContainer createdevRr() { + return new DeviceRefrigeratorFlexContainer(); } - public AbstractFlexContainerAnnc createDeWDeAnnc() { - return new DeviceWarningDeviceFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdevRrAnnc() { + return new DeviceRefrigeratorFlexContainerAnnc(); } - public AbstractFlexContainer createDeWVe() { - return new DeviceWaterValveFlexContainer(); + public AbstractFlexContainer createdeSPl() { + return new DeviceSecurityPanelFlexContainer(); } - public AbstractFlexContainerAnnc createDeWVeAnnc() { - return new DeviceWaterValveFlexContainerAnnc(); + public AbstractFlexContainerAnnc createdeSPlAnnc() { + return new DeviceSecurityPanelFlexContainerAnnc(); } - public AbstractFlexContainer createDeWSn() { - return new DeviceWeatherStationFlexContainer(); + public AbstractFlexContainer createhangp() { + return new HangupFlexContainer(); } - public AbstractFlexContainerAnnc createDeWSnAnnc() { - return new DeviceWeatherStationFlexContainerAnnc(); + public AbstractFlexContainerAnnc createhangpAnnc() { + return new HangupFlexContainerAnnc(); + } + + public AbstractFlexContainer createdevLt() { + return new DeviceLightFlexContainer(); + } + + public AbstractFlexContainerAnnc createdevLtAnnc() { + return new DeviceLightFlexContainerAnnc(); + } + + public AbstractFlexContainer createglucr() { + return new GlucometerFlexContainer(); + } + + public AbstractFlexContainerAnnc createglucrAnnc() { + return new GlucometerFlexContainerAnnc(); + } + + public AbstractFlexContainer createdBPMr() { + return new DeviceBloodPressureMonitorFlexContainer(); + } + + public AbstractFlexContainerAnnc createdBPMrAnnc() { + return new DeviceBloodPressureMonitorFlexContainerAnnc(); + } + + public AbstractFlexContainer createreCEe() { + return new RemoteControlEnableFlexContainer(); + } + + public AbstractFlexContainerAnnc createreCEeAnnc() { + return new RemoteControlEnableFlexContainerAnnc(); + } + + public AbstractFlexContainer createdeCDr() { + return new DeviceClothesDryerFlexContainer(); + } + + public AbstractFlexContainerAnnc createdeCDrAnnc() { + return new DeviceClothesDryerFlexContainerAnnc(); + } + + public AbstractFlexContainer createspiLl() { + return new SpinLevelFlexContainer(); + } + + public AbstractFlexContainerAnnc createspiLlAnnc() { + return new SpinLevelFlexContainerAnnc(); + } + + public AbstractFlexContainer createaudVe() { + return new AudioVolumeFlexContainer(); + } + + public AbstractFlexContainerAnnc createaudVeAnnc() { + return new AudioVolumeFlexContainerAnnc(); + } + + public AbstractFlexContainer createfoamg() { + return new FoamingFlexContainer(); + } + + public AbstractFlexContainerAnnc createfoamgAnnc() { + return new FoamingFlexContainerAnnc(); + } + + public AbstractFlexContainer createweigt() { + return new WeightFlexContainer(); + } + + public AbstractFlexContainerAnnc createweigtAnnc() { + return new WeightFlexContainerAnnc(); + } + + public AbstractFlexContainer createclock() { + return new ClockFlexContainer(); + } + + public AbstractFlexContainerAnnc createclockAnnc() { + return new ClockFlexContainerAnnc(); + } + + public AbstractFlexContainer createdevD0() { + return new DeviceDoorFlexContainer(); + } + + public AbstractFlexContainerAnnc createdevD0Annc() { + return new DeviceDoorFlexContainerAnnc(); + } + + public AbstractFlexContainer createcWDJM() { + return new ClothesWasherDryerJobModeFlexContainer(); + } + + public AbstractFlexContainerAnnc createcWDJMAnnc() { + return new ClothesWasherDryerJobModeFlexContainerAnnc(); + } + + public AbstractFlexContainer createdeCMe() { + return new DeviceCoffeeMachineFlexContainer(); + } + + public AbstractFlexContainerAnnc createdeCMeAnnc() { + return new DeviceCoffeeMachineFlexContainerAnnc(); + } + + public AbstractFlexContainer createdevTn() { + return new DeviceTelevisionFlexContainer(); + } + + public AbstractFlexContainerAnnc createdevTnAnnc() { + return new DeviceTelevisionFlexContainerAnnc(); + } + + public AbstractFlexContainer createdeSCt() { + return new DeviceSteamClosetFlexContainer(); + } + + public AbstractFlexContainerAnnc createdeSCtAnnc() { + return new DeviceSteamClosetFlexContainerAnnc(); + } + + public AbstractFlexContainer createpusBn() { + return new PushButtonFlexContainer(); + } + + public AbstractFlexContainerAnnc createpusBnAnnc() { + return new PushButtonFlexContainerAnnc(); + } + + public AbstractFlexContainer createdeNVe() { + return new DecrementNumberValueFlexContainer(); + } + + public AbstractFlexContainerAnnc createdeNVeAnnc() { + return new DecrementNumberValueFlexContainerAnnc(); + } + + public AbstractFlexContainer createcolSn() { + return new ColourSaturationFlexContainer(); + } + + public AbstractFlexContainerAnnc createcolSnAnnc() { + return new ColourSaturationFlexContainerAnnc(); + } + + public AbstractFlexContainer createimpSr() { + return new ImpactSensorFlexContainer(); + } + + public AbstractFlexContainerAnnc createimpSrAnnc() { + return new ImpactSensorFlexContainerAnnc(); + } + + public AbstractFlexContainer createdeRCr() { + return new DeviceRobotCleanerFlexContainer(); + } + + public AbstractFlexContainerAnnc createdeRCrAnnc() { + return new DeviceRobotCleanerFlexContainerAnnc(); + } + + public AbstractFlexContainer createdeACr() { + return new DeviceAirConditionerFlexContainer(); + } + + public AbstractFlexContainerAnnc createdeACrAnnc() { + return new DeviceAirConditionerFlexContainerAnnc(); + } + + public AbstractFlexContainer createtexMe() { + return new TextMessageFlexContainer(); + } + + public AbstractFlexContainerAnnc createtexMeAnnc() { + return new TextMessageFlexContainerAnnc(); + } + + public AbstractFlexContainer createdevCp() { + return new DeviceCooktopFlexContainer(); + } + + public AbstractFlexContainerAnnc createdevCpAnnc() { + return new DeviceCooktopFlexContainerAnnc(); + } + + public AbstractFlexContainer createbEIAs() { + return new BioElectricalImpedanceAnalysisFlexContainer(); + } + + public AbstractFlexContainerAnnc createbEIAsAnnc() { + return new BioElectricalImpedanceAnalysisFlexContainerAnnc(); + } + + public AbstractFlexContainer createdevGr() { + return new DeviceGlucosemeterFlexContainer(); + } + + public AbstractFlexContainerAnnc createdevGrAnnc() { + return new DeviceGlucosemeterFlexContainerAnnc(); + } + + public AbstractFlexContainer createcreds() { + return new CredentialsFlexContainer(); + } + + public AbstractFlexContainerAnnc createcredsAnnc() { + return new CredentialsFlexContainerAnnc(); + } + + public AbstractFlexContainer createhoWSy() { + return new HotWaterSupplyFlexContainer(); + } + + public AbstractFlexContainerAnnc createhoWSyAnnc() { + return new HotWaterSupplyFlexContainerAnnc(); + } + + public AbstractFlexContainer createdTDPr() { + return new DeviceThreeDPrinterFlexContainer(); + } + + public AbstractFlexContainerAnnc createdTDPrAnnc() { + return new DeviceThreeDPrinterFlexContainerAnnc(); + } + + public AbstractFlexContainer createdevOn() { + return new DeviceOvenFlexContainer(); + } + + public AbstractFlexContainerAnnc createdevOnAnnc() { + return new DeviceOvenFlexContainerAnnc(); + } + + public AbstractFlexContainer createpulsr() { + return new PulsemeterFlexContainer(); + } + + public AbstractFlexContainerAnnc createpulsrAnnc() { + return new PulsemeterFlexContainerAnnc(); + } + + public AbstractFlexContainer createaiQSr() { + return new AirQualitySensorFlexContainer(); + } + + public AbstractFlexContainerAnnc createaiQSrAnnc() { + return new AirQualitySensorFlexContainerAnnc(); + } + + public AbstractFlexContainer createwatFw() { + return new WaterFlowFlexContainer(); + } + + public AbstractFlexContainerAnnc createwatFwAnnc() { + return new WaterFlowFlexContainerAnnc(); + } + + public AbstractFlexContainer createtimer() { + return new TimerFlexContainer(); + } + + public AbstractFlexContainerAnnc createtimerAnnc() { + return new TimerFlexContainerAnnc(); + } + + public AbstractFlexContainer createdevFr() { + return new DeviceFreezerFlexContainer(); + } + + public AbstractFlexContainerAnnc createdevFrAnnc() { + return new DeviceFreezerFlexContainerAnnc(); + } + + public AbstractFlexContainer createbrewg() { + return new BrewingFlexContainer(); + } + + public AbstractFlexContainerAnnc createbrewgAnnc() { + return new BrewingFlexContainerAnnc(); + } + + public AbstractFlexContainer createopeMe() { + return new OperationModeFlexContainer(); + } + + public AbstractFlexContainerAnnc createopeMeAnnc() { + return new OperationModeFlexContainerAnnc(); + } + + public AbstractFlexContainer createfauDn() { + return new FaultDetectionFlexContainer(); + } + + public AbstractFlexContainerAnnc createfauDnAnnc() { + return new FaultDetectionFlexContainerAnnc(); + } + + public AbstractFlexContainer createuveSr() { + return new UvSensorFlexContainer(); + } + + public AbstractFlexContainerAnnc createuveSrAnnc() { + return new UvSensorFlexContainerAnnc(); + } + + public AbstractFlexContainer createreTMe() { + return new ResetTextMessageFlexContainer(); + } + + public AbstractFlexContainerAnnc createreTMeAnnc() { + return new ResetTextMessageFlexContainerAnnc(); + } + + public AbstractFlexContainer createnumVe() { + return new NumberValueFlexContainer(); + } + + public AbstractFlexContainerAnnc createnumVeAnnc() { + return new NumberValueFlexContainerAnnc(); + } + + public AbstractFlexContainer createstoDt() { + return new Stop3DprintFlexContainer(); + } + + public AbstractFlexContainerAnnc createstoDtAnnc() { + return new Stop3DprintFlexContainerAnnc(); + } + + public AbstractFlexContainer createrecor() { + return new RecorderFlexContainer(); + } + + public AbstractFlexContainerAnnc createrecorAnnc() { + return new RecorderFlexContainerAnnc(); + } + + public AbstractFlexContainer creategrinr() { + return new GrinderFlexContainer(); + } + + public AbstractFlexContainerAnnc creategrinrAnnc() { + return new GrinderFlexContainerAnnc(); + } + + public AbstractFlexContainer createplaCl() { + return new PlayerControlFlexContainer(); + } + + public AbstractFlexContainerAnnc createplaClAnnc() { + return new PlayerControlFlexContainerAnnc(); + } + + public AbstractFlexContainer createpriQe() { + return new PrintQueueFlexContainer(); + } + + public AbstractFlexContainerAnnc createpriQeAnnc() { + return new PrintQueueFlexContainerAnnc(); + } + + public AbstractFlexContainer createsesDn() { + return new SessionDescriptionFlexContainer(); + } + + public AbstractFlexContainerAnnc createsesDnAnnc() { + return new SessionDescriptionFlexContainerAnnc(); + } + + public AbstractFlexContainer createuphCl() { + return new UpChannelFlexContainer(); + } + + public AbstractFlexContainerAnnc createuphClAnnc() { + return new UpChannelFlexContainerAnnc(); + } + + public AbstractFlexContainer createdMFPr() { + return new DeviceMultiFunctionPrinterFlexContainer(); + } + + public AbstractFlexContainerAnnc createdMFPrAnnc() { + return new DeviceMultiFunctionPrinterFlexContainerAnnc(); + } + + public AbstractFlexContainer createnexTk() { + return new NextTrackFlexContainer(); + } + + public AbstractFlexContainerAnnc createnexTkAnnc() { + return new NextTrackFlexContainerAnnc(); + } + + public AbstractFlexContainer createbaror() { + return new BarometerFlexContainer(); + } + + public AbstractFlexContainerAnnc createbarorAnnc() { + return new BarometerFlexContainerAnnc(); + } + + public AbstractFlexContainer createdeGVe() { + return new DeviceGasValveFlexContainer(); + } + + public AbstractFlexContainerAnnc createdeGVeAnnc() { + return new DeviceGasValveFlexContainerAnnc(); + } + + public AbstractFlexContainer createreNVe() { + return new ResetNumberValueFlexContainer(); + } + + public AbstractFlexContainerAnnc createreNVeAnnc() { + return new ResetNumberValueFlexContainerAnnc(); + } + + public AbstractFlexContainer createcHJMe() { + return new CookerHoodJobModeFlexContainer(); + } + + public AbstractFlexContainerAnnc createcHJMeAnnc() { + return new CookerHoodJobModeFlexContainerAnnc(); + } + + public AbstractFlexContainer createdEVCr() { + return new DeviceElectricVehicleChargerFlexContainer(); + } + + public AbstractFlexContainerAnnc createdEVCrAnnc() { + return new DeviceElectricVehicleChargerFlexContainerAnnc(); + } + + public AbstractFlexContainer createdeTDr() { + return new DeviceTemperatureDetectorFlexContainer(); + } + + public AbstractFlexContainerAnnc createdeTDrAnnc() { + return new DeviceTemperatureDetectorFlexContainerAnnc(); + } + + public AbstractFlexContainer createcolor() { + return new ColourFlexContainer(); + } + + public AbstractFlexContainerAnnc createcolorAnnc() { + return new ColourFlexContainerAnnc(); + } + + public AbstractFlexContainer createdevMn() { + return new DeviceMicrogenerationFlexContainer(); + } + + public AbstractFlexContainerAnnc createdevMnAnnc() { + return new DeviceMicrogenerationFlexContainerAnnc(); + } + + public AbstractFlexContainer createdevSr() { + return new DeviceScannerFlexContainer(); + } + + public AbstractFlexContainerAnnc createdevSrAnnc() { + return new DeviceScannerFlexContainerAnnc(); + } + + public AbstractFlexContainer createbrigs() { + return new BrightnessFlexContainer(); + } + + public AbstractFlexContainerAnnc createbrigsAnnc() { + return new BrightnessFlexContainerAnnc(); + } + + public AbstractFlexContainer createrefrn() { + return new RefrigerationFlexContainer(); + } + + public AbstractFlexContainerAnnc createrefrnAnnc() { + return new RefrigerationFlexContainerAnnc(); + } + + public AbstractFlexContainer createauDFr() { + return new AutoDocumentFeederFlexContainer(); + } + + public AbstractFlexContainerAnnc createauDFrAnnc() { + return new AutoDocumentFeederFlexContainerAnnc(); + } + + public AbstractFlexContainer createtelCl() { + return new TelevisionChannelFlexContainer(); + } + + public AbstractFlexContainerAnnc createtelClAnnc() { + return new TelevisionChannelFlexContainerAnnc(); + } + + public AbstractFlexContainer creategeoLn() { + return new GeoLocationFlexContainer(); + } + + public AbstractFlexContainerAnnc creategeoLnAnnc() { + return new GeoLocationFlexContainerAnnc(); + } + + public AbstractFlexContainer createdHCCT() { + return new DeviceHomeCCTVFlexContainer(); + } + + public AbstractFlexContainerAnnc createdHCCTAnnc() { + return new DeviceHomeCCTVFlexContainerAnnc(); + } + + public AbstractFlexContainer createdooSs() { + return new DoorStatusFlexContainer(); + } + + public AbstractFlexContainerAnnc createdooSsAnnc() { + return new DoorStatusFlexContainerAnnc(); + } + + public AbstractFlexContainer createacCTr() { + return new ActivateClockTimerFlexContainer(); + } + + public AbstractFlexContainerAnnc createacCTrAnnc() { + return new ActivateClockTimerFlexContainerAnnc(); + } + + public AbstractFlexContainer createrelHy() { + return new RelativeHumidityFlexContainer(); + } + + public AbstractFlexContainerAnnc createrelHyAnnc() { + return new RelativeHumidityFlexContainerAnnc(); + } + + public AbstractFlexContainer createsCJMe() { + return new SteamClosetJobModeFlexContainer(); + } + + public AbstractFlexContainerAnnc createsCJMeAnnc() { + return new SteamClosetJobModeFlexContainerAnnc(); + } + + public AbstractFlexContainer createdAQMr() { + return new DeviceAirQualityMonitorFlexContainer(); + } + + public AbstractFlexContainerAnnc createdAQMrAnnc() { + return new DeviceAirQualityMonitorFlexContainerAnnc(); + } + + public AbstractFlexContainer createdeARr() { + return new DeviceAudioReceiverFlexContainer(); + } + + public AbstractFlexContainerAnnc createdeARrAnnc() { + return new DeviceAudioReceiverFlexContainerAnnc(); + } + + public AbstractFlexContainer createanemr() { + return new AnemometerFlexContainer(); + } + + public AbstractFlexContainerAnnc createanemrAnnc() { + return new AnemometerFlexContainerAnnc(); + } + + public AbstractFlexContainer createdevSh() { + return new DeviceSwitchFlexContainer(); + } + + public AbstractFlexContainerAnnc createdevShAnnc() { + return new DeviceSwitchFlexContainerAnnc(); } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenFlexContainer.java new file mode 100644 index 00000000..4f43d8f6 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenFlexContainer.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : Open + +Increase the open level by the amount of the "stepValue" up to the "maxLevel". + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = OpenFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = OpenFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class OpenFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "open"; + public static final String SHORT_NAME = "open"; + + public OpenFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass.openlevel." + OpenFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenFlexContainerAnnc.java new file mode 100644 index 00000000..728e238c --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenFlexContainerAnnc.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : OpenAnnc + +Increase the open level by the amount of the "stepValue" up to the "maxLevel". + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = OpenFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = OpenFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class OpenFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "openAnnc"; + public static final String SHORT_NAME = "openAnnc"; + + public OpenFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass.openlevel." + OpenFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenLevelFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenLevelFlexContainer.java new file mode 100644 index 00000000..058dc4a5 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenLevelFlexContainer.java @@ -0,0 +1,103 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : OpenLevel + +This ModuleClass provides the capabilities to control and monitor the open status of an entity, for example a curtain. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = OpenLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = OpenLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class OpenLevelFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "openLevel"; + public static final String SHORT_NAME = "opeLl"; + + public OpenLevelFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + OpenLevelFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute minLevel = new CustomAttribute(); + minLevel.setLongName("minLevel"); + minLevel.setShortName("minLl"); + minLevel.setType("xs:integer"); + getCustomAttributes().add(minLevel); + CustomAttribute maxLevel = new CustomAttribute(); + maxLevel.setLongName("maxLevel"); + maxLevel.setShortName("maxLl"); + maxLevel.setType("xs:integer"); + getCustomAttributes().add(maxLevel); + CustomAttribute openLevel = new CustomAttribute(); + openLevel.setLongName("openLevel"); + openLevel.setShortName("opeLl"); + openLevel.setType("xs:integer"); + getCustomAttributes().add(openLevel); + CustomAttribute stepValue = new CustomAttribute(); + stepValue.setLongName("stepValue"); + stepValue.setShortName("steVe"); + stepValue.setType("xs:integer"); + getCustomAttributes().add(stepValue); + } + + + @XmlElement(name=OpenFlexContainer.SHORT_NAME, required=true, type=OpenFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenFlexContainer open; + + public OpenFlexContainer getOpen() { + this.open = (OpenFlexContainer) getResourceByName(OpenFlexContainer.SHORT_NAME); + return open; + } + + public void setOpen(OpenFlexContainer newAction) { + this.open = newAction; + getFlexContainerOrContainerOrSubscription().add(open); + } + + @XmlElement(name=CloseFlexContainer.SHORT_NAME, required=true, type=CloseFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private CloseFlexContainer close; + + public CloseFlexContainer getClose() { + this.close = (CloseFlexContainer) getResourceByName(CloseFlexContainer.SHORT_NAME); + return close; + } + + public void setClose(CloseFlexContainer newAction) { + this.close = newAction; + getFlexContainerOrContainerOrSubscription().add(close); + } + + public void finalizeSerialization() { + getOpen(); + getClose(); + } + + public void finalizeDeserialization() { + if (this.open != null) { + setOpen(this.open); + } + if (this.close != null) { + setClose(this.close); + } + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenLevelFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenLevelFlexContainerAnnc.java new file mode 100644 index 00000000..c68c6e94 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OpenLevelFlexContainerAnnc.java @@ -0,0 +1,80 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : OpenLevelAnnc + +This ModuleClass provides the capabilities to control and monitor the open status of an entity, for example a curtain. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = OpenLevelFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = OpenLevelFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class OpenLevelFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "openLevelAnnc"; + public static final String SHORT_NAME = "opeLlAnnc"; + + public OpenLevelFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + OpenLevelFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getOpenAnnc(); + getCloseAnnc(); + } + + public void finalizeDeserialization() { + if (this.openAnnc != null){ + setOpenAnnc(openAnnc); + } + if (this.closeAnnc != null){ + setCloseAnnc(closeAnnc); + } + } + + @XmlElement(name=OpenFlexContainerAnnc.SHORT_NAME, required=true, type=OpenFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private OpenFlexContainerAnnc openAnnc; + + public void setOpenAnnc(OpenFlexContainerAnnc openAnnc) { + this.openAnnc = openAnnc; + getFlexContainerOrContainerOrSubscription().add(openAnnc); + } + + public OpenFlexContainerAnnc getOpenAnnc() { + this.openAnnc = (OpenFlexContainerAnnc) getResourceByName(OpenFlexContainerAnnc.SHORT_NAME); + return openAnnc; + } + @XmlElement(name=CloseFlexContainerAnnc.SHORT_NAME, required=true, type=CloseFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private CloseFlexContainerAnnc closeAnnc; + + public void setCloseAnnc(CloseFlexContainerAnnc closeAnnc) { + this.closeAnnc = closeAnnc; + getFlexContainerOrContainerOrSubscription().add(closeAnnc); + } + + public CloseFlexContainerAnnc getCloseAnnc() { + this.closeAnnc = (CloseFlexContainerAnnc) getResourceByName(CloseFlexContainerAnnc.SHORT_NAME); + return closeAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OperationModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OperationModeFlexContainer.java new file mode 100644 index 00000000..b913dc7c --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OperationModeFlexContainer.java @@ -0,0 +1,53 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : OperationMode + +This ModuleClasses provides capabilities to control or monitor the operation mode of appliances. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = OperationModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = OperationModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class OperationModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "operationMode"; + public static final String SHORT_NAME = "opeMe"; + + public OperationModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + OperationModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute startPause = new CustomAttribute(); + startPause.setLongName("startPause"); + startPause.setShortName("staPe"); + startPause.setType("xs:boolean"); + getCustomAttributes().add(startPause); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OperationModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OperationModeFlexContainerAnnc.java new file mode 100644 index 00000000..949a5884 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OperationModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : OperationModeAnnc + +This ModuleClasses provides capabilities to control or monitor the operation mode of appliances. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = OperationModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = OperationModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class OperationModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "operationModeAnnc"; + public static final String SHORT_NAME = "opeMeAnnc"; + + public OperationModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + OperationModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OvercurrentSensorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OvercurrentSensorFlexContainer.java new file mode 100644 index 00000000..633a8ca9 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OvercurrentSensorFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : OvercurrentSensor + +This ModuleClass provides capabilities for an over-current sensor. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = OvercurrentSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = OvercurrentSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class OvercurrentSensorFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "overcurrentSensor"; + public static final String SHORT_NAME = "oveSr"; + + public OvercurrentSensorFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + OvercurrentSensorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute detectedTime = new CustomAttribute(); + detectedTime.setLongName("detectedTime"); + detectedTime.setShortName("detTe"); + detectedTime.setType("xs:datetime"); + getCustomAttributes().add(detectedTime); + CustomAttribute duration = new CustomAttribute(); + duration.setLongName("duration"); + duration.setShortName("dur"); + duration.setType("xs:float"); + getCustomAttributes().add(duration); + CustomAttribute overcurrentStatus = new CustomAttribute(); + overcurrentStatus.setLongName("overcurrentStatus"); + overcurrentStatus.setShortName("oveSs"); + overcurrentStatus.setType("xs:boolean"); + getCustomAttributes().add(overcurrentStatus); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OvercurrentSensorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OvercurrentSensorFlexContainerAnnc.java new file mode 100644 index 00000000..9eaa221c --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OvercurrentSensorFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : OvercurrentSensorAnnc + +This ModuleClass provides capabilities for an over-current sensor. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = OvercurrentSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = OvercurrentSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class OvercurrentSensorFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "overcurrentSensorAnnc"; + public static final String SHORT_NAME = "oveSrAnnc"; + + public OvercurrentSensorFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + OvercurrentSensorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OximeterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OximeterFlexContainer.java index 4082b25a..20be44a5 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OximeterFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OximeterFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Oximeter -This ModuleClass provides the capability to report the measurement of blood characteristics. +This ModuleClass provides the capability to report the measurement of blood oxygen characteristics. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = OximeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class OximeterFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "oximeter"; public static final String SHORT_NAME = "oximr"; - + public OximeterFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + OximeterFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute oxygenSaturation = new CustomAttribute(); + oxygenSaturation.setLongName("oxygenSaturation"); + oxygenSaturation.setShortName("oxySn"); + oxygenSaturation.setType("xs:integer"); + getCustomAttributes().add(oxygenSaturation); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OximeterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OximeterFlexContainerAnnc.java index 129ab414..6d5a8461 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OximeterFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OximeterFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : OximeterAnnc -This ModuleClass provides the capability to report the measurement of blood characteristics. +This ModuleClass provides the capability to report the measurement of blood oxygen characteristics. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = OximeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class OximeterFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OzoneMeterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OzoneMeterFlexContainer.java new file mode 100644 index 00000000..8762a9eb --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OzoneMeterFlexContainer.java @@ -0,0 +1,68 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : OzoneMeter + +This ModuleClass provides capabilities for an ozone meter. The "ozoneValue?" attributes are optional, but one of them SHALL be provided. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = OzoneMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = OzoneMeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class OzoneMeterFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "ozoneMeter"; + public static final String SHORT_NAME = "ozoMr"; + + public OzoneMeterFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + OzoneMeterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute ozoneValueMG = new CustomAttribute(); + ozoneValueMG.setLongName("ozoneValueMG"); + ozoneValueMG.setShortName("ozVMG"); + ozoneValueMG.setType("xs:float"); + getCustomAttributes().add(ozoneValueMG); + CustomAttribute ozoneStatus = new CustomAttribute(); + ozoneStatus.setLongName("ozoneStatus"); + ozoneStatus.setShortName("ozoSs"); + ozoneStatus.setType("hd:enumOzoneStatus"); + getCustomAttributes().add(ozoneStatus); + CustomAttribute maxValue = new CustomAttribute(); + maxValue.setLongName("maxValue"); + maxValue.setShortName("maxVe"); + maxValue.setType("xs:float"); + getCustomAttributes().add(maxValue); + CustomAttribute ozoneValuePPM = new CustomAttribute(); + ozoneValuePPM.setLongName("ozoneValuePPM"); + ozoneValuePPM.setShortName("oVPPM"); + ozoneValuePPM.setType("xs:float"); + getCustomAttributes().add(ozoneValuePPM); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OzoneMeterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OzoneMeterFlexContainerAnnc.java new file mode 100644 index 00000000..3a0666cc --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/OzoneMeterFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : OzoneMeterAnnc + +This ModuleClass provides capabilities for an ozone meter. The "ozoneValue?" attributes are optional, but one of them SHALL be provided. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = OzoneMeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = OzoneMeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class OzoneMeterFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "ozoneMeterAnnc"; + public static final String SHORT_NAME = "ozoMrAnnc"; + + public OzoneMeterFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + OzoneMeterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PersonSensorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PersonSensorFlexContainer.java index 0dd3997a..93fff213 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PersonSensorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PersonSensorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : PersonSensor -This ModuleClass indicates if a known people has been detected by a camera. +This ModuleClass provides the capabilities for detecting/recognizing people. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = PersonSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class PersonSensorFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "personSensor"; public static final String SHORT_NAME = "perSr"; - + public PersonSensorFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + PersonSensorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute detectedPersons = new CustomAttribute(); + detectedPersons.setLongName("detectedPersons"); + detectedPersons.setShortName("detPs"); + detectedPersons.setType("[xs:string]"); + getCustomAttributes().add(detectedPersons); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PersonSensorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PersonSensorFlexContainerAnnc.java index b5c65422..32f55dd4 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PersonSensorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PersonSensorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : PersonSensorAnnc -This ModuleClass indicates if a known people has been detected by a camera. +This ModuleClass provides the capabilities for detecting/recognizing people. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = PersonSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class PersonSensorFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PhoneCallFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PhoneCallFlexContainer.java new file mode 100644 index 00000000..dff563af --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PhoneCallFlexContainer.java @@ -0,0 +1,115 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : PhoneCall + +This ModuleClass provides the capability get or set the caller and receipient IDs as well as to initate and terminate a call. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = PhoneCallFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = PhoneCallFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class PhoneCallFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "phoneCall"; + public static final String SHORT_NAME = "phoCl"; + + public PhoneCallFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + PhoneCallFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute recipientID = new CustomAttribute(); + recipientID.setLongName("recipientID"); + recipientID.setShortName("recID"); + recipientID.setType("xs:string"); + getCustomAttributes().add(recipientID); + CustomAttribute callerID = new CustomAttribute(); + callerID.setLongName("callerID"); + callerID.setShortName("calID"); + callerID.setType("xs:string"); + getCustomAttributes().add(callerID); + CustomAttribute callState = new CustomAttribute(); + callState.setLongName("callState"); + callState.setShortName("calSe"); + callState.setType("hd:enumCallState"); + getCustomAttributes().add(callState); + } + + + @XmlElement(name=CallFlexContainer.SHORT_NAME, required=true, type=CallFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private CallFlexContainer call; + + public CallFlexContainer getCall() { + this.call = (CallFlexContainer) getResourceByName(CallFlexContainer.SHORT_NAME); + return call; + } + + public void setCall(CallFlexContainer newAction) { + this.call = newAction; + getFlexContainerOrContainerOrSubscription().add(call); + } + + @XmlElement(name=AnswerFlexContainer.SHORT_NAME, required=true, type=AnswerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AnswerFlexContainer answer; + + public AnswerFlexContainer getAnswer() { + this.answer = (AnswerFlexContainer) getResourceByName(AnswerFlexContainer.SHORT_NAME); + return answer; + } + + public void setAnswer(AnswerFlexContainer newAction) { + this.answer = newAction; + getFlexContainerOrContainerOrSubscription().add(answer); + } + + @XmlElement(name=HangupFlexContainer.SHORT_NAME, required=true, type=HangupFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private HangupFlexContainer hangup; + + public HangupFlexContainer getHangup() { + this.hangup = (HangupFlexContainer) getResourceByName(HangupFlexContainer.SHORT_NAME); + return hangup; + } + + public void setHangup(HangupFlexContainer newAction) { + this.hangup = newAction; + getFlexContainerOrContainerOrSubscription().add(hangup); + } + + public void finalizeSerialization() { + getCall(); + getAnswer(); + getHangup(); + } + + public void finalizeDeserialization() { + if (this.call != null) { + setCall(this.call); + } + if (this.answer != null) { + setAnswer(this.answer); + } + if (this.hangup != null) { + setHangup(this.hangup); + } + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PhoneCallFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PhoneCallFlexContainerAnnc.java new file mode 100644 index 00000000..09823784 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PhoneCallFlexContainerAnnc.java @@ -0,0 +1,96 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : PhoneCallAnnc + +This ModuleClass provides the capability get or set the caller and receipient IDs as well as to initate and terminate a call. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = PhoneCallFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = PhoneCallFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class PhoneCallFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "phoneCallAnnc"; + public static final String SHORT_NAME = "phoClAnnc"; + + public PhoneCallFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + PhoneCallFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getCallAnnc(); + getAnswerAnnc(); + getHangupAnnc(); + } + + public void finalizeDeserialization() { + if (this.callAnnc != null){ + setCallAnnc(callAnnc); + } + if (this.answerAnnc != null){ + setAnswerAnnc(answerAnnc); + } + if (this.hangupAnnc != null){ + setHangupAnnc(hangupAnnc); + } + } + + @XmlElement(name=CallFlexContainerAnnc.SHORT_NAME, required=true, type=CallFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private CallFlexContainerAnnc callAnnc; + + public void setCallAnnc(CallFlexContainerAnnc callAnnc) { + this.callAnnc = callAnnc; + getFlexContainerOrContainerOrSubscription().add(callAnnc); + } + + public CallFlexContainerAnnc getCallAnnc() { + this.callAnnc = (CallFlexContainerAnnc) getResourceByName(CallFlexContainerAnnc.SHORT_NAME); + return callAnnc; + } + @XmlElement(name=AnswerFlexContainerAnnc.SHORT_NAME, required=true, type=AnswerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private AnswerFlexContainerAnnc answerAnnc; + + public void setAnswerAnnc(AnswerFlexContainerAnnc answerAnnc) { + this.answerAnnc = answerAnnc; + getFlexContainerOrContainerOrSubscription().add(answerAnnc); + } + + public AnswerFlexContainerAnnc getAnswerAnnc() { + this.answerAnnc = (AnswerFlexContainerAnnc) getResourceByName(AnswerFlexContainerAnnc.SHORT_NAME); + return answerAnnc; + } + @XmlElement(name=HangupFlexContainerAnnc.SHORT_NAME, required=true, type=HangupFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private HangupFlexContainerAnnc hangupAnnc; + + public void setHangupAnnc(HangupFlexContainerAnnc hangupAnnc) { + this.hangupAnnc = hangupAnnc; + getFlexContainerOrContainerOrSubscription().add(hangupAnnc); + } + + public HangupFlexContainerAnnc getHangupAnnc() { + this.hangupAnnc = (HangupFlexContainerAnnc) getResourceByName(HangupFlexContainerAnnc.SHORT_NAME); + return hangupAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PlayerControlFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PlayerControlFlexContainer.java new file mode 100644 index 00000000..87351f58 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PlayerControlFlexContainer.java @@ -0,0 +1,103 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : PlayerControl + +This ModuleClass provides capabilities to control and monitor the operational modes of a media player functionality. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = PlayerControlFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = PlayerControlFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class PlayerControlFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "playerControl"; + public static final String SHORT_NAME = "plaCl"; + + public PlayerControlFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + PlayerControlFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentPlayerModeName = new CustomAttribute(); + currentPlayerModeName.setLongName("currentPlayerModeName"); + currentPlayerModeName.setShortName("cPMNe"); + currentPlayerModeName.setType("xs:string"); + getCustomAttributes().add(currentPlayerModeName); + CustomAttribute speedFactor = new CustomAttribute(); + speedFactor.setLongName("speedFactor"); + speedFactor.setShortName("speFr"); + speedFactor.setType("xs:float"); + getCustomAttributes().add(speedFactor); + CustomAttribute currentPlayerMode = new CustomAttribute(); + currentPlayerMode.setLongName("currentPlayerMode"); + currentPlayerMode.setShortName("cuPMe"); + currentPlayerMode.setType("hd:enumPlayerMode"); + getCustomAttributes().add(currentPlayerMode); + CustomAttribute supportedPlayerModes = new CustomAttribute(); + supportedPlayerModes.setLongName("supportedPlayerModes"); + supportedPlayerModes.setShortName("suPMs"); + supportedPlayerModes.setType("[hd:enumPlayerMode]"); + getCustomAttributes().add(supportedPlayerModes); + } + + + @XmlElement(name=NextTrackFlexContainer.SHORT_NAME, required=true, type=NextTrackFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private NextTrackFlexContainer nextTrack; + + public NextTrackFlexContainer getNextTrack() { + this.nextTrack = (NextTrackFlexContainer) getResourceByName(NextTrackFlexContainer.SHORT_NAME); + return nextTrack; + } + + public void setNextTrack(NextTrackFlexContainer newAction) { + this.nextTrack = newAction; + getFlexContainerOrContainerOrSubscription().add(nextTrack); + } + + @XmlElement(name=PreviousTrackFlexContainer.SHORT_NAME, required=true, type=PreviousTrackFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PreviousTrackFlexContainer previousTrack; + + public PreviousTrackFlexContainer getPreviousTrack() { + this.previousTrack = (PreviousTrackFlexContainer) getResourceByName(PreviousTrackFlexContainer.SHORT_NAME); + return previousTrack; + } + + public void setPreviousTrack(PreviousTrackFlexContainer newAction) { + this.previousTrack = newAction; + getFlexContainerOrContainerOrSubscription().add(previousTrack); + } + + public void finalizeSerialization() { + getNextTrack(); + getPreviousTrack(); + } + + public void finalizeDeserialization() { + if (this.nextTrack != null) { + setNextTrack(this.nextTrack); + } + if (this.previousTrack != null) { + setPreviousTrack(this.previousTrack); + } + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PlayerControlFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PlayerControlFlexContainerAnnc.java new file mode 100644 index 00000000..52500cf4 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PlayerControlFlexContainerAnnc.java @@ -0,0 +1,80 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : PlayerControlAnnc + +This ModuleClass provides capabilities to control and monitor the operational modes of a media player functionality. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = PlayerControlFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = PlayerControlFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class PlayerControlFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "playerControlAnnc"; + public static final String SHORT_NAME = "plaClAnnc"; + + public PlayerControlFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + PlayerControlFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getNextTrackAnnc(); + getPreviousTrackAnnc(); + } + + public void finalizeDeserialization() { + if (this.nextTrackAnnc != null){ + setNextTrackAnnc(nextTrackAnnc); + } + if (this.previousTrackAnnc != null){ + setPreviousTrackAnnc(previousTrackAnnc); + } + } + + @XmlElement(name=NextTrackFlexContainerAnnc.SHORT_NAME, required=true, type=NextTrackFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private NextTrackFlexContainerAnnc nextTrackAnnc; + + public void setNextTrackAnnc(NextTrackFlexContainerAnnc nextTrackAnnc) { + this.nextTrackAnnc = nextTrackAnnc; + getFlexContainerOrContainerOrSubscription().add(nextTrackAnnc); + } + + public NextTrackFlexContainerAnnc getNextTrackAnnc() { + this.nextTrackAnnc = (NextTrackFlexContainerAnnc) getResourceByName(NextTrackFlexContainerAnnc.SHORT_NAME); + return nextTrackAnnc; + } + @XmlElement(name=PreviousTrackFlexContainerAnnc.SHORT_NAME, required=true, type=PreviousTrackFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private PreviousTrackFlexContainerAnnc previousTrackAnnc; + + public void setPreviousTrackAnnc(PreviousTrackFlexContainerAnnc previousTrackAnnc) { + this.previousTrackAnnc = previousTrackAnnc; + getFlexContainerOrContainerOrSubscription().add(previousTrackAnnc); + } + + public PreviousTrackFlexContainerAnnc getPreviousTrackAnnc() { + this.previousTrackAnnc = (PreviousTrackFlexContainerAnnc) getResourceByName(PreviousTrackFlexContainerAnnc.SHORT_NAME); + return previousTrackAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PowerSaveFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PowerSaveFlexContainer.java index 38c48654..a3b9dbc0 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PowerSaveFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PowerSaveFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : PowerSave -This ModuleClass provides capabilities to enable power saving mode and monitor the current status. +This ModuleClass provides capabilities to enable the power saving mode of a device and monitor the current status. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = PowerSaveFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -31,18 +30,24 @@ import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; public class PowerSaveFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "powerSave"; - public static final String SHORT_NAME = "powSe"; - + public static final String SHORT_NAME = "powS0"; + public PowerSaveFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + PowerSaveFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute powerSaveEnabled = new CustomAttribute(); + powerSaveEnabled.setLongName("powerSaveEnabled"); + powerSaveEnabled.setShortName("poSEd"); + powerSaveEnabled.setType("xs:boolean"); + getCustomAttributes().add(powerSaveEnabled); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PowerSaveFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PowerSaveFlexContainerAnnc.java index ef1a00da..64b4c026 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PowerSaveFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PowerSaveFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : PowerSaveAnnc -This ModuleClass provides capabilities to enable power saving mode and monitor the current status. +This ModuleClass provides capabilities to enable the power saving mode of a device and monitor the current status. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = PowerSaveFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -31,18 +29,19 @@ import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; public class PowerSaveFlexContainerAnnc extends AbstractFlexContainerAnnc { public static final String LONG_NAME = "powerSaveAnnc"; - public static final String SHORT_NAME = "powSeAnnc"; + public static final String SHORT_NAME = "powS0Annc"; public PowerSaveFlexContainerAnnc () { setContainerDefinition("org.onem2m.home.moduleclass." + PowerSaveFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PreviousTrackFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PreviousTrackFlexContainer.java new file mode 100644 index 00000000..17fdb76a --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PreviousTrackFlexContainer.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : PreviousTrack + +Go back to a previous chapter, section or similar marker in the media. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = PreviousTrackFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = PreviousTrackFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class PreviousTrackFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "previousTrack"; + public static final String SHORT_NAME = "preTk"; + + public PreviousTrackFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass.playercontrol." + PreviousTrackFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PreviousTrackFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PreviousTrackFlexContainerAnnc.java new file mode 100644 index 00000000..6011d11e --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PreviousTrackFlexContainerAnnc.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : PreviousTrackAnnc + +Go back to a previous chapter, section or similar marker in the media. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = PreviousTrackFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = PreviousTrackFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class PreviousTrackFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "previousTrackAnnc"; + public static final String SHORT_NAME = "preTkAnnc"; + + public PreviousTrackFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass.playercontrol." + PreviousTrackFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PrintQueueFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PrintQueueFlexContainer.java new file mode 100644 index 00000000..4d674208 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PrintQueueFlexContainer.java @@ -0,0 +1,58 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : PrintQueue + +This ModuleClass provides the capabilities for monitoring printing list information. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = PrintQueueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = PrintQueueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class PrintQueueFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "printQueue"; + public static final String SHORT_NAME = "priQe"; + + public PrintQueueFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + PrintQueueFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute printingState = new CustomAttribute(); + printingState.setLongName("printingState"); + printingState.setShortName("priSe"); + printingState.setType("[hd:enumJobState]"); + getCustomAttributes().add(printingState); + CustomAttribute uri = new CustomAttribute(); + uri.setLongName("uri"); + uri.setShortName("ur0"); + uri.setType("[xs:uri]"); + getCustomAttributes().add(uri); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PrintQueueFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PrintQueueFlexContainerAnnc.java new file mode 100644 index 00000000..0afb12b6 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PrintQueueFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : PrintQueueAnnc + +This ModuleClass provides the capabilities for monitoring printing list information. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = PrintQueueFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = PrintQueueFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class PrintQueueFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "printQueueAnnc"; + public static final String SHORT_NAME = "priQeAnnc"; + + public PrintQueueFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + PrintQueueFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PulsemeterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PulsemeterFlexContainer.java new file mode 100644 index 00000000..00350d46 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PulsemeterFlexContainer.java @@ -0,0 +1,68 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : Pulsemeter + +This ModuleClass provides the capability to report the measurement of pulse characteristics. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = PulsemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = PulsemeterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class PulsemeterFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "pulsemeter"; + public static final String SHORT_NAME = "pulsr"; + + public PulsemeterFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + PulsemeterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute rr = new CustomAttribute(); + rr.setLongName("rr"); + rr.setShortName("r0"); + rr.setType("xs:float"); + getCustomAttributes().add(rr); + CustomAttribute modality = new CustomAttribute(); + modality.setLongName("modality"); + modality.setShortName("moday"); + modality.setType("xs:string"); + getCustomAttributes().add(modality); + CustomAttribute pulseRate = new CustomAttribute(); + pulseRate.setLongName("pulseRate"); + pulseRate.setShortName("pulRe"); + pulseRate.setType("xs:float"); + getCustomAttributes().add(pulseRate); + CustomAttribute energy = new CustomAttribute(); + energy.setLongName("energy"); + energy.setShortName("enery"); + energy.setType("xs:float"); + getCustomAttributes().add(energy); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PulsemeterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PulsemeterFlexContainerAnnc.java new file mode 100644 index 00000000..d78aaa26 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PulsemeterFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : PulsemeterAnnc + +This ModuleClass provides the capability to report the measurement of pulse characteristics. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = PulsemeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = PulsemeterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class PulsemeterFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "pulsemeterAnnc"; + public static final String SHORT_NAME = "pulsrAnnc"; + + public PulsemeterFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + PulsemeterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PushButtonFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PushButtonFlexContainer.java index 9ad7a3f4..f27b3a0f 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PushButtonFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PushButtonFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : PushButton -This ModuleClass provides the capability to indicate the operation of a button style switch. A typical application can be an SOS button. +This ModuleClass provides the capability to indicate the operation of a button style switch. A typical application can be an SOS button. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = PushButtonFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class PushButtonFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "pushButton"; public static final String SHORT_NAME = "pusBn"; - + public PushButtonFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + PushButtonFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute pushed = new CustomAttribute(); + pushed.setLongName("pushed"); + pushed.setShortName("pushd"); + pushed.setType("xs:boolean"); + getCustomAttributes().add(pushed); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PushButtonFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PushButtonFlexContainerAnnc.java index 10a44f5c..fb1db0ff 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PushButtonFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/PushButtonFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : PushButtonAnnc -This ModuleClass provides the capability to indicate the operation of a button style switch. A typical application can be an SOS button. +This ModuleClass provides the capability to indicate the operation of a button style switch. A typical application can be an SOS button. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = PushButtonFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class PushButtonFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RecorderFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RecorderFlexContainer.java index e6e549c1..6020d88e 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RecorderFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RecorderFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Recorder -This ModuleClass provides the capability to record the video/audio for a defined duration. +This ModuleClass provides the capability to record the video/audio for a defined duration. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = RecorderFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class RecorderFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "recorder"; public static final String SHORT_NAME = "recor"; - + public RecorderFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + RecorderFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute duration = new CustomAttribute(); + duration.setLongName("duration"); + duration.setShortName("dur"); + duration.setType("xs:integer"); + getCustomAttributes().add(duration); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RecorderFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RecorderFlexContainerAnnc.java index f2964365..25233a46 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RecorderFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RecorderFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : RecorderAnnc -This ModuleClass provides the capability to record the video/audio for a defined duration. +This ModuleClass provides the capability to record the video/audio for a defined duration. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = RecorderFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class RecorderFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RefrigerationFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RefrigerationFlexContainer.java index 7396fc2a..59527de3 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RefrigerationFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RefrigerationFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Refrigeration -This ModuleClass describes a refrigeration function. This is not a Refrigerator device. The filter state is a read-only value providing the percentage life time remaining for the water filter. RapidFreeze is a boolean that controls the rapid freeze capability if present. RapidCool is a boolean that controls the rapid cool capability if present. Defrost is a boolean that controls the defrost cycle if present. +This ModuleClass provides capabilities for a refrigeration function. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = RefrigerationFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,33 @@ public class RefrigerationFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "refrigeration"; public static final String SHORT_NAME = "refrn"; - + public RefrigerationFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + RefrigerationFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute rapidCool = new CustomAttribute(); + rapidCool.setLongName("rapidCool"); + rapidCool.setShortName("rapCl"); + rapidCool.setType("xs:boolean"); + getCustomAttributes().add(rapidCool); + CustomAttribute defrost = new CustomAttribute(); + defrost.setLongName("defrost"); + defrost.setShortName("defrt"); + defrost.setType("xs:boolean"); + getCustomAttributes().add(defrost); + CustomAttribute rapidFreeze = new CustomAttribute(); + rapidFreeze.setLongName("rapidFreeze"); + rapidFreeze.setShortName("rapFe"); + rapidFreeze.setType("xs:boolean"); + getCustomAttributes().add(rapidFreeze); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RefrigerationFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RefrigerationFlexContainerAnnc.java index 24e8cd33..f4e2cc2f 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RefrigerationFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RefrigerationFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : RefrigerationAnnc -This ModuleClass describes a refrigeration function. This is not a Refrigerator device. The filter state is a read-only value providing the percentage life time remaining for the water filter. RapidFreeze is a boolean that controls the rapid freeze capability if present. RapidCool is a boolean that controls the rapid cool capability if present. Defrost is a boolean that controls the defrost cycle if present. +This ModuleClass provides capabilities for a refrigeration function. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = RefrigerationFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class RefrigerationFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RelativeHumidityFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RelativeHumidityFlexContainer.java index 84eccfe4..a5c64bcf 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RelativeHumidityFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RelativeHumidityFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : RelativeHumidity -This ModuleClass provides the capability for the device to report the humidity based on a specified rule that is vendor discretionary. +This ModuleClass provides the capability for the device to report the humidity based on a specified rule that is vendor dependent. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = RelativeHumidityFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,28 @@ public class RelativeHumidityFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "relativeHumidity"; public static final String SHORT_NAME = "relHy"; - + public RelativeHumidityFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + RelativeHumidityFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute relativeHumidity = new CustomAttribute(); + relativeHumidity.setLongName("relativeHumidity"); + relativeHumidity.setShortName("relHy"); + relativeHumidity.setType("xs:float"); + getCustomAttributes().add(relativeHumidity); + CustomAttribute desiredHumidity = new CustomAttribute(); + desiredHumidity.setLongName("desiredHumidity"); + desiredHumidity.setShortName("desHy"); + desiredHumidity.setType("xs:float"); + getCustomAttributes().add(desiredHumidity); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RelativeHumidityFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RelativeHumidityFlexContainerAnnc.java index 91b2c3af..8103bdc4 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RelativeHumidityFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RelativeHumidityFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : RelativeHumidityAnnc -This ModuleClass provides the capability for the device to report the humidity based on a specified rule that is vendor discretionary. +This ModuleClass provides the capability for the device to report the humidity based on a specified rule that is vendor dependent. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = RelativeHumidityFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class RelativeHumidityFlexContainerAnnc extends AbstractFlexContainerAnnc setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RemoteControlEnableFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RemoteControlEnableFlexContainer.java new file mode 100644 index 00000000..46b4be83 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RemoteControlEnableFlexContainer.java @@ -0,0 +1,53 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : RemoteControlEnable + +This ModuleClasses provides capabilities to monitor the remote controllability of the appliance. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = RemoteControlEnableFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = RemoteControlEnableFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class RemoteControlEnableFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "remoteControlEnable"; + public static final String SHORT_NAME = "reCEe"; + + public RemoteControlEnableFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + RemoteControlEnableFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute remoteControlEnabled = new CustomAttribute(); + remoteControlEnabled.setLongName("remoteControlEnabled"); + remoteControlEnabled.setShortName("reCEd"); + remoteControlEnabled.setType("xs:boolean"); + getCustomAttributes().add(remoteControlEnabled); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RemoteControlEnableFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RemoteControlEnableFlexContainerAnnc.java new file mode 100644 index 00000000..c0f0378a --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RemoteControlEnableFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : RemoteControlEnableAnnc + +This ModuleClasses provides capabilities to monitor the remote controllability of the appliance. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = RemoteControlEnableFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = RemoteControlEnableFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class RemoteControlEnableFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "remoteControlEnableAnnc"; + public static final String SHORT_NAME = "reCEeAnnc"; + + public RemoteControlEnableFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + RemoteControlEnableFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetNumberValueFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetNumberValueFlexContainer.java index f4ec17ce..63cc9aa9 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetNumberValueFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetNumberValueFlexContainer.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : resetNumberValue +Action : ResetNumberValue Reset the "numberValue" to its "defaultValue". -Created: 2017-09-28 17:26:40 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = ResetNumberValueFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class ResetNumberValueFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetNumberValueFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetNumberValueFlexContainerAnnc.java index 40389c9c..79f8f27c 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetNumberValueFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetNumberValueFlexContainerAnnc.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : resetNumberValue +Action : ResetNumberValueAnnc Reset the "numberValue" to its "defaultValue". -Created: 2017-09-28 17:26:40 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = ResetNumberValueFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class ResetNumberValueFlexContainerAnnc extends AbstractFlexContainerAnnc setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } - -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetTextMessageFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetTextMessageFlexContainer.java new file mode 100644 index 00000000..75a01937 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetTextMessageFlexContainer.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : ResetTextMessage + +Reset the receiver of the message to the "defaultValue". + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = ResetTextMessageFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ResetTextMessageFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ResetTextMessageFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "resetTextMessage"; + public static final String SHORT_NAME = "reTMe"; + + public ResetTextMessageFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass.textmessage." + ResetTextMessageFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetTextMessageFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetTextMessageFlexContainerAnnc.java new file mode 100644 index 00000000..c71259cf --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ResetTextMessageFlexContainerAnnc.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : ResetTextMessageAnnc + +Reset the receiver of the message to the "defaultValue". + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = ResetTextMessageFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ResetTextMessageFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ResetTextMessageFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "resetTextMessageAnnc"; + public static final String SHORT_NAME = "reTMeAnnc"; + + public ResetTextMessageFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass.textmessage." + ResetTextMessageFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RobotCleanerJobModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RobotCleanerJobModeFlexContainer.java new file mode 100644 index 00000000..b288fc18 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RobotCleanerJobModeFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : RobotCleanerJobMode + +This ModuleClasses provides capabilities to control and monitor the job modes of a robotCleaner. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = RobotCleanerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = RobotCleanerJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class RobotCleanerJobModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "robotCleanerJobMode"; + public static final String SHORT_NAME = "rCJMe"; + + public RobotCleanerJobModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + RobotCleanerJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentJobModeName = new CustomAttribute(); + currentJobModeName.setLongName("currentJobModeName"); + currentJobModeName.setShortName("cJMNe"); + currentJobModeName.setType("xs:string"); + getCustomAttributes().add(currentJobModeName); + CustomAttribute currentJobMode = new CustomAttribute(); + currentJobMode.setLongName("currentJobMode"); + currentJobMode.setShortName("cuJMe"); + currentJobMode.setType("hd:enumRobotCleanerJobMode"); + getCustomAttributes().add(currentJobMode); + CustomAttribute jobModes = new CustomAttribute(); + jobModes.setLongName("jobModes"); + jobModes.setShortName("jobMs"); + jobModes.setType("[hd:enumRobotCleanerJobMode]"); + getCustomAttributes().add(jobModes); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RobotCleanerJobModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RobotCleanerJobModeFlexContainerAnnc.java new file mode 100644 index 00000000..dfc676ee --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RobotCleanerJobModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : RobotCleanerJobModeAnnc + +This ModuleClasses provides capabilities to control and monitor the job modes of a robotCleaner. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = RobotCleanerJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = RobotCleanerJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class RobotCleanerJobModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "robotCleanerJobModeAnnc"; + public static final String SHORT_NAME = "rCJMeAnnc"; + + public RobotCleanerJobModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + RobotCleanerJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RunStateFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RunStateFlexContainer.java new file mode 100644 index 00000000..1f9f0137 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RunStateFlexContainer.java @@ -0,0 +1,73 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : RunState + +This ModuleClasses provides capabilities to control and the monitor machine state of appliances. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = RunStateFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = RunStateFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class RunStateFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "runState"; + public static final String SHORT_NAME = "runSe"; + + public RunStateFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + RunStateFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute machineStates = new CustomAttribute(); + machineStates.setLongName("machineStates"); + machineStates.setShortName("macSs"); + machineStates.setType("[hd:enumMachineState]"); + getCustomAttributes().add(machineStates); + CustomAttribute jobStates = new CustomAttribute(); + jobStates.setLongName("jobStates"); + jobStates.setShortName("jobSs"); + jobStates.setType("[hd:enumJobState]"); + getCustomAttributes().add(jobStates); + CustomAttribute currentMachineState = new CustomAttribute(); + currentMachineState.setLongName("currentMachineState"); + currentMachineState.setShortName("cuMSe"); + currentMachineState.setType("hd:enumMachineState"); + getCustomAttributes().add(currentMachineState); + CustomAttribute currentJobState = new CustomAttribute(); + currentJobState.setLongName("currentJobState"); + currentJobState.setShortName("cuJSe"); + currentJobState.setType("hd:enumJobState"); + getCustomAttributes().add(currentJobState); + CustomAttribute progressPercentage = new CustomAttribute(); + progressPercentage.setLongName("progressPercentage"); + progressPercentage.setShortName("proPe"); + progressPercentage.setType("xs:float"); + getCustomAttributes().add(progressPercentage); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RunStateFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RunStateFlexContainerAnnc.java new file mode 100644 index 00000000..a121ef75 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/RunStateFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : RunStateAnnc + +This ModuleClasses provides capabilities to control and the monitor machine state of appliances. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = RunStateFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = RunStateFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class RunStateFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "runStateAnnc"; + public static final String SHORT_NAME = "runSeAnnc"; + + public RunStateFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + RunStateFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SecurityModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SecurityModeFlexContainer.java new file mode 100644 index 00000000..1acd4c77 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SecurityModeFlexContainer.java @@ -0,0 +1,58 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : SecurityMode + +This ModuleClasses provides capabilities to control and monitor a security mode. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = SecurityModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = SecurityModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class SecurityModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "securityMode"; + public static final String SHORT_NAME = "secMe"; + + public SecurityModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + SecurityModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentSecurityMode = new CustomAttribute(); + currentSecurityMode.setLongName("currentSecurityMode"); + currentSecurityMode.setShortName("cuSMe"); + currentSecurityMode.setType("hd:enumSecurityMode"); + getCustomAttributes().add(currentSecurityMode); + CustomAttribute securityModes = new CustomAttribute(); + securityModes.setLongName("securityModes"); + securityModes.setShortName("secMs"); + securityModes.setType("[hd:enumSecurityMode]"); + getCustomAttributes().add(securityModes); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SecurityModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SecurityModeFlexContainerAnnc.java new file mode 100644 index 00000000..aaed0b34 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SecurityModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : SecurityModeAnnc + +This ModuleClasses provides capabilities to control and monitor a security mode. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = SecurityModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = SecurityModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class SecurityModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "securityModeAnnc"; + public static final String SHORT_NAME = "secMeAnnc"; + + public SecurityModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + SecurityModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SessionDescriptionFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SessionDescriptionFlexContainer.java new file mode 100644 index 00000000..ac408b02 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SessionDescriptionFlexContainer.java @@ -0,0 +1,58 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : SessionDescription + +This ModuleClass provides the capabilities for a sessionDescription containing a URL at twhich the specified media can be accessed and the definition of media using SDP. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = SessionDescriptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = SessionDescriptionFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class SessionDescriptionFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "sessionDescription"; + public static final String SHORT_NAME = "sesDn"; + + public SessionDescriptionFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + SessionDescriptionFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute url = new CustomAttribute(); + url.setLongName("url"); + url.setShortName("ur1"); + url.setType("xs:uri"); + getCustomAttributes().add(url); + CustomAttribute sdp = new CustomAttribute(); + sdp.setLongName("sdp"); + sdp.setShortName("sdp"); + sdp.setType("xs:string"); + getCustomAttributes().add(sdp); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SessionDescriptionFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SessionDescriptionFlexContainerAnnc.java new file mode 100644 index 00000000..5a0a7581 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SessionDescriptionFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : SessionDescriptionAnnc + +This ModuleClass provides the capabilities for a sessionDescription containing a URL at twhich the specified media can be accessed and the definition of media using SDP. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = SessionDescriptionFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = SessionDescriptionFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class SessionDescriptionFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "sessionDescriptionAnnc"; + public static final String SHORT_NAME = "sesDnAnnc"; + + public SessionDescriptionFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + SessionDescriptionFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SignalStrengthFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SignalStrengthFlexContainer.java index 61467690..3e00c802 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SignalStrengthFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SignalStrengthFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : SignalStrength -This ModuleClass provides the capability to monitor the strength of the signal. +This ModuleClass provides the capability to monitor the strength of the signal. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = SignalStrengthFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,28 @@ public class SignalStrengthFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "signalStrength"; public static final String SHORT_NAME = "sigSh"; - + public SignalStrengthFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + SignalStrengthFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute rssi = new CustomAttribute(); + rssi.setLongName("rssi"); + rssi.setShortName("rssi"); + rssi.setType("xs:float"); + getCustomAttributes().add(rssi); + CustomAttribute lqi = new CustomAttribute(); + lqi.setLongName("lqi"); + lqi.setShortName("lqi"); + lqi.setType("xs:integer"); + getCustomAttributes().add(lqi); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SignalStrengthFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SignalStrengthFlexContainerAnnc.java index 05d59df6..e4eb0987 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SignalStrengthFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SignalStrengthFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : SignalStrengthAnnc -This ModuleClass provides the capability to monitor the strength of the signal. +This ModuleClass provides the capability to monitor the strength of the signal. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = SignalStrengthFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class SignalStrengthFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SmokeSensorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SmokeSensorFlexContainer.java index abd26c66..2e3399a9 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SmokeSensorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SmokeSensorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : SmokeSensor -This ModuleClass provides the capabilities to indicate the detection of smoke and raises an alarm if triggering criterion is met. +This ModuleClass provides the capabilities to indicate the detection of smoke and raising an alarm if the triggering criterion is met. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = SmokeSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,38 @@ public class SmokeSensorFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "smokeSensor"; public static final String SHORT_NAME = "smoSr"; - + public SmokeSensorFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + SmokeSensorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute detectedTime = new CustomAttribute(); + detectedTime.setLongName("detectedTime"); + detectedTime.setShortName("detTe"); + detectedTime.setType("xs:datetime"); + getCustomAttributes().add(detectedTime); + CustomAttribute alarm = new CustomAttribute(); + alarm.setLongName("alarm"); + alarm.setShortName("alarm"); + alarm.setType("xs:boolean"); + getCustomAttributes().add(alarm); + CustomAttribute smokeThreshhold = new CustomAttribute(); + smokeThreshhold.setLongName("smokeThreshhold"); + smokeThreshhold.setShortName("smoTd"); + smokeThreshhold.setType("xs:integer"); + getCustomAttributes().add(smokeThreshhold); + CustomAttribute currentValue = new CustomAttribute(); + currentValue.setLongName("currentValue"); + currentValue.setShortName("crv"); + currentValue.setType("xs:integer"); + getCustomAttributes().add(currentValue); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SmokeSensorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SmokeSensorFlexContainerAnnc.java index 2f97ffeb..4b7178f1 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SmokeSensorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SmokeSensorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : SmokeSensorAnnc -This ModuleClass provides the capabilities to indicate the detection of smoke and raises an alarm if triggering criterion is met. +This ModuleClass provides the capabilities to indicate the detection of smoke and raising an alarm if the triggering criterion is met. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:53 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = SmokeSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class SmokeSensorFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SphygmomanometerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SphygmomanometerFlexContainer.java new file mode 100644 index 00000000..ad933504 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SphygmomanometerFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : Sphygmomanometer + +This ModuleClass provides the capability to report the measurement of blood pressure characteristics. + +Created: 2018-06-29 17:19:53 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = SphygmomanometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = SphygmomanometerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class SphygmomanometerFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "sphygmomanometer"; + public static final String SHORT_NAME = "sphyr"; + + public SphygmomanometerFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + SphygmomanometerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute diastolicPressure = new CustomAttribute(); + diastolicPressure.setLongName("diastolicPressure"); + diastolicPressure.setShortName("diaPe"); + diastolicPressure.setType("xs:float"); + getCustomAttributes().add(diastolicPressure); + CustomAttribute meanPressure = new CustomAttribute(); + meanPressure.setLongName("meanPressure"); + meanPressure.setShortName("meaPe"); + meanPressure.setType("xs:float"); + getCustomAttributes().add(meanPressure); + CustomAttribute systolicPressure = new CustomAttribute(); + systolicPressure.setLongName("systolicPressure"); + systolicPressure.setShortName("sysPe"); + systolicPressure.setType("xs:float"); + getCustomAttributes().add(systolicPressure); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SphygmomanometerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SphygmomanometerFlexContainerAnnc.java new file mode 100644 index 00000000..03b0c03c --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SphygmomanometerFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : SphygmomanometerAnnc + +This ModuleClass provides the capability to report the measurement of blood pressure characteristics. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = SphygmomanometerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = SphygmomanometerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class SphygmomanometerFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "sphygmomanometerAnnc"; + public static final String SHORT_NAME = "sphyrAnnc"; + + public SphygmomanometerFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + SphygmomanometerFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SpinLevelFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SpinLevelFlexContainer.java index 98a82925..b84229eb 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SpinLevelFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SpinLevelFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : SpinLevel -This ModuleClass provides capabilities to control and monitor the level of spin. It is intended to be part of objects which use spinning function such as a washing machine and a dryer. +This ModuleClass provides capabilities to control and monitor the level of spin. It is intended to be part of devices which use spinning function such as a washing machine and a dryer. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = SpinLevelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class SpinLevelFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "spinLevel"; public static final String SHORT_NAME = "spiLl"; - + public SpinLevelFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + SpinLevelFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute spinLevelStrength = new CustomAttribute(); + spinLevelStrength.setLongName("spinLevelStrength"); + spinLevelStrength.setShortName("spLSh"); + spinLevelStrength.setType("hd:enumSpinLevelStrength"); + getCustomAttributes().add(spinLevelStrength); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SpinLevelFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SpinLevelFlexContainerAnnc.java index c6a23682..428a10f4 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SpinLevelFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SpinLevelFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : SpinLevelAnnc -This ModuleClass provides capabilities to control and monitor the level of spin. It is intended to be part of objects which use spinning function such as a washing machine and a dryer. +This ModuleClass provides capabilities to control and monitor the level of spin. It is intended to be part of devices which use spinning function such as a washing machine and a dryer. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = SpinLevelFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class SpinLevelFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Start3DprintFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Start3DprintFlexContainer.java new file mode 100644 index 00000000..775a41a8 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Start3DprintFlexContainer.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : Start3Dprint + +Start 3D printing. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = Start3DprintFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = Start3DprintFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class Start3DprintFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "start3Dprint"; + public static final String SHORT_NAME = "staDt"; + + public Start3DprintFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass.threedprinter." + Start3DprintFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Start3DprintFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Start3DprintFlexContainerAnnc.java new file mode 100644 index 00000000..20ea19b7 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Start3DprintFlexContainerAnnc.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : Start3DprintAnnc + +Start 3D printing. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = Start3DprintFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = Start3DprintFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class Start3DprintFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "start3DprintAnnc"; + public static final String SHORT_NAME = "staDtAnnc"; + + public Start3DprintFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass.threedprinter." + Start3DprintFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SteamClosetJobModeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SteamClosetJobModeFlexContainer.java new file mode 100644 index 00000000..b991ea0b --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SteamClosetJobModeFlexContainer.java @@ -0,0 +1,63 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : SteamClosetJobMode + +This ModuleClasses provides capabilities to control and monitor the job modes of steamCloset. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = SteamClosetJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = SteamClosetJobModeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class SteamClosetJobModeFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "steamClosetJobMode"; + public static final String SHORT_NAME = "sCJMe"; + + public SteamClosetJobModeFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + SteamClosetJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute currentJobModeName = new CustomAttribute(); + currentJobModeName.setLongName("currentJobModeName"); + currentJobModeName.setShortName("cJMNe"); + currentJobModeName.setType("xs:string"); + getCustomAttributes().add(currentJobModeName); + CustomAttribute currentJobMode = new CustomAttribute(); + currentJobMode.setLongName("currentJobMode"); + currentJobMode.setShortName("cuJMe"); + currentJobMode.setType("hd:enumSteamClosetJobMode"); + getCustomAttributes().add(currentJobMode); + CustomAttribute jobModes = new CustomAttribute(); + jobModes.setLongName("jobModes"); + jobModes.setShortName("jobMs"); + jobModes.setType("[hd:enumSteamClosetJobMode]"); + getCustomAttributes().add(jobModes); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SteamClosetJobModeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SteamClosetJobModeFlexContainerAnnc.java new file mode 100644 index 00000000..4ea53f2d --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/SteamClosetJobModeFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : SteamClosetJobModeAnnc + +This ModuleClasses provides capabilities to control and monitor the job modes of steamCloset. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = SteamClosetJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = SteamClosetJobModeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class SteamClosetJobModeFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "steamClosetJobModeAnnc"; + public static final String SHORT_NAME = "sCJMeAnnc"; + + public SteamClosetJobModeFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + SteamClosetJobModeFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Stop3DprintFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Stop3DprintFlexContainer.java new file mode 100644 index 00000000..31d7305c --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Stop3DprintFlexContainer.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : Stop3Dprint + +Stop 3D printing. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; + +@XmlRootElement(name = Stop3DprintFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = Stop3DprintFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class Stop3DprintFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "stop3Dprint"; + public static final String SHORT_NAME = "stoDt"; + + public Stop3DprintFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass.threedprinter." + Stop3DprintFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Stop3DprintFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Stop3DprintFlexContainerAnnc.java new file mode 100644 index 00000000..508795a8 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/Stop3DprintFlexContainerAnnc.java @@ -0,0 +1,46 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +Action : Stop3DprintAnnc + +Stop 3D printing. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = Stop3DprintFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = Stop3DprintFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class Stop3DprintFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "stop3DprintAnnc"; + public static final String SHORT_NAME = "stoDtAnnc"; + + public Stop3DprintFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass.threedprinter." + Stop3DprintFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TelevisionChannelFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TelevisionChannelFlexContainer.java index 0233240a..2417876d 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TelevisionChannelFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TelevisionChannelFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ ModuleClass : TelevisionChannel -This ModuleClass provides capabilities to set and get channels of a device that has a channel list. +This ModuleClass provides capabilities to set and get channels of a device that has a channel list. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,9 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = TelevisionChannelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,53 +32,72 @@ public class TelevisionChannelFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "televisionChannel"; public static final String SHORT_NAME = "telCl"; - + public TelevisionChannelFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + TelevisionChannelFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute previousChannel = new CustomAttribute(); + previousChannel.setLongName("previousChannel"); + previousChannel.setShortName("preCl"); + previousChannel.setType("xs:integer"); + getCustomAttributes().add(previousChannel); + CustomAttribute availableChannels = new CustomAttribute(); + availableChannels.setLongName("availableChannels"); + availableChannels.setShortName("avaCs"); + availableChannels.setType("[xs:integer]"); + getCustomAttributes().add(availableChannels); + CustomAttribute channelName = new CustomAttribute(); + channelName.setLongName("channelName"); + channelName.setShortName("chaNe"); + channelName.setType("xs:string"); + getCustomAttributes().add(channelName); + CustomAttribute channelId = new CustomAttribute(); + channelId.setLongName("channelId"); + channelId.setShortName("chaId"); + channelId.setType("xs:integer"); + getCustomAttributes().add(channelId); } - - public void finalizeSerialization() { - getUpChannel(); - getDownChannel(); - } - - public void finalizeDeserialization() { - if (this.upChannel != null) { - setUpChannel(upChannel); - } - if (this.downChannel != null) { - setDownChannel(downChannel); - } - } - + + @XmlElement(name=UpChannelFlexContainer.SHORT_NAME, required=true, type=UpChannelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private UpChannelFlexContainer upChannel; - - public void setUpChannel(UpChannelFlexContainer upChannel) { - this.upChannel = upChannel; - getFlexContainerOrContainerOrSubscription().add(upChannel); - } - public UpChannelFlexContainer getUpChannel() { this.upChannel = (UpChannelFlexContainer) getResourceByName(UpChannelFlexContainer.SHORT_NAME); return upChannel; } + public void setUpChannel(UpChannelFlexContainer newAction) { + this.upChannel = newAction; + getFlexContainerOrContainerOrSubscription().add(upChannel); + } + @XmlElement(name=DownChannelFlexContainer.SHORT_NAME, required=true, type=DownChannelFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private DownChannelFlexContainer downChannel; + public DownChannelFlexContainer getDownChannel() { + this.downChannel = (DownChannelFlexContainer) getResourceByName(DownChannelFlexContainer.SHORT_NAME); + return downChannel; + } - public void setDownChannel(DownChannelFlexContainer downChannel) { - this.downChannel = downChannel; + public void setDownChannel(DownChannelFlexContainer newAction) { + this.downChannel = newAction; getFlexContainerOrContainerOrSubscription().add(downChannel); } + + public void finalizeSerialization() { + getUpChannel(); + getDownChannel(); + } - public DownChannelFlexContainer getDownChannel() { - this.downChannel = (DownChannelFlexContainer) getResourceByName(DownChannelFlexContainer.SHORT_NAME); - return downChannel; + public void finalizeDeserialization() { + if (this.upChannel != null) { + setUpChannel(this.upChannel); + } + if (this.downChannel != null) { + setDownChannel(this.downChannel); + } } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TelevisionChannelFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TelevisionChannelFlexContainerAnnc.java index 91e7bc5c..73c391fb 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TelevisionChannelFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TelevisionChannelFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ ModuleClass : TelevisionChannelAnnc -This ModuleClass provides capabilities to set and get channels of a device that has a channel list. +This ModuleClass provides capabilities to set and get channels of a device that has a channel list. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = TelevisionChannelFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,24 +37,23 @@ public class TelevisionChannelFlexContainerAnnc extends AbstractFlexContainerAnn setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { - getUpChannelAnnc(); - getDownChannelAnnc(); + getUpChannelAnnc(); + getDownChannelAnnc(); } public void finalizeDeserialization() { - if (this.upChannelAnnc != null) { - setUpChannelAnnc(upChannelAnnc); + if (this.upChannelAnnc != null){ + setUpChannelAnnc(upChannelAnnc); } - if (this.downChannelAnnc != null) { - setDownChannelAnnc(downChannelAnnc); + if (this.downChannelAnnc != null){ + setDownChannelAnnc(downChannelAnnc); } } @XmlElement(name=UpChannelFlexContainerAnnc.SHORT_NAME, required=true, type=UpChannelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private UpChannelFlexContainerAnnc upChannelAnnc; - + private UpChannelFlexContainerAnnc upChannelAnnc; public void setUpChannelAnnc(UpChannelFlexContainerAnnc upChannelAnnc) { this.upChannelAnnc = upChannelAnnc; @@ -66,10 +64,8 @@ public class TelevisionChannelFlexContainerAnnc extends AbstractFlexContainerAnn this.upChannelAnnc = (UpChannelFlexContainerAnnc) getResourceByName(UpChannelFlexContainerAnnc.SHORT_NAME); return upChannelAnnc; } - @XmlElement(name=DownChannelFlexContainerAnnc.SHORT_NAME, required=true, type=DownChannelFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private DownChannelFlexContainerAnnc downChannelAnnc; - + private DownChannelFlexContainerAnnc downChannelAnnc; public void setDownChannelAnnc(DownChannelFlexContainerAnnc downChannelAnnc) { this.downChannelAnnc = downChannelAnnc; @@ -81,4 +77,4 @@ public class TelevisionChannelFlexContainerAnnc extends AbstractFlexContainerAnn return downChannelAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureAlarmFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureAlarmFlexContainer.java index f07f6b15..83d6b341 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureAlarmFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureAlarmFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : TemperatureAlarm -This ModuleClass provides the capabilities to indicates the detection of abnormal temperatures and raies an alarm if the triggering criterion is met. +This ModuleClass provides the capabilities to indicate the detection of abnormal temperatures and raises an alarm if the triggering criterion is met. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = TemperatureAlarmFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,33 @@ public class TemperatureAlarmFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "temperatureAlarm"; public static final String SHORT_NAME = "temAm"; - + public TemperatureAlarmFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + TemperatureAlarmFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute alarm = new CustomAttribute(); + alarm.setLongName("alarm"); + alarm.setShortName("alarm"); + alarm.setType("xs:boolean"); + getCustomAttributes().add(alarm); + CustomAttribute temperature = new CustomAttribute(); + temperature.setLongName("temperature"); + temperature.setShortName("tempe"); + temperature.setType("xs:float"); + getCustomAttributes().add(temperature); + CustomAttribute temperatureThreshhold = new CustomAttribute(); + temperatureThreshhold.setLongName("temperatureThreshhold"); + temperatureThreshhold.setShortName("temTd"); + temperatureThreshhold.setType("xs:integer"); + getCustomAttributes().add(temperatureThreshhold); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureAlarmFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureAlarmFlexContainerAnnc.java index 9575dfdb..f9748584 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureAlarmFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureAlarmFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : TemperatureAlarmAnnc -This ModuleClass provides the capabilities to indicates the detection of abnormal temperatures and raies an alarm if the triggering criterion is met. +This ModuleClass provides the capabilities to indicate the detection of abnormal temperatures and raises an alarm if the triggering criterion is met. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = TemperatureAlarmFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class TemperatureAlarmFlexContainerAnnc extends AbstractFlexContainerAnnc setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureFlexContainer.java index b1b2d659..7abec372 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Temperature -This ModuleClass provides capabilities to represent the current temperature and target temperature of devices such as an air conditioner, refrigerator, oven and etc. +This ModuleClass provides capabilities to represent the current temperature and target temperature of devices such as an air conditioner, refrigerator, oven and etc. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = TemperatureFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,48 @@ public class TemperatureFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "temperature"; public static final String SHORT_NAME = "tempe"; - + public TemperatureFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + TemperatureFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute currentTemperature = new CustomAttribute(); + currentTemperature.setLongName("currentTemperature"); + currentTemperature.setShortName("curT0"); + currentTemperature.setType("xs:float"); + getCustomAttributes().add(currentTemperature); + CustomAttribute unit = new CustomAttribute(); + unit.setLongName("unit"); + unit.setShortName("unit"); + unit.setType("xs:string"); + getCustomAttributes().add(unit); + CustomAttribute minValue = new CustomAttribute(); + minValue.setLongName("minValue"); + minValue.setShortName("minVe"); + minValue.setType("xs:float"); + getCustomAttributes().add(minValue); + CustomAttribute targetTemperature = new CustomAttribute(); + targetTemperature.setLongName("targetTemperature"); + targetTemperature.setShortName("tarTe"); + targetTemperature.setType("xs:float"); + getCustomAttributes().add(targetTemperature); + CustomAttribute maxValue = new CustomAttribute(); + maxValue.setLongName("maxValue"); + maxValue.setShortName("maxVe"); + maxValue.setType("xs:float"); + getCustomAttributes().add(maxValue); + CustomAttribute stepValue = new CustomAttribute(); + stepValue.setLongName("stepValue"); + stepValue.setShortName("steVe"); + stepValue.setType("xs:float"); + getCustomAttributes().add(stepValue); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureFlexContainerAnnc.java index 32c6d6c9..c7450c94 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TemperatureFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : TemperatureAnnc -This ModuleClass provides capabilities to represent the current temperature and target temperature of devices such as an air conditioner, refrigerator, oven and etc. +This ModuleClass provides capabilities to represent the current temperature and target temperature of devices such as an air conditioner, refrigerator, oven and etc. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = TemperatureFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class TemperatureFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TextMessageFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TextMessageFlexContainer.java new file mode 100644 index 00000000..9d2ae72f --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TextMessageFlexContainer.java @@ -0,0 +1,96 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : TextMessage + +This ModuleClass provides capabilities to set and get a text message. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = TextMessageFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = TextMessageFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class TextMessageFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "textMessage"; + public static final String SHORT_NAME = "texMe"; + + public TextMessageFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + TextMessageFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute textMessage = new CustomAttribute(); + textMessage.setLongName("textMessage"); + textMessage.setShortName("texMe"); + textMessage.setType("xs:string"); + getCustomAttributes().add(textMessage); + CustomAttribute defaultValue = new CustomAttribute(); + defaultValue.setLongName("defaultValue"); + defaultValue.setShortName("defVe"); + defaultValue.setType("xs:string"); + getCustomAttributes().add(defaultValue); + CustomAttribute minLength = new CustomAttribute(); + minLength.setLongName("minLength"); + minLength.setShortName("minLh"); + minLength.setType("xs:integer"); + getCustomAttributes().add(minLength); + CustomAttribute messageEncoding = new CustomAttribute(); + messageEncoding.setLongName("messageEncoding"); + messageEncoding.setShortName("mesEg"); + messageEncoding.setType("xs:string"); + getCustomAttributes().add(messageEncoding); + CustomAttribute supportedMessageValues = new CustomAttribute(); + supportedMessageValues.setLongName("supportedMessageValues"); + supportedMessageValues.setShortName("suMVs"); + supportedMessageValues.setType("[xs:string]"); + getCustomAttributes().add(supportedMessageValues); + CustomAttribute maxLength = new CustomAttribute(); + maxLength.setLongName("maxLength"); + maxLength.setShortName("maxLh"); + maxLength.setType("xs:integer"); + getCustomAttributes().add(maxLength); + } + + + @XmlElement(name=ResetTextMessageFlexContainer.SHORT_NAME, required=true, type=ResetTextMessageFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ResetTextMessageFlexContainer resetTextMessage; + + public ResetTextMessageFlexContainer getResetTextMessage() { + this.resetTextMessage = (ResetTextMessageFlexContainer) getResourceByName(ResetTextMessageFlexContainer.SHORT_NAME); + return resetTextMessage; + } + + public void setResetTextMessage(ResetTextMessageFlexContainer newAction) { + this.resetTextMessage = newAction; + getFlexContainerOrContainerOrSubscription().add(resetTextMessage); + } + + public void finalizeSerialization() { + getResetTextMessage(); + } + + public void finalizeDeserialization() { + if (this.resetTextMessage != null) { + setResetTextMessage(this.resetTextMessage); + } + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TextMessageFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TextMessageFlexContainerAnnc.java new file mode 100644 index 00000000..7304664d --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TextMessageFlexContainerAnnc.java @@ -0,0 +1,64 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : TextMessageAnnc + +This ModuleClass provides capabilities to set and get a text message. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = TextMessageFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = TextMessageFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class TextMessageFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "textMessageAnnc"; + public static final String SHORT_NAME = "texMeAnnc"; + + public TextMessageFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + TextMessageFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getResetTextMessageAnnc(); + } + + public void finalizeDeserialization() { + if (this.resetTextMessageAnnc != null){ + setResetTextMessageAnnc(resetTextMessageAnnc); + } + } + + @XmlElement(name=ResetTextMessageFlexContainerAnnc.SHORT_NAME, required=true, type=ResetTextMessageFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private ResetTextMessageFlexContainerAnnc resetTextMessageAnnc; + + public void setResetTextMessageAnnc(ResetTextMessageFlexContainerAnnc resetTextMessageAnnc) { + this.resetTextMessageAnnc = resetTextMessageAnnc; + getFlexContainerOrContainerOrSubscription().add(resetTextMessageAnnc); + } + + public ResetTextMessageFlexContainerAnnc getResetTextMessageAnnc() { + this.resetTextMessageAnnc = (ResetTextMessageFlexContainerAnnc) getResourceByName(ResetTextMessageFlexContainerAnnc.SHORT_NAME); + return resetTextMessageAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ThreeDPrinterFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ThreeDPrinterFlexContainer.java new file mode 100644 index 00000000..461c4de2 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ThreeDPrinterFlexContainer.java @@ -0,0 +1,113 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ThreeDPrinter + +This ModuleClass describes capabilities of a 3D printer. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = ThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ThreeDPrinterFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ThreeDPrinterFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "threeDPrinter"; + public static final String SHORT_NAME = "thDPr"; + + public ThreeDPrinterFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + ThreeDPrinterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute printSizeY = new CustomAttribute(); + printSizeY.setLongName("printSizeY"); + printSizeY.setShortName("priSY"); + printSizeY.setType("xs:float"); + getCustomAttributes().add(printSizeY); + CustomAttribute printType = new CustomAttribute(); + printType.setLongName("printType"); + printType.setShortName("priTe"); + printType.setType("hd:enum3DPrinterTechnology"); + getCustomAttributes().add(printType); + CustomAttribute printSizeX = new CustomAttribute(); + printSizeX.setLongName("printSizeX"); + printSizeX.setShortName("priSX"); + printSizeX.setType("xs:float"); + getCustomAttributes().add(printSizeX); + CustomAttribute memorySize = new CustomAttribute(); + memorySize.setLongName("memorySize"); + memorySize.setShortName("memSe"); + memorySize.setType("xs:float"); + getCustomAttributes().add(memorySize); + CustomAttribute printSizeZ = new CustomAttribute(); + printSizeZ.setLongName("printSizeZ"); + printSizeZ.setShortName("priSZ"); + printSizeZ.setType("xs:float"); + getCustomAttributes().add(printSizeZ); + CustomAttribute network = new CustomAttribute(); + network.setLongName("network"); + network.setShortName("netwk"); + network.setType("xs:boolean"); + getCustomAttributes().add(network); + } + + + @XmlElement(name=Start3DprintFlexContainer.SHORT_NAME, required=true, type=Start3DprintFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private Start3DprintFlexContainer start3Dprint; + + public Start3DprintFlexContainer getStart3Dprint() { + this.start3Dprint = (Start3DprintFlexContainer) getResourceByName(Start3DprintFlexContainer.SHORT_NAME); + return start3Dprint; + } + + public void setStart3Dprint(Start3DprintFlexContainer newAction) { + this.start3Dprint = newAction; + getFlexContainerOrContainerOrSubscription().add(start3Dprint); + } + + @XmlElement(name=Stop3DprintFlexContainer.SHORT_NAME, required=true, type=Stop3DprintFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private Stop3DprintFlexContainer stop3Dprint; + + public Stop3DprintFlexContainer getStop3Dprint() { + this.stop3Dprint = (Stop3DprintFlexContainer) getResourceByName(Stop3DprintFlexContainer.SHORT_NAME); + return stop3Dprint; + } + + public void setStop3Dprint(Stop3DprintFlexContainer newAction) { + this.stop3Dprint = newAction; + getFlexContainerOrContainerOrSubscription().add(stop3Dprint); + } + + public void finalizeSerialization() { + getStart3Dprint(); + getStop3Dprint(); + } + + public void finalizeDeserialization() { + if (this.start3Dprint != null) { + setStart3Dprint(this.start3Dprint); + } + if (this.stop3Dprint != null) { + setStop3Dprint(this.stop3Dprint); + } + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ThreeDPrinterFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ThreeDPrinterFlexContainerAnnc.java new file mode 100644 index 00000000..99b48b1c --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ThreeDPrinterFlexContainerAnnc.java @@ -0,0 +1,80 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : ThreeDPrinterAnnc + +This ModuleClass describes capabilities of a 3D printer. + +Created: 2018-06-29 17:19:51 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = ThreeDPrinterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = ThreeDPrinterFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class ThreeDPrinterFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "threeDPrinterAnnc"; + public static final String SHORT_NAME = "thDPrAnnc"; + + public ThreeDPrinterFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + ThreeDPrinterFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + getStart3DprintAnnc(); + getStop3DprintAnnc(); + } + + public void finalizeDeserialization() { + if (this.start3DprintAnnc != null){ + setStart3DprintAnnc(start3DprintAnnc); + } + if (this.stop3DprintAnnc != null){ + setStop3DprintAnnc(stop3DprintAnnc); + } + } + + @XmlElement(name=Start3DprintFlexContainerAnnc.SHORT_NAME, required=true, type=Start3DprintFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private Start3DprintFlexContainerAnnc start3DprintAnnc; + + public void setStart3DprintAnnc(Start3DprintFlexContainerAnnc start3DprintAnnc) { + this.start3DprintAnnc = start3DprintAnnc; + getFlexContainerOrContainerOrSubscription().add(start3DprintAnnc); + } + + public Start3DprintFlexContainerAnnc getStart3DprintAnnc() { + this.start3DprintAnnc = (Start3DprintFlexContainerAnnc) getResourceByName(Start3DprintFlexContainerAnnc.SHORT_NAME); + return start3DprintAnnc; + } + @XmlElement(name=Stop3DprintFlexContainerAnnc.SHORT_NAME, required=true, type=Stop3DprintFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") + private Stop3DprintFlexContainerAnnc stop3DprintAnnc; + + public void setStop3DprintAnnc(Stop3DprintFlexContainerAnnc stop3DprintAnnc) { + this.stop3DprintAnnc = stop3DprintAnnc; + getFlexContainerOrContainerOrSubscription().add(stop3DprintAnnc); + } + + public Stop3DprintFlexContainerAnnc getStop3DprintAnnc() { + this.stop3DprintAnnc = (Stop3DprintFlexContainerAnnc) getResourceByName(Stop3DprintFlexContainerAnnc.SHORT_NAME); + return stop3DprintAnnc; + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TimerFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TimerFlexContainer.java index 0299d290..435dd01a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TimerFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TimerFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ ModuleClass : Timer -This ModuleClass provides capabilities to monitor and control the times when the appliance executes its operations (i.e. when it starts, when it ends). +This ModuleClass provides capabilities to monitor and control the times when the appliance executes its operations, that means when it starts, when it ends etc. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,9 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = TimerFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,53 +32,92 @@ public class TimerFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "timer"; public static final String SHORT_NAME = "timer"; - + public TimerFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + TimerFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute absoluteStartTime = new CustomAttribute(); + absoluteStartTime.setLongName("absoluteStartTime"); + absoluteStartTime.setShortName("abSTe"); + absoluteStartTime.setType("xs:datetime"); + getCustomAttributes().add(absoluteStartTime); + CustomAttribute targetTimeToStop = new CustomAttribute(); + targetTimeToStop.setLongName("targetTimeToStop"); + targetTimeToStop.setShortName("tTTSp"); + targetTimeToStop.setType("xs:integer"); + getCustomAttributes().add(targetTimeToStop); + CustomAttribute estimatedTimeToEnd = new CustomAttribute(); + estimatedTimeToEnd.setLongName("estimatedTimeToEnd"); + estimatedTimeToEnd.setShortName("eTTEd"); + estimatedTimeToEnd.setType("xs:integer"); + getCustomAttributes().add(estimatedTimeToEnd); + CustomAttribute absoluteStopTime = new CustomAttribute(); + absoluteStopTime.setLongName("absoluteStopTime"); + absoluteStopTime.setShortName("abST0"); + absoluteStopTime.setType("xs:datetime"); + getCustomAttributes().add(absoluteStopTime); + CustomAttribute targetTimeToStart = new CustomAttribute(); + targetTimeToStart.setLongName("targetTimeToStart"); + targetTimeToStart.setShortName("tTTSt"); + targetTimeToStart.setType("xs:integer"); + getCustomAttributes().add(targetTimeToStart); + CustomAttribute referenceTimer = new CustomAttribute(); + referenceTimer.setLongName("referenceTimer"); + referenceTimer.setShortName("refTr"); + referenceTimer.setType("xs:integer"); + getCustomAttributes().add(referenceTimer); + CustomAttribute targetDuration = new CustomAttribute(); + targetDuration.setLongName("targetDuration"); + targetDuration.setShortName("tarDn"); + targetDuration.setType("xs:integer"); + getCustomAttributes().add(targetDuration); + CustomAttribute runningTime = new CustomAttribute(); + runningTime.setLongName("runningTime"); + runningTime.setShortName("runTe"); + runningTime.setType("xs:integer"); + getCustomAttributes().add(runningTime); } - - public void finalizeSerialization() { - getActivateClockTimer(); - getDeactivateClockTimer(); - } - - public void finalizeDeserialization() { - if (this.activateClockTimer != null) { - setActivateClockTimer(activateClockTimer); - } - if (this.deactivateClockTimer != null) { - setDeactivateClockTimer(deactivateClockTimer); - } - } - + + @XmlElement(name=ActivateClockTimerFlexContainer.SHORT_NAME, required=true, type=ActivateClockTimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private ActivateClockTimerFlexContainer activateClockTimer; - - public void setActivateClockTimer(ActivateClockTimerFlexContainer activateClockTimer) { - this.activateClockTimer = activateClockTimer; - getFlexContainerOrContainerOrSubscription().add(activateClockTimer); - } - public ActivateClockTimerFlexContainer getActivateClockTimer() { this.activateClockTimer = (ActivateClockTimerFlexContainer) getResourceByName(ActivateClockTimerFlexContainer.SHORT_NAME); return activateClockTimer; } + public void setActivateClockTimer(ActivateClockTimerFlexContainer newAction) { + this.activateClockTimer = newAction; + getFlexContainerOrContainerOrSubscription().add(activateClockTimer); + } + @XmlElement(name=DeactivateClockTimerFlexContainer.SHORT_NAME, required=true, type=DeactivateClockTimerFlexContainer.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") private DeactivateClockTimerFlexContainer deactivateClockTimer; + public DeactivateClockTimerFlexContainer getDeactivateClockTimer() { + this.deactivateClockTimer = (DeactivateClockTimerFlexContainer) getResourceByName(DeactivateClockTimerFlexContainer.SHORT_NAME); + return deactivateClockTimer; + } - public void setDeactivateClockTimer(DeactivateClockTimerFlexContainer deactivateClockTimer) { - this.deactivateClockTimer = deactivateClockTimer; + public void setDeactivateClockTimer(DeactivateClockTimerFlexContainer newAction) { + this.deactivateClockTimer = newAction; getFlexContainerOrContainerOrSubscription().add(deactivateClockTimer); } + + public void finalizeSerialization() { + getActivateClockTimer(); + getDeactivateClockTimer(); + } - public DeactivateClockTimerFlexContainer getDeactivateClockTimer() { - this.deactivateClockTimer = (DeactivateClockTimerFlexContainer) getResourceByName(DeactivateClockTimerFlexContainer.SHORT_NAME); - return deactivateClockTimer; + public void finalizeDeserialization() { + if (this.activateClockTimer != null) { + setActivateClockTimer(this.activateClockTimer); + } + if (this.deactivateClockTimer != null) { + setDeactivateClockTimer(this.deactivateClockTimer); + } } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TimerFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TimerFlexContainerAnnc.java index ea838a56..40e14a6a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TimerFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TimerFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,9 +9,9 @@ ModuleClass : TimerAnnc -This ModuleClass provides capabilities to monitor and control the times when the appliance executes its operations (i.e. when it starts, when it ends). +This ModuleClass provides capabilities to monitor and control the times when the appliance executes its operations, that means when it starts, when it ends etc. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; @@ -21,9 +21,8 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = TimerFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,24 +37,23 @@ public class TimerFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { - getActivateClockTimerAnnc(); - getDeactivateClockTimerAnnc(); + getActivateClockTimerAnnc(); + getDeactivateClockTimerAnnc(); } public void finalizeDeserialization() { - if (this.activateClockTimerAnnc != null) { - setActivateClockTimerAnnc(activateClockTimerAnnc); + if (this.activateClockTimerAnnc != null){ + setActivateClockTimerAnnc(activateClockTimerAnnc); } - if (this.deactivateClockTimerAnnc != null) { - setDeactivateClockTimerAnnc(deactivateClockTimerAnnc); + if (this.deactivateClockTimerAnnc != null){ + setDeactivateClockTimerAnnc(deactivateClockTimerAnnc); } } @XmlElement(name=ActivateClockTimerFlexContainerAnnc.SHORT_NAME, required=true, type=ActivateClockTimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private ActivateClockTimerFlexContainerAnnc activateClockTimerAnnc; - + private ActivateClockTimerFlexContainerAnnc activateClockTimerAnnc; public void setActivateClockTimerAnnc(ActivateClockTimerFlexContainerAnnc activateClockTimerAnnc) { this.activateClockTimerAnnc = activateClockTimerAnnc; @@ -66,10 +64,8 @@ public class TimerFlexContainerAnnc extends AbstractFlexContainerAnnc { this.activateClockTimerAnnc = (ActivateClockTimerFlexContainerAnnc) getResourceByName(ActivateClockTimerFlexContainerAnnc.SHORT_NAME); return activateClockTimerAnnc; } - @XmlElement(name=DeactivateClockTimerFlexContainerAnnc.SHORT_NAME, required=true, type=DeactivateClockTimerFlexContainerAnnc.class, namespace="http://www.onem2m.org/xml/protocols/homedomain") - private DeactivateClockTimerFlexContainerAnnc deactivateClockTimerAnnc; - + private DeactivateClockTimerFlexContainerAnnc deactivateClockTimerAnnc; public void setDeactivateClockTimerAnnc(DeactivateClockTimerFlexContainerAnnc deactivateClockTimerAnnc) { this.deactivateClockTimerAnnc = deactivateClockTimerAnnc; @@ -81,4 +77,4 @@ public class TimerFlexContainerAnnc extends AbstractFlexContainerAnnc { return deactivateClockTimerAnnc; } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ToggleFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ToggleFlexContainer.java index ac8900bb..67f63d25 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ToggleFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ToggleFlexContainer.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : toggle +Action : Toggle Toggle the switch. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = ToggleFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class ToggleFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ToggleFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ToggleFlexContainerAnnc.java index 317f051f..b5be2a49 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ToggleFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/ToggleFlexContainerAnnc.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : toggle +Action : ToggleAnnc Toggle the switch. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = ToggleFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class ToggleFlexContainerAnnc extends AbstractFlexContainerAnnc { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } - -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TurboFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TurboFlexContainer.java index e32319ef..4635d6ad 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TurboFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TurboFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Turbo -This ModuleClass provides capabilities to enalbe turbo mode and monitor the current status of the turbo function. It is intended to be part of objects which use turbo function such as an air conditioner, a washing machine etc. +This ModuleClass provides capabilities to enable turbo mode and monitor the current status of the turbo function. It is intended to be part of devices which use turbo function such as an air conditioner, a washing machine etc. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = TurboFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class TurboFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "turbo"; public static final String SHORT_NAME = "turbo"; - + public TurboFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + TurboFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute turboEnabled = new CustomAttribute(); + turboEnabled.setLongName("turboEnabled"); + turboEnabled.setShortName("turEd"); + turboEnabled.setType("xs:boolean"); + getCustomAttributes().add(turboEnabled); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TurboFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TurboFlexContainerAnnc.java index adce9835..fdbeaf1a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TurboFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/TurboFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : TurboAnnc -This ModuleClass provides capabilities to enalbe turbo mode and monitor the current status of the turbo function. It is intended to be part of objects which use turbo function such as an air conditioner, a washing machine etc. +This ModuleClass provides capabilities to enable turbo mode and monitor the current status of the turbo function. It is intended to be part of devices which use turbo function such as an air conditioner, a washing machine etc. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = TurboFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class TurboFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpChannelFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpChannelFlexContainer.java index 760d38e0..52175214 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpChannelFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpChannelFlexContainer.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : upChannel +Action : UpChannel -Change the current channel to the next channel in the stored list of available channels. If the current channel is the last one in the list, the new set channel may be the first one in the list. +Change the current channel to the next channel in the stored list of available channels. If the current channel is the last one in the list, the new set channel may be the first one in the list. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = UpChannelFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class UpChannelFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpChannelFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpChannelFlexContainerAnnc.java index 54a3e8fd..89f9c90a 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpChannelFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpChannelFlexContainerAnnc.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : upChannel +Action : UpChannelAnnc -Change the current channel to the next channel in the stored list of available channels. If the current channel is the last one in the list, the new set channel may be the first one in the list. +Change the current channel to the next channel in the stored list of available channels. If the current channel is the last one in the list, the new set channel may be the first one in the list. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = UpChannelFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class UpChannelFlexContainerAnnc extends AbstractFlexContainerAnnc { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } - -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpVolumeFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpVolumeFlexContainer.java index 316b872d..bb53299e 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpVolumeFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpVolumeFlexContainer.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : upVolume +Action : UpVolume -Increase volume by the amount of the stepValue up to the maxValue. +Increase volume by the amount of the stepValue up to the maxValue. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; @XmlRootElement(name = UpVolumeFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class UpVolumeFlexContainer extends AbstractFlexContainer { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpVolumeFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpVolumeFlexContainerAnnc.java index 78d7b1f6..834ff81e 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpVolumeFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UpVolumeFlexContainerAnnc.java @@ -1,29 +1,27 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************** -Action : upVolume +Action : UpVolumeAnnc -Increase volume by the amount of the stepValue up to the maxValue. +Increase volume by the amount of the stepValue up to the maxValue. -Created: 2018-06-11 12:14:17 +Created: 2018-06-29 17:19:51 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = UpVolumeFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -39,11 +37,10 @@ public class UpVolumeFlexContainerAnnc extends AbstractFlexContainerAnnc { setShortName(SHORT_NAME); } - public void finalizeSerialization() { } public void finalizeDeserialization() { } - -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UvSensorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UvSensorFlexContainer.java new file mode 100644 index 00000000..2ba3bea4 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UvSensorFlexContainer.java @@ -0,0 +1,58 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : UvSensor + +This ModuleClass describes the capabilities of an ultraviolet sensor. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; + +@XmlRootElement(name = UvSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = UvSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class UvSensorFlexContainer extends AbstractFlexContainer { + + public static final String LONG_NAME = "uvSensor"; + public static final String SHORT_NAME = "uveSr"; + + public UvSensorFlexContainer () { + setContainerDefinition("org.onem2m.home.moduleclass." + UvSensorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + CustomAttribute uvStatus = new CustomAttribute(); + uvStatus.setLongName("uvStatus"); + uvStatus.setShortName("uvtSs"); + uvStatus.setType("hd:enumUvStatus"); + getCustomAttributes().add(uvStatus); + CustomAttribute uvValue = new CustomAttribute(); + uvValue.setLongName("uvValue"); + uvValue.setShortName("uvaVe"); + uvValue.setType("xs:float"); + getCustomAttributes().add(uvValue); + } + + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UvSensorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UvSensorFlexContainerAnnc.java new file mode 100644 index 00000000..4db579e1 --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/UvSensorFlexContainerAnnc.java @@ -0,0 +1,47 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : UvSensorAnnc + +This ModuleClass describes the capabilities of an ultraviolet sensor. + +Created: 2018-06-29 17:19:54 +*/ + +package org.eclipse.om2m.commons.resource.flexcontainerspec; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; + +@XmlRootElement(name = UvSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = UvSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") +public class UvSensorFlexContainerAnnc extends AbstractFlexContainerAnnc { + + public static final String LONG_NAME = "uvSensorAnnc"; + public static final String SHORT_NAME = "uveSrAnnc"; + + public UvSensorFlexContainerAnnc () { + setContainerDefinition("org.onem2m.home.moduleclass." + UvSensorFlexContainer.LONG_NAME); + setLongName(LONG_NAME); + setShortName(SHORT_NAME); + } + + public void finalizeSerialization() { + } + + public void finalizeDeserialization() { + } + + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterFlowFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterFlowFlexContainer.java index 182c30ea..a4c77d32 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterFlowFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterFlowFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : WaterFlow -This ModuleClass is for controlling water strength of a device. +This ModuleClass provides capabilities for controlling the water strength of a device. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = WaterFlowFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class WaterFlowFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "waterFlow"; public static final String SHORT_NAME = "watFw"; - + public WaterFlowFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + WaterFlowFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute waterFlowStrength = new CustomAttribute(); + waterFlowStrength.setLongName("waterFlowStrength"); + waterFlowStrength.setShortName("waFSh"); + waterFlowStrength.setType("hd:enumWaterFlowStrength"); + getCustomAttributes().add(waterFlowStrength); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterFlowFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterFlowFlexContainerAnnc.java index df0ced9c..cfe2f98f 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterFlowFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterFlowFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : WaterFlowAnnc -This ModuleClass is for controlling water strength of a device. +This ModuleClass provides capabilities for controlling the water strength of a device. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = WaterFlowFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class WaterFlowFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterSensorFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterSensorFlexContainer.java index f46505d2..bdd503cf 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterSensorFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterSensorFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : WaterSensor -This ModuleClass provides the capabilities to indicates whether water has been sensed or not and raises an alarm if the triggering criterion is met. +This ModuleClass provides the capabilities to indicate whether or not water has been sensed, and raising an alarm if the triggering criterion is met. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = WaterSensorFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class WaterSensorFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "waterSensor"; public static final String SHORT_NAME = "watSr"; - + public WaterSensorFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + WaterSensorFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute alarm = new CustomAttribute(); + alarm.setLongName("alarm"); + alarm.setShortName("alarm"); + alarm.setType("xs:boolean"); + getCustomAttributes().add(alarm); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterSensorFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterSensorFlexContainerAnnc.java index d46409b2..ecad01cb 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterSensorFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WaterSensorFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : WaterSensorAnnc -This ModuleClass provides the capabilities to indicates whether water has been sensed or not and raises an alarm if the triggering criterion is met. +This ModuleClass provides the capabilities to indicate whether or not water has been sensed, and raising an alarm if the triggering criterion is met. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = WaterSensorFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class WaterSensorFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WeightFlexContainer.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WeightFlexContainer.java index c2b872f2..d9365f3f 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WeightFlexContainer.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WeightFlexContainer.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,20 @@ ModuleClass : Weight -This ModuleClass provides the capability to report the measurement of weight. +This ModuleClass provides the capability to report the measurement of weight. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; @XmlRootElement(name = WeightFlexContainer.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -32,17 +31,23 @@ public class WeightFlexContainer extends AbstractFlexContainer { public static final String LONG_NAME = "weight"; public static final String SHORT_NAME = "weigt"; - + public WeightFlexContainer () { setContainerDefinition("org.onem2m.home.moduleclass." + WeightFlexContainer.LONG_NAME); setLongName(LONG_NAME); setShortName(SHORT_NAME); + CustomAttribute weight = new CustomAttribute(); + weight.setLongName("weight"); + weight.setShortName("weigt"); + weight.setType("xs:float"); + getCustomAttributes().add(weight); } - + + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WeightFlexContainerAnnc.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WeightFlexContainerAnnc.java index d5cac135..676dc230 100644 --- a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WeightFlexContainerAnnc.java +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/resource/flexcontainerspec/WeightFlexContainerAnnc.java @@ -1,6 +1,6 @@ /* ******************************************************************************** - * Copyright (c) 2014, 2017 Orange. + * Copyright (c) 2014, 2018 Orange. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,21 +9,19 @@ ModuleClass : WeightAnnc -This ModuleClass provides the capability to report the measurement of weight. +This ModuleClass provides the capability to report the measurement of weight. -Created: 2018-06-11 12:14:18 +Created: 2018-06-29 17:19:54 */ package org.eclipse.om2m.commons.resource.flexcontainerspec; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; +import org.eclipse.om2m.commons.resource.AbstractFlexContainerAnnc; @XmlRootElement(name = WeightFlexContainerAnnc.SHORT_NAME, namespace = "http://www.onem2m.org/xml/protocols/homedomain") @XmlAccessorType(XmlAccessType.FIELD) @@ -38,11 +36,12 @@ public class WeightFlexContainerAnnc extends AbstractFlexContainerAnnc { setLongName(LONG_NAME); setShortName(SHORT_NAME); } - + public void finalizeSerialization() { } public void finalizeDeserialization() { } -} \ No newline at end of file + +} diff --git a/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/utils/CustomAttributList.java b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/utils/CustomAttributList.java new file mode 100644 index 00000000..c93e93ff --- /dev/null +++ b/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/utils/CustomAttributList.java @@ -0,0 +1,42 @@ +package org.eclipse.om2m.commons.utils; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.function.Consumer; + +import org.eclipse.om2m.commons.resource.CustomAttribute; + +public class CustomAttributList extends ArrayList { + + @Override + public boolean add(CustomAttribute e) { + + // check if customAttribute does not exist + CustomAttribute existing = getFirstByShortName(e.getShortName()); + if (existing != null) { + existing.setValue(e.getValue()); + return true; + } else { + return super.add(e); + } + + + } + + private CustomAttribute getFirstByShortName(String shortName) { + // check provided shortName + if (shortName == null) { + // no need to iterate over the list + return null; + } + for(CustomAttribute ca : this) { + if (shortName.equals(ca.getShortName())) { + return ca; + } + } + + // custom attribute not found + return null; + } + +} diff --git a/org.eclipse.om2m.core.service/.classpath b/org.eclipse.om2m.core.service/.classpath deleted file mode 100644 index 642bfb34..00000000 --- a/org.eclipse.om2m.core.service/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.core.service/.project b/org.eclipse.om2m.core.service/.project deleted file mode 100644 index 62e08a66..00000000 --- a/org.eclipse.om2m.core.service/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.core.service - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.core/.classpath b/org.eclipse.om2m.core/.classpath deleted file mode 100644 index a95e0906..00000000 --- a/org.eclipse.om2m.core/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.core/.project b/org.eclipse.om2m.core/.project deleted file mode 100644 index 1d931b6f..00000000 --- a/org.eclipse.om2m.core/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.core - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/controller/DiscoveryController.java b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/controller/DiscoveryController.java index 998c7959..3840323b 100644 --- a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/controller/DiscoveryController.java +++ b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/controller/DiscoveryController.java @@ -55,6 +55,7 @@ import org.eclipse.om2m.commons.exceptions.BadRequestException; import org.eclipse.om2m.commons.exceptions.NotImplementedException; import org.eclipse.om2m.commons.exceptions.OperationNotAllowed; import org.eclipse.om2m.commons.exceptions.ResourceNotFoundException; +import org.eclipse.om2m.commons.resource.DynAuthTokenReqInfo; import org.eclipse.om2m.commons.resource.FilterCriteria; import org.eclipse.om2m.commons.resource.RequestPrimitive; import org.eclipse.om2m.commons.resource.ResponsePrimitive; @@ -122,12 +123,11 @@ public class DiscoveryController extends Controller { if (!filter.getLabels().isEmpty()) { HashSet allFoundUriEntities = new HashSet<>(); int limit = (filter.getLimit() != null ? filter.getLimit().intValue() : -1); - for (int indexLabel = 0; indexLabel < filter.getLabels().size(); indexLabel++) { - String label = filter.getLabels().get(indexLabel); + for (String label : filter.getLabels()) { LabelEntity labelEntity = dbs.getDAOFactory().getLabelDAO().find(transaction, label); - if (labelEntity != null) { - List allFoundResources = stackLabelResources(labelEntity, filter, resourceEntity.getHierarchicalURI()); + List allFoundResources = stackLabelResources(labelEntity, + filter.getResourceType(), resourceEntity.getHierarchicalURI()); for (ResourceEntity resEntity : allFoundResources) { UriMapperEntity uriEntity = new UriMapperEntity(); uriEntity.setHierarchicalUri(resEntity.getHierarchicalURI()); @@ -151,8 +151,11 @@ public class DiscoveryController extends Controller { URIList uriList = new URIList(); // need to call getListofUri in order to create at least an empty list uriList.getListOfUri(); - for(UriMapperEntity uriEntity : childUris){ - if(filter.getLimit() != null && uriList.getListOfUri().size() == filter.getLimit().intValue()){ + DynAuthTokenReqInfo tokenReqInfo = null; + for (UriMapperEntity uriEntity : childUris) { + LOGGER.debug("check URI " + uriEntity.getHierarchicalUri()); + if (filter.getLimit() != null + && uriList.getListOfUri().size() == filter.getLimit().intValue()) { break; } @@ -174,10 +177,24 @@ public class DiscoveryController extends Controller { } } } catch (AccessDeniedException e) { + LOGGER.warn("Access denied for " + currentResourceEntity + ": " + e.getMessage()); // nothing to do + // here we should retrieve dyn auth token req info if available + + if (tokenReqInfo != null) { + if (e.getDynAuthTokenReqInfo() != null) { + tokenReqInfo.getDasInfo().addAll(e.getDynAuthTokenReqInfo().getDasInfo()); + } + } else { + tokenReqInfo = e.getDynAuthTokenReqInfo(); + } } } } + LOGGER.debug("checked URIs " + uriList.getListOfUri()); + if (uriList.getListOfUri().isEmpty() && (tokenReqInfo != null)) { + throw new AccessDeniedException(tokenReqInfo); + } response.setContent(uriList); response.setResponseStatusCode(ResponseStatusCode.OK); @@ -236,9 +253,9 @@ public class DiscoveryController extends Controller { } } - private List stackLabelResources(LabelEntity labelEntity, FilterCriteria filter, String baseUri) { + private List stackLabelResources(LabelEntity labelEntity, + BigInteger rty, String baseUri) { List result = new ArrayList<>(); - BigInteger rty = filter.getResourceType(); if (rty != null){ switch (rty.intValue()) { case ResourceType.AE: @@ -321,7 +338,6 @@ public class DiscoveryController extends Controller { it.remove(); } } - return result; } diff --git a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/controller/FlexContainerController.java b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/controller/FlexContainerController.java index 9e047c8e..fba8f05c 100644 --- a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/controller/FlexContainerController.java +++ b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/controller/FlexContainerController.java @@ -23,6 +23,7 @@ import org.eclipse.om2m.commons.entities.CSEBaseEntity; import org.eclipse.om2m.commons.entities.ContainerEntity; import org.eclipse.om2m.commons.entities.DynamicAuthorizationConsultationEntity; import org.eclipse.om2m.commons.entities.FlexContainerEntity; +import org.eclipse.om2m.commons.entities.LabelEntity; import org.eclipse.om2m.commons.entities.RemoteCSEEntity; import org.eclipse.om2m.commons.entities.ResourceEntity; import org.eclipse.om2m.commons.entities.SubscriptionEntity; @@ -247,6 +248,15 @@ public class FlexContainerController extends Controller { case ResourceType.FLEXCONTAINER: flexContainerEntity.setParentFlexContainer((FlexContainerEntity) parentEntity); break; + case ResourceType.CONTAINER: + flexContainerEntity.setParentContainer((ContainerEntity) parentEntity); + break; + case ResourceType.CSE_BASE: + flexContainerEntity.setParentCSEB((CSEBaseEntity) parentEntity); + break; + case ResourceType.REMOTE_CSE: + flexContainerEntity.setParentCSR((CSEBaseEntity) parentEntity); + break; } // accessControlPolicyIDs O @@ -280,8 +290,8 @@ public class FlexContainerController extends Controller { // custom attributes for (CustomAttribute ca : flexContainer.getCustomAttributes()) { - flexContainerEntity.createOrUpdateCustomAttribute(ca.getCustomAttributeName(), - ca.getCustomAttributeValue()); + flexContainerEntity.createOrUpdateCustomAttribute(ca.getShortName(), + ca.getValue(), ca.getType()); } // create the FlexContainer in the DB @@ -342,6 +352,7 @@ public class FlexContainerController extends Controller { if (flexContainerEntity == null) { throw new ResourceNotFoundException("Resource not found"); } + LOGGER.debug("Retrieved flex entity: " + flexContainerEntity); // if resource exists, check authorization // retrieve @@ -352,7 +363,7 @@ public class FlexContainerController extends Controller { // Mapping the entity with the exchange resource AbstractFlexContainer flexContainerResource = EntityMapperFactory.getFlexContainerMapper() .mapEntityToResource(flexContainerEntity, request); - + LOGGER.debug("Retrieved flex resource: " + flexContainerResource); response.setContent(flexContainerResource); @@ -480,14 +491,28 @@ public class FlexContainerController extends Controller { // update link with flexContainerEntity - DacEntity for(DynamicAuthorizationConsultationEntity dace : flexContainerEntity.getDynamicAuthorizationConsultations()) { DynamicAuthorizationConsultationEntity daceFromDB = dbs.getDAOFactory().getDynamicAuthorizationDAO().find(transaction, dace.getResourceID()); - daceFromDB.getLinkedFlexContainerEntites().add(flexContainerEntity); - dbs.getDAOFactory().getDynamicAuthorizationDAO().update(transaction, daceFromDB); + boolean found = false; + for (FlexContainerEntity fce : daceFromDB.getLinkedFlexContainerEntites()) { + if (fce.getResourceID().equals(flexContainerEntity.getResourceID())) { + found = true; + break; + } + } + if (!found) { + daceFromDB.getLinkedFlexContainerEntites().add(flexContainerEntity); + dbs.getDAOFactory().getDynamicAuthorizationDAO().update(transaction, daceFromDB); + } + } } // labels O if (!flexContainer.getLabels().isEmpty()) { - flexContainerEntity.setLabelsEntitiesFromSring(flexContainer.getLabels()); +// flexContainerEntity.setLabelsEntitiesFromSring(flexContainer.getLabels()); + // Only accept new labels + for (String s : flexContainer.getLabels()) { + flexContainerEntity.getLabelsEntities().add(new LabelEntity(s)); + } modifiedFlexCtr.getLabels().addAll(flexContainer.getLabels()); } // expirationTime O @@ -525,13 +550,16 @@ public class FlexContainerController extends Controller { } // here add customAttribute that might be updated - if (!flexContainer.getCustomAttributes().isEmpty()) { - for (CustomAttribute ca : flexContainer.getCustomAttributes()) { - flexContainerEntity.createOrUpdateCustomAttribute(ca.getCustomAttributeName(), - ca.getCustomAttributeValue()); + LOGGER.debug("request flex attributes: " + flexContainer.getCustomAttributes()); + modifiedFlexCtr.getCustomAttributes().clear(); + for (CustomAttribute ca : flexContainer.getCustomAttributes()) { + if (ca.getValue() != null) { + flexContainerEntity.createOrUpdateCustomAttribute(ca.getShortName(), + ca.getValue(), ca.getType()); + modifiedFlexCtr.getCustomAttributes().add(ca); } - modifiedFlexCtr.setCustomAttributes(flexContainer.getCustomAttributes()); } + LOGGER.debug("modified flex attributes: " + modifiedFlexCtr.getCustomAttributes()); } flexContainerEntity.setLastModifiedTime(DateUtil.now()); @@ -541,7 +569,7 @@ public class FlexContainerController extends Controller { if (!isInternalNotify) { // check if a FlexContainerService exist FlexContainerService fcs = FlexContainerSelector.getFlexContainerService( - /* request.getTo() */ /* UriUtil.toCseRelativeUri( */flexContainerEntity.getResourceID()/* ) */); + flexContainerEntity.getResourceID()); if (fcs != null) { try { fcs.setCustomAttributeValues(modifiedFlexCtr.getCustomAttributes(), request); diff --git a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/dynamicauthorization/DynamicAuthorizationSelector.java b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/dynamicauthorization/DynamicAuthorizationSelector.java index e9a6e6e2..40b71b4b 100644 --- a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/dynamicauthorization/DynamicAuthorizationSelector.java +++ b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/dynamicauthorization/DynamicAuthorizationSelector.java @@ -8,8 +8,13 @@ package org.eclipse.om2m.core.dynamicauthorization; import java.math.BigInteger; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.eclipse.om2m.commons.constants.Constants; import org.eclipse.om2m.commons.constants.MimeMediaType; import org.eclipse.om2m.commons.constants.Operation; @@ -19,8 +24,10 @@ import org.eclipse.om2m.commons.entities.DynamicAuthorizationConsultationEntity; import org.eclipse.om2m.commons.entities.ResourceEntity; import org.eclipse.om2m.commons.exceptions.AccessDeniedException; import org.eclipse.om2m.commons.resource.AccessControlRule; +import org.eclipse.om2m.commons.resource.DasInfo; import org.eclipse.om2m.commons.resource.DynAuthDasRequest; import org.eclipse.om2m.commons.resource.DynAuthDasResponse.DynamicACPInfo; +import org.eclipse.om2m.commons.resource.DynAuthTokenReqInfo; import org.eclipse.om2m.commons.resource.RequestPrimitive; import org.eclipse.om2m.commons.resource.ResponsePrimitive; import org.eclipse.om2m.commons.resource.SecurityInfo; @@ -29,6 +36,8 @@ import org.eclipse.om2m.core.redirector.Redirector; public class DynamicAuthorizationSelector { + protected static Log LOGGER = LogFactory.getLog(DynamicAuthorizationSelector.class); + /** * singleton */ @@ -62,21 +71,50 @@ public class DynamicAuthorizationSelector { * resource involved in the request * @return list of ACPs extracted from dynamicAcpInfo */ - public void authorize(List dacesToBeUsed, RequestPrimitive request, - ResourceEntity resourceEntity) throws AccessDeniedException { + public void authorize(List dacesToBeUsed, + RequestPrimitive request, ResourceEntity resourceEntity) throws AccessDeniedException { + LOGGER.debug("authorize " + resourceEntity.getResourceID() + + " to " + dacesToBeUsed); + // create securityInfo describing the request to authorize + SecurityInfo securityInfo = new SecurityInfo(); + securityInfo.setSecurityInfoType(SecurityInfoType.DYNAMIC_AUTHORIZATION_REQUEST); + securityInfo.setDasRequest(new DynAuthDasRequest()); + securityInfo.getDasRequest().setOperation(request.getOperation()); + securityInfo.getDasRequest().setOriginator(request.getFrom()); + securityInfo.getDasRequest().getTokenIDs().addAll(request.getTokens()); + securityInfo.getDasRequest().setTargetedResourceID(resourceEntity.getResourceID()); + securityInfo.getDasRequest().setTargetedResourceType(resourceEntity.getResourceType()); // iterate over daces list in order to perform authorization process + Map> tickets = new HashMap<>(); for (DynamicAuthorizationConsultationEntity dace : dacesToBeUsed) { // check if the DynamicAuthorizationConsultation entity is enabled if (dace.getDynamicAuthorizationEnabled()) { - if (authorize(dace, request, resourceEntity)) { + List ticketsPerDAC = new ArrayList<>(); + if (authorize(dace, securityInfo, resourceEntity, ticketsPerDAC, request)) { return; } + tickets.put(dace, ticketsPerDAC); } } - throw new AccessDeniedException(); - + // prepare DynAuthTokenReqInfo to be returned + DynAuthTokenReqInfo dynAuthTokenReqInfo = null; + if (!dacesToBeUsed.isEmpty()) { + dynAuthTokenReqInfo = new DynAuthTokenReqInfo(); + for (DynamicAuthorizationConsultationEntity dace : dacesToBeUsed) { + DasInfo dasInfo = new DasInfo(); + dasInfo.setURI(dace.getDynamicAuthorizationPoA().get(0)); + dasInfo.setDasRequest(securityInfo.getDasRequest()); + + List ticketsPerDac = tickets.get(dace); + dasInfo.getDasRequest().getTokenIDs().clear(); + dasInfo.getDasRequest().getTokenIDs().addAll(ticketsPerDac); + + dynAuthTokenReqInfo.getDasInfo().add(dasInfo); + } + } + throw new AccessDeniedException(dynAuthTokenReqInfo); } /** @@ -92,19 +130,10 @@ public class DynamicAuthorizationSelector { * @return true if the server grants the authorization else false (all other * cases) */ - private boolean authorize(DynamicAuthorizationConsultationEntity dace, RequestPrimitive request, - ResourceEntity resourceEntity) { - - - SecurityInfo securityInfo = new SecurityInfo(); - securityInfo.setSecurityInfoType(SecurityInfoType.DYNAMIC_AUTHORIZATION_REQUEST); - securityInfo.setDasRequest(new DynAuthDasRequest()); - securityInfo.getDasRequest().setOperation(request.getOperation()); - securityInfo.getDasRequest().setOriginator(request.getFrom()); - securityInfo.getDasRequest().setTargetedResourceID(resourceEntity.getResourceID()); - securityInfo.getDasRequest().setTargetedResourceType(resourceEntity.getResourceType()); - + private boolean authorize(DynamicAuthorizationConsultationEntity dace, SecurityInfo securityInfo, + ResourceEntity resourceEntity, List tokens, RequestPrimitive request) { List pointOfAccesses = dace.getDynamicAuthorizationPoA(); + LOGGER.debug("authorize " + resourceEntity.getResourceID() + " to " + pointOfAccesses); for (String pointOfAccess : pointOfAccesses) { RequestPrimitive notifyRequest = new RequestPrimitive(); notifyRequest.setOperation(Operation.NOTIFY); @@ -119,33 +148,47 @@ public class DynamicAuthorizationSelector { SecurityInfo responseSecurityInfo = (SecurityInfo) response.getContent(); if (responseSecurityInfo == null) { // no dynamic acp + LOGGER.info("No SecurityInfo in response"); continue; } if (!SecurityInfoType.DYNAMIC_AUTHORIZATION_RESPONSE .equals(responseSecurityInfo.getSecurityInfoType())) { // invalid type + LOGGER.info("Wrong SecurityInfo type in response"); continue; } + if (responseSecurityInfo.getDasResponse().getTokens() != null) { + tokens.addAll(responseSecurityInfo.getDasResponse().getTokens()); + } DynamicACPInfo dynamicAcpInfo = responseSecurityInfo.getDasResponse().getDynamicACPInfo(); if (dynamicAcpInfo == null) { // no dynamicAcpInfo + LOGGER.info("No DynamicACPInfo in response"); continue; } try { - checkACPs(dynamicAcpInfo, request.getFrom(), request.getOperation()); + checkACPs(dynamicAcpInfo, securityInfo.getDasRequest().getOriginator(), + securityInfo.getDasRequest().getOperation()); + List rpts = responseSecurityInfo.getDasResponse().getTokens(); + if ((rpts != null) && !(rpts.isEmpty())) { + request.getTokens().clear(); + request.getTokens().addAll(rpts); + } + LOGGER.debug("check OK"); return true; } catch (AccessDeniedException e) { // we continue to iterate over dac point of accesses + LOGGER.warn("check KO: " + e.getMessage()); } + } else { + LOGGER.info("KO response " + response.getResponseStatusCode()); } } - return false; } - /** * Checks the Access Right based on ACP list (Permission) * @param acp - Id of the accessRight @@ -153,44 +196,32 @@ public class DynamicAuthorizationSelector { * @param operation - requested method * @return error with a specific status code if the requesting Entity or the method does not exist otherwise null */ - public void checkACPs(DynamicACPInfo dynamicAcpInfo, String originator, BigInteger operation) + private void checkACPs(DynamicACPInfo dynamicAcpInfo, String originator, BigInteger operation) throws AccessDeniedException{ - if(originator == null){ - throw new AccessDeniedException(); + if (originator == null) { + throw new AccessDeniedException("No originator"); } if (dynamicAcpInfo == null) { throw new AccessDeniedException("dynamicAcpInfo is false"); } // Check Resource accessRight existence not found - boolean originatorFound = false; - boolean operationAllowed = false; SetOfAcrs setOfAcrs = dynamicAcpInfo.getGrantedPrivileges(); if (setOfAcrs == null) { throw new AccessDeniedException("set of acrs is null"); } - for (AccessControlRule rule : setOfAcrs.getAccessControlRule()){ - originatorFound = false ; - operationAllowed = false; - for (String originatorRule : rule.getAccessControlOriginators()){ - if (originator.matches(originatorRule.replace("*", ".*"))){ - originatorFound = true; - break; - } - } - if (originatorFound){ - if (rule.getAccessControlOperations().equals(operation)) { - operationAllowed = true; + for (AccessControlRule rule : setOfAcrs.getAccessControlRule()) { + LOGGER.debug("check " + originator + " in " + rule.getAccessControlOriginators() + + " and " + operation + " / " + rule.getAccessControlOperations()); + if (rule.getAccessControlOperations().equals(operation)) { + for (String originatorRule : rule.getAccessControlOriginators()) { + if (originator.matches(originatorRule.replace("*", ".*"))) { + return; + } } } - if (originatorFound && operationAllowed){ - break; - } - } - if (originatorFound && operationAllowed){ - return; } - - throw new AccessDeniedException(); + throw new AccessDeniedException("originator not found or operation not allowed"); } + } diff --git a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/ContainerMapper.java b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/ContainerMapper.java index f25c59bc..66430ac7 100644 --- a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/ContainerMapper.java +++ b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/ContainerMapper.java @@ -132,26 +132,26 @@ public class ContainerMapper extends EntityMapper{ protected void mapChildResources(ContainerEntity entity, Container resource, int level, int offset) { // add child ref contentInstance for (ContentInstanceEntity cin : entity.getChildContentInstances()) { - ContentInstance cinRes = new ContentInstanceMapper().mapEntityToResource(cin, ResultContent.ATTRIBUTES, level - 1, offset - 1); + ContentInstance cinRes = new ContentInstanceMapper().mapEntityToResource(cin, ResultContent.ATTRIBUTES_AND_CHILD_RES, level - 1, offset - 1); resource.getContentInstanceOrContainerOrSubscription().add(cinRes); } // add child ref subscription for (SubscriptionEntity sub : entity.getSubscriptions()){ - Subscription subRes = new SubscriptionMapper().mapEntityToResource(sub, ResultContent.ATTRIBUTES, level - 1, offset - 1); + Subscription subRes = new SubscriptionMapper().mapEntityToResource(sub, ResultContent.ATTRIBUTES_AND_CHILD_RES, level - 1, offset - 1); resource.getContentInstanceOrContainerOrSubscription().add(subRes); } // add child ref with containers for (ContainerEntity childCont : entity.getChildContainers()) { - Container cnt = new ContainerMapper().mapEntityToResource(childCont, ResultContent.ATTRIBUTES, level - 1, offset - 1); + Container cnt = new ContainerMapper().mapEntityToResource(childCont, ResultContent.ATTRIBUTES_AND_CHILD_RES, level - 1, offset - 1); resource.getContentInstanceOrContainerOrSubscription().add(cnt); } // add child ref flexContainers for(FlexContainerEntity childFlexCont : entity.getChildFlexContainers()) { - AbstractFlexContainer fcnt = new FlexContainerMapper().mapEntityToResource(childFlexCont, ResultContent.ATTRIBUTES, level - 1, offset - 1); + AbstractFlexContainer fcnt = new FlexContainerMapper().mapEntityToResource(childFlexCont, ResultContent.ATTRIBUTES_AND_CHILD_RES, level - 1, offset - 1); resource.getContentInstanceOrContainerOrSubscription().add(fcnt); } } diff --git a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/FlexContainerMapper.java b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/FlexContainerMapper.java index 371354d0..37acb182 100644 --- a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/FlexContainerMapper.java +++ b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/FlexContainerMapper.java @@ -8,6 +8,7 @@ package org.eclipse.om2m.core.entitymapper; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -28,6 +29,8 @@ import org.eclipse.om2m.core.flexcontainer.FlexContainerSelector; import org.eclipse.om2m.flexcontainer.service.FlexContainerService; public class FlexContainerMapper extends EntityMapper{ + +// private static Log LOGGER = LogFactory.getLog(FlexContainerMapper.class); @Override protected AbstractFlexContainer createResource() { @@ -62,21 +65,30 @@ public class FlexContainerMapper extends EntityMapper customAttributeNames = new ArrayList(); + Map attributes = new HashMap(); for (CustomAttributeEntity cae : entity.getCustomAttributes()) { - customAttributeNames.add(cae.getCustomAttributeName()); + attributes.put(cae.getName(), cae); } - for (Map.Entry entry : fcs.getCustomAttributeValues(customAttributeNames).entrySet()) { + List names = new ArrayList<>(attributes.keySet()); + resource.getCustomAttributes().clear(); + for (Map.Entry entry : fcs.getCustomAttributeValues(names).entrySet()) { + String name = entry.getKey(); + CustomAttributeEntity cae = attributes.get(name); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName(entry.getKey()); - ca.setCustomAttributeValue(entry.getValue()); + ca.setShortName(name); +// ca.setLongName(cae.getLongName()); + ca.setType(cae.getType()); + ca.setValue(entry.getValue()); resource.getCustomAttributes().add(ca); } } diff --git a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/MgmtObjMapper.java b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/MgmtObjMapper.java index ceb7221e..c336a320 100644 --- a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/MgmtObjMapper.java +++ b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/entitymapper/MgmtObjMapper.java @@ -40,7 +40,8 @@ import org.eclipse.om2m.commons.resource.Subscription; public class MgmtObjMapper extends EntityMapper { @Override - protected void mapAttributes(MgmtObjEntity entity, MgmtObj resource, int level, int offset) { + protected void mapAttributes(MgmtObjEntity entity, MgmtObj resource, + int level, int offset) { if (level < 0) { return; } @@ -49,14 +50,10 @@ public class MgmtObjMapper extends EntityMapper { EntityMapperFactory.getAnnounceableSubordonateEntity_AnnounceableResourceMapper().mapAttributes(entity, resource, level, offset); - resource.setCreationTime(entity.getCreationTime()); - resource.setDescription(entity.getDescription()); resource.setExpirationTime(entity.getExpirationTime()); - resource.setLastModifiedTime(entity.getLastModifiedTime()); - resource.setName(entity.getName()); - resource.setParentID(entity.getParentID()); - resource.setResourceID(entity.getResourceID()); - resource.setResourceType(entity.getResourceType()); + resource.setDescription(entity.getDescription()); + resource.getObjectIDs().addAll(entity.getObjectIDs()); + resource.getObjectPaths().addAll(entity.getObjectPaths()); if (entity instanceof AreaNwkInfoEntity) { mapSpecificAttributes((AreaNwkInfoEntity)entity, (AreaNwkInfo)resource); @@ -69,18 +66,18 @@ public class MgmtObjMapper extends EntityMapper { private void mapSpecificAttributes(AreaNwkInfoEntity entity, AreaNwkInfo resource) { resource.setAreaNwkType(entity.getAreaNwkType()); - if (!entity.getListOfDevices().isEmpty()) { - resource.getListOfDevices().addAll(entity.getListOfDevices()); - } + resource.getListOfDevices().addAll(entity.getListOfDevices()); } - private void mapSpecificAttributes(AreaNwkDeviceInfoEntity entity, AreaNwkDeviceInfo resource) { + private void mapSpecificAttributes(AreaNwkDeviceInfoEntity entity, + AreaNwkDeviceInfo resource) { resource.setAreaNwkId(entity.getAreaNwkId()); resource.setDevID(entity.getDevID()); resource.setDevType(entity.getDevType()); resource.setSleepDuration(entity.getSleepDuration()); resource.setSleepInterval(entity.getSleepInterval()); resource.setStatus(entity.getStatus()); + resource.getListOfNeighbors().addAll(entity.getListOfNeighbors()); } private void mapSpecificAttributes(DeviceInfoEntity entity, DeviceInfo resource) { @@ -88,7 +85,6 @@ public class MgmtObjMapper extends EntityMapper { resource.setModel(entity.getModel()); resource.setManufacturer(entity.getManufacturer()); resource.setDeviceType(entity.getDeviceType()); - resource.setDeviceName(entity.getDeviceName()); resource.setFwVersion(entity.getFwVersion()); resource.setSwVersion(entity.getSwVersion()); @@ -106,33 +102,39 @@ public class MgmtObjMapper extends EntityMapper { } @Override - protected List getChildResourceRef(MgmtObjEntity entity, int level, int offset) { + protected List getChildResourceRef(MgmtObjEntity entity, + int level, int offset) { List childRefs = new ArrayList<>(); if (level == 0) { return childRefs; } // add child ref subscription - for (SubscriptionEntity sub : entity.getSubscriptions()){ + for (SubscriptionEntity sub : entity.getSubscriptions()) { ChildResourceRef child = new ChildResourceRef(); child.setResourceName(sub.getName()); child.setType(ResourceType.SUBSCRIPTION); child.setValue(sub.getResourceID()); childRefs.add(child); - childRefs.addAll(new SubscriptionMapper().getChildResourceRef(sub, level - 1, offset - 1)); + childRefs.addAll(new SubscriptionMapper() + .getChildResourceRef(sub, level - 1, offset - 1)); } return childRefs; } @Override - protected void mapChildResourceRef(MgmtObjEntity entity, MgmtObj resource, int level, int offset) { - ((MgmtObjWithChildren)resource).getChildResource().addAll(getChildResourceRef(entity, level, offset)); + protected void mapChildResourceRef(MgmtObjEntity entity, MgmtObj resource, + int level, int offset) { + ((MgmtObjWithChildren)resource).getChildResource() + .addAll(getChildResourceRef(entity, level, offset)); } @Override - protected void mapChildResources(MgmtObjEntity entity, MgmtObj resource, int level, int offset) { + protected void mapChildResources(MgmtObjEntity entity, MgmtObj resource, + int level, int offset) { // add child ref subscription - for (SubscriptionEntity sub : entity.getSubscriptions()){ - Subscription subRes = new SubscriptionMapper().mapEntityToResource(sub, ResultContent.ATTRIBUTES, level - 1, offset - 1); + for (SubscriptionEntity sub : entity.getSubscriptions()) { + Subscription subRes = new SubscriptionMapper() + .mapEntityToResource(sub, ResultContent.ATTRIBUTES, level - 1, offset - 1); ((MgmtObjWithChildren)resource).getSubscriptions().add(subRes); } } diff --git a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/router/Router.java b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/router/Router.java index 8408990e..c8f4f579 100644 --- a/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/router/Router.java +++ b/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/router/Router.java @@ -35,6 +35,7 @@ import org.eclipse.om2m.commons.constants.ResponseStatusCode; import org.eclipse.om2m.commons.constants.ResponseType; import org.eclipse.om2m.commons.constants.ResultContent; import org.eclipse.om2m.commons.constants.ShortName; +import org.eclipse.om2m.commons.exceptions.AccessDeniedException; import org.eclipse.om2m.commons.exceptions.BadRequestException; import org.eclipse.om2m.commons.exceptions.NotImplementedException; import org.eclipse.om2m.commons.exceptions.Om2mException; @@ -71,8 +72,10 @@ import org.eclipse.om2m.core.nblocking.NonBlockingHandler; import org.eclipse.om2m.core.redirector.Redirector; import org.eclipse.om2m.core.service.CseService; import org.eclipse.om2m.core.urimapper.UriMapper; + /** - * Routes a generic request to the appropriate resource controller to handle it based on the request method and URI. + * Routes a generic request to the appropriate resource controller to handle it + * based on the request method and URI. */ public class Router implements CseService { @@ -81,7 +84,9 @@ public class Router implements CseService { /** * Invokes required resource controller method. - * @param request - The generic request to handle + * + * @param request + * - The generic request to handle * @return The generic returned response */ public ResponsePrimitive doRequest(RequestPrimitive request) { @@ -89,18 +94,18 @@ public class Router implements CseService { LOGGER.info("Received request in Router: " + request.toString()); ResponsePrimitive response = new ResponsePrimitive(request); Patterns patterns = new Patterns(); - + String contentFormat = System.getProperty("org.eclipse.om2m.registration.contentFormat", MimeMediaType.XML); - try{ + try { // Non blocking request handling - if (request.getResponseTypeInfo() != null - && request.getResponseTypeInfo().getResponseType() != null){ + if (request.getResponseTypeInfo() != null && request.getResponseTypeInfo().getResponseType() != null) { if (request.getResponseTypeInfo().getResponseType().equals(ResponseType.NON_BLOCKING_REQUEST_SYNCH) - || request.getResponseTypeInfo().getResponseType().equals(ResponseType.NON_BLOCKING_REQUEST_ASYNCH)){ - if(Constants.NON_BLOCKING_SUPPORTED){ - return NonBlockingHandler.handle(request); + || request.getResponseTypeInfo().getResponseType() + .equals(ResponseType.NON_BLOCKING_REQUEST_ASYNCH)) { + if (Constants.NON_BLOCKING_SUPPORTED) { + return NonBlockingHandler.handle(request); } else { response.setResponseStatusCode(ResponseStatusCode.NON_BLOCKING_REQUEST_NOT_SUPPORTED); response.setContent("Non blocking request is not supported"); @@ -111,99 +116,97 @@ public class Router implements CseService { } // Check if the data type has been set - if (request.getRequestContentType() == null){ + if (request.getRequestContentType() == null) { request.setRequestContentType(contentFormat); LOGGER.info("No Content-Type parameter set, setting to default: " + request.getRequestContentType()); } - if (request.getReturnContentType() == null){ + if (request.getReturnContentType() == null) { request.setReturnContentType(contentFormat); LOGGER.info("No Accept parameter set, setting to default: " + request.getReturnContentType()); } // Check if the data type requested is supported - if (request.getRequestContentType() != MimeMediaType.OBJ && request.getRequestContentType()!=null){ - if (!DataMapperSelector.getDataMapperList().containsKey(request.getRequestContentType())){ - throw new NotImplementedException(request.getRequestContentType()+" is not supported."); + if (request.getRequestContentType() != MimeMediaType.OBJ && request.getRequestContentType() != null) { + if (!DataMapperSelector.getDataMapperList().containsKey(request.getRequestContentType())) { + throw new NotImplementedException(request.getRequestContentType() + " is not supported."); } } - if (request.getReturnContentType() != MimeMediaType.OBJ && request.getReturnContentType()!=null){ - if (!DataMapperSelector.getDataMapperList().containsKey(request.getReturnContentType())){ - throw new NotImplementedException(request.getReturnContentType()+" is not supported."); + if (request.getReturnContentType() != MimeMediaType.OBJ && request.getReturnContentType() != null) { + if (!DataMapperSelector.getDataMapperList().containsKey(request.getReturnContentType())) { + throw new NotImplementedException(request.getReturnContentType() + " is not supported."); } } // Check if the operation has been provided - if(request.getOperation() == null){ + if (request.getOperation() == null) { throw new BadRequestException("No Operation provided"); } // URI Handling if (request.getTo() == null) { throw new BadRequestException("No To/TargetId parameter provided"); - } - - if(request.getTo().startsWith("~")){ + } + + if (request.getTo().startsWith("~")) { request.setTo(request.getTo().substring(1)); - } + } // Check if the SP-ID is provided - if(request.getTo().startsWith("//") || request.getTo().startsWith("_")){ + if (request.getTo().startsWith("//") || request.getTo().startsWith("_")) { String uri = request.getTo().substring(2); String spId = uri.split("/")[0]; - if (!spId.equals(Constants.M2M_SP_ID)){ + if (!spId.equals(Constants.M2M_SP_ID)) { throw new ResourceNotFoundException("Not the current SP Domain (" + spId + ")"); } else { request.setTo(uri.replace(spId, "")); } - } else if (!request.getTo().startsWith("/")){ + } else if (!request.getTo().startsWith("/")) { request.setTo("/" + Constants.CSE_ID + "/" + request.getTo()); } // Remove the last "/" from the request uri if exist. - if(request.getTo().endsWith("/")){ - request.setTo(request.getTo().substring(0,request.getTo().length()-1)); + if (request.getTo().endsWith("/")) { + request.setTo(request.getTo().substring(0, request.getTo().length() - 1)); } getQueryStringFromTargetId(request); // Redirection case - if (!patterns.match(patterns.NON_RETARGETING_PATTERN, request.getTo())){ + if (!patterns.match(patterns.NON_RETARGETING_PATTERN, request.getTo())) { LOGGER.info("Request targeting another CSE, forwarding to Redirector: " + request.getTo()); return Redirector.retarget(request); } LOGGER.info("Request handling in the current CSE: " + request.getTo()); - Controller controller = null ; + Controller controller = null; // Case of hierarchical URI, retrieve the non-hierarchical URI of the resource - if (patterns.match(patterns.HIERARCHICAL_PATTERN, request.getTo())){ - if(request.getTo().contains(patterns.FANOUT_POINT_MATCH + "/")){ + if (patterns.match(patterns.HIERARCHICAL_PATTERN, request.getTo())) { + if (request.getTo().contains(patterns.FANOUT_POINT_MATCH + "/")) { int foptIndex = request.getTo().indexOf(patterns.FANOUT_POINT_MATCH); String uri = request.getTo().substring(0, foptIndex); - String suffix = request.getTo() - .substring( - foptIndex + patterns.FANOUT_POINT_MATCH.length(), - request.getTo().length() - ); + String suffix = request.getTo().substring(foptIndex + patterns.FANOUT_POINT_MATCH.length(), + request.getTo().length()); controller = new FanOutPointController(suffix); request.setTo(uri); LOGGER.info("Fan Out request received: [grp uri: " + uri + ", suffix: " + suffix + "]"); - } if (request.getTo().endsWith(patterns.FANOUT_POINT_MATCH)) { + } + if (request.getTo().endsWith(patterns.FANOUT_POINT_MATCH)) { controller = new FanOutPointController(); request.setTo(request.getTo().replaceAll(patterns.FANOUT_POINT_MATCH, "")); - LOGGER.info("Fan Out request received: [grp uri: " + request.getTo()+ "]"); - } - if(request.getTo().endsWith("/" + ShortName.LATEST)){ + LOGGER.info("Fan Out request received: [grp uri: " + request.getTo() + "]"); + } + if (request.getTo().endsWith("/" + ShortName.LATEST)) { controller = new LatestOldestController(SortingPolicy.LATEST); request.setTo(request.getTo() + "/"); - request.setTo(request.getTo().replace("/"+ShortName.LATEST+"/", "")); + request.setTo(request.getTo().replace("/" + ShortName.LATEST + "/", "")); } - if (request.getTo().endsWith("/" + ShortName.OLDEST)){ + if (request.getTo().endsWith("/" + ShortName.OLDEST)) { controller = new LatestOldestController(SortingPolicy.OLDEST); request.setTo(request.getTo() + "/"); - request.setTo(request.getTo().replace("/"+ShortName.OLDEST+"/", "")); + request.setTo(request.getTo().replace("/" + ShortName.OLDEST + "/", "")); } String nonHierarchicalUri = UriMapper.getNonHierarchicalUri(request.getTo()); - if (nonHierarchicalUri == null){ + if (nonHierarchicalUri == null) { throw new ResourceNotFoundException("Resource not found"); } request.setTo(nonHierarchicalUri); @@ -211,37 +214,37 @@ public class Router implements CseService { } // Notify case - if(request.getOperation().equals(Operation.NOTIFY)){ + if (request.getOperation().equals(Operation.NOTIFY)) { return Redirector.retargetNotify(request); } // Discovery case if ((request.getFilterCriteria() != null) && (request.getFilterCriteria().getFilterUsage() != null) - && (request.getFilterCriteria().getFilterUsage().intValue() == 1)){ + && (request.getFilterCriteria().getFilterUsage().intValue() == 1)) { controller = new DiscoveryController(); } // Determine the appropriate resource controller // In case of a CREATE, the resource type determine the controller - if (controller == null){ - if (request.getOperation().equals(Operation.CREATE)){ + if (controller == null) { + if (request.getOperation().equals(Operation.CREATE)) { controller = getResourceControllerFromRT(request.getResourceType()); } else { controller = getResourceControllerFromURI(request.getTo()); - } + } } - if (controller!=null){ - LOGGER.info("ResourceController to be used ["+ controller.getClass().getSimpleName()+"]"); + if (controller != null) { + LOGGER.info("ResourceController to be used [" + controller.getClass().getSimpleName() + "]"); // Perform the request in the specific controller response = controller.doRequest(request); - if(request.getResultContent() != null && request.getResultContent().equals(ResultContent.NOTHING)){ + if (request.getResultContent() != null && request.getResultContent().equals(ResultContent.NOTHING)) { response.setContent(null); } else { - if(response.getContent() != null && !(response.getContent() instanceof String) - && !request.getReturnContentType().equals(MimeMediaType.OBJ)){ - String representation = DataMapperSelector.getDataMapperList(). - get(request.getReturnContentType()).objToString(response.getContent()); + if (response.getContent() != null && !(response.getContent() instanceof String) + && !request.getReturnContentType().equals(MimeMediaType.OBJ)) { + String representation = DataMapperSelector.getDataMapperList() + .get(request.getReturnContentType()).objToString(response.getContent()); response.setContent(representation); response.setContentType(request.getReturnContentType()); } @@ -249,13 +252,24 @@ public class Router implements CseService { } else { throw new BadRequestException("Malformed URI"); } - } catch (Om2mException om2mException){ + } catch (AccessDeniedException accessDeniedException) { + response.setResponseStatusCode(accessDeniedException.getErrorStatusCode()); + response.setContent(accessDeniedException.getMessage()); + response.setContentType(MimeMediaType.TEXT_PLAIN); + if (accessDeniedException.getDynAuthTokenReqInfo() != null) { + response.setContentType(request.getReturnContentType()); + response.setContent(DataMapperSelector.getDataMapperList().get(request.getReturnContentType()) + .objToString(accessDeniedException.getDynAuthTokenReqInfo())); + } + LOGGER.error("AccessDeniedException caught in Router: " + accessDeniedException.getMessage(), + accessDeniedException); + } catch (Om2mException om2mException) { response.setResponseStatusCode(om2mException.getErrorStatusCode()); response.setContent(om2mException.getMessage()); response.setContentType(MimeMediaType.TEXT_PLAIN); LOGGER.error("OM2M exception caught in Router: " + om2mException.getMessage(), om2mException); LOGGER.debug("OM2M exception caught in Router", om2mException); - } catch(Exception e){ + } catch (Exception e) { LOGGER.error("Router internal error", e); response.setResponseStatusCode(ResponseStatusCode.INTERNAL_SERVER_ERROR); response.setContent("Router internal error"); @@ -268,30 +282,35 @@ public class Router implements CseService { /** * Finds required resource controller based on uri patterns. - * @param uri - Generic request uri - * @param method - Generic request method - * @param representation - Resource representation + * + * @param uri + * - Generic request uri + * @param method + * - Generic request method + * @param representation + * - Resource representation * @return The matched resource controller otherwise null */ - protected Controller getResourceControllerFromURI(String uri){ + protected Controller getResourceControllerFromURI(String uri) { Patterns patterns = new Patterns(); - // Match the resource controller with an uri pattern and return it, otherwise return null - if (patterns.match(patterns.CSE_BASE_PATTERN, uri)){ + // Match the resource controller with an uri pattern and return it, otherwise + // return null + if (patterns.match(patterns.CSE_BASE_PATTERN, uri)) { return new CSEBaseController(); } - if (patterns.match(patterns.AE_PATTERN, uri)){ + if (patterns.match(patterns.AE_PATTERN, uri)) { return new AEController(); } - if (patterns.match(patterns.AEANNC_PATTERN, uri)){ + if (patterns.match(patterns.AEANNC_PATTERN, uri)) { return new AEAnncController(); } - if (patterns.match(patterns.ACP_PATTERN, uri)){ + if (patterns.match(patterns.ACP_PATTERN, uri)) { return new AccessControlPolicyController(); } - if (patterns.match(patterns.CONTAINER_PATTERN, uri)){ + if (patterns.match(patterns.CONTAINER_PATTERN, uri)) { return new ContainerController(); } - if (patterns.match(patterns.DYNAMIC_AUTHORIZATION_CONSULTATION_PATTERN, uri)){ + if (patterns.match(patterns.DYNAMIC_AUTHORIZATION_CONSULTATION_PATTERN, uri)) { return new DynamicAuthorizationConsultationController(); } if (patterns.match(patterns.FLEXCONTAINER_PATTERN, uri)) { @@ -306,7 +325,7 @@ public class Router implements CseService { if (patterns.match(patterns.REMOTE_CSE_PATTERN, uri)) { return new RemoteCSEController(); } - if (patterns.match(patterns.GROUP_PATTERN, uri)){ + if (patterns.match(patterns.GROUP_PATTERN, uri)) { return new GroupController(); } if (patterns.match(patterns.NODE_PATTERN, uri)) { @@ -321,47 +340,48 @@ public class Router implements CseService { if (patterns.match(patterns.NMGMT_OBJ_ANNC_PATTERN, uri)) { return new MgmtObjAnncController(); } - if (patterns.match(patterns.SUBSCRIPTION_PATTERN, uri)){ + if (patterns.match(patterns.SUBSCRIPTION_PATTERN, uri)) { return new SubscriptionController(); } - if (patterns.match(patterns.POLLING_CHANNEL_PATTERN, uri)){ + if (patterns.match(patterns.POLLING_CHANNEL_PATTERN, uri)) { return new PollingChannelController(); } - if (patterns.match(patterns.POLLING_CHANNEL_URI_PATTERN, uri)){ + if (patterns.match(patterns.POLLING_CHANNEL_URI_PATTERN, uri)) { return new PollingChannelUriController(); } - if (patterns.match(patterns.REQUEST_PATTERN, uri)){ + if (patterns.match(patterns.REQUEST_PATTERN, uri)) { return new RequestController(); } return null; } /** - * In the case of a CREATE operation, the controller is determined by the + * In the case of a CREATE operation, the controller is determined by the * resource type argument from the generic request primitive. - * @param resourceType + * + * @param resourceType * @return the matching controller */ - protected Controller getResourceControllerFromRT(BigInteger resourceType){ + protected Controller getResourceControllerFromRT(BigInteger resourceType) { // test in case resourceType is null if (resourceType == null) { throw new BadRequestException("Resource type is missing for creation request"); } // switch case - switch(resourceType.intValue()){ + switch (resourceType.intValue()) { case ResourceType.CSE_BASE: return new CSEBaseController(); - case ResourceType.ACCESS_CONTROL_POLICY: + case ResourceType.ACCESS_CONTROL_POLICY: return new AccessControlPolicyController(); case ResourceType.AE: return new AEController(); case ResourceType.CONTAINER: return new ContainerController(); - case ResourceType.CONTENT_INSTANCE : + case ResourceType.CONTENT_INSTANCE: return new ContentInstanceController(); case ResourceType.DYNAMIC_AUTHORIZATION_CONSULTATION: return new DynamicAuthorizationConsultationController(); - case ResourceType.REMOTE_CSE : + case ResourceType.REMOTE_CSE: return new RemoteCSEController(); case ResourceType.GROUP: return new GroupController(); @@ -372,28 +392,28 @@ public class Router implements CseService { case ResourceType.POLLING_CHANNEL: return new PollingChannelController(); case ResourceType.FLEXCONTAINER: - return new FlexContainerController(); + return new FlexContainerController(); case ResourceType.AE_ANNC: return new AEAnncController(); case ResourceType.FLEXCONTAINER_ANNC: return new FlexContainerAnncController(); case ResourceType.MGMT_OBJ: - return new MgmtObjController(); + return new MgmtObjController(); case ResourceType.MGMT_OBJ_ANNC: - return new MgmtObjAnncController(); + return new MgmtObjAnncController(); case ResourceType.NODE_ANNC: return new NodeAnncController(); - default : + default: throw new NotImplementedException("ResourceType: " + resourceType + " is not implemented"); } } - private static void getQueryStringFromTargetId(RequestPrimitive request){ - + private static void getQueryStringFromTargetId(RequestPrimitive request) { + if (request.getTo().contains("#")) { request.getQueryStrings().put("#", new ArrayList()); } - if(request.getTo().contains("?")){ + if (request.getTo().contains("?")) { String query = request.getTo().split("\\?")[1]; Map> parameters = new HashMap>(); if (query != null) { @@ -414,12 +434,12 @@ public class Router implements CseService { } else { List values = new ArrayList(); values.add(value); - parameters.put(key,values); + parameters.put(key, values); } } } request.getQueryStrings().putAll(parameters); - + } } diff --git a/org.eclipse.om2m.dal.driver.sample/.classpath b/org.eclipse.om2m.dal.driver.sample/.classpath deleted file mode 100644 index a95e0906..00000000 --- a/org.eclipse.om2m.dal.driver.sample/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.dal.driver.sample/.project b/org.eclipse.om2m.dal.driver.sample/.project deleted file mode 100644 index b487567e..00000000 --- a/org.eclipse.om2m.dal.driver.sample/.project +++ /dev/null @@ -1,39 +0,0 @@ - - - org.eclipse.om2m.dal.driver.sample - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.pde.ds.core.builder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.dal/.classpath b/org.eclipse.om2m.dal/.classpath deleted file mode 100644 index 8984ae99..00000000 --- a/org.eclipse.om2m.dal/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.dal/.project b/org.eclipse.om2m.dal/.project deleted file mode 100644 index 0c37733c..00000000 --- a/org.eclipse.om2m.dal/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.dal - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.das.service/.classpath b/org.eclipse.om2m.das.service/.classpath deleted file mode 100644 index 56b865eb..00000000 --- a/org.eclipse.om2m.das.service/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.das.service/.project b/org.eclipse.om2m.das.service/.project deleted file mode 100644 index 6512b95a..00000000 --- a/org.eclipse.om2m.das.service/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.das.service - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.das.testsuite/.classpath b/org.eclipse.om2m.das.testsuite/.classpath deleted file mode 100644 index 56b865eb..00000000 --- a/org.eclipse.om2m.das.testsuite/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.das.testsuite/.project b/org.eclipse.om2m.das.testsuite/.project deleted file mode 100644 index 42c8752b..00000000 --- a/org.eclipse.om2m.das.testsuite/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.das.testsuite - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.das.testsuite/src/main/java/org/eclipse/om2m/das/testsuite/ae/DASServiceTest_FlexContainer.java b/org.eclipse.om2m.das.testsuite/src/main/java/org/eclipse/om2m/das/testsuite/ae/DASServiceTest_FlexContainer.java index 737f6854..ca8204f8 100644 --- a/org.eclipse.om2m.das.testsuite/src/main/java/org/eclipse/om2m/das/testsuite/ae/DASServiceTest_FlexContainer.java +++ b/org.eclipse.om2m.das.testsuite/src/main/java/org/eclipse/om2m/das/testsuite/ae/DASServiceTest_FlexContainer.java @@ -83,8 +83,8 @@ public class DASServiceTest_FlexContainer extends AbstractDASServiceTest { // update FlexContainer FlexContainer toBeUpdated = new FlexContainer(); CustomAttribute customAttribute = new CustomAttribute(); - customAttribute.setCustomAttributeName("test"); - customAttribute.setCustomAttributeValue("value"); + customAttribute.setShortName("test"); + customAttribute.setValue("value"); createdFlexContainer.getCustomAttributes().add(customAttribute); // prepare update request diff --git a/org.eclipse.om2m.das.testsuite/src/main/java/org/eclipse/om2m/das/testsuite/ae/DASServiceTest_FlexContainerAnnc.java b/org.eclipse.om2m.das.testsuite/src/main/java/org/eclipse/om2m/das/testsuite/ae/DASServiceTest_FlexContainerAnnc.java index 6923107a..0fa64abc 100644 --- a/org.eclipse.om2m.das.testsuite/src/main/java/org/eclipse/om2m/das/testsuite/ae/DASServiceTest_FlexContainerAnnc.java +++ b/org.eclipse.om2m.das.testsuite/src/main/java/org/eclipse/om2m/das/testsuite/ae/DASServiceTest_FlexContainerAnnc.java @@ -102,8 +102,8 @@ public class DASServiceTest_FlexContainerAnnc extends AbstractDASServiceTest { // update FlexContainer BinarySwitchFlexContainerAnnc toBeUpdated = new BinarySwitchFlexContainerAnnc(); CustomAttribute customAttribute = new CustomAttribute(); - customAttribute.setCustomAttributeName("powSe"); - customAttribute.setCustomAttributeValue("true"); + customAttribute.setShortName("powSe"); + customAttribute.setValue("true"); createdFlexContainerAnnc.getCustomAttributes().add(customAttribute); // prepare update request diff --git a/org.eclipse.om2m.datamapping.jaxb/.classpath b/org.eclipse.om2m.datamapping.jaxb/.classpath deleted file mode 100644 index 900f6a34..00000000 --- a/org.eclipse.om2m.datamapping.jaxb/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/org.eclipse.om2m.datamapping.jaxb/.project b/org.eclipse.om2m.datamapping.jaxb/.project deleted file mode 100644 index a177a8bd..00000000 --- a/org.eclipse.om2m.datamapping.jaxb/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.datamapping.jaxb - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.datamapping.jaxb/pom.xml b/org.eclipse.om2m.datamapping.jaxb/pom.xml index d743f207..7d7a7672 100644 --- a/org.eclipse.om2m.datamapping.jaxb/pom.xml +++ b/org.eclipse.om2m.datamapping.jaxb/pom.xml @@ -27,4 +27,63 @@ 1.1.0-SNAPSHOT org.eclipse.om2m :: datamapper jaxb + + + + junit + junit + 4.11 + test + + + + + + + src/test/java + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.8 + 1.8 + + + + compiletests + test-compile + + testCompile + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.0 + + + test + test + + + **/*.java + + methods + 10 + + + test + + + + + + + \ No newline at end of file diff --git a/org.eclipse.om2m.datamapping.jaxb/src/main/resources/json-binding.json b/org.eclipse.om2m.datamapping.jaxb/src/main/resources/json-binding.json index 222fadde..c7b88d58 100644 --- a/org.eclipse.om2m.datamapping.jaxb/src/main/resources/json-binding.json +++ b/org.eclipse.om2m.datamapping.jaxb/src/main/resources/json-binding.json @@ -206,6 +206,138 @@ "name": "ChildResourceRef", "java-attributes": { } + }, + { + "name": "DynAuthDasRequest", + "java-attributes": { + "xml-element": [ + { + "java-attribute": "originator", + "name": "og", + "namespace": "" + }, + { + "java-attribute": "targetedResourceType", + "name": "tirt", + "namespace": "" + }, + { + "java-attribute": "operation", + "name": "op", + "namespace": "" + }, + { + "java-attribute": "originatorIP", + "name": "oip", + "namespace": "" + }, + { + "java-attribute": "originatorLocation", + "name": "olo", + "namespace": "" + }, + { + "java-attribute": "originatorRoleIDs", + "name": "orid", + "namespace": "" + }, + { + "java-attribute": "requestTimestamp", + "name": "rts", + "namespace": "" + }, + { + "java-attribute": "targetedResourceID", + "name": "trid", + "namespace": "" + }, + { + "java-attribute": "proposedPrivilegesLifetime", + "name": "ppl", + "namespace": "" + }, + { + "java-attribute": "roleIDsFromACPs", + "name": "rfa", + "namespace": "" + }, + { + "java-attribute": "tokenIDs", + "name": "tids", + "namespace": "" + } + ] + } + }, + { + "name": "DynAuthTokenReqInfo", + "java-attributes": { + "xml-element": [ + { + "java-attribute": "dasInfo", + "name": "dasi", + "namespace": "" + } + ] + } + }, + { + "name": "DasInfo", + "java-attributes": { + "xml-element": [ + { + "java-attribute": "URI", + "name": "uri", + "namespace": "" + }, + { + "java-attribute": "dasRequest", + "name": "daq", + "namespace": "" + } + ] + } + }, + { + "name": "MgmtObj", + "java-attributes": { + "xml-element": [ + { + "java-attribute": "objectIDs", + "name": "obis", + "namespace": "" + }, + { + "java-attribute": "objectPaths", + "name": "obps", + "namespace": "" + } + ] + } + }, + { + "name": "AreaNwkDeviceInfo", + "java-attributes": { + "xml-element": [ + { + "java-attribute": "listOfNeighbors", + "name": "lnh", + "namespace": "" + } + ] + } + }, + { + "name": "AreaNwkInfo", + "java-attributes": { + "xml-element": [ + { + "java-attribute": "listOfDevices", + "name": "ldv", + "namespace": "" + } + ] + } } ] } diff --git a/org.eclipse.om2m.datamapping.jaxb/src/main/resources/xml-binding.xml b/org.eclipse.om2m.datamapping.jaxb/src/main/resources/xml-binding.xml index af996311..7440e52c 100644 --- a/org.eclipse.om2m.datamapping.jaxb/src/main/resources/xml-binding.xml +++ b/org.eclipse.om2m.datamapping.jaxb/src/main/resources/xml-binding.xml @@ -108,7 +108,6 @@ - @@ -136,6 +135,25 @@ + + + + + + + + + + + + + + + + + + + @@ -168,4 +186,4 @@ - \ No newline at end of file + diff --git a/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestDeviceLightFlexContainer.java b/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestDeviceLightFlexContainer.java index 1a87ace7..8bd6218e 100644 --- a/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestDeviceLightFlexContainer.java +++ b/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestDeviceLightFlexContainer.java @@ -10,7 +10,11 @@ package org.eclipse.om2m.datamapping.jaxb; import static org.junit.Assert.*; import org.eclipse.om2m.commons.constants.MimeMediaType; +import org.eclipse.om2m.commons.resource.CustomAttribute; import org.eclipse.om2m.commons.resource.flexcontainerspec.BinarySwitchFlexContainer; +import org.eclipse.om2m.commons.resource.flexcontainerspec.BrightnessFlexContainer; +import org.eclipse.om2m.commons.resource.flexcontainerspec.ColourFlexContainer; +import org.eclipse.om2m.commons.resource.flexcontainerspec.ColourSaturationFlexContainer; import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceLightFlexContainer; import org.eclipse.om2m.commons.resource.flexcontainerspec.ToggleFlexContainer; import org.junit.After; @@ -56,6 +60,125 @@ public class MapperTestDeviceLightFlexContainer extends AbstractMapperTest { assertTrue(toggleObject instanceof ToggleFlexContainer); + } + + @Test + public void testDatashareStringToObj_json() { + String xmlPayload = readFile("src/test/resources/deviceLightDatashareFlexContainer.json"); + + DeviceLightFlexContainer deviceLightFlexContainer = (DeviceLightFlexContainer) jsonMapper.stringToObj(xmlPayload); + + assertNotNull(deviceLightFlexContainer); + + assertFalse(deviceLightFlexContainer.getFlexContainerOrContainerOrSubscription().isEmpty()); + assertTrue(deviceLightFlexContainer.getFlexContainerOrContainerOrSubscription().size() == 4); + + ColourSaturationFlexContainer colorSaturationFlexContainer = null; + ColourFlexContainer colourFlexContainer = null; + BrightnessFlexContainer brightnessFlexContainer = null; + BinarySwitchFlexContainer binarySwitchFlexContainer = null; + for(Object o : deviceLightFlexContainer.getFlexContainerOrContainerOrSubscription()) { + if (o instanceof ColourSaturationFlexContainer) { + colorSaturationFlexContainer = (ColourSaturationFlexContainer) o; + } else if (o instanceof ColourFlexContainer) { + colourFlexContainer = (ColourFlexContainer) o; + } else if (o instanceof BrightnessFlexContainer) { + brightnessFlexContainer = (BrightnessFlexContainer) o; + } else if (o instanceof BinarySwitchFlexContainer) { + binarySwitchFlexContainer = (BinarySwitchFlexContainer) o; + } + } + + assertNotNull(colorSaturationFlexContainer); + assertNotNull(colourFlexContainer); + assertNotNull(brightnessFlexContainer); + assertNotNull(binarySwitchFlexContainer); + + // colorSaturation + assertTrue("org.onem2m.home.moduleclass.colourSaturation".equals(colorSaturationFlexContainer.getContainerDefinition())); + assertTrue(colorSaturationFlexContainer.getResourceType().intValue() == 28); + assertTrue(!colorSaturationFlexContainer.getCustomAttributes().isEmpty()); + System.out.println("nb of custumAttributes: " + colorSaturationFlexContainer.getCustomAttributes().size()); + System.out.println("======================================================="); + for(CustomAttribute ca : colorSaturationFlexContainer.getCustomAttributes()) { + System.out.println("CA longName=" + ca.getLongName()); + System.out.println("CA shortName=" + ca.getShortName()); + System.out.println("CA value=" + ca.getValue()); + System.out.println("CA type=" + ca.getType()); + System.out.println("------------------------------------"); + } + System.out.println("======================================================="); + assertTrue(colorSaturationFlexContainer.getCustomAttributes().size() == 1); + CustomAttribute colSn = colorSaturationFlexContainer.getCustomAttribute("colSn"); + assertNotNull(colSn); + assertTrue("xs:integer".equals(colSn.getType())); + System.out.println("colSn value=" + colSn.getValue()); + assertTrue("73".equals(colSn.getValue())); + assertTrue("colSn".equals(colSn.getShortName())); + assertTrue("colourSaturation".equals(colSn.getLongName())); + + + // color + assertTrue("org.onem2m.home.moduleclass.colour".equals(colourFlexContainer.getContainerDefinition())); + assertTrue(colourFlexContainer.getResourceType().intValue() == 28); + assertTrue(!colourFlexContainer.getCustomAttributes().isEmpty()); + assertTrue(colourFlexContainer.getCustomAttributes().size() == 3); + CustomAttribute red = colourFlexContainer.getCustomAttribute("red"); + assertNotNull(red); + assertTrue("red".equals(red.getShortName())); + assertTrue("red".equals(red.getLongName())); + assertTrue("xs:integer".equals(red.getType())); + assertTrue("66".equals(red.getValue())); + CustomAttribute blue = colourFlexContainer.getCustomAttribute("blue"); + assertNotNull(blue); + assertTrue("blue".equals(blue.getShortName())); + assertTrue("blue".equals(blue.getLongName())); + assertTrue("xs:integer".equals(blue.getType())); + assertTrue("244".equals(blue.getValue())); + CustomAttribute green = colourFlexContainer.getCustomAttribute("green"); + assertNotNull(green); + assertTrue("green".equals(green.getShortName())); + assertTrue("green".equals(green.getLongName())); + assertTrue("xs:integer".equals(green.getType())); + assertTrue("115".equals(green.getValue())); + + // brightness + assertTrue("org.onem2m.home.moduleclass.brightness".equals(brightnessFlexContainer.getContainerDefinition())); + assertTrue(brightnessFlexContainer.getResourceType().intValue() == 28); + assertTrue(!brightnessFlexContainer.getCustomAttributes().isEmpty()); + assertTrue(brightnessFlexContainer.getCustomAttributes().size() == 1); + CustomAttribute brigs = brightnessFlexContainer.getCustomAttribute("brigs"); + assertNotNull(brigs); + assertTrue("brigs".equals(brigs.getShortName())); + assertTrue("brightness".equals(brigs.getLongName())); + assertTrue("xs:integer".equals(brigs.getType())); + assertTrue("96".equals(brigs.getValue())); + + // binarySwitch + assertTrue("org.onem2m.home.moduleclass.binarySwitch".equals(binarySwitchFlexContainer.getContainerDefinition())); + assertTrue(binarySwitchFlexContainer.getResourceType().intValue() == 28); + assertTrue(!binarySwitchFlexContainer.getCustomAttributes().isEmpty()); + assertTrue(binarySwitchFlexContainer.getCustomAttributes().size() == 1); + CustomAttribute powerState = binarySwitchFlexContainer.getCustomAttribute("powSe"); + assertNotNull(powerState); + assertTrue("powerState".equals(powerState.getLongName())); + assertTrue("powSe".equals(powerState.getShortName())); + assertTrue("xs:boolean".equals(powerState.getType())); + assertTrue("false".equals(powerState.getValue())); + ToggleFlexContainer toggle = binarySwitchFlexContainer.getToggle(); + assertNotNull(toggle); + assertTrue("org.onem2m.home.moduleclass.binarySwitch.toggle".equals(toggle.getContainerDefinition())); + assertTrue(toggle.getResourceType().intValue() == 28); + +// assertNotNull(binarySwitchFlexContainer.getToggle()); +// assertNotNull(binarySwitchFlexContainer.getFlexContainerOrContainerOrSubscription()); +// assertFalse(binarySwitchFlexContainer.getFlexContainerOrContainerOrSubscription().isEmpty()); +// assertTrue(binarySwitchFlexContainer.getFlexContainerOrContainerOrSubscription().size() == 1); +// +// Object toggleObject = binarySwitchFlexContainer.getFlexContainerOrContainerOrSubscription().get(0); +// assertTrue(toggleObject instanceof ToggleFlexContainer); + + } } diff --git a/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestDynAuthTokenReqInfo.java b/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestDynAuthTokenReqInfo.java new file mode 100644 index 00000000..58c0750f --- /dev/null +++ b/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestDynAuthTokenReqInfo.java @@ -0,0 +1,65 @@ +package org.eclipse.om2m.datamapping.jaxb; + +import static org.junit.Assert.*; + +import java.math.BigInteger; + +import org.eclipse.om2m.commons.constants.MimeMediaType; +import org.eclipse.om2m.commons.constants.Operation; +import org.eclipse.om2m.commons.constants.ResourceType; +import org.eclipse.om2m.commons.resource.DasInfo; +import org.eclipse.om2m.commons.resource.DynAuthDasRequest; +import org.eclipse.om2m.commons.resource.DynAuthTokenReqInfo; +import org.junit.Before; +import org.junit.Test; + +public class MapperTestDynAuthTokenReqInfo { + + private Mapper xmlMapper; + private Mapper jsonMapper; + + @Before + public void setUp() throws Exception { + xmlMapper = new Mapper(MimeMediaType.XML); + jsonMapper = new Mapper(MimeMediaType.JSON); + } + + @Test + public void test_xmlObjToString() { + + DynAuthTokenReqInfo tokenReqInfo = new DynAuthTokenReqInfo(); + DasInfo dasInfo = new DasInfo(); + dasInfo.setURI("http://test"); + dasInfo.setDasRequest(new DynAuthDasRequest()); + dasInfo.getDasRequest().setOperation(Operation.RETRIEVE); + dasInfo.getDasRequest().setOriginator("originator"); + dasInfo.getDasRequest().setTargetedResourceID("/incse/resource1"); + dasInfo.getDasRequest().setTargetedResourceType(BigInteger.valueOf(ResourceType.FLEXCONTAINER)); + dasInfo.getDasRequest().getTokenIDs().add("token1"); + dasInfo.getDasRequest().getTokenIDs().add("token2"); + tokenReqInfo.getDasInfo().add(dasInfo); + + System.out.println(xmlMapper.objToString(tokenReqInfo)); + + } + + @Test + public void test_jsonObjToString() { + + DynAuthTokenReqInfo tokenReqInfo = new DynAuthTokenReqInfo(); + DasInfo dasInfo = new DasInfo(); + dasInfo.setURI("http://test"); + dasInfo.setDasRequest(new DynAuthDasRequest()); + dasInfo.getDasRequest().setOperation(Operation.RETRIEVE); + dasInfo.getDasRequest().setOriginator("originator"); + dasInfo.getDasRequest().setTargetedResourceID("/incse/resource1"); + dasInfo.getDasRequest().setTargetedResourceType(BigInteger.valueOf(ResourceType.FLEXCONTAINER)); + dasInfo.getDasRequest().getTokenIDs().add("token1"); + dasInfo.getDasRequest().getTokenIDs().add("token2"); + tokenReqInfo.getDasInfo().add(dasInfo); + + System.out.println(jsonMapper.objToString(tokenReqInfo)); + + } + +} diff --git a/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestUrilList.java b/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestUrilList.java index 51bcd868..c4f8c219 100644 --- a/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestUrilList.java +++ b/org.eclipse.om2m.datamapping.jaxb/src/test/java/org/eclipse/om2m/datamapping/jaxb/MapperTestUrilList.java @@ -80,9 +80,13 @@ public class MapperTestUrilList extends AbstractMapperTest { URIList uriList = new URIList(); uriList.getListOfUri().add("tof"); uriList.getListOfUri().add("plouf"); - String s = jsonMapper.objToString(uriList); + String s = jsonMapper.objToString(uriList).replaceAll("\\s", ""); + System.out.println(s); String expectedString = "{\r\n" + " \"m2m:uril\" : [ \"tof\", \"plouf\" ]\r\n" + "}"; + expectedString = expectedString.replaceAll("\\s", ""); + System.out.println(expectedString); + assertTrue(expectedString.equals(s)); } @@ -98,7 +102,7 @@ public class MapperTestUrilList extends AbstractMapperTest { URIList uriList = (URIList) object; - // impossible de passer de string object. + // impossible de passer de string a object. } diff --git a/org.eclipse.om2m.datamapping.jaxb/src/test/resources/deviceLightDatashareFlexContainer.json b/org.eclipse.om2m.datamapping.jaxb/src/test/resources/deviceLightDatashareFlexContainer.json new file mode 100644 index 00000000..59d56a98 --- /dev/null +++ b/org.eclipse.om2m.datamapping.jaxb/src/test/resources/deviceLightDatashareFlexContainer.json @@ -0,0 +1,84 @@ +{ + "hd:devLt": { + "cnd": "org.onem2m.home.device.deviceLight", + "ty": 28, + "ri": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLWRldmljZS1kZXZpY2VMaWdodA==", + "pi": "/in-cse/ipe-datashare", + "ct": 1507310624000, + "lt": 1525296379453, + "lbl": [ + "object.type/device" + ], + "rn": "org.onem2m.home.device.deviceLight__MzkxMioxMTI4OSpsaWZ4OmxpZnhfY29sb3JfYTE5QGQwNzNkNTEyNDkxYg==", + "pDSNm": "d073d512491b", + "prDMr": "lifx", + "pDMNe": "lifx:lifx_color_a19", + "prDTe": 4, + "hd:colSn": { + "cnd": "org.onem2m.home.moduleclass.colourSaturation", + "ty": 28, + "ri": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLW1vZHVsZWNsYXNzLWNvbG91clNhdHVyYXRpb24=", + "pi": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLWRldmljZS1kZXZpY2VMaWdodA==", + "ct": 1507310624000, + "lt": 1525296379453, + "lbl": [ + "object.type/module" + ], + "rn": "org.onem2m.home.moduleclass.colourSaturation__MzkxMioxMTI4OSpsaWZ4OmxpZnhfY29sb3JfYTE5QGQwNzNkNTEyNDkxYg==", + "colSn": 73 + }, + "hd:binSh": { + "cnd": "org.onem2m.home.moduleclass.binarySwitch", + "ty": 28, + "ri": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLW1vZHVsZWNsYXNzLWJpbmFyeVN3aXRjaA==", + "pi": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLWRldmljZS1kZXZpY2VMaWdodA==", + "ct": 1507310624000, + "lt": 1525296379453, + "lbl": [ + "object.type/module" + ], + "rn": "org.onem2m.home.moduleclass.binarySwitch__MzkxMioxMTI4OSpsaWZ4OmxpZnhfY29sb3JfYTE5QGQwNzNkNTEyNDkxYg==", + "powSe": false, + "hd:togge": { + "cnd": "org.onem2m.home.moduleclass.binarySwitch.toggle", + "ty": 28, + "ri": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLWFjdGlvbi10b2dnbGUtYmluYXJ5U3dpdGNo", + "pi": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLW1vZHVsZWNsYXNzLWJpbmFyeVN3aXRjaC1iaW5hcnlTd2l0Y2g=", + "ct": 1507310624000, + "lt": 1525296379453, + "lbl": [ + "object.type/action" + ], + "rn": "org.onem2m.home.moduleclass.binarySwitch.toggle__MzkxMioxMTI4OSpsaWZ4OmxpZnhfY29sb3JfYTE5QGQwNzNkNTEyNDkxYg==" + } + }, + "hd:brigs": { + "cnd": "org.onem2m.home.moduleclass.brightness", + "ty": 28, + "ri": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLW1vZHVsZWNsYXNzLWJyaWdodG5lc3M=", + "pi": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLWRldmljZS1kZXZpY2VMaWdodA==", + "ct": 1507310624000, + "lt": 1525296379453, + "lbl": [ + "object.type/module" + ], + "rn": "org.onem2m.home.moduleclass.brightness__MzkxMioxMTI4OSpsaWZ4OmxpZnhfY29sb3JfYTE5QGQwNzNkNTEyNDkxYg==", + "brigs": 96 + }, + "hd:color": { + "cnd": "org.onem2m.home.moduleclass.colour", + "ty": 28, + "ri": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLW1vZHVsZWNsYXNzLWNvbG91cg==", + "pi": "/in-cse/ZmNudC0zOTEyKjExMjg5KmxpZng6bGlmeF9jb2xvcl9hMTlAZDA3M2Q1MTI0OTFiLWRldmljZS1kZXZpY2VMaWdodA==", + "ct": 1507310624000, + "lt": 1525296379453, + "lbl": [ + "object.type/module" + ], + "rn": "org.onem2m.home.moduleclass.colour__MzkxMioxMTI4OSpsaWZ4OmxpZnhfY29sb3JfYTE5QGQwNzNkNTEyNDkxYg==", + "red": 66, + "green": 115, + "blue": 244 + } + } +} \ No newline at end of file diff --git a/org.eclipse.om2m.datamapping.service/.classpath b/org.eclipse.om2m.datamapping.service/.classpath deleted file mode 100644 index 98ddc48e..00000000 --- a/org.eclipse.om2m.datamapping.service/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.datamapping.service/.project b/org.eclipse.om2m.datamapping.service/.project deleted file mode 100644 index 1197089c..00000000 --- a/org.eclipse.om2m.datamapping.service/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.datamapping.service - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.flexcontainer.service/src/main/java/org/eclipse/om2m/flexcontainer/service/FlexContainerService.java b/org.eclipse.om2m.flexcontainer.service/src/main/java/org/eclipse/om2m/flexcontainer/service/FlexContainerService.java index 69042496..10c017a2 100644 --- a/org.eclipse.om2m.flexcontainer.service/src/main/java/org/eclipse/om2m/flexcontainer/service/FlexContainerService.java +++ b/org.eclipse.om2m.flexcontainer.service/src/main/java/org/eclipse/om2m/flexcontainer/service/FlexContainerService.java @@ -19,7 +19,7 @@ public interface FlexContainerService { /** * Get the most updated value of a custom attribute * - * @param customAttributeName + * @param name * name of the custom attribute * @return the most updated value of the custom attribute */ diff --git a/org.eclipse.om2m.interworking.service/.classpath b/org.eclipse.om2m.interworking.service/.classpath deleted file mode 100644 index 642bfb34..00000000 --- a/org.eclipse.om2m.interworking.service/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.interworking.service/.project b/org.eclipse.om2m.interworking.service/.project deleted file mode 100644 index 7262bca5..00000000 --- a/org.eclipse.om2m.interworking.service/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.interworking.service - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.ipe.dal/.classpath b/org.eclipse.om2m.ipe.dal/.classpath deleted file mode 100644 index a95e0906..00000000 --- a/org.eclipse.om2m.ipe.dal/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.ipe.dal/.project b/org.eclipse.om2m.ipe.dal/.project deleted file mode 100644 index 42f3cf07..00000000 --- a/org.eclipse.om2m.ipe.dal/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.ipe.dal - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.ipe.sample.sdt/.classpath b/org.eclipse.om2m.ipe.sample.sdt/.classpath deleted file mode 100644 index a95e0906..00000000 --- a/org.eclipse.om2m.ipe.sample.sdt/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.ipe.sample.sdt/.project b/org.eclipse.om2m.ipe.sample.sdt/.project deleted file mode 100644 index 62a1a098..00000000 --- a/org.eclipse.om2m.ipe.sample.sdt/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.ipe.sample.sdt - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.ipe.sample.sdt/src/main/java/org/eclipse/om2m/ipe/sample/sdt/model/Lamp.java b/org.eclipse.om2m.ipe.sample.sdt/src/main/java/org/eclipse/om2m/ipe/sample/sdt/model/Lamp.java index d0b5259f..a296c448 100644 --- a/org.eclipse.om2m.ipe.sample.sdt/src/main/java/org/eclipse/om2m/ipe/sample/sdt/model/Lamp.java +++ b/org.eclipse.om2m.ipe.sample.sdt/src/main/java/org/eclipse/om2m/ipe/sample/sdt/model/Lamp.java @@ -33,7 +33,7 @@ public class Lamp extends Light { addModule(new SampleColour("colour_" + id, domain)); addModule(new ColourSaturation("colourSaturation_" + id, domain, - new IntegerDataPoint(DatapointType.colourSat) { + new IntegerDataPoint(DatapointType.colourSaturation) { private Integer v = new Integer((int)(Math.random() * 100)); @Override public void doSetValue(Integer value) throws DataPointException { diff --git a/org.eclipse.om2m.ipe.sample/.classpath b/org.eclipse.om2m.ipe.sample/.classpath deleted file mode 100644 index 642bfb34..00000000 --- a/org.eclipse.om2m.ipe.sample/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.ipe.sample/.project b/org.eclipse.om2m.ipe.sample/.project deleted file mode 100644 index 9fb298e3..00000000 --- a/org.eclipse.om2m.ipe.sample/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.ipe.sample - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/.classpath b/org.eclipse.om2m.ipe.sdt.testsuite/.classpath deleted file mode 100644 index 56b865eb..00000000 --- a/org.eclipse.om2m.ipe.sdt.testsuite/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/.project b/org.eclipse.om2m.ipe.sdt.testsuite/.project deleted file mode 100644 index da3a3315..00000000 --- a/org.eclipse.om2m.ipe.sdt.testsuite/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.ipe.sdt.testsuite - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/CSEUtil.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/CSEUtil.java index 1cab2e09..00efd551 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/CSEUtil.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/CSEUtil.java @@ -25,7 +25,6 @@ import org.eclipse.om2m.core.service.CseService; public class CSEUtil { public static ResponsePrimitive retrieveEntity(CseService cseService, String flexContainerLocation) { - RequestPrimitive request = new RequestPrimitive(); request.setFrom(Constants.ADMIN_REQUESTING_ENTITY); request.setRequestContentType(MimeMediaType.OBJ); @@ -34,7 +33,6 @@ public class CSEUtil { request.setTo(flexContainerLocation); return cseService.doRequest(request); - } public static ResponsePrimitive updateFlexContainerEntity(CseService cseService, String flexContainerLocation, AbstractFlexContainer flexContainer) { @@ -50,7 +48,6 @@ public class CSEUtil { } public static ResponsePrimitive discovery(final CseService cseService, final List labels, final String to) { - RequestPrimitive request = new RequestPrimitive(); request.setFrom(Constants.ADMIN_REQUESTING_ENTITY); request.setRequestContentType(MimeMediaType.OBJ); diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/DeviceDiscoveryTestSuite.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/DeviceDiscoveryTestSuite.java index 88e929f1..745fd45b 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/DeviceDiscoveryTestSuite.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/DeviceDiscoveryTestSuite.java @@ -28,7 +28,6 @@ import org.eclipse.om2m.sdt.datapoints.ValuedDataPoint; import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.types.DataType; -import org.eclipse.om2m.sdt.types.SimpleType; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.util.tracker.ServiceTracker; @@ -41,9 +40,10 @@ public class DeviceDiscoveryTestSuite { private final BundleContext bundleContext; private final CseService cseService; - private final ServiceTracker deviceServiceTracker; + private final ServiceTracker deviceServiceTracker; private final List devices; + @SuppressWarnings({ "unchecked", "rawtypes" }) public DeviceDiscoveryTestSuite(BundleContext context, CseService pCseService) { this.bundleContext = context; this.cseService = pCseService; @@ -52,21 +52,17 @@ public class DeviceDiscoveryTestSuite { deviceServiceTracker = new ServiceTracker(bundleContext, Device.class.getName(), new ServiceTrackerCustomizer() { - @Override public void removedService(ServiceReference reference, Object service) { removeDevice((Device) service); } - @Override public void modifiedService(ServiceReference reference, Object service) { } - @Override public Object addingService(ServiceReference reference) { Device device = (Device) bundleContext.getService(reference); addDevice(device); - checkDevice(device); return device; } @@ -167,7 +163,7 @@ public class DeviceDiscoveryTestSuite { // at this point, we are sure the CustomAttribute exist if (attributeValue == null) { - if (customAttribute.getCustomAttributeValue() != null) { + if (customAttribute.getValue() != null) { System.out.println("checkCustomAttribute(name=" + attributeName + ", expectedValue=" + attributeValue + ") - expecting null value"); return false; @@ -176,16 +172,17 @@ public class DeviceDiscoveryTestSuite { } } - boolean result = attributeValue.equals(customAttribute.getCustomAttributeValue()); + boolean result = attributeValue.equals(customAttribute.getValue()); if (!result) { System.out.println("checkCustomAttribute(name=" + attributeName + ", expectedValue=" + attributeValue - + ") - found " + customAttribute.getCustomAttributeValue() + "- foundType=" - + customAttribute.getCustomAttributeValue().getClass()); + + ") - found " + customAttribute.getValue() + "- foundType=" + + customAttribute.getValue().getClass()); } return result; } + @SuppressWarnings("unchecked") private boolean checkModule(Module module, String moduleLocation) { System.out.println("checkModule(name=" + module.getName() + ")"); ResponsePrimitive response = CSEUtil.retrieveEntity(cseService, moduleLocation); @@ -255,6 +252,7 @@ public class DeviceDiscoveryTestSuite { return true; } + @SuppressWarnings("unchecked") private boolean writeDataPoint(Module module, String moduleLocation, DataPoint dataPoint) { System.out.println("writeDataPoint(moduleName=" + module.getName() + ", moduleLocation=" + moduleLocation + ", dataPointName=" + dataPoint.getName()); @@ -284,8 +282,6 @@ public class DeviceDiscoveryTestSuite { Boolean currentValueBoolean = (Boolean) currentValue; newValue = Boolean.valueOf(!currentValueBoolean.booleanValue()).toString(); } else if (dataPoint.getDataType().equals(DataType.Integer)) { - Integer currentValueInteger = (Integer) currentValue; - // colour if ("red".equals(dataPoint.getName()) || "green".equals(dataPoint.getName()) || "blue".equals(dataPoint.getName())) { @@ -298,8 +294,8 @@ public class DeviceDiscoveryTestSuite { // set new value through the ipe AbstractFlexContainer updateFc = FlexContainerFactory.getSpecializationFlexContainer(module.getShortDefinitionName()); CustomAttribute dataPointCA = new CustomAttribute(); - dataPointCA.setCustomAttributeName(dataPoint.getName()); - dataPointCA.setCustomAttributeValue(newValue); + dataPointCA.setShortName(dataPoint.getShortName()); + dataPointCA.setValue(newValue); updateFc.getCustomAttributes().add(dataPointCA); // send request @@ -374,8 +370,8 @@ public class DeviceDiscoveryTestSuite { for (String name : action.getArgNames()) { CustomAttribute ca = new CustomAttribute(); executionFlexContainer.getCustomAttributes().add(ca); - ca.setCustomAttributeName(name); - ca.setCustomAttributeValue("12"); + ca.setShortName(name); + ca.setValue("12"); } response = CSEUtil.updateFlexContainerEntity(cseService, actionLocation, executionFlexContainer); if (!ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) { @@ -388,6 +384,7 @@ public class DeviceDiscoveryTestSuite { } // Gregory BONNARDEL - 2016 05 20 : TO BE REMOVED + @SuppressWarnings("unchecked") public boolean checkDataPoint(DataPoint dataPoint, String dataPointLocation) { System.out.println("checkDataPoint(name=" + dataPoint.getName() + ", location=" + dataPointLocation + ")"); @@ -436,9 +433,9 @@ public class DeviceDiscoveryTestSuite { // update AbstractFlexContainer flexContainerToBeUpdated = FlexContainerFactory.getSpecializationFlexContainer(dataPointFlexContainer.getShortName()); CustomAttribute value = new CustomAttribute(); - value.setCustomAttributeName("value"); + value.setShortName("value"); String typedRandomValue = randomValue(dataPoint.getDataType().getName()); - value.setCustomAttributeValue(typedRandomValue); + value.setValue(typedRandomValue); flexContainerToBeUpdated.getCustomAttributes().add(value); response = CSEUtil.updateFlexContainerEntity(cseService, dataPointLocation, flexContainerToBeUpdated); diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/SDTModuleTestSuite.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/SDTModuleTestSuite.java index d23cc401..cde1ec53 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/SDTModuleTestSuite.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/SDTModuleTestSuite.java @@ -11,14 +11,12 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.om2m.core.service.CseService; -import org.eclipse.om2m.ipe.sdt.testsuite.TestReport.State; import org.eclipse.om2m.ipe.sdt.testsuite.module.AbstractModuleTest; import org.eclipse.om2m.ipe.sdt.testsuite.module.AlarmSpeakerModuleTest; import org.eclipse.om2m.ipe.sdt.testsuite.module.BinarySwitchModuleTest; import org.eclipse.om2m.ipe.sdt.testsuite.module.ColourModuleTest; import org.eclipse.om2m.ipe.sdt.testsuite.module.ColourSaturationModuleTest; import org.eclipse.om2m.ipe.sdt.testsuite.module.FaultDetectionModuleTest; -import org.eclipse.om2m.ipe.sdt.testsuite.module.RunModeModuleTest; import org.eclipse.om2m.ipe.sdt.testsuite.module.SmokeSensorModuleTest; import org.eclipse.om2m.ipe.sdt.testsuite.module.WaterLevelModuleTest; import org.eclipse.om2m.ipe.sdt.testsuite.module.WaterSensorModuleTest; @@ -101,9 +99,9 @@ public class SDTModuleTestSuite { case "org.onem2m.home.moduleclass.waterSensor": amt = new WaterSensorModuleTest(cseService, module); break; - case "org.onem2m.home.moduleclass.runMode": - amt = new RunModeModuleTest(cseService, module); - break; +// case "org.onem2m.home.moduleclass.runMode": +// amt = new RunStateModuleTest(cseService, module); +// break; case "org.onem2m.home.moduleclass.alarmSpeaker": amt = new AlarmSpeakerModuleTest(cseService, module); break; diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/AbstractModuleTest.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/AbstractModuleTest.java index 8416b513..40d79be3 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/AbstractModuleTest.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/AbstractModuleTest.java @@ -15,7 +15,6 @@ import java.util.List; import org.eclipse.om2m.commons.constants.Constants; import org.eclipse.om2m.commons.constants.ResponseStatusCode; -import org.eclipse.om2m.commons.resource.DiscoveryResult; import org.eclipse.om2m.commons.resource.ResponsePrimitive; import org.eclipse.om2m.commons.resource.URIList; import org.eclipse.om2m.core.service.CseService; diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/AlarmSpeakerModuleTest.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/AlarmSpeakerModuleTest.java index 0706ce44..46cb326d 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/AlarmSpeakerModuleTest.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/AlarmSpeakerModuleTest.java @@ -18,10 +18,10 @@ import org.eclipse.om2m.ipe.sdt.testsuite.TestReport.State; import org.eclipse.om2m.sdt.Module; import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; -import org.eclipse.om2m.sdt.home.types.AlertColourCode; -import org.eclipse.om2m.sdt.home.types.DatapointType; import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.types.AlertColourCode; +import org.eclipse.om2m.sdt.home.types.DatapointType; public class AlarmSpeakerModuleTest extends AbstractModuleTest { @@ -62,10 +62,10 @@ public class AlarmSpeakerModuleTest extends AbstractModuleTest { // toneCA exist ==> check value Integer toneValueFromFlexContainer = null; try { - toneValueFromFlexContainer = Integer.parseInt(toneCA.getCustomAttributeValue()); + toneValueFromFlexContainer = Integer.parseInt(toneCA.getValue()); } catch (NumberFormatException e) { report.setErrorMessage( - "NumberFormatException on toneValue from FlexContainer:" + toneCA.getCustomAttributeValue()); + "NumberFormatException on toneValue from FlexContainer:" + toneCA.getValue()); report.setException(e); report.setState(State.KO); return report; @@ -132,8 +132,8 @@ public class AlarmSpeakerModuleTest extends AbstractModuleTest { // set toneCA toneCA = new CustomAttribute(); - toneCA.setCustomAttributeName(DatapointType.tone.getShortName()); - toneCA.setCustomAttributeValue(possibleValue.toString()); + toneCA.setShortName(DatapointType.tone.getShortName()); + toneCA.setValue(possibleValue.toString()); // flexcontainer toBeUpdated = new AlarmSpeakerFlexContainer(); @@ -167,8 +167,9 @@ public class AlarmSpeakerModuleTest extends AbstractModuleTest { // set toneCA toneCA = new CustomAttribute(); - toneCA.setCustomAttributeName(DatapointType.tone.getShortName()); - toneCA.setCustomAttributeValue("1"); // fire + toneCA.setShortName(DatapointType.tone.getShortName()); + toneCA.setValue("1"); // fire +// toneCA.setValue(Tone.Values.fire.toString()); // flexcontainer toBeUpdated = new AlarmSpeakerFlexContainer(); @@ -229,7 +230,7 @@ public class AlarmSpeakerModuleTest extends AbstractModuleTest { } // retrieve alarmStatus value from FlexContainer - Boolean alarmStatusValueFromFlexContainer = Boolean.valueOf(alarmStatusCA.getCustomAttributeValue()); + Boolean alarmStatusValueFromFlexContainer = Boolean.valueOf(alarmStatusCA.getValue()); if (!checkObject(alarmStatusValueFromDP, alarmStatusValueFromFlexContainer, report, DatapointType.alarmStatus.getShortName())) { return report; @@ -267,8 +268,8 @@ public class AlarmSpeakerModuleTest extends AbstractModuleTest { // prepare request CustomAttribute alarmStatusCA = new CustomAttribute(); - alarmStatusCA.setCustomAttributeName(DatapointType.alarmStatus.getShortName()); - alarmStatusCA.setCustomAttributeValue(newAlarmStatusValue.toString()); + alarmStatusCA.setShortName(DatapointType.alarmStatus.getShortName()); + alarmStatusCA.setValue(newAlarmStatusValue.toString()); AlarmSpeakerFlexContainer toBeUpdated = new AlarmSpeakerFlexContainer(); toBeUpdated.getCustomAttributes().add(alarmStatusCA); @@ -311,7 +312,7 @@ public class AlarmSpeakerModuleTest extends AbstractModuleTest { AlertColourCode lightDP = (AlertColourCode) getModule().getDataPoint(DatapointType.light.getShortName()); if (lightDP != null) { - Integer lightValueFromDP = null; + AlertColourCode.Values lightValueFromDP = null; try { lightValueFromDP = lightDP.getValue(); } catch (DataPointException | AccessException e) { @@ -340,10 +341,10 @@ public class AlarmSpeakerModuleTest extends AbstractModuleTest { // retrieve value from customAttribute Integer lightValueFromFlexContainer = null; try { - lightValueFromFlexContainer = Integer.parseInt(lightCA.getCustomAttributeValue()); + lightValueFromFlexContainer = Integer.parseInt(lightCA.getValue()); } catch (NumberFormatException e) { report.setErrorMessage("unable to cast light customAttribute value (" - + lightCA.getCustomAttributeValue() + ") as an Integer"); + + lightCA.getValue() + ") as an Integer"); report.setState(State.KO); return report; } @@ -392,7 +393,7 @@ public class AlarmSpeakerModuleTest extends AbstractModuleTest { // light datapoint exist // retrieve current value - Integer lightValueFromDP = null; + AlertColourCode.Values lightValueFromDP = null; try { lightValueFromDP = lightDP.getValue(); } catch (DataPointException | AccessException e) { @@ -403,13 +404,14 @@ public class AlarmSpeakerModuleTest extends AbstractModuleTest { } // prepare new light value - Integer newLightValue = (lightValueFromDP.intValue() == 1 ? 2 : 1); + AlertColourCode.Values newLightValue = (lightValueFromDP == AlertColourCode.Values.green) + ? AlertColourCode.Values.red : AlertColourCode.Values.green; // prepare request AlarmSpeakerFlexContainer toBeUpdated = new AlarmSpeakerFlexContainer(); CustomAttribute lightCA = new CustomAttribute(); - lightCA.setCustomAttributeName(DatapointType.light.getShortName()); - lightCA.setCustomAttributeValue(newLightValue.toString()); + lightCA.setShortName(DatapointType.light.getShortName()); + lightCA.setValue(newLightValue.toString()); toBeUpdated.getCustomAttributes().add(lightCA); // perform UPDATE request @@ -441,8 +443,8 @@ public class AlarmSpeakerModuleTest extends AbstractModuleTest { // prepare request AlarmSpeakerFlexContainer toBeUpdated = new AlarmSpeakerFlexContainer(); CustomAttribute lightCA = new CustomAttribute(); - lightCA.setCustomAttributeName(DatapointType.light.getShortName()); - lightCA.setCustomAttributeValue(Integer.valueOf(AlertColourCode.Red).toString()); + lightCA.setShortName(DatapointType.light.getShortName()); + lightCA.setValue(AlertColourCode.Values.red.toString()); toBeUpdated.getCustomAttributes().add(lightCA); // perform UPDATE request diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/BinarySwitchModuleTest.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/BinarySwitchModuleTest.java index 60fcc4dd..7051faf8 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/BinarySwitchModuleTest.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/BinarySwitchModuleTest.java @@ -53,14 +53,14 @@ public class BinarySwitchModuleTest extends AbstractModuleTest { // get powerState value BinarySwitchFlexContainer retrievedFlexContainer = (BinarySwitchFlexContainer) response.getContent(); CustomAttribute powerStateCA = retrievedFlexContainer.getCustomAttribute(DatapointType.powerState.getShortName()); - Boolean powerState = Boolean.parseBoolean(powerStateCA.getCustomAttributeValue()); + Boolean powerState = Boolean.parseBoolean(powerStateCA.getValue()); System.out.println("powerState=" + powerState); // set powerState value BinarySwitchFlexContainer toBeUpdatedFlexContainer = new BinarySwitchFlexContainer(); Boolean newPowerState = new Boolean(!powerState.booleanValue()); - powerStateCA.setCustomAttributeValue(newPowerState.toString()); + powerStateCA.setValue(newPowerState.toString()); toBeUpdatedFlexContainer.getCustomAttributes().add(powerStateCA); response = CSEUtil.updateFlexContainerEntity(getCseService(), moduleUrl, toBeUpdatedFlexContainer); if (!ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) { @@ -91,7 +91,7 @@ public class BinarySwitchModuleTest extends AbstractModuleTest { // then retrieve from OM2M tree retrievedFlexContainer = (BinarySwitchFlexContainer) response.getContent(); powerStateCA = retrievedFlexContainer.getCustomAttribute(DatapointType.powerState.getShortName()); - Boolean currentPowerStateValue = Boolean.parseBoolean(powerStateCA.getCustomAttributeValue()); + Boolean currentPowerStateValue = Boolean.parseBoolean(powerStateCA.getValue()); if (!currentPowerStateValue.equals(newPowerState)) { System.out.println("value from flexContainer (" + currentPowerStateValue + ") is the same as the one set (" + newPowerState +")"); } diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/ColourModuleTest.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/ColourModuleTest.java index 6f5e98ac..e1fb8d80 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/ColourModuleTest.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/ColourModuleTest.java @@ -76,9 +76,9 @@ public class ColourModuleTest extends AbstractModuleTest { CustomAttribute redCA = retrievedFlexContainer.getCustomAttribute(DatapointType.red.getShortName()); CustomAttribute greenCA = retrievedFlexContainer.getCustomAttribute(DatapointType.green.getShortName()); CustomAttribute blueCA = retrievedFlexContainer.getCustomAttribute(DatapointType.blue.getShortName()); - Integer redValueFromFlexContainer = Integer.valueOf(redCA.getCustomAttributeValue()); - Integer greenValueFromFlexContainer = Integer.valueOf(greenCA.getCustomAttributeValue()); - Integer blueValueFromFlexContainer = Integer.valueOf(blueCA.getCustomAttributeValue()); + Integer redValueFromFlexContainer = Integer.valueOf(redCA.getValue()); + Integer greenValueFromFlexContainer = Integer.valueOf(greenCA.getValue()); + Integer blueValueFromFlexContainer = Integer.valueOf(blueCA.getValue()); // get value from DataPoint IntegerDataPoint redDP = (IntegerDataPoint) getModule().getDataPoint(DatapointType.red.getShortName()); @@ -123,9 +123,9 @@ public class ColourModuleTest extends AbstractModuleTest { Integer newGreenValue = (int) (Math.random()*255d); Integer newBlueValue = (int) (Math.random()*255d); ColourFlexContainer toBeUpdated = new ColourFlexContainer(); - redCA.setCustomAttributeValue(newRedValue.toString()); - greenCA.setCustomAttributeValue(newGreenValue.toString()); - blueCA.setCustomAttributeValue(newBlueValue.toString()); + redCA.setValue(newRedValue.toString()); + greenCA.setValue(newGreenValue.toString()); + blueCA.setValue(newBlueValue.toString()); toBeUpdated.getCustomAttributes().add(redCA); toBeUpdated.getCustomAttributes().add(greenCA); toBeUpdated.getCustomAttributes().add(blueCA); @@ -179,9 +179,9 @@ public class ColourModuleTest extends AbstractModuleTest { redCA = retrievedFlexContainer.getCustomAttribute(DatapointType.red.getShortName()); greenCA = retrievedFlexContainer.getCustomAttribute(DatapointType.green.getShortName()); blueCA = retrievedFlexContainer.getCustomAttribute(DatapointType.blue.getShortName()); - redValueFromFlexContainer = Integer.valueOf(redCA.getCustomAttributeValue()); - greenValueFromFlexContainer = Integer.valueOf(greenCA.getCustomAttributeValue()); - blueValueFromFlexContainer = Integer.valueOf(blueCA.getCustomAttributeValue()); + redValueFromFlexContainer = Integer.valueOf(redCA.getValue()); + greenValueFromFlexContainer = Integer.valueOf(greenCA.getValue()); + blueValueFromFlexContainer = Integer.valueOf(blueCA.getValue()); if (Math.abs(newRedValue - redValueFromFlexContainer) > 2) { // if (!newRedValue.equals(redValueFromFlexContainer)) { report.setErrorMessage("new red value (" + newRedValue diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/ColourSaturationModuleTest.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/ColourSaturationModuleTest.java index 6457b322..c111a546 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/ColourSaturationModuleTest.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/ColourSaturationModuleTest.java @@ -75,11 +75,13 @@ public class ColourSaturationModuleTest extends AbstractModuleTest { ColourSaturationFlexContainer retrievedFlexContainer = (ColourSaturationFlexContainer) response.getContent(); // get colourSaturation custom attribute - CustomAttribute colourSaturationCA = retrievedFlexContainer.getCustomAttribute(DatapointType.colourSat.getShortName()); - Integer colourSaturationFromFlexContainer = Integer.valueOf(colourSaturationCA.getCustomAttributeValue()); + CustomAttribute colourSaturationCA = + retrievedFlexContainer.getCustomAttribute(DatapointType.colourSaturation.getShortName()); + Integer colourSaturationFromFlexContainer = Integer.valueOf(colourSaturationCA.getValue()); // get colourSaturation from module - IntegerDataPoint colourSaturationDP = (IntegerDataPoint) getModule().getDataPoint(DatapointType.colourSat.getShortName()); + IntegerDataPoint colourSaturationDP = + (IntegerDataPoint) getModule().getDataPoint(DatapointType.colourSaturation.getShortName()); Integer colourSaturationFromDP = null; try { colourSaturationFromDP = colourSaturationDP.getValue(); @@ -103,7 +105,7 @@ public class ColourSaturationModuleTest extends AbstractModuleTest { // set colourSaturation ColourSaturationFlexContainer toBeUpdated = new ColourSaturationFlexContainer(); Integer newColourSaturation = new Integer((int) (Math.random() * 100d)); - colourSaturationCA.setCustomAttributeValue(newColourSaturation.toString()); + colourSaturationCA.setValue(newColourSaturation.toString()); toBeUpdated.getCustomAttributes().add(colourSaturationCA); response = CSEUtil.updateFlexContainerEntity(getCseService(), moduleUrl, toBeUpdated); if (!ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) { @@ -140,8 +142,9 @@ public class ColourSaturationModuleTest extends AbstractModuleTest { retrievedFlexContainer = (ColourSaturationFlexContainer) response.getContent(); // get colourSaturation custom attribute - colourSaturationCA = retrievedFlexContainer.getCustomAttribute(DatapointType.colourSat.getShortName()); - colourSaturationFromFlexContainer = Integer.valueOf(colourSaturationCA.getCustomAttributeValue()); + colourSaturationCA = + retrievedFlexContainer.getCustomAttribute(DatapointType.colourSaturation.getShortName()); + colourSaturationFromFlexContainer = Integer.valueOf(colourSaturationCA.getValue()); // check value between flexContainer and newValue if (Math.abs(colourSaturationFromFlexContainer - newColourSaturation) > 2) { // if diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/FaultDetectionModuleTest.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/FaultDetectionModuleTest.java index 763f0ce9..203d6771 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/FaultDetectionModuleTest.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/FaultDetectionModuleTest.java @@ -55,9 +55,9 @@ public class FaultDetectionModuleTest extends AbstractModuleTest { CustomAttribute statusCA = retrievedFlexContainer.getCustomAttribute(DatapointType.status.getShortName()); CustomAttribute codeCA = retrievedFlexContainer.getCustomAttribute(DatapointType.code.getShortName()); // optional CustomAttribute descriptionCA = retrievedFlexContainer.getCustomAttribute(DatapointType.description.getShortName()); // optional - Boolean statusValueFromFlexContainer = Boolean.parseBoolean(statusCA.getCustomAttributeValue()); - Integer codeValueFromFlexContainer = (codeCA != null ? Integer.valueOf(codeCA.getCustomAttributeValue()) :null); - String descriptionValueFromFlexContainer = (descriptionCA != null ? descriptionCA.getCustomAttributeValue() : null); + Boolean statusValueFromFlexContainer = Boolean.parseBoolean(statusCA.getValue()); + Integer codeValueFromFlexContainer = (codeCA != null ? Integer.valueOf(codeCA.getValue()) :null); + String descriptionValueFromFlexContainer = (descriptionCA != null ? descriptionCA.getValue() : null); // retrieve Datapoint @@ -127,7 +127,7 @@ public class FaultDetectionModuleTest extends AbstractModuleTest { // set status customAttribute value FaultDetectionFlexContainer toBeUpdated = new FaultDetectionFlexContainer(); Boolean newStatusValue = (statusValueFromDP.booleanValue() ? Boolean.FALSE : Boolean.TRUE); - statusCA.setCustomAttributeValue(newStatusValue.toString()); + statusCA.setValue(newStatusValue.toString()); toBeUpdated.getCustomAttributes().add(statusCA); response = CSEUtil.updateFlexContainerEntity(getCseService(), moduleUrl, toBeUpdated); if (ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) { @@ -158,9 +158,9 @@ public class FaultDetectionModuleTest extends AbstractModuleTest { toBeUpdated = new FaultDetectionFlexContainer(); if(codeCA == null) { codeCA = new CustomAttribute(); - codeCA.setCustomAttributeName(DatapointType.code.getShortName()); + codeCA.setShortName(DatapointType.code.getShortName()); } - codeCA.setCustomAttributeValue("1"); + codeCA.setValue("1"); toBeUpdated.getCustomAttributes().add(codeCA); response = CSEUtil.updateFlexContainerEntity(getCseService(), moduleUrl, toBeUpdated); if (ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) { @@ -185,7 +185,7 @@ public class FaultDetectionModuleTest extends AbstractModuleTest { return report; } } else { - if (codeCA.getCustomAttributeValue().equals("1")) { + if (codeCA.getValue().equals("1")) { report.setErrorMessage("writable operation should fail!!!"); report.setState(State.KO); return report; @@ -197,10 +197,10 @@ public class FaultDetectionModuleTest extends AbstractModuleTest { toBeUpdated = new FaultDetectionFlexContainer(); if (descriptionCA == null) { descriptionCA = new CustomAttribute(); - descriptionCA.setCustomAttributeName(DatapointType.description.getShortName()); + descriptionCA.setShortName(DatapointType.description.getShortName()); } String newDescriptionValue = "A fake description value " + System.currentTimeMillis(); - descriptionCA.setCustomAttributeValue(newDescriptionValue); + descriptionCA.setValue(newDescriptionValue); toBeUpdated.getCustomAttributes().add(descriptionCA); response = CSEUtil.updateFlexContainerEntity(getCseService(), moduleUrl, toBeUpdated); if (ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) { @@ -227,7 +227,7 @@ public class FaultDetectionModuleTest extends AbstractModuleTest { return report; } } else { - if (newDescriptionValue.equals(descriptionCA.getCustomAttributeValue())) { + if (newDescriptionValue.equals(descriptionCA.getValue())) { report.setErrorMessage("writable operation should fail!!!"); report.setState(State.KO); return report; diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/RunModeModuleTest.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/RunModeModuleTest.java deleted file mode 100644 index 00114ae8..00000000 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/RunModeModuleTest.java +++ /dev/null @@ -1,307 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.ipe.sdt.testsuite.module; - -import java.util.Arrays; -import java.util.List; - -import org.eclipse.om2m.commons.constants.ResponseStatusCode; -import org.eclipse.om2m.commons.resource.CustomAttribute; -import org.eclipse.om2m.commons.resource.ResponsePrimitive; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RunModeFlexContainer; -import org.eclipse.om2m.core.service.CseService; -import org.eclipse.om2m.ipe.sdt.testsuite.CSEUtil; -import org.eclipse.om2m.ipe.sdt.testsuite.TestReport; -import org.eclipse.om2m.ipe.sdt.testsuite.TestReport.State; -import org.eclipse.om2m.ipe.sdt.testsuite.module.exception.FlexContainerNotFound; -import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.datapoints.ArrayDataPoint; -import org.eclipse.om2m.sdt.exceptions.AccessException; -import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.types.DatapointType; - -public class RunModeModuleTest extends AbstractModuleTest { - - private String moduleUrl = null; - - public RunModeModuleTest(CseService pCseService, Module pModule) { - super(pCseService, pModule); - - try { - moduleUrl = getModuleFlexContainerUrl(); - } catch (FlexContainerNotFound e) { - } - } - - public TestReport testGetOperationMode() { - TestReport report = new TestReport("test " + getModule().getName() + ".getOperationMode"); - - if (moduleUrl == null) { - report.setState(State.KO); - report.setErrorMessage("unable to find out FlexContainer for module " + getModule().getName()); - return report; - } - - // at this point, we are sure the Module Flexcontainer exist - ResponsePrimitive response = CSEUtil.retrieveEntity(getCseService(), moduleUrl); - if (!ResponseStatusCode.OK.equals(response.getResponseStatusCode())) { - report.setErrorMessage("unable to retrieve FlexContainer for module " + getModule().getName() + " : " - + response.getContent()); - report.setState(State.KO); - return report; - } - RunModeFlexContainer retrievedFlexContainer = (RunModeFlexContainer) response.getContent(); - - // get operationMode customAttribute - CustomAttribute operationModeCA = retrievedFlexContainer.getCustomAttribute(DatapointType.operationMode.getShortName()); - if (operationModeCA == null) { - report.setErrorMessage("operationMode customAttribute does not exist"); - report.setState(State.KO); - return report; - } - - // get operationMode value from customAttribute - List operationModeFromFlexContainer = getListFromStringArray(operationModeCA.getCustomAttributeValue()); - - // get operationMode value from Datapoint - ArrayDataPoint operationModeDP = (ArrayDataPoint) getModule().getDataPoint(DatapointType.operationMode.getShortName()); - List operationModeFromDP = null; - try { - operationModeFromDP = operationModeDP.getValue(); - } catch (DataPointException | AccessException e) { - report.setErrorMessage("unable to get operationMode value from Datapoint"); - report.setState(State.KO); - return report; - } - - // check value from flexContainer and from Datapoint - if (!checkObject(operationModeFromFlexContainer, operationModeFromDP, report, DatapointType.operationMode.getShortName())) { - return report; - } - - report.setState(State.OK); - return report; - } - - public TestReport testSetOperationMode() { - TestReport report = new TestReport("test " + getModule().getName() + ".setOperationMode"); - - if (moduleUrl == null) { - report.setState(State.KO); - report.setErrorMessage("unable to find out FlexContainer for module " + getModule().getName()); - return report; - } - - // at this point, we are sure the Module Flexcontainer exist - - // get possible values from supportedMode datapoint - ArrayDataPoint supportedModesDP = (ArrayDataPoint) getModule().getDataPoint(DatapointType.supportedModes.getShortName()); - List supportedModesFromDP; - try { - supportedModesFromDP = supportedModesDP.getValue(); - } catch (DataPointException | AccessException e1) { - report.setErrorMessage("unable to retrieve value of supportedModes Datapoint: " + e1.getMessage()); - report.setState(State.KO); - return report; - } - - // get current operationMode - ArrayDataPoint operationModeDP = (ArrayDataPoint) getModule().getDataPoint(DatapointType.operationMode.getShortName()); - List currentOperationModeValue = null; - try { - currentOperationModeValue = operationModeDP.getValue(); - } catch (DataPointException | AccessException e) { - report.setState(State.KO); - report.setErrorMessage("unable to retrieve current value of operationMode datapoint"); - return report; - } - - // find a new value - String newOperationModeValue = ""; - for (String supportedMode : supportedModesFromDP) { - if (!currentOperationModeValue.contains(supportedMode)) { - newOperationModeValue += supportedMode; - break; - } - } - newOperationModeValue += ""; - - // set operationMode value - RunModeFlexContainer toBeUpdated = new RunModeFlexContainer(); - CustomAttribute customAttribute = new CustomAttribute(); - customAttribute.setCustomAttributeName(DatapointType.operationMode.getShortName()); - customAttribute.setCustomAttributeValue(newOperationModeValue.toString()); - toBeUpdated.getCustomAttributes().add(customAttribute); - - // perform UPDATE request - ResponsePrimitive response = CSEUtil.updateFlexContainerEntity(getCseService(), moduleUrl, toBeUpdated); - if (!ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) { - report.setErrorMessage("unable to update FlexContainer for module " + getModule().getName() + " : " - + response.getContent()); - report.setState(State.KO); - return report; - } - - // perform RETRIEVE request and check value - response = CSEUtil.retrieveEntity(getCseService(), moduleUrl); - RunModeFlexContainer retrievedFlexContainer = (RunModeFlexContainer) response.getContent(); - - // get operationMode customAttribute and value - CustomAttribute operationModeCA = retrievedFlexContainer.getCustomAttribute(DatapointType.operationMode.getShortName()); - String operationModeFromFlexContainer = operationModeCA.getCustomAttributeValue(); - // remove first character and last character "[]" - operationModeFromFlexContainer = operationModeFromFlexContainer.substring(1, - operationModeFromFlexContainer.length() - 1); - if (!checkObject(newOperationModeValue, operationModeFromFlexContainer, report, DatapointType.operationMode.getShortName())) { - return report; - } - - // set an unknow value - String newOperationModeWrongValue = "unknownValue_" + System.currentTimeMillis(); - toBeUpdated = new RunModeFlexContainer(); - customAttribute.setCustomAttributeName(DatapointType.operationMode.getShortName()); - customAttribute.setCustomAttributeValue(newOperationModeWrongValue); - toBeUpdated.getCustomAttributes().add(customAttribute); - - // perform UPDATE request - response = CSEUtil.updateFlexContainerEntity(getCseService(), moduleUrl, toBeUpdated); - if (ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) { - report.setErrorMessage("expected KO on UPDATE request as operationMode value is wrong"); - report.setState(State.KO); - return report; - } - - // perform RETRIEVE request and check value did not change - response = CSEUtil.retrieveEntity(getCseService(), moduleUrl); - retrievedFlexContainer = (RunModeFlexContainer) response.getContent(); - - // get operationMode customAttribute and value - operationModeCA = retrievedFlexContainer.getCustomAttribute(DatapointType.operationMode.getShortName()); - operationModeFromFlexContainer = operationModeCA.getCustomAttributeValue(); - // remove first character and last character "[]" - operationModeFromFlexContainer = operationModeFromFlexContainer.substring(1, - operationModeFromFlexContainer.length() - 1); - if (!checkObject(newOperationModeValue, operationModeFromFlexContainer, report, DatapointType.operationMode.getShortName())) { - return report; - } - - report.setState(State.OK); - return report; - } - - public TestReport testGetSupportedModes() { - TestReport report = new TestReport("test " + getModule().getName() + ".getSupportedModes"); - - if (moduleUrl == null) { - report.setState(State.KO); - report.setErrorMessage("unable to find out FlexContainer for module " + getModule().getName()); - return report; - } - // at this point, we are sure the Module Flexcontainer exist - - // perform RETRIEVE request on module FlexContainer - ResponsePrimitive response = CSEUtil.retrieveEntity(getCseService(), moduleUrl); - if (!ResponseStatusCode.OK.equals(response.getResponseStatusCode())) { - report.setErrorMessage("unable to retrieve FlexContainer of module " + getModule().getName()); - report.setState(State.KO); - return report; - } - RunModeFlexContainer retrievedFlexContainer = (RunModeFlexContainer) response.getContent(); - - // check supportedModes customAttribute exist - CustomAttribute supportedModesCA = retrievedFlexContainer.getCustomAttribute(DatapointType.supportedModes.getShortName()); - if (supportedModesCA == null) { - report.setErrorMessage("supportedModes customAttribute does not exist"); - report.setState(State.KO); - return report; - } - - // get value from customAttribute - List supportedModesListFromFlexContainer = getListFromStringArray( - supportedModesCA.getCustomAttributeValue()); - - // get value from datapoint - ArrayDataPoint supportedModesDP = (ArrayDataPoint) getModule().getDataPoint(DatapointType.supportedModes.getShortName()); - List supportedModesListFromDP = null; - try { - supportedModesListFromDP = supportedModesDP.getValue(); - } catch (DataPointException | AccessException e) { - report.setErrorMessage("unable to retrieve supportedModes Datapoint value: " + e.getMessage()); - report.setState(State.KO); - return report; - } - - // check values between flexContainer and dp - // first check list size - if (supportedModesListFromDP.size() != supportedModesListFromFlexContainer.size()) { - report.setErrorMessage("supportedModes size from Datapoint different from the list from flexContainer"); - report.setState(State.KO); - return report; - } - for (String s : supportedModesListFromDP) { - if (!supportedModesListFromFlexContainer.contains(s)) { - report.setErrorMessage(s + " mode is not in FlexContainer list"); - report.setState(State.KO); - return report; - } - } - - report.setState(State.OK); - return report; - } - - public TestReport testSetSupportedModes() { - TestReport report = new TestReport("test " + getModule().getName() + ".setSupportedModes"); - - if (moduleUrl == null) { - report.setState(State.KO); - report.setErrorMessage("unable to find out FlexContainer for module " + getModule().getName()); - return report; - } - // at this point, we are sure the Module Flexcontainer exist - - CustomAttribute supportedModesCA = new CustomAttribute(); - supportedModesCA.setCustomAttributeName(DatapointType.supportedModes.getShortName()); - supportedModesCA.setCustomAttributeValue("mode2,mode3,mode6,mode7"); - - RunModeFlexContainer toBeUpdated = new RunModeFlexContainer(); - toBeUpdated.getCustomAttributes().add(supportedModesCA); - - // perform UPDATE request - ResponsePrimitive response = CSEUtil.updateFlexContainerEntity(getCseService(), moduleUrl, toBeUpdated); - if (!ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) { - report.setErrorMessage("unable to update supportedModes customAttribute:" + response.getContent()); - report.setState(State.KO); - return report; - } - - // retrieve value from datapoint - ArrayDataPoint supportedModesDP = (ArrayDataPoint) getModule().getDataPoint(DatapointType.supportedModes.getShortName()); - List supportedModesFromDP = null; - try { - supportedModesFromDP = supportedModesDP.getValue(); - } catch (DataPointException | AccessException e) { - report.setErrorMessage("unable to retrieve supportedModes value from datapoint:" + e.getMessage()); - report.setException(e); - report.setState(State.KO); - return report; - } - - // convert customAttribute as a list - String[] supportedModesValueFromFlexContainer_array = supportedModesCA.getCustomAttributeValue().split(","); - List supportedModesValueFromFlexContainer_list = Arrays.asList(supportedModesValueFromFlexContainer_array); - - // check value - if (!checkObject(supportedModesValueFromFlexContainer_list, supportedModesFromDP, report, DatapointType.supportedModes.getShortName())) { - return report; - } - - report.setState(State.OK); - return report; - } -} diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/SmokeSensorModuleTest.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/SmokeSensorModuleTest.java index 3502983e..597b3abf 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/SmokeSensorModuleTest.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/SmokeSensorModuleTest.java @@ -60,7 +60,7 @@ public class SmokeSensorModuleTest extends AbstractModuleTest { report.setState(State.KO); return report; } - Boolean alarm = Boolean.parseBoolean(alarmCA.getCustomAttributeValue()); + Boolean alarm = Boolean.parseBoolean(alarmCA.getValue()); // alarm from module BooleanDataPoint alarmDP = (BooleanDataPoint) getModule().getDataPoint(DatapointType.alarm.getShortName()); @@ -81,7 +81,7 @@ public class SmokeSensorModuleTest extends AbstractModuleTest { // try to set value SmokeSensorFlexContainer toBeUpdated = new SmokeSensorFlexContainer(); - alarmCA.setCustomAttributeValue("true"); + alarmCA.setValue("true"); toBeUpdated.getCustomAttributes().add(alarmCA); response = CSEUtil.updateFlexContainerEntity(getCseService(), moduleUrl, toBeUpdated); if (ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) { @@ -104,7 +104,7 @@ public class SmokeSensorModuleTest extends AbstractModuleTest { if (detectedTimeCA != null) { // detectedTime is optional - Integer detectedTime = new Integer(detectedTimeCA.getCustomAttributeValue()); + Integer detectedTime = new Integer(detectedTimeCA.getValue()); // get detectedTime from module IntegerDataPoint detectedTimeDP = (IntegerDataPoint) getModule().getDataPoint(DatapointType.detectedTime.getShortName()); diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/WaterLevelModuleTest.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/WaterLevelModuleTest.java index a56c6718..a07a9b1b 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/WaterLevelModuleTest.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/WaterLevelModuleTest.java @@ -16,10 +16,10 @@ import org.eclipse.om2m.ipe.sdt.testsuite.CSEUtil; import org.eclipse.om2m.ipe.sdt.testsuite.TestReport; import org.eclipse.om2m.ipe.sdt.testsuite.TestReport.State; import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.LiquidLevel; import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.LiquidLevel; public class WaterLevelModuleTest extends AbstractModuleTest { @@ -58,7 +58,7 @@ public class WaterLevelModuleTest extends AbstractModuleTest { LiquidLevel liquidLevelDP = (LiquidLevel) getModule().getDataPoint(DatapointType.liquidLevel.getShortName()); // retrieve liquidLevel value from datapoint - Integer liquidLevelValueFromDP = null; + LiquidLevel.Values liquidLevelValueFromDP = null; try { liquidLevelValueFromDP = liquidLevelDP.getValue(); } catch (DataPointException | AccessException e) { @@ -71,9 +71,9 @@ public class WaterLevelModuleTest extends AbstractModuleTest { // retrieve value from customAttribute Integer liquidLevelFromFlexContainer = null; try { - liquidLevelFromFlexContainer = Integer.parseInt(liquidLevelCA.getCustomAttributeValue()); + liquidLevelFromFlexContainer = Integer.parseInt(liquidLevelCA.getValue()); } catch (NumberFormatException nfe) { - report.setErrorMessage("unable to cast liquidLevel customAttribute value (" + liquidLevelCA.getCustomAttributeValue() + ") as an Integer"); + report.setErrorMessage("unable to cast liquidLevel customAttribute value (" + liquidLevelCA.getValue() + ") as an Integer"); report.setState(State.KO); return report; } @@ -82,7 +82,6 @@ public class WaterLevelModuleTest extends AbstractModuleTest { return report; } - report.setState(State.OK); return report; } @@ -96,7 +95,7 @@ public class WaterLevelModuleTest extends AbstractModuleTest { // retrieve liquidLevel datapoint LiquidLevel liquidLevelDP = (LiquidLevel) getModule().getDataPoint(DatapointType.liquidLevel.getShortName()); - Integer liquidLevelFromDP = null; + LiquidLevel.Values liquidLevelFromDP = null; try { liquidLevelFromDP = liquidLevelDP.getValue(); } catch (DataPointException | AccessException e) { @@ -107,13 +106,13 @@ public class WaterLevelModuleTest extends AbstractModuleTest { } // compute new value for liquidLevel customAttribute (value between 1 and 5) - Integer newLiquidLevelValue = (liquidLevelFromDP.intValue() == 1 ? 5 : 1); + Integer newLiquidLevelValue = (liquidLevelFromDP.ordinal() == 1 ? 5 : 1); // prepare FlexContainer + customAttribute LiquidLevelFlexContainer toBeUpdated = new LiquidLevelFlexContainer(); CustomAttribute liquidLevelCA = new CustomAttribute(); - liquidLevelCA.setCustomAttributeName(DatapointType.liquidLevel.getShortName()); - liquidLevelCA.setCustomAttributeValue(newLiquidLevelValue.toString()); + liquidLevelCA.setShortName(DatapointType.liquidLevel.getShortName()); + liquidLevelCA.setValue(newLiquidLevelValue.toString()); toBeUpdated.getCustomAttributes().add(liquidLevelCA); // perform UPDATE request diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/WaterSensorModuleTest.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/WaterSensorModuleTest.java index 1ee6daf1..5ade949e 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/WaterSensorModuleTest.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/module/WaterSensorModuleTest.java @@ -57,15 +57,15 @@ public class WaterSensorModuleTest extends AbstractModuleTest { // retrieve alarm value from flexContainer Boolean alarmValueFromFlexContainer = null; - if (alarmCA.getCustomAttributeValue() == null) { + if (alarmCA.getValue() == null) { report.setErrorMessage("alarm customAttribute value is null"); report.setState(State.KO); return report; } try { - alarmValueFromFlexContainer = Boolean.valueOf(alarmCA.getCustomAttributeValue()); + alarmValueFromFlexContainer = Boolean.valueOf(alarmCA.getValue()); } catch (ClassCastException e) { - report.setErrorMessage("alarm customAttribute value is not a Boolean value (" + alarmCA.getCustomAttributeValue() + ")"); + report.setErrorMessage("alarm customAttribute value is not a Boolean value (" + alarmCA.getValue() + ")"); report.setState(State.KO); return report; } @@ -118,8 +118,8 @@ public class WaterSensorModuleTest extends AbstractModuleTest { // prepare update WaterSensorFlexContainer toBeUpdated = new WaterSensorFlexContainer(); CustomAttribute alarmCA = new CustomAttribute(); - alarmCA.setCustomAttributeName(DatapointType.alarm.getShortName()); - alarmCA.setCustomAttributeValue(Boolean.valueOf(!alarmValueFromDP.booleanValue()).toString()); + alarmCA.setShortName(DatapointType.alarm.getShortName()); + alarmCA.setValue(Boolean.valueOf(!alarmValueFromDP.booleanValue()).toString()); toBeUpdated.getCustomAttributes().add(alarmCA); // perform UPDATE request ==> expect KO @@ -142,7 +142,7 @@ public class WaterSensorModuleTest extends AbstractModuleTest { WaterSensorFlexContainer retrievedFlexContainer = (WaterSensorFlexContainer) response.getContent(); CustomAttribute ca = retrievedFlexContainer.getCustomAttribute(DatapointType.alarm.getShortName()); try { - currentValueFromDP = Boolean.parseBoolean(ca.getCustomAttributeValue()); + currentValueFromDP = Boolean.parseBoolean(ca.getValue()); } catch (Exception e) { report.setErrorMessage("unable to retrieve alarm customAttribute value:" + e.getMessage()); report.setState(State.KO); diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/subscription/SubscriptionHttpServlet.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/subscription/SubscriptionHttpServlet.java index 155460e8..78e2d22a 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/subscription/SubscriptionHttpServlet.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/subscription/SubscriptionHttpServlet.java @@ -18,7 +18,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.eclipse.om2m.commons.resource.AbstractFlexContainer; -import org.eclipse.om2m.commons.resource.CustomAttribute; import org.eclipse.om2m.commons.resource.Notification; import org.eclipse.om2m.commons.resource.Notification.NotificationEvent; import org.eclipse.om2m.commons.resource.Notification.NotificationEvent.Representation; diff --git a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/subscription/SubscriptionTestSuite.java b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/subscription/SubscriptionTestSuite.java index 15d94cf6..5bc0064e 100644 --- a/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/subscription/SubscriptionTestSuite.java +++ b/org.eclipse.om2m.ipe.sdt.testsuite/src/main/java/org/eclipse/om2m/ipe/sdt/testsuite/subscription/SubscriptionTestSuite.java @@ -7,10 +7,7 @@ *******************************************************************************/ package org.eclipse.om2m.ipe.sdt.testsuite.subscription; -import java.io.BufferedReader; import java.io.IOException; -import java.io.InputStreamReader; -import java.sql.DatabaseMetaData; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -25,11 +22,6 @@ import org.eclipse.om2m.commons.constants.NotificationContentType; import org.eclipse.om2m.commons.constants.ResponseStatusCode; import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.CustomAttribute; -import org.eclipse.om2m.commons.resource.DiscoveryResult; -import org.eclipse.om2m.commons.resource.Notification; -import org.eclipse.om2m.commons.resource.Notification.NotificationEvent; -import org.eclipse.om2m.commons.resource.Notification.NotificationEvent.Representation; -import org.eclipse.om2m.commons.resource.Resource; import org.eclipse.om2m.commons.resource.ResponsePrimitive; import org.eclipse.om2m.commons.resource.Subscription; import org.eclipse.om2m.commons.resource.URIList; @@ -38,14 +30,11 @@ import org.eclipse.om2m.datamapping.service.DataMapperService; import org.eclipse.om2m.ipe.sdt.testsuite.CSEUtil; import org.eclipse.om2m.ipe.sdt.testsuite.TestReport; import org.eclipse.om2m.ipe.sdt.testsuite.TestReport.State; -import org.eclipse.om2m.ipe.sdt.testsuite.module.exception.FlexContainerNotFound; import org.eclipse.om2m.sdt.DataPoint; import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.Property; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.service.http.HttpService; -import org.osgi.service.http.NamespaceException; import org.osgi.util.tracker.ServiceTracker; public class SubscriptionTestSuite extends HttpServlet { @@ -226,7 +215,7 @@ public class SubscriptionTestSuite extends HttpServlet { } // check value - String valueFromOM2M = ca.getCustomAttributeValue(); + String valueFromOM2M = ca.getValue(); if (!valueFromOM2M.equals(value.toString())) { report.setErrorMessage("value from OM2M (" + valueFromOM2M + ") is different of the value from SDT (" + value.toString() + ")"); report.setState(State.KO); diff --git a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/ModuleSDTListener.java b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/ModuleSDTListener.java index bdc8948f..782796ba 100644 --- a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/ModuleSDTListener.java +++ b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/ModuleSDTListener.java @@ -78,9 +78,9 @@ public class ModuleSDTListener implements SDTEventListener { AbstractFlexContainer toBeUpdated = new FlexContainer(); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName(notif.getDataPoint().getName()); + ca.setShortName(notif.getDataPoint().getName()); Object value = notif.getValue(); - ca.setCustomAttributeValue((value != null ? value.toString() : null)); + ca.setValue((value != null ? value.toString() : null)); toBeUpdated.getCustomAttributes().add(ca); ResponsePrimitive response = CseUtil.sendInternalNotifyFlexContainerRequest(toBeUpdated, diff --git a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTActionAdaptor.java b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTActionAdaptor.java index 363da684..7008dcf1 100644 --- a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTActionAdaptor.java +++ b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTActionAdaptor.java @@ -65,7 +65,7 @@ public class SDTActionAdaptor { for (Arg arg : action.getArgs()) { CustomAttribute customAttribute = new CustomAttribute(); - customAttribute.setCustomAttributeName(arg.getName()); + customAttribute.setShortName(arg.getName()); actionFlexContainer.getCustomAttributes().add(customAttribute); } diff --git a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTDeviceAdaptor.java b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTDeviceAdaptor.java index fe2736c0..41b38621 100644 --- a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTDeviceAdaptor.java +++ b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTDeviceAdaptor.java @@ -114,6 +114,9 @@ public class SDTDeviceAdaptor { nwkDeviceInfo.setDevID(this.device.getName()); nwkDeviceInfo.setDevType("SDT"); + // Set cnd in deviceInfo's deviceType + devInfo.setDeviceType(flexContainer.getContainerDefinition()); + logger.info("Node mgmtObjs: " + node.getMgmtObjs()); if (hasToBeAnnounced) { @@ -153,8 +156,8 @@ public class SDTDeviceAdaptor { devInfo.setManufacturer(sdtProperty.getValue()); } else if (shortName.equals(PropertyType.deviceModelName.getShortName())) { devInfo.setModel(sdtProperty.getValue()); - } else if (shortName.equals(PropertyType.deviceType.getShortName())) { - devInfo.setDeviceType(sdtProperty.getValue()); +// } else if (shortName.equals(PropertyType.deviceType.getShortName())) { +// devInfo.setDeviceType(sdtProperty.getValue()); } else if (shortName.equals(PropertyType.hardwareVersion.getShortName())) { devInfo.setHwVersion(sdtProperty.getValue()); } else if (shortName.equals(PropertyType.manufacturerDetailsLink.getShortName())) { @@ -179,8 +182,8 @@ public class SDTDeviceAdaptor { devInfo.setProtocol(sdtProperty.getValue()); } else { CustomAttribute customAttributeForSdtProperty = new CustomAttribute(); - customAttributeForSdtProperty.setCustomAttributeName(shortName); - customAttributeForSdtProperty.setCustomAttributeValue(sdtProperty.getValue()); + customAttributeForSdtProperty.setShortName(shortName); + customAttributeForSdtProperty.setValue(sdtProperty.getValue()); logger.info("new Property CustomAttribute (" + customAttributeForSdtProperty + ")"); flexContainer.getCustomAttributes().add(customAttributeForSdtProperty); } diff --git a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTModuleAdaptor.java b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTModuleAdaptor.java index a753fe03..4ccc9be0 100644 --- a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTModuleAdaptor.java +++ b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTModuleAdaptor.java @@ -8,7 +8,6 @@ package org.eclipse.om2m.ipe.sdt; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.apache.commons.logging.Log; @@ -18,14 +17,11 @@ import org.eclipse.om2m.commons.resource.AbstractFlexContainer; import org.eclipse.om2m.commons.resource.CustomAttribute; import org.eclipse.om2m.commons.resource.ResponsePrimitive; import org.eclipse.om2m.commons.resource.flexcontainerspec.FlexContainerFactory; -import org.eclipse.om2m.core.service.CseService; import org.eclipse.om2m.ipe.sdt.flexcontainerservice.ModuleFlexContainerService; import org.eclipse.om2m.sdt.Action; import org.eclipse.om2m.sdt.DataPoint; import org.eclipse.om2m.sdt.Module; import org.eclipse.om2m.sdt.Property; -import org.eclipse.om2m.sdt.datapoints.AbstractDateDataPoint; -import org.eclipse.om2m.sdt.datapoints.ArrayDataPoint; import org.eclipse.om2m.sdt.datapoints.ValuedDataPoint; import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.DataPointException; @@ -89,32 +85,15 @@ public class SDTModuleAdaptor { /// each DataPoint is a custom attribute for (DataPoint dp : module.getDataPoints()) { CustomAttribute customAttribute = new CustomAttribute(); - String customAttributeName = dp.getShortDefinitionType(); + String customAttributeName = dp.getShortName(); if (customAttributeName == null) { customAttributeName = dp.getName(); } - customAttribute.setCustomAttributeName(customAttributeName); - String value = null; + customAttribute.setShortName(customAttributeName); try { - if (dp instanceof AbstractDateDataPoint) { - value = ((AbstractDateDataPoint) dp).getStringValue(); - } else if (dp instanceof ArrayDataPoint) { - List values = ((ArrayDataPoint) dp).getValue(); - if (values != null) { - StringBuffer sb = new StringBuffer(); - boolean first = true; - for (Object i : values) { - if (first) first = false; - else sb.append(","); - sb.append(i.toString()); - } - value = sb.toString(); - } - } else { - Object val = ((ValuedDataPoint) dp).getValue(); - if (val != null) - value = val.toString(); - } + customAttribute.setValue(((ValuedDataPoint) dp).toStringValue()); + customAttribute.setLongName(dp.getLongName()); + customAttribute.setType(dp.getDataType().getTypeChoice().getOneM2MType()); } catch (DataPointException e) { // how to handle this exception? // should we stop module publishing step in oneM2M tree ? @@ -128,7 +107,6 @@ public class SDTModuleAdaptor { } catch (Exception e) { logger.error("Error in datapoint " + dp, e); } - customAttribute.setCustomAttributeValue(value); logger.info("add DataPoint customAttribute(" + customAttribute + ")"); flexContainer.getCustomAttributes().add(customAttribute); @@ -143,8 +121,8 @@ public class SDTModuleAdaptor { } CustomAttribute caForSdtProperty = new CustomAttribute(); - caForSdtProperty.setCustomAttributeName(sdtProperty.getShortName()); - caForSdtProperty.setCustomAttributeValue(sdtProperty.getValue()); + caForSdtProperty.setShortName(sdtProperty.getShortName()); + caForSdtProperty.setValue(sdtProperty.getValue()); logger.info("add Property customAttribute(" + caForSdtProperty + ")"); flexContainer.getCustomAttributes().add(caForSdtProperty); diff --git a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTUtil.java b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTUtil.java deleted file mode 100644 index 364d9d07..00000000 --- a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/SDTUtil.java +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.ipe.sdt; - -import java.net.URI; -import java.text.DateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import org.eclipse.om2m.commons.resource.CustomAttribute; - -public class SDTUtil { - - static final private DateFormat dateTimeFormat = DateFormat.getDateTimeInstance(); - static final private DateFormat dateFormat = DateFormat.getDateInstance(); - static final private DateFormat timeFormat = DateFormat.getTimeInstance(); - - public static Object getValue(CustomAttribute attr, String type) throws Exception { - return getValue(attr.getCustomAttributeValue(), type); - } - - public static Object getValue(String value, String type) throws Exception { - if (value == null) - return null; - switch (type) { - case "xs:string": return value; - case "xs:integer": - return Integer.parseInt(value); - case "xs:float": return Float.parseFloat(value); - case "xs:boolean": return Boolean.parseBoolean(value); - case "xs:datetime": return dateTimeFormat.parse(value); - case "xs:time": return timeFormat.parse(value); - case "xs:date": return dateFormat.parse(value); - case "xs:byte": return Byte.parseByte(value); - case "xs:enum": - List ret = new ArrayList(); - value = value.trim(); - if (value.charAt(0) == '[') - value = value.substring(1); - int last = value.length() - 1; - if (value.charAt(last) == ']') - value = value.substring(0, last); - for (String val : value.split(",")) { - ret.add(val.trim()); - } - return ret; - case "xs:uri": return new URI(value); - case "xs:blob": return value; - default: - return type.startsWith("hd:") ? Integer.parseInt(value) : value; - } - } - - public static String getStringValue(String type, Object val) throws Exception { - if (val == null) { - return null; - } - switch (type) { - case "xs:string": - return val.toString();//"\"" + val.toString() + "\""; - case "xs:integer": - case "xs:float": - case "xs:boolean": - case "xs:byte": - case "xs:uri": - return val.toString(); - case "xs:datetime": return dateTimeFormat.format((Date)val); - case "xs:time": return timeFormat.format((Date)val); - case "xs:date": return dateFormat.format((Date)val); - case "xs:enum": - String ret = ""; - boolean first = true; - for (Object s : (List)val) { - if (first) ret += ","; - else first = false; - ret += s.toString(); - } - return ret; - case "xs:blob": return null;// TODO serialize byte array - default: - if (type.startsWith("hd:")) - return val.toString(); - return null; - } - } - -} diff --git a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/flexcontainerservice/ActionFlexContainerService.java b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/flexcontainerservice/ActionFlexContainerService.java index 6bc552bc..42d3d6be 100644 --- a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/flexcontainerservice/ActionFlexContainerService.java +++ b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/flexcontainerservice/ActionFlexContainerService.java @@ -20,11 +20,11 @@ import org.eclipse.om2m.commons.resource.CustomAttribute; import org.eclipse.om2m.commons.resource.RequestPrimitive; import org.eclipse.om2m.flexcontainer.service.FlexContainerService; import org.eclipse.om2m.ipe.sdt.Activator; -import org.eclipse.om2m.ipe.sdt.SDTUtil; import org.eclipse.om2m.sdt.Action; import org.eclipse.om2m.sdt.args.Command; import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.ActionException; +import org.eclipse.om2m.sdt.types.DataType; import org.osgi.framework.ServiceRegistration; public class ActionFlexContainerService implements FlexContainerService { @@ -86,16 +86,15 @@ public class ActionFlexContainerService implements FlexContainerService { for (String argName : action.getArgNames()) { CustomAttribute ca = getCustomAttribute(customAttributes, argName); if (ca != null) { - args.put(argName, SDTUtil.getValue(ca, "string")); + DataType type = DataType.getDataType(ca.getType()); + args.put(argName, + type.getTypeChoice().fromString(ca.getValue())); } } } catch (Exception e) { e.printStackTrace(); } -// actionToBeInvoked = true; - } /* else nothing to do */ -// } else { -// actionToBeInvoked = true; + } } // if (actionToBeInvoked) { @@ -105,16 +104,16 @@ public class ActionFlexContainerService implements FlexContainerService { Object response = ((Command) action).invoke(args); if (response != null) { CustomAttribute output = new CustomAttribute(); - output.setCustomAttributeName("output"); - output.setCustomAttributeValue(response.toString()); + output.setShortName("output"); + output.setValue(response.toString()); customAttributes.add(output); } } catch (ActionException e) { - logger.debug("setCustomAttributeValues(" + customAttributes + logger.info("setCustomAttributeValues(" + customAttributes + ") - KO: " + e.getMessage()); throw new Om2mException("action execution failed:" + e.getMessage(), ResponseStatusCode.BAD_REQUEST); } catch (AccessException e) { - logger.debug("setCustomAttributeValues(" + customAttributes + logger.info("setCustomAttributeValues(" + customAttributes + ") - KO: " + e.getMessage()); throw new Om2mException("action execution failed:" + e.getMessage(), ResponseStatusCode.ACCESS_DENIED); } @@ -138,7 +137,7 @@ public class ActionFlexContainerService implements FlexContainerService { private static CustomAttribute getCustomAttribute(List customAttributes, String name) { if (customAttributes != null) { for (CustomAttribute ca : customAttributes) { - if (name.equals(ca.getCustomAttributeName())) { + if (name.equals(ca.getShortName())) { return ca; } } diff --git a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/flexcontainerservice/ModuleFlexContainerService.java b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/flexcontainerservice/ModuleFlexContainerService.java index 5fab0783..44d37dc2 100644 --- a/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/flexcontainerservice/ModuleFlexContainerService.java +++ b/org.eclipse.om2m.ipe.sdt/src/main/java/org/eclipse/om2m/ipe/sdt/flexcontainerservice/ModuleFlexContainerService.java @@ -20,13 +20,13 @@ import org.eclipse.om2m.commons.resource.CustomAttribute; import org.eclipse.om2m.commons.resource.RequestPrimitive; import org.eclipse.om2m.flexcontainer.service.FlexContainerService; import org.eclipse.om2m.ipe.sdt.Activator; -import org.eclipse.om2m.ipe.sdt.SDTUtil; import org.eclipse.om2m.sdt.DataPoint; import org.eclipse.om2m.sdt.Module; import org.eclipse.om2m.sdt.Property; import org.eclipse.om2m.sdt.datapoints.ValuedDataPoint; import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.types.DataType.TypeChoice; import org.osgi.framework.ServiceRegistration; public class ModuleFlexContainerService implements FlexContainerService { @@ -60,7 +60,7 @@ public class ModuleFlexContainerService implements FlexContainerService { @Override public String getCustomAttributeValue(String customAttributeName) throws Om2mException { - logger.debug("DataPointFlexContainerService - getCustomAttributeValue(customAttributeName=" + logger.debug("DataPointFlexContainerService - getCustomAttributeValue(name=" + customAttributeName + ")"); Property prop = module.getPropertyByShortName(customAttributeName); if (prop != null) { @@ -68,7 +68,7 @@ public class ModuleFlexContainerService implements FlexContainerService { return prop.getValue(); } - // retrieve the DataPoint object based on customAttributeName input parameter + // retrieve the DataPoint object based on name input parameter DataPoint dataPoint = module.getDataPointByShortName(customAttributeName); if (dataPoint == null) { throw new Om2mException("unknown custom attribute " + customAttributeName + " in " + module, @@ -76,24 +76,17 @@ public class ModuleFlexContainerService implements FlexContainerService { } // at this point, we are sure the DataPoint exist. - String value = null; try { - Object o = ((ValuedDataPoint) dataPoint).getValue(); - String type = dataPoint.getDataType().getTypeChoice().getOneM2MType(); - value = SDTUtil.getStringValue(type, o); + return ((ValuedDataPoint) dataPoint).toStringValue(); } catch (AccessException e) { - e.printStackTrace(); + logger.info("", e); throw new Om2mException("unable to retrieve value of DataPoint " + dataPoint.getName() + " : " + e.getMessage(), ResponseStatusCode.ACCESS_DENIED); } catch (Exception e) { - e.printStackTrace(); + logger.info("", e); throw new Om2mException("unable to retrieve value of DataPoint " + dataPoint.getName() + " : " + e.getMessage(), ResponseStatusCode.INTERNAL_SERVER_ERROR); } - - logger.debug("DataPointFlexContainerService - getCustomAttributeValue(customAttributeName=" + customAttributeName - + ") - value=" + value); - return value; } @Override @@ -112,13 +105,16 @@ public class ModuleFlexContainerService implements FlexContainerService { dpNames.add(name); } else { logger.warn("CustomAttribute " + name + " unknown"); - throw new Om2mException(ResponseStatusCode.INVALID_ARGUMENTS); + // BONNARDEL Gregory - 2018 07 05 + // voir pourquoi on rentre dans ce bout de code ??? +// throw new Om2mException(ResponseStatusCode.INVALID_ARGUMENTS); } } for (Map.Entry entry : module.getDatapointHandler().getValues(dpNames).entrySet()) { DataPoint dataPoint = module.getDataPointByShortName(entry.getKey()); String type = dataPoint.getDataType().getTypeChoice().getOneM2MType(); - ret.put(entry.getKey(), SDTUtil.getStringValue(type, entry.getValue())); +// ret.put(entry.getKey(), SDTUtil.getStringValue(type, entry.getValue())); + ret.put(entry.getKey(), (entry.getValue() != null ? entry.getValue().toString() : null)); } return ret; } catch (AccessException e) { @@ -140,16 +136,15 @@ public class ModuleFlexContainerService implements FlexContainerService { Map values = new HashMap(); for (CustomAttribute ca : customAttributes) { - DataPoint dataPoint = module.getDataPointByShortName(ca.getCustomAttributeName()); + DataPoint dataPoint = module.getDataPointByShortName(ca.getShortName()); if (dataPoint == null) // no datapoint for this attribute // throw a Om2mException throw new Om2mException(ResponseStatusCode.INVALID_ARGUMENTS); try { // retrieve type of the DataPoint - String type = dataPoint.getDataType().getTypeChoice().getOneM2MType(); - values.put(ca.getCustomAttributeName(), - SDTUtil.getValue(ca.getCustomAttributeValue(), type)); + TypeChoice type = dataPoint.getDataType().getTypeChoice(); + values.put(ca.getShortName(), type.fromString(ca.getValue())); } catch (Exception e) { logger.info("KO: " + e.getMessage()); throw new Om2mException(e.getMessage(), e, diff --git a/org.eclipse.om2m.persistence.eclipselink/.classpath b/org.eclipse.om2m.persistence.eclipselink/.classpath deleted file mode 100644 index 606239a1..00000000 --- a/org.eclipse.om2m.persistence.eclipselink/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/org.eclipse.om2m.persistence.eclipselink/.project b/org.eclipse.om2m.persistence.eclipselink/.project deleted file mode 100644 index 161996a8..00000000 --- a/org.eclipse.om2m.persistence.eclipselink/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.persistence.eclipselink - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/AeAnncDAO.java b/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/AeAnncDAO.java index 0877566d..4cb22c2e 100644 --- a/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/AeAnncDAO.java +++ b/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/AeAnncDAO.java @@ -41,13 +41,11 @@ public class AeAnncDAO extends AbstractDAO { // de-associate labels List labels = resource.getLabelsEntities(); for (LabelEntity label : labels) { - label.getLinkedFcnt().remove(resource); + label.getLinkedAeA().remove(resource); } - if (resource.getParentCsr() != null) { resource.getParentCsr().getChildAeAnncs().remove(resource); } - transaction.getEm().remove(resource); } diff --git a/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/AeDAO.java b/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/AeDAO.java index 9dcfeee0..a246d6de 100644 --- a/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/AeDAO.java +++ b/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/AeDAO.java @@ -45,17 +45,15 @@ public class AeDAO extends AbstractDAO { // de-associate labels List labels = resource.getLabelsEntities(); for (LabelEntity label : labels) { - label.getLinkedFcnt().remove(resource); + label.getLinkedAe().remove(resource); } if (resource.getParentCse() != null) { resource.getParentCse().getAes().remove(resource); } - if (resource.getParentCsr() != null) { resource.getParentCsr().getChildAes().remove(resource); } - transaction.getEm().remove(resource); // transaction.getEm().getEntityManagerFactory().getCache().evict(CSEBaseEntity.class); // transaction.getEm().getEntityManagerFactory().getCache().evict(RemoteCSEEntity.class); diff --git a/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/FlexContainerAnncDAO.java b/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/FlexContainerAnncDAO.java index a8ea5bb4..d1b65f0d 100644 --- a/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/FlexContainerAnncDAO.java +++ b/org.eclipse.om2m.persistence.eclipselink/src/main/java/org/eclipse/om2m/persistence/eclipselink/internal/dao/FlexContainerAnncDAO.java @@ -22,20 +22,17 @@ public class FlexContainerAnncDAO extends AbstractDAO { // de-associate labels List labels = resource.getLabelsEntities(); for (LabelEntity label : labels) { - label.getLinkedFcnt().remove(resource); + label.getLinkedFcntA().remove(resource); } // de-associate parent if (resource.getParentAeAnnc() != null) { resource.getParentAeAnnc().getFlexContainerAnncs().remove(resource); } - if (resource.getParentFlexContainerAnnc() != null) { resource.getParentFlexContainerAnnc().getChildFlexContainerAnncs().remove(resource); } - transaction.getEm().remove(resource); - } } diff --git a/org.eclipse.om2m.persistence.mongodb/.classpath b/org.eclipse.om2m.persistence.mongodb/.classpath deleted file mode 100644 index 00834bcb..00000000 --- a/org.eclipse.om2m.persistence.mongodb/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/org.eclipse.om2m.persistence.mongodb/.project b/org.eclipse.om2m.persistence.mongodb/.project deleted file mode 100644 index 0ff31333..00000000 --- a/org.eclipse.om2m.persistence.mongodb/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.persistence.mongodb - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.persistence.service/.classpath b/org.eclipse.om2m.persistence.service/.classpath deleted file mode 100644 index a95e0906..00000000 --- a/org.eclipse.om2m.persistence.service/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.persistence.service/.project b/org.eclipse.om2m.persistence.service/.project deleted file mode 100644 index 47c27ea7..00000000 --- a/org.eclipse.om2m.persistence.service/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.persistence.service - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.sdt.comparator.xml/.classpath b/org.eclipse.om2m.sdt.comparator.xml/.classpath deleted file mode 100644 index 98ddc48e..00000000 --- a/org.eclipse.om2m.sdt.comparator.xml/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.sdt.comparator.xml/.project b/org.eclipse.om2m.sdt.comparator.xml/.project deleted file mode 100644 index 5b135b82..00000000 --- a/org.eclipse.om2m.sdt.comparator.xml/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.sdt.comparator.xml - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.sdt/.project b/org.eclipse.om2m.sdt/.project deleted file mode 100644 index 45ee8d80..00000000 --- a/org.eclipse.om2m.sdt/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - oneM2M.SDT - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/DataPoint.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/DataPoint.java index bfee5c33..1833b18a 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/DataPoint.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/DataPoint.java @@ -21,8 +21,8 @@ public class DataPoint extends Element { private Module parent; - private String longDefinitionType; - private String shortDefinitionType; + private String longName; + private String shortName; public DataPoint(final Identifiers name, final DataType type) { super(name.getShortName()); @@ -32,8 +32,8 @@ public class DataPoint extends Element { optional = false; readable = true; writable = true; - longDefinitionType = name.getLongName(); - shortDefinitionType = name.getShortName(); + longName = name.getLongName(); + shortName = name.getShortName(); } public DataType getDataType() { @@ -91,17 +91,24 @@ public class DataPoint extends Element { } /** - * @return the longDefinitionType + * @return the longName */ - public String getLongDefinitionType() { - return longDefinitionType; + public String getLongName() { + return longName; } /** * @return the shortDefinitionType */ - public String getShortDefinitionType() { - return shortDefinitionType; + public String getShortName() { + return shortName; + } + + @Override + public String toString() { + return "<" + getClass().getSimpleName() + " name=" + name + + " shortName=" + shortName + " longName=" + longName + " type=" + type + + "/>"; } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/Identifiers.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/Identifiers.java index 153f7446..ed8f9242 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/Identifiers.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/Identifiers.java @@ -14,5 +14,11 @@ public interface Identifiers { String getDefinition(); String getShortName(); String getLongName(); + + public interface Typed extends Identifiers { + + DataType getDataType(); + + } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/ModuleClass.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/ModuleClass.java index 5eddb155..92f61824 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/ModuleClass.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/ModuleClass.java @@ -40,7 +40,7 @@ public abstract class ModuleClass extends Element { private Map actions; private Map dataPoints; - private Map dataPointsByShortDefinitionType; + private Map dataPointsByShortName; private Map events; @@ -58,7 +58,7 @@ public abstract class ModuleClass extends Element { optional = false; this.actions = new HashMap(); this.dataPoints = new HashMap(); - this.dataPointsByShortDefinitionType = new HashMap(); + this.dataPointsByShortName = new HashMap(); this.events = new HashMap(); this.properties = new HashMap(); domain.addModule(this); @@ -116,8 +116,8 @@ public abstract class ModuleClass extends Element { return dataPoints.get(name); } - public DataPoint getDataPointByShortName(final String shortDefinitionType) { - return dataPointsByShortDefinitionType.get(shortDefinitionType); + public DataPoint getDataPointByShortName(final String shortName) { + return dataPointsByShortName.get(shortName); } public void addDataPoint(final DataPoint dp) { @@ -127,13 +127,13 @@ public abstract class ModuleClass extends Element { throw new IllegalArgumentException(msg); } dp.setParent((Module) this); - if (dp.getShortDefinitionType() == null) { + if (dp.getShortName() == null) { String msg = "Short definition type is null of " + dp.getName() + " in module " + getName(); Logger.warning(msg); throw new IllegalArgumentException(msg); } dataPoints.put(dp.getName(), dp); - dataPointsByShortDefinitionType.put(dp.getShortDefinitionType(), dp); + dataPointsByShortName.put(dp.getShortName(), dp); if (owner!= null) { dp.setOwner(owner); } @@ -142,7 +142,7 @@ public abstract class ModuleClass extends Element { public void removeDataPoint(final String name) { DataPoint dp = dataPoints.remove(name); if (dp != null) { - dataPointsByShortDefinitionType.remove(dp.getShortDefinitionType()); + dataPointsByShortName.remove(dp.getShortName()); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/ArrayDataPoint.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/ArrayDataPoint.java index bfb68408..07edb4b5 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/ArrayDataPoint.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/ArrayDataPoint.java @@ -15,8 +15,8 @@ import org.eclipse.om2m.sdt.types.DataType; public abstract class ArrayDataPoint extends ValuedDataPoint> { - public ArrayDataPoint(Identifiers name) { - super(name, new DataType("array", new Array())); + public ArrayDataPoint(Identifiers.Typed name) { + super(name, new DataType(new Array(name.getDataType()))); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/EnumDataPoint.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/EnumDataPoint.java index 5aa73006..f7e1a635 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/EnumDataPoint.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/EnumDataPoint.java @@ -47,7 +47,7 @@ public abstract class EnumDataPoint extends ValuedDataPoint { public void setValue(T v) throws DataPointException, AccessException { if (! values.contains(v)) - throw new DataPointException("Unknown value"); + throw new DataPointException("Invalid value " + v); super.setValue(v); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/ValuedDataPoint.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/ValuedDataPoint.java index cd16d8ed..07db04c4 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/ValuedDataPoint.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/datapoints/ValuedDataPoint.java @@ -29,6 +29,10 @@ public abstract class ValuedDataPoint extends DataPoint { } return doGetValue(); } + + public String toStringValue() throws DataPointException, AccessException, Exception { + return getDataType().getTypeChoice().toString(getValue()); + } public void setValue(T value) throws DataPointException, AccessException { if (! isWritable()) { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/Array.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/Array.java index cd768c45..2a3a6bf8 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/Array.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/Array.java @@ -7,15 +7,54 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.types; +import java.util.ArrayList; +import java.util.List; + import org.eclipse.om2m.sdt.types.DataType.TypeChoice; public class Array implements TypeChoice { - public Array() { + private DataType dataType; + + public Array(final DataType dataType) { + this.dataType = dataType; } public String getOneM2MType() { - return "xs:enum"; + String ret = dataType.getTypeChoice().getOneM2MType(); + return ret.startsWith("[") ? ret : "[" + ret + "]"; + } + + public DataType getDataType() { + return dataType; + } + + @Override + public String toString(Object val) throws Exception { + if (val instanceof List) { + String ret = "["; + boolean first = true; + for (Object item : (List)val) { + if (first) first = false; + else ret += ","; + ret += dataType.getTypeChoice().toString(item); + } + return ret + "]"; + } + return val.toString(); + } + + @SuppressWarnings("unchecked") + @Override + public Object fromString(String val) throws Exception { + List ret = new ArrayList(); + String s = val.trim(); + if (s.startsWith("[")) + s = s.substring(1, s.length()-1); + for (String item : s.split(",")) { + ret.add((T)dataType.getTypeChoice().fromString(item)); + } + return ret; } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/BasicType.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/BasicType.java index b8b00757..a39cbd3f 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/BasicType.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/BasicType.java @@ -8,25 +8,43 @@ package org.eclipse.om2m.sdt.types; import java.net.URI; +import java.text.DateFormat; import java.util.Date; import java.util.HashMap; import java.util.Map; public class BasicType { + + static private final String PREFIX = "xs:"; + static private final String S_INTEGER = PREFIX + "integer"; + static private final String S_BOOLEAN = PREFIX + "boolean"; + static private final String S_STRING = PREFIX + "string"; + static private final String S_BYTE = PREFIX + "byte"; + static private final String S_FLOAT = PREFIX + "float"; + static private final String S_ENUM = PREFIX + "enum"; + static private final String S_DATE = PREFIX + "date"; + static private final String S_TIME = PREFIX + "time"; + static private final String S_DATETIME = PREFIX + "datetime"; + static private final String S_BLOB = PREFIX + "blob"; + static private final String S_URI = PREFIX + "uri"; + static final private DateFormat dateTimeFormat = DateFormat.getDateTimeInstance(); + static final private DateFormat dateFormat = DateFormat.getDateInstance(); + static final private DateFormat timeFormat = DateFormat.getTimeInstance(); + static private Map values = new HashMap(); - static public final BasicType INTEGER = new BasicType("integer", Integer.class); - static public final BasicType BOOLEAN = new BasicType("boolean", Boolean.class); - static public final BasicType STRING = new BasicType("string", String.class); - static public final BasicType BYTE = new BasicType("byte", Byte.class); - static public final BasicType FLOAT = new BasicType("float", Float.class); - static public final BasicType ENUM = new BasicType("enum", Enum.class); - static public final BasicType DATE = new BasicType("date", Date.class); - static public final BasicType TIME = new BasicType("time", Date.class); - static public final BasicType DATETIME = new BasicType("datetime", Date.class); - static public final BasicType BLOB = new BasicType("blob", byte[].class); - static public final BasicType URI = new BasicType("uri", URI.class); + static public final BasicType INTEGER = new BasicType(S_INTEGER, Integer.class); + static public final BasicType BOOLEAN = new BasicType(S_BOOLEAN, Boolean.class); + static public final BasicType STRING = new BasicType(S_STRING, String.class); + static public final BasicType BYTE = new BasicType(S_BYTE, Byte.class); + static public final BasicType FLOAT = new BasicType(S_FLOAT, Float.class); + static public final BasicType ENUM = new BasicType(S_ENUM, Enum.class); + static public final BasicType DATE = new BasicType(S_DATE, Date.class); + static public final BasicType TIME = new BasicType(S_TIME, Date.class); + static public final BasicType DATETIME = new BasicType(S_DATETIME, Date.class); + static public final BasicType BLOB = new BasicType(S_BLOB, byte[].class); + static public final BasicType URI = new BasicType(S_URI, URI.class); private final String value; private final Class clazz; @@ -48,7 +66,46 @@ public class BasicType { static public BasicType getBasicType(final String s) { return values.get(s); } + + public String toString(Object val) { + if (val == null) { + return null; + } + switch (value) { + case S_STRING: + case S_ENUM: + case S_INTEGER: + case S_FLOAT: + case S_BOOLEAN: + case S_BYTE: + case S_URI: + return val.toString(); + case S_DATETIME: return dateTimeFormat.format((Date)val); + case S_TIME: return timeFormat.format((Date)val); + case S_DATE: return dateFormat.format((Date)val); + case S_BLOB: return val.toString(); // TODO serialize byte array + } + return null; + } + public Object fromString(String val) throws Exception { + switch (value) { + case S_STRING: return val; + case S_ENUM: + case S_INTEGER: + return Integer.parseInt(val); + case S_FLOAT: return Float.parseFloat(val); + case S_BOOLEAN: return Boolean.parseBoolean(val); + case S_DATETIME: return dateTimeFormat.parse(val); + case S_TIME: return timeFormat.parse(val); + case S_DATE: return dateFormat.parse(val); + case S_BYTE: return Byte.parseByte(val); + case S_BLOB: return val; // TODO serialize byte array + case S_URI: return new URI(value); + } + return null; + } + @Override public String toString() { return clazz.getSimpleName().toLowerCase(); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/DataType.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/DataType.java index 4c149e0f..82194dd4 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/DataType.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/DataType.java @@ -18,19 +18,21 @@ public class DataType extends Element { public interface TypeChoice { public String getOneM2MType(); + public String toString(Object val) throws Exception; + public Object fromString(String val) throws Exception; } - static public final DataType Boolean = new DataType("boolean", SimpleType.Boolean); - static public final DataType Byte = new DataType("byte", SimpleType.Byte); - static public final DataType Integer = new DataType("integer", SimpleType.Integer); - static public final DataType Float = new DataType("float", SimpleType.Float); - static public final DataType String = new DataType("string", SimpleType.String); - static public final DataType Enum = new DataType("enum", SimpleType.Enum); - static public final DataType Date = new DataType("date", SimpleType.Date); - static public final DataType Time = new DataType("time", SimpleType.Time); - static public final DataType Datetime = new DataType("datetime", SimpleType.Datetime); - static public final DataType Blob = new DataType("blob", SimpleType.Blob); - static public final DataType Uri = new DataType("uri", SimpleType.Uri); + static public final DataType Boolean = new DataType(SimpleType.Boolean); + static public final DataType Byte = new DataType(SimpleType.Byte); + static public final DataType Integer = new DataType(SimpleType.Integer); + static public final DataType Float = new DataType(SimpleType.Float); + static public final DataType String = new DataType(SimpleType.String); + static public final DataType Enum = new DataType(SimpleType.Enum); + static public final DataType Date = new DataType(SimpleType.Date); + static public final DataType Time = new DataType(SimpleType.Time); + static public final DataType Datetime = new DataType(SimpleType.Datetime); + static public final DataType Blob = new DataType(SimpleType.Blob); + static public final DataType Uri = new DataType(SimpleType.Uri); private String unitOfMeasure; @@ -38,11 +40,23 @@ public class DataType extends Element { private Map constraints; - public DataType(final String name, final TypeChoice type) { - super(name); + public DataType(final TypeChoice type) { + super(type.getOneM2MType()); this.type = type; this.constraints = new HashMap(); } + + static public DataType getDataType(final String name) { + String s = name.trim(); + if (s.startsWith("[")) { + DataType dt = getDataType(s.substring(1, s.length()-1)); + return (dt == null) ? null : new DataType(new Array<>(dt)); + } + SimpleType st = SimpleType.getSimpleType(s); + if (st != null) + return new DataType(st); + return null; + } public TypeChoice getTypeChoice() { return type; @@ -86,4 +100,10 @@ public class DataType extends Element { return ret.append("\n").append(t1).append("").toString(); } + @Override + public String toString() { + return "<" + getClass().getSimpleName() + " name=" + name + + " type=" + getTypeChoice().getOneM2MType() + "/>"; + } + } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/SimpleType.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/SimpleType.java index 7486dcea..02377f9f 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/SimpleType.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/SimpleType.java @@ -42,13 +42,23 @@ public class SimpleType implements TypeChoice { } public String getOneM2MType() { - return "xs:" + getType().getValue(); + return getType().getValue(); } static public SimpleType getSimpleType(final String s) { return values.get(s); } + @Override + public String toString(Object val) throws Exception { + return type.toString(val); + } + + @Override + public Object fromString(String val) throws Exception { + return type.fromString(val); + } + @Override public String toString() { return ""; diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/Struct.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/Struct.java index 945b8fa1..6e27c356 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/Struct.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.api/src/main/java/org/eclipse/om2m/sdt/types/Struct.java @@ -37,4 +37,14 @@ public class Struct implements TypeChoice { return "xs:notDefined"; } + @Override + public String toString(Object val) throws Exception { + throw new Exception("Not implemented"); + } + + @Override + public Object fromString(String val) throws Exception { + throw new Exception("Not implemented"); + } + } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/.project b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/.project deleted file mode 100644 index 95d24dce..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - oneM2M.SDT.Applications - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/META-INF/MANIFEST.MF b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/META-INF/MANIFEST.MF new file mode 100644 index 00000000..1307bf15 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/META-INF/MANIFEST.MF @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.om2m.sdt.home.monitoring.authentication.service +Bundle-SymbolicName: org.eclipse.om2m.sdt.home.monitoring.authentication.service +Bundle-Version: 1.1.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-ClassPath: . +Export-Package: org.eclipse.om2m.sdt.home.monitoring.authentication.service diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/build.properties b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/build.properties new file mode 100644 index 00000000..35c69df7 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/build.properties @@ -0,0 +1,23 @@ +############################################################################### +# Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) +# 7 Colonel Roche 31077 Toulouse - France +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Initial Contributors: +# Thierry Monteil : Project manager, technical co-manager +# Mahdi Ben Alaya : Technical co-manager +# Samir Medjiah : Technical co-manager +# Khalil Drira : Strategy expert +# Guillaume Garzone : Developer +# Franois Assaoui : Developer +# +# New contributors : +############################################################################### +source.. = src/main/java/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/pom.xml b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/pom.xml new file mode 100644 index 00000000..263efb1d --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/pom.xml @@ -0,0 +1,26 @@ + + + + + + 4.0.0 + + org.eclipse.om2m.sdt.home.monitoring.authentication.service + eclipse-plugin + Authentication service for Home Monitoring + + + org.eclipse.om2m + org.eclipse.om2m.sdt.home.applications + 1.1.0-SNAPSHOT + + + + diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/AuthenticationInfo.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/AuthenticationInfo.java new file mode 100644 index 00000000..ea393127 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/AuthenticationInfo.java @@ -0,0 +1,31 @@ +package org.eclipse.om2m.sdt.home.monitoring.authentication.service; + +public class AuthenticationInfo { + + private String clientId; + private String accessToken; + + + public String getClientId() { + return clientId; + } + public void setClientId(String clientId) { + this.clientId = clientId; + } + public String getAccessToken() { + return accessToken; + } + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public String toString() { + StringBuffer sb = new StringBuffer("AuthenticationInfo("); + sb.append("clientId:").append(clientId).append(","); + sb.append("accessToken:").append(accessToken); + sb.append(")"); + return super.toString(); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/AuthenticationService.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/AuthenticationService.java new file mode 100644 index 00000000..fe2c5aa9 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/AuthenticationService.java @@ -0,0 +1,29 @@ +package org.eclipse.om2m.sdt.home.monitoring.authentication.service; + +public interface AuthenticationService { + + /* + * Return the authentication page (url) + */ + public String getAuthenticationPage(String sessionId, String serverName, int serverPort); + + /** + * Service name + * @return + */ + public Object getServiceName(); + + /** + * authentication info + * @return + */ + public AuthenticationInfo getAuthenticationInfo(String sessionId); + + /** + * Retrieve end user info. + * @return end user info + */ + public UserInfo getEndUserInfo(String sessionId); + + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/UserInfo.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/UserInfo.java new file mode 100644 index 00000000..211f59a4 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.applications.authentication.service/src/main/java/org/eclipse/om2m/sdt/home/monitoring/authentication/service/UserInfo.java @@ -0,0 +1,43 @@ +package org.eclipse.om2m.sdt.home.monitoring.authentication.service; + +public class UserInfo { + + private String userId; + private String firstName; + private String lastName; + + public UserInfo(String id) { + this.userId = id; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String clientId) { + this.userId = clientId; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + @Override + public String toString() { + return ""; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/META-INF/MANIFEST.MF b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/META-INF/MANIFEST.MF index 32acc365..8d7067d8 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/META-INF/MANIFEST.MF +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/META-INF/MANIFEST.MF @@ -1,31 +1,34 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: org.eclipse.om2m.sdt.home.monitoring -Bundle-SymbolicName: org.eclipse.om2m.sdt.home.monitoring -Bundle-Version: 1.1.0.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Bundle-Activator: org.eclipse.om2m.sdt.home.monitoring.Activator -Bundle-ClassPath: ., - lib/json-simple-1.1.1.jar -Import-Package: javax.servlet, - javax.servlet.http, - org.apache.commons.codec.binary, - org.apache.commons.logging, - org.eclipse.om2m.commons.constants, - org.eclipse.om2m.commons.resource, - org.eclipse.om2m.core.service, - org.eclipse.om2m.interworking.service, - org.eclipse.om2m.sdt, - org.eclipse.om2m.sdt.args, - org.eclipse.om2m.sdt.datapoints, - org.eclipse.om2m.sdt.exceptions, - org.eclipse.om2m.sdt.home.devices, - org.eclipse.om2m.sdt.home.driver, - org.eclipse.om2m.sdt.home.modules, - org.eclipse.om2m.sdt.home.types, - org.eclipse.om2m.sdt.types, - org.osgi.framework, - org.osgi.service.cm, - org.osgi.service.http, - org.osgi.service.log, - org.osgi.util.tracker +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.om2m.sdt.home.monitoring +Bundle-SymbolicName: org.eclipse.om2m.sdt.home.monitoring +Bundle-Version: 1.1.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-ClassPath: ., + lib/json-simple-1.1.1.jar +Import-Package: javax.servlet, + javax.servlet.http, + org.apache.commons.codec.binary, + org.apache.commons.logging, + org.eclipse.om2m.commons.constants, + org.eclipse.om2m.commons.resource, + org.eclipse.om2m.core.service, + org.eclipse.om2m.interworking.service, + org.eclipse.om2m.sdt, + org.eclipse.om2m.sdt.args, + org.eclipse.om2m.sdt.datapoints, + org.eclipse.om2m.sdt.exceptions, + org.eclipse.om2m.sdt.home.devices, + org.eclipse.om2m.sdt.home.driver, + org.eclipse.om2m.sdt.home.modules, + org.eclipse.om2m.sdt.home.monitoring.authentication.service, + org.eclipse.om2m.sdt.home.types, + org.eclipse.om2m.sdt.types, + org.osgi.framework, + org.osgi.service.cm, + org.osgi.service.component, + org.osgi.service.component.annotations, + org.osgi.service.http, + org.osgi.service.log, + org.osgi.util.tracker +Service-Component: OSGI-INF/home.monitoring.application.xml diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/OSGI-INF/home.monitoring.application.xml b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/OSGI-INF/home.monitoring.application.xml new file mode 100644 index 00000000..d7adb2a1 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/OSGI-INF/home.monitoring.application.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/build.properties b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/build.properties index 940bbe7b..0cdd2b65 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/build.properties +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/build.properties @@ -1,24 +1,25 @@ -############################################################################### -# Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) -# 7 Colonel Roche 31077 Toulouse - France -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Initial Contributors: -# Thierry Monteil : Project manager, technical co-manager -# Mahdi Ben Alaya : Technical co-manager -# Samir Medjiah : Technical co-manager -# Khalil Drira : Strategy expert -# Guillaume Garzone : Developer -# Franois Assaoui : Developer -# -# New contributors : -############################################################################### -source.. = src/main/java/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - lib/json-simple-1.1.1.jar +############################################################################### +# Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) +# 7 Colonel Roche 31077 Toulouse - France +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Initial Contributors: +# Thierry Monteil : Project manager, technical co-manager +# Mahdi Ben Alaya : Technical co-manager +# Samir Medjiah : Technical co-manager +# Khalil Drira : Strategy expert +# Guillaume Garzone : Developer +# Franois Assaoui : Developer +# +# New contributors : +############################################################################### +source.. = src/main/java/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + lib/json-simple-1.1.1.jar,\ + OSGI-INF/home.monitoring.application.xml diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/Activator.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/Activator.java index 0d850c80..6c1a6736 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/Activator.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/Activator.java @@ -1,137 +1,140 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.monitoring; - -import java.util.Dictionary; -import java.util.Hashtable; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.eclipse.om2m.core.service.CseService; -import org.eclipse.om2m.interworking.service.InterworkingService; -import org.eclipse.om2m.sdt.home.monitoring.servlet.CredentialsServlet; -import org.eclipse.om2m.sdt.home.monitoring.servlet.HomeServlet; -import org.eclipse.om2m.sdt.home.monitoring.servlet.InCseContextServlet; -import org.eclipse.om2m.sdt.home.monitoring.servlet.LoginServlet; -import org.eclipse.om2m.sdt.home.monitoring.servlet.LogoutServlet; -import org.eclipse.om2m.sdt.home.monitoring.util.AeRegistration; -import org.eclipse.om2m.sdt.home.monitoring.util.Constants; -import org.eclipse.om2m.sdt.home.monitoring.util.ResourceDiscovery; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.osgi.framework.ServiceRegistration; -import org.osgi.service.cm.ConfigurationException; -import org.osgi.service.cm.ManagedService; -import org.osgi.service.http.HttpService; -import org.osgi.util.tracker.ServiceTracker; - - -public class Activator implements BundleActivator , ManagedService { - /** logger */ - private static Log LOGGER = LogFactory.getLog(Activator.class); - public String globalContext = System.getProperty("org.eclipse.om2m.globalContext",""); - public static String uiContext = /*System.getProperty("org.eclipse.om2m.webInterfaceContext","/")*/""; - public static String sep ="/"; - public static String CAMERAURL =""; - /** HTTP service tracker */ - private ServiceTracker httpServiceTracker; - private ServiceTracker sclServiceTracker; - - @Override - public void start(BundleContext context) throws Exception { - initCseServiceTracker(context) ; - - if (uiContext.equals("/")) { - sep=""; - } - - httpServiceTracker = new ServiceTracker(context, HttpService.class.getName(), null) { - - public void removedService(ServiceReference reference, Object service) { - LOGGER.info("HttpService removed"); - try { - LOGGER.info("Unregister " + uiContext + sep + " http context"); - ((HttpService) service).unregister(uiContext + sep + Constants.APPNAME); - } catch (IllegalArgumentException e) { - LOGGER.error("Error unregistring webapp servlet",e); - } - } - - public Object addingService(ServiceReference reference) { - LOGGER.info("HttpService discovered"); - HttpService httpService = (HttpService) context.getService(reference); - try { - LOGGER.info("Register test " + uiContext + sep + "Home_Monitoring_Application http context"); - httpService.registerServlet(uiContext + sep + Constants.APPNAME, - new HomeServlet(context), null, null); - httpService.registerServlet(uiContext + sep + Constants.APPNAME + "/in-cse/context", - new InCseContextServlet(), null, null); - httpService.registerServlet(uiContext + sep + Constants.APPNAME + "/security/login", - new LoginServlet(context), null, null); - httpService.registerServlet(uiContext + sep + Constants.APPNAME + "/security/cred", - new CredentialsServlet(context), null, null); - httpService.registerServlet(uiContext + sep + Constants.APPNAME + "/security/logout", - new LogoutServlet(context), null, null); - httpService.registerResources(uiContext + sep + Constants.APPNAME + "/webapps", - uiContext + sep + "webapps", null); - } catch (Exception e) { - LOGGER.error("Error registring webapp servlet",e); - } - return httpService; - } - }; - httpServiceTracker.open(); - Dictionary dic= new Hashtable(); - dic.put("service.pid", "home.monitoring.application"); - context.registerService(ManagedService.class.getName(), new Activator(), dic); - } - - @Override - public void stop(BundleContext context) throws Exception { - try { - sclServiceTracker.close(); - httpServiceTracker.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void initCseServiceTracker(final BundleContext bundleContext) { - sclServiceTracker = new ServiceTracker(bundleContext, CseService.class.getName(), null) { - private ServiceRegistration sr; - - public void removedService(ServiceReference reference, Object service) { - - sr.unregister(); - AeRegistration.getInstance().deleteAe(); - AeRegistration.getInstance().setCseService(null); - - LOGGER.info("CSEService removed"); - } - public Object addingService(ServiceReference reference) { - LOGGER.info("CSEService Tracker found"); - CseService cseService = (CseService) this.context.getService(reference); - AeRegistration.getInstance().setCseService(cseService); - AeRegistration.getInstance().createAe(); - sr = bundleContext.registerService(InterworkingService.class, AeRegistration.getInstance(), null); - ResourceDiscovery.initCseService(cseService); - return cseService; - } - }; - sclServiceTracker.open(); - } - - @Override - public void updated(Dictionary dictionary) throws ConfigurationException { - if (dictionary != null) { - CAMERAURL=dictionary.get("ip.camera.url").toString(); - } - } - -} +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.monitoring; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.om2m.core.service.CseService; +import org.eclipse.om2m.interworking.service.InterworkingService; +import org.eclipse.om2m.sdt.home.monitoring.authentication.service.AuthenticationService; +import org.eclipse.om2m.sdt.home.monitoring.servlet.AuthenticationServiceServlet; +import org.eclipse.om2m.sdt.home.monitoring.servlet.CredentialsServlet; +import org.eclipse.om2m.sdt.home.monitoring.servlet.HomeServlet; +import org.eclipse.om2m.sdt.home.monitoring.servlet.InCseContextServlet; +import org.eclipse.om2m.sdt.home.monitoring.servlet.LoginServlet; +import org.eclipse.om2m.sdt.home.monitoring.servlet.LogoutServlet; +import org.eclipse.om2m.sdt.home.monitoring.servlet.MyHttpContext; +import org.eclipse.om2m.sdt.home.monitoring.util.AeRegistration; +import org.eclipse.om2m.sdt.home.monitoring.util.Constants; +import org.eclipse.om2m.sdt.home.monitoring.util.ResourceDiscovery; +import org.osgi.framework.ServiceRegistration; +import org.osgi.service.component.ComponentContext; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.ReferenceCardinality; +import org.osgi.service.component.annotations.ReferencePolicy; +import org.osgi.service.http.HttpContext; +import org.osgi.service.http.HttpService; + + +@Component(name="home.monitoring.application", immediate=true,enabled=true) +public class Activator { + /** logger */ + private static Log LOGGER = LogFactory.getLog(Activator.class); + public String globalContext = System.getProperty("org.eclipse.om2m.globalContext",""); + public static String uiContext = /*System.getProperty("org.eclipse.om2m.webInterfaceContext","/")*/""; + public static String sep ="/"; + + private ServiceRegistration sr; + + private HttpService httpService; + private CseService sclService; + private List authenticationServices = new ArrayList(); + + + @Activate() + protected void activate(ComponentContext componentContext) { + // at this point, we are sure to have an HTTPService & a CseService + // as they are both mandatory services + + if (uiContext.equals("/")) { + sep=""; + } + + // register AE + AeRegistration.getInstance().setCseService(sclService); + AeRegistration.getInstance().createAe(); + sr = componentContext.getBundleContext().registerService(InterworkingService.class, AeRegistration.getInstance(), null); + ResourceDiscovery.initCseService(sclService); + + // expose HomeMonitoring service through HTTP service + try { + LOGGER.info("Register test " + uiContext + sep + "Home_Monitoring_Application http context"); + HttpContext httpContext = new MyHttpContext(httpService.createDefaultHttpContext()); + + httpService.registerServlet(uiContext + sep + Constants.APPNAME, + new HomeServlet(), null, httpContext); + httpService.registerServlet(uiContext + sep + Constants.APPNAME + AuthenticationServiceServlet.SERVLET_PATH, + new AuthenticationServiceServlet(this), null, httpContext); + httpService.registerServlet(uiContext + sep + Constants.APPNAME + "/in-cse/context", + new InCseContextServlet(), null, httpContext); + httpService.registerServlet(uiContext + sep + Constants.APPNAME + "/security/login", + new LoginServlet(this), null, httpContext); + httpService.registerServlet(uiContext + sep + Constants.APPNAME + "/security/cred", + new CredentialsServlet(), null, httpContext); + httpService.registerServlet(uiContext + sep + Constants.APPNAME + "/security/logout", + new LogoutServlet(), null, httpContext); + httpService.registerResources(uiContext + sep + Constants.APPNAME + "/webapps", + uiContext + sep + "webapps", httpContext); + } catch (Exception e) { + LOGGER.error("Error registring webapp servlet",e); + } + } + + @Deactivate + protected void deactivate() { + // unregister http servlet + this.httpService.unregister(uiContext + sep + Constants.APPNAME); + // delete ae + sr.unregister(); + AeRegistration.getInstance().deleteAe(); + AeRegistration.getInstance().setCseService(null); + } + + @Reference(cardinality=ReferenceCardinality.MANDATORY, policy=ReferencePolicy.DYNAMIC, unbind="unbindHttpService") + protected void bindHttpService(HttpService pHttpService) { + this.httpService = pHttpService; + } + protected void unbindHttpService(HttpService pHttpService) { + this.httpService = null; + } + + @Reference(cardinality=ReferenceCardinality.MANDATORY, policy=ReferencePolicy.DYNAMIC, unbind="unbindCseService") + protected void bindCseService(CseService pCseService) { + this.sclService = pCseService; + } + protected void unbindCseService(CseService pCseService) { + this.sclService = null; + } + + @Reference(cardinality=ReferenceCardinality.MULTIPLE, policy=ReferencePolicy.DYNAMIC, unbind="unbindAuthenticationService") + protected void bindAuthenticationService(AuthenticationService authenticationService) { + synchronized (authenticationServices) { + authenticationServices.add(authenticationService); + } + } + protected void unbindAuthenticationService(AuthenticationService authenticationService) { + synchronized (authenticationServices) { + authenticationServices.remove(authenticationService); + } + } + + public List getAuthenticationServices() { + List toBeReturned = new ArrayList<>(); + synchronized (authenticationServices) { + toBeReturned.addAll(authenticationServices); + } + return toBeReturned; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/AuthenticationServiceServlet.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/AuthenticationServiceServlet.java new file mode 100644 index 00000000..10ef305f --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/AuthenticationServiceServlet.java @@ -0,0 +1,67 @@ +package org.eclipse.om2m.sdt.home.monitoring.servlet; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.eclipse.om2m.sdt.home.monitoring.Activator; +import org.eclipse.om2m.sdt.home.monitoring.authentication.service.AuthenticationService; + +public class AuthenticationServiceServlet extends HttpServlet { + + public static final String SERVLET_PATH = "/authentication_servlet"; + + private final Activator activator; + + public AuthenticationServiceServlet(Activator activator) { + this.activator = activator; + } + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + String requestInfo = req.getPathInfo(); + String serverName = req.getServerName(); + int serverPort = req.getServerPort(); + String sessionId = null; + + // retrieve httpsession id + HttpSession httpSession = req.getSession(); + if (httpSession != null) { + sessionId = httpSession.getId(); + } + if ((requestInfo != null) || (sessionId == null)) { + resp.setStatus(404); + return; + } + String ret = "["; + boolean first = true; + for (AuthenticationService s : activator.getAuthenticationServices()) { + if (first) first = false; + else ret += ","; + ret += "{\"authenticationPage\":\"" + + s.getAuthenticationPage(sessionId, serverName, serverPort) + + "\",\"serviceName\":\"" + s.getServiceName() + "\"}"; + } + ret += "]"; + resp.setHeader("Content-Type", "application/json"); + resp.getWriter().println(ret); + resp.setStatus(200); + } + + @Override + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String requestInfo = req.getPathInfo(); + // TO BE DELETED + if (requestInfo == null) { + String sessionId = req.getParameter("sessionId"); + } else { + resp.setStatus(404); + } + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/CredentialsServlet.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/CredentialsServlet.java index 21438211..61b77c5e 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/CredentialsServlet.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/CredentialsServlet.java @@ -1,48 +1,69 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.monitoring.servlet; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.eclipse.om2m.sdt.home.monitoring.util.Constants; -import org.json.simple.JSONObject; -import org.osgi.framework.BundleContext; - -public class CredentialsServlet extends HttpServlet { - - private static final long serialVersionUID = 1L; - - public CredentialsServlet(BundleContext context) { - } - - @SuppressWarnings("unchecked") - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - String sessionId = request.getParameter(SessionManager.SESSION_ID_PARAMETER); - SessionManager.Session session = SessionManager.getInstance().getSession(sessionId); - if (session == null) { - // no valid session => - response.sendError(HttpServletResponse.SC_FORBIDDEN); - return; - } - - JSONObject jsonObject = new JSONObject(); - jsonObject.put(Constants.NAME, session.getName()); - jsonObject.put(Constants.CREDENTIALS, session.getName() + ':' + session.getPassword()); - - response.setContentType("application/json"); - response.getWriter().write(jsonObject.toJSONString()); - } - -} +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.monitoring.servlet; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.om2m.sdt.home.monitoring.util.Constants; +import org.eclipse.om2m.sdt.home.monitoring.util.HttpSessionHelper; +import org.json.simple.JSONObject; + +public class CredentialsServlet extends HttpServlet { + + private static Log LOGGER = LogFactory.getLog(CredentialsServlet.class); + + private static final long serialVersionUID = 1L; + + public CredentialsServlet() { + } + + @SuppressWarnings("unchecked") + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { +// String sessionId = request.getParameter(SessionManager.SESSION_ID_PARAMETER); + HttpSession session = request.getSession(); +// SessionManager.Session session = SessionManager.getInstance().getSession(sessionId); + if (session == null) { + // no valid session => + response.sendError(HttpServletResponse.SC_FORBIDDEN); + return; + } + + if (session.isNew()) { + LOGGER.info("session is new"); + } + + HttpSessionHelper sessionHelper = new HttpSessionHelper(session); + String name = sessionHelper.getName(); + String password = sessionHelper.getPassword(); + LOGGER.info("session: " + name + " / " + password + " / " + session.getId()); + + JSONObject jsonObject = new JSONObject(); + jsonObject.put(Constants.NAME, name); + if (sessionHelper.getBearer() != null) { + jsonObject.put(Constants.BEARER, sessionHelper.getBearer()); + jsonObject.put(Constants.CLIENT_ID, sessionHelper.getClientId()); + } + if (! ((name == null) || name.isEmpty() || (password == null) || password.isEmpty())) { + jsonObject.put(Constants.CREDENTIALS, name + ':' + password); + } + + response.setContentType("application/json"); + response.getWriter().write(jsonObject.toJSONString()); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/HomeServlet.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/HomeServlet.java index 265e9fd9..70de43aa 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/HomeServlet.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/HomeServlet.java @@ -1,64 +1,69 @@ -/******************************************************************************* - * Copyright (c) 2013-2014 LAAS-CNRS (www.laas.fr) - * 7 Colonel Roche 31077 Toulouse - France - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Thierry Monteil (Project co-founder) - Management and initial specification, - * conception and documentation. - * Mahdi Ben Alaya (Project co-founder) - Management and initial specification, - * conception, implementation, test and documentation. - * Christophe Chassot - Management and initial specification. - * Khalil Drira - Management and initial specification. - * Yassine Banouar - Initial specification, conception, implementation, test - * and documentation. - ******************************************************************************/ -package org.eclipse.om2m.sdt.home.monitoring.servlet; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.eclipse.om2m.sdt.home.monitoring.util.Constants; -import org.eclipse.om2m.sdt.home.monitoring.util.FileUtil; -import org.osgi.framework.BundleContext; - -public class HomeServlet extends HttpServlet { - - private static Log LOGGER = LogFactory.getLog(HomeServlet.class); - - private static final long serialVersionUID = 1L; - - public HomeServlet(BundleContext context) { - } - - @Override - protected void doGet(HttpServletRequest request, - HttpServletResponse response) throws ServletException, IOException { - // check session - LOGGER.info("home " + request.getParameterMap()); - String sessionId = request.getParameter(SessionManager.SESSION_ID_PARAMETER); - if ((sessionId != null) && SessionManager.getInstance().checkTokenExists(sessionId)) { - response.sendRedirect("/" + Constants.APPNAME + "/monitor/home"); - } else { - String redirect = "/" + Constants.WEBAPPS + "login.html"; - String name = request.getParameter(Constants.NAME); - String password = request.getParameter(Constants.PASSWORD); - if (! (FileUtil.isEmpty(name) || FileUtil.isEmpty(password))) { - redirect += "?" + Constants.NAME + "=" + name - + "&" + Constants.PASSWORD + "=" + password; - } - response.sendRedirect(redirect); - } - } - -} +/******************************************************************************* + * Copyright (c) 2013-2014 LAAS-CNRS (www.laas.fr) + * 7 Colonel Roche 31077 Toulouse - France + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Thierry Monteil (Project co-founder) - Management and initial specification, + * conception and documentation. + * Mahdi Ben Alaya (Project co-founder) - Management and initial specification, + * conception, implementation, test and documentation. + * Christophe Chassot - Management and initial specification. + * Khalil Drira - Management and initial specification. + * Yassine Banouar - Initial specification, conception, implementation, test + * and documentation. + ******************************************************************************/ +package org.eclipse.om2m.sdt.home.monitoring.servlet; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.om2m.sdt.home.monitoring.util.Constants; +import org.eclipse.om2m.sdt.home.monitoring.util.FileUtil; +import org.eclipse.om2m.sdt.home.monitoring.util.HttpSessionHelper; + +public class HomeServlet extends HttpServlet { + + private static Log LOGGER = LogFactory.getLog(HomeServlet.class); + + private static final long serialVersionUID = 1L; + + public HomeServlet() { + } + + @Override + protected void doGet(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + // check session + LOGGER.info("home " + request.getParameterMap()); + + HttpSession session = request.getSession(); + HttpSessionHelper sessionHelper = new HttpSessionHelper(session); + boolean authenticatedUser = sessionHelper.getAuthenticatedUser(); + if ((session != null) && authenticatedUser) { + response.setHeader("Set-Cookie", "JSESSIONID=" + System.currentTimeMillis() + ";Path=/"); + response.sendRedirect("/" + Constants.APPNAME); + } else { + String redirect = Constants.WEBAPPS + "login.html"; + String name = request.getParameter(Constants.NAME); + String password = request.getParameter(Constants.PASSWORD); + if (! (FileUtil.isEmpty(name) || FileUtil.isEmpty(password))) { + redirect += "?" + Constants.NAME + "=" + name + + "&" + Constants.PASSWORD + "=" + password; + } + response.sendRedirect(redirect); + } + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/InCseContextServlet.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/InCseContextServlet.java index 74b45b2b..40e45afd 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/InCseContextServlet.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/InCseContextServlet.java @@ -19,6 +19,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.eclipse.om2m.commons.constants.Constants; import org.eclipse.om2m.sdt.home.monitoring.util.AeRegistration; +import org.eclipse.om2m.sdt.home.monitoring.util.HttpSessionHelper; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; @@ -37,8 +38,11 @@ public class InCseContextServlet extends HttpServlet { @SuppressWarnings("unchecked") @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - String sessionId = req.getParameter(SessionManager.SESSION_ID_PARAMETER); - if (! SessionManager.getInstance().checkTokenExists(sessionId)) { + HttpSessionHelper sessionHelper = new HttpSessionHelper(req.getSession()); + +// String sessionId = req.getParameter(SessionManager.SESSION_ID_PARAMETER); +// if (! SessionManager.getInstance().checkTokenExists(sessionId)) { + if (!sessionHelper.getAuthenticatedUser()) { resp.sendError(HttpServletResponse.SC_FORBIDDEN); return; } @@ -51,6 +55,8 @@ public class InCseContextServlet extends HttpServlet { resp.getWriter().print("~/" + cseId + "/" + cseName); } else if (GET_NOTIFICATIONS.equals(pathInfo)) { // retrieve notifications + String sessionId = req.getSession().getId(); + List notifications = AeRegistration.getInstance().getNotificationsAndClears(sessionId); JSONArray globalJson = new JSONArray(); for (JSONObject notification : notifications) { @@ -70,7 +76,7 @@ public class InCseContextServlet extends HttpServlet { JSONParser parser = new JSONParser(); JSONObject jsonObject = (JSONObject) parser.parse(req.getReader()); String resourceId = (String) jsonObject.get(RESOURCE_ID); - String sessionId = (String) jsonObject.get(SessionManager.SESSION_ID_PARAMETER); + String sessionId = req.getSession().getId(); LOGGER.info("doPost(subscribeTo) " + resourceId); if (AeRegistration.getInstance().createSubscription(resourceId, sessionId)) { resp.setStatus(HttpServletResponse.SC_OK); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/LoginServlet.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/LoginServlet.java index cab5650a..f340082c 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/LoginServlet.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/LoginServlet.java @@ -1,45 +1,71 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.monitoring.servlet; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.eclipse.om2m.sdt.home.monitoring.util.AuthFillter; -import org.eclipse.om2m.sdt.home.monitoring.util.Constants; -import org.osgi.framework.BundleContext; - -public class LoginServlet extends HttpServlet { - - private static Log LOGGER = LogFactory.getLog(LoginServlet.class); - - private static final long serialVersionUID = 1L; - - public LoginServlet(BundleContext context) { - } - - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - LOGGER.info("login " + request.getParameterMap()); - SessionManager.Session session = AuthFillter.validateUserCredentials(request, response); - if (session != null) { - response.sendRedirect("/" + Constants.WEBAPPS + "monitor.html?" - + SessionManager.SESSION_ID_PARAMETER + "=" + session.getId()); - } else { - response.sendRedirect("/" + Constants.WEBAPPS + "login.html?message=error"); - } - } - -} +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.monitoring.servlet; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.om2m.sdt.home.monitoring.Activator; +import org.eclipse.om2m.sdt.home.monitoring.util.AuthFillter; +import org.eclipse.om2m.sdt.home.monitoring.util.Constants; +import org.eclipse.om2m.sdt.home.monitoring.util.HttpSessionHelper; + +public class LoginServlet extends HttpServlet { + + private static Log LOGGER = LogFactory.getLog(LoginServlet.class); + + private static final long serialVersionUID = 1L; + + private final Activator activator; + + public LoginServlet(Activator pActivator) { + this.activator = pActivator; + } + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + LOGGER.info("login " + request.getParameterMap()); + HttpSession session = request.getSession(true); + + if (session.isNew()) { + LOGGER.info("session new !"); + } + AuthFillter.validateUserCredentials(request, response, + activator.getAuthenticationServices()); + HttpSessionHelper sessionHelper = new HttpSessionHelper(session); + LOGGER.info("session: " + sessionHelper.getName() + " / " + sessionHelper.getPassword() + " / " + session.getId()); + + if (sessionHelper.getAuthenticatedUser()) { + response.sendRedirect(Constants.WEBAPPS + "monitor.html"); + } else { + response.sendRedirect(Constants.WEBAPPS + "login.html?message=error"); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + AuthFillter.validateUserCredentials(request, response, + activator.getAuthenticationServices()); + HttpSessionHelper sessionHelper = new HttpSessionHelper(request.getSession()); + if (sessionHelper.getAuthenticatedUser()) { + response.sendRedirect(Constants.WEBAPPS + "monitor.html"); + } else { + response.sendRedirect(Constants.WEBAPPS + "login.html?message=error"); + } + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/LogoutServlet.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/LogoutServlet.java index 3cc5902f..17003289 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/LogoutServlet.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/LogoutServlet.java @@ -1,39 +1,41 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.monitoring.servlet; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.eclipse.om2m.sdt.home.monitoring.util.AeRegistration; -import org.eclipse.om2m.sdt.home.monitoring.util.Constants; -import org.osgi.framework.BundleContext; - -public class LogoutServlet extends HttpServlet { - - private static final long serialVersionUID = 1L; - - public LogoutServlet(BundleContext context) { - } - - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - String sessionId = request.getParameter(SessionManager.SESSION_ID_PARAMETER); - if (sessionId != null) { - SessionManager.Session session = SessionManager.getInstance().removeSession(sessionId); - AeRegistration.getInstance().deassociateSubscriptionAndSessions(session.getId()); - } - response.sendRedirect("/" + Constants.WEBAPPS + "login.html"); - } - -} +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.monitoring.servlet; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.eclipse.om2m.sdt.home.monitoring.util.AeRegistration; +import org.eclipse.om2m.sdt.home.monitoring.util.Constants; + +public class LogoutServlet extends HttpServlet { + + private static final long serialVersionUID = 1L; + + public LogoutServlet() { + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + // invalidate session + + HttpSession httpSession = request.getSession(); + if (httpSession != null) { + AeRegistration.getInstance().deassociateSubscriptionAndSessions(httpSession.getId()); + httpSession.invalidate(); + } + response.sendRedirect(Constants.WEBAPPS + "login.html"); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/MyHttpContext.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/MyHttpContext.java new file mode 100644 index 00000000..07aa82b9 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/MyHttpContext.java @@ -0,0 +1,80 @@ +package org.eclipse.om2m.sdt.home.monitoring.servlet; + +import java.io.IOException; +import java.net.URL; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.eclipse.om2m.sdt.home.monitoring.util.Constants; +import org.eclipse.om2m.sdt.home.monitoring.util.HttpSessionHelper; +import org.osgi.service.http.HttpContext; + +public class MyHttpContext implements HttpContext { + + private final HttpContext defaultHttpContext; + + public MyHttpContext(HttpContext defaultHttpContext) { + this.defaultHttpContext = defaultHttpContext; + } + + @Override + public String getMimeType(String arg0) { + return defaultHttpContext.getMimeType(arg0); + } + + @Override + public URL getResource(String arg0) { + return defaultHttpContext.getResource(arg0); + } + + @Override + public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException { + // some urls do not require any security + if (checkUrl(request)) { + return true; + } + + HttpSession httpSession = request.getSession(); + if (httpSession != null) { + HttpSessionHelper sessionHelper = new HttpSessionHelper(httpSession); + if (sessionHelper.getAuthenticatedUser()) { + return true; + } + } + + // if we reach out this point, it means that the user is not authenticated + // redirect to login page + response.sendRedirect(Constants.WEBAPPS + "login.html"); + return true; + } + + private boolean checkUrl(HttpServletRequest request) { + String contextPath = request.getContextPath(); + String servletPath = request.getServletPath() + "/"; + String pathInfo = request.getPathInfo(); + System.out.println(contextPath); + System.out.println("servletPath=" + servletPath); + + if (servletPath.equals("/Home_Monitoring_Application/security/login/")) { + return true; + } + + if (servletPath.equals("/Home_Monitoring_Application/authentication_servlet/") + && request.getMethod().equals("GET")) { + return true; + } + + if (servletPath.equals(Constants.WEBAPPS) + && (pathInfo.equals("/login.html") + || pathInfo.startsWith("/css/") || pathInfo.startsWith("/images/") + || pathInfo.startsWith("/js/") || pathInfo.startsWith("/fonts/") + || pathInfo.startsWith("/resources/"))) { + return true; + } + + return false; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/SessionManager.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/SessionManager.java deleted file mode 100644 index f4b948ff..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/servlet/SessionManager.java +++ /dev/null @@ -1,89 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.monitoring.servlet; - -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -public class SessionManager { - - public class Session { - - private final String name; - private final String password; - private final String id; - - public Session(final String pName, final String pPassword) { - this.name = pName; - this.id = UUID.randomUUID().toString(); - this.password = pPassword; - } - - public String getName() { - return name; - } - - public String getPassword() { - return password; - } - - public String getId() { - return id; - } - - } - - public static final String SESSION_ID_PARAMETER = "sessionId"; - - private static final SessionManager INSTANCE = new SessionManager(); - - private final Map openedSessions; - - public static SessionManager getInstance() { - return INSTANCE; - } - - /** - * Make private default constructor - */ - private SessionManager() { - openedSessions = new HashMap(); - } - - public Session createNewSession(String name, String password) { - Session session = new Session(name, password); - synchronized (openedSessions) { - openedSessions.put(session.getId(), session); - } - return session; - } - - public Session removeSession(String token) { - synchronized (openedSessions) { - return openedSessions.remove(token); - } - } - - public boolean checkTokenExists(String token) { - if (token == null) - return false; - synchronized (openedSessions) { - return openedSessions.containsKey(token); - } - } - - public Session getSession(String sessionId) { - if (sessionId == null) - return null; - synchronized (openedSessions) { - return openedSessions.get(sessionId); - } - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/AeRegistration.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/AeRegistration.java index fa5c3c54..65562a55 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/AeRegistration.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/AeRegistration.java @@ -35,7 +35,6 @@ import org.eclipse.om2m.commons.resource.SetOfAcrs; import org.eclipse.om2m.commons.resource.Subscription; import org.eclipse.om2m.core.service.CseService; import org.eclipse.om2m.interworking.service.InterworkingService; -import org.eclipse.om2m.sdt.home.monitoring.servlet.SessionManager; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; @@ -130,12 +129,12 @@ public class AeRegistration implements InterworkingService, org.eclipse.om2m.sdt // create a Container to store the icon Container iconContainer = createContainer(registeredApplication.getResourceID(), "ICON"); if (iconContainer != null) { - createContentInstance(iconContainer, "/" + IMAGES + "logo.png"); + createContentInstance(iconContainer, IMAGES + "logo.png"); } Container presentationUrlContainer = createContainer(registeredApplication.getResourceID(), "PRESENTATION_URL"); if (presentationUrlContainer != null) { - createContentInstance(presentationUrlContainer, "/" + WEBAPPS + "login.html"); + createContentInstance(presentationUrlContainer, WEBAPPS + "login.html"); } // ok @@ -314,7 +313,7 @@ public class AeRegistration implements InterworkingService, org.eclipse.om2m.sdt } public boolean createSubscription(String resourceId, String sessionId) { - if ((resourceId == null) || ! SessionManager.getInstance().checkTokenExists(sessionId)) { + if ((resourceId == null) /*|| ! SessionManager.getInstance().checkTokenExists(sessionId)*/) { return false; } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/AuthFillter.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/AuthFillter.java index 1f37180c..9fc74c81 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/AuthFillter.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/AuthFillter.java @@ -1,63 +1,110 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.monitoring.util; - -import java.io.IOException; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.eclipse.om2m.sdt.home.monitoring.servlet.SessionManager; - -public class AuthFillter implements Constants { - - private static Log LOGGER = LogFactory.getLog(AuthFillter.class); - - public static SessionManager.Session validateUserCredentials(HttpServletRequest request, HttpServletResponse response) throws IOException { -// boolean isValid = false; - String name = ""; - String password = ""; - if ((request.getParameter(NAME) != null) && (request.getParameter(PASSWORD) != null)) { - name = request.getParameter(NAME); - password = request.getParameter(PASSWORD); - LOGGER.info("parameters " + name + "/" + password); - } else if (request.getHeader(AUTHORIZATION) != null) { - LOGGER.info("Headers Authorization " + request.getHeader(AUTHORIZATION) - + REQUESTED + request.getHeader(REQUESTED)); - response.addHeader(AUTHENTICATE, "Basic"); - response.addHeader(AUTHORIZATION, request.getHeader(AUTHORIZATION)); - if (request.getHeader(REQUESTED) != null) - response.addHeader(REQUESTED, request.getHeader(REQUESTED)); - String authHeader = request.getHeader(AUTHORIZATION); - String cred = new String(Base64.decodeBase64(authHeader.substring(6).getBytes())); - int idx = cred.indexOf(":"); - name = cred.substring(0, idx); - password = cred.substring(idx + 1); - LOGGER.info("headers " + name + "/" + password); - } else - LOGGER.info("void"); - String result = ResourceDiscovery.validateUserCredentials(name, password); - LOGGER.info("result=" + result); - if (result != null) { - // create new session - return SessionManager.getInstance().createNewSession(name, password); - } - - if (/*! isValid && */request.getHeader(REQUESTED) != null) { - response.addHeader(AUTHENTICATE, "Basic"); - LOGGER.info(REQUESTED + " " + name + "/" + password); - response.sendError(HttpServletResponse.SC_UNAUTHORIZED, null); - } - LOGGER.info(name + "/" + password); - return null; - } - -} +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.monitoring.util; + +import java.io.IOException; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.eclipse.om2m.sdt.home.monitoring.authentication.service.AuthenticationInfo; +import org.eclipse.om2m.sdt.home.monitoring.authentication.service.AuthenticationService; + +public class AuthFillter implements Constants { + + private static Log LOGGER = LogFactory.getLog(AuthFillter.class); + + public static void validateUserCredentials(HttpServletRequest request, HttpServletResponse response, + List authenticationServices) throws IOException { +// boolean isValid = false; + String name = ""; + String password = ""; + String bearer = null; + String clientId = null; + String serviceName = null; + String sessionId = null; + + HttpSession httpSession = request.getSession(); + sessionId = httpSession.getId(); + + if ((request.getParameter(NAME) != null) && (request.getParameter(PASSWORD) != null)) { + name = request.getParameter(NAME); + password = request.getParameter(PASSWORD); + LOGGER.info("parameters " + name + "/" + password); + } else if (request.getHeader(AUTHORIZATION) != null) { + LOGGER.info("Headers Authorization " + request.getHeader(AUTHORIZATION) + + REQUESTED + request.getHeader(REQUESTED)); + response.addHeader(AUTHENTICATE, "Basic"); + response.addHeader(AUTHORIZATION, request.getHeader(AUTHORIZATION)); + if (request.getHeader(REQUESTED) != null) + response.addHeader(REQUESTED, request.getHeader(REQUESTED)); + String authHeader = request.getHeader(AUTHORIZATION); + String cred = new String(Base64.decodeBase64(authHeader.substring(6).getBytes())); + int idx = cred.indexOf(":"); + name = cred.substring(0, idx); + password = cred.substring(idx + 1); + LOGGER.info("headers " + name + "/" + password); + } else if ((serviceName = request.getParameter("serviceName")) != null) { + AuthenticationService as = getAuthenticationService(serviceName, authenticationServices); + if (as != null) { + AuthenticationInfo ai = as.getAuthenticationInfo(sessionId); + bearer = ai.getAccessToken(); + clientId = ai.getClientId(); + name = as.getEndUserInfo(sessionId).getUserId(); + } + } else + LOGGER.info("void"); + + boolean createNewSession = false; + if (bearer != null) { + // check bearer + createNewSession = true; + } else { + String result = ResourceDiscovery.validateUserCredentials(name, password); + LOGGER.info("result=" + result); + if (result != null) { + createNewSession = true; + } + } + + if (createNewSession) { + // create new session + HttpSessionHelper sessionHelper = new HttpSessionHelper(httpSession); + sessionHelper.setAuthenticationUser(Boolean.TRUE); + sessionHelper.setName(name); + sessionHelper.setPassword(password); + sessionHelper.setBearer(bearer); + sessionHelper.setClientId(clientId); + sessionHelper.setServiceName(serviceName); + } + + if (/*! isValid && */request.getHeader(REQUESTED) != null) { + response.addHeader(AUTHENTICATE, "Basic"); + LOGGER.info(REQUESTED + " " + name + "/" + password); + response.sendError(HttpServletResponse.SC_UNAUTHORIZED, null); + return; + } + LOGGER.info("authenticated " + name + "/" + password); + } + + private static AuthenticationService getAuthenticationService(String name, + List authenticationServices) { + for (AuthenticationService as : authenticationServices) { + if (name.equals(as.getServiceName())) { + return as; + } + } + return null; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/Constants.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/Constants.java index f4703c96..2bbfe832 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/Constants.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/Constants.java @@ -1,30 +1,32 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.monitoring.util; - -public interface Constants { - - String APPNAME = "Home_Monitoring_Application"; - String RESOURCE_ID = "SDT_" + APPNAME; - String FRIENDLY_HOME_MONITORING_NAME = "Home Monitoring Application"; - String ACP_HOME_MONITORING_NAME = RESOURCE_ID + "_ACP"; - String HOME_MONITORING_RESOURCE_ID = "ResourceID/" + RESOURCE_ID; - String RESOURCE_TYPE = "ResourceType/Application"; - String POA = "HomeMonitoringPOA"; - - String WEBAPPS = APPNAME + "/webapps/"; - String IMAGES = WEBAPPS + "images/"; - - String NAME = "name"; - String CREDENTIALS = "credentials"; - String PASSWORD = "password"; - String AUTHORIZATION = "Authorization"; - String AUTHENTICATE = "WWW-Authenticate"; - String REQUESTED = "X-Requested-With"; - -} +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.monitoring.util; + +public interface Constants { + + String APPNAME = "Home_Monitoring_Application"; + String RESOURCE_ID = "SDT_" + APPNAME; + String FRIENDLY_HOME_MONITORING_NAME = "Home Monitoring Application"; + String ACP_HOME_MONITORING_NAME = RESOURCE_ID + "_ACP"; + String HOME_MONITORING_RESOURCE_ID = "ResourceID/" + RESOURCE_ID; + String RESOURCE_TYPE = "ResourceType/Application"; + String POA = "HomeMonitoringPOA"; + + String WEBAPPS = "/" + APPNAME + "/webapps/"; + String IMAGES = WEBAPPS + "images/"; + + String NAME = "name"; + String CREDENTIALS = "credentials"; + String PASSWORD = "password"; + String BEARER = "bearer"; + String CLIENT_ID = "clientId"; + String AUTHORIZATION = "Authorization"; + String AUTHENTICATE = "WWW-Authenticate"; + String REQUESTED = "X-Requested-With"; + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/HttpSessionHelper.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/HttpSessionHelper.java new file mode 100644 index 00000000..54f85dae --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/java/org/eclipse/om2m/sdt/home/monitoring/util/HttpSessionHelper.java @@ -0,0 +1,69 @@ +package org.eclipse.om2m.sdt.home.monitoring.util; + +import javax.servlet.http.HttpSession; + +public class HttpSessionHelper { + + private final HttpSession httpSession; + + private static final String NAME = "name"; + private static final String PASSWORD = "password"; + private static final String BEARER = "bearer"; + private static final String CLIENT_ID = "clientId"; + private static final String SERVICE_NAME = "serviceName"; + private static final String AUTHENTICATED_USER = "authenticatedUser"; + + public HttpSessionHelper(HttpSession pHttpSession) { + this.httpSession = pHttpSession; + } + + public void setName(String name) { + httpSession.setAttribute(NAME, name); + } + + public String getName() { + return (String) httpSession.getAttribute(NAME); + } + + public void setPassword(String password) { + httpSession.setAttribute(PASSWORD, password); + } + + public String getPassword() { + return (String) httpSession.getAttribute(PASSWORD); + } + + public void setBearer(String bearer) { + httpSession.setAttribute(BEARER, bearer); + } + + public String getBearer() { + return (String) httpSession.getAttribute(BEARER); + } + + public void setClientId(String clientId) { + httpSession.setAttribute(CLIENT_ID, clientId); + } + + public String getClientId() { + return (String) httpSession.getAttribute(CLIENT_ID); + } + + public void setServiceName(String serviceName) { + httpSession.setAttribute(SERVICE_NAME, serviceName); + } + + public String getServiceName() { + return (String) httpSession.getAttribute(SERVICE_NAME); + } + + public void setAuthenticationUser(Boolean authenticatedUser) { + httpSession.setAttribute(AUTHENTICATED_USER, authenticatedUser); + } + + public boolean getAuthenticatedUser() { + Boolean b = (Boolean) httpSession.getAttribute(AUTHENTICATED_USER); + return (b == null) ? false : b.booleanValue(); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/css/color_picker.css b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/css/color_picker.css new file mode 100644 index 00000000..d1c5c4c5 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/css/color_picker.css @@ -0,0 +1,86 @@ + /******************************************************************************* + * Copyright (c) 2018, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ + + +.pickerContainer { + height: 80px; +} + +.picker { + float:left; +} + +.sliders { + margin-top: 5px; + margin-left: 40px; + float: left; +} + +.slider { + margin-top: 0px; + float: right; +} + +.slidersLables { + width: 160px; + height: 30px; + margin-bottom: 0px; + margin-right: 20px; +} + +.colorPicker { + position: relative; +} + +.colorPicker * { + position: absolute; + cursor: crosshair; +} + +.colorPicker { + width: 70px; + height: 70px; +} + +.colorPicker .ring { + background: url(../images/ringM2M.png) no-repeat; + width: 70px; + height: 70px; +} + +.colorPicker .color { + top: 1px; + left: 1px; + width: 68px; + height: 68px; +} + +.colorPicker .pointer { + width: 17px; + height: 17px; + margin: -8px 0 0 -8px; + overflow: hidden; + background: url(../images/pointer.png) no-repeat; +} + + @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) { + /* IE10+ specific styles */ + .sliders + { + margin-top: 5px; + margin-left: 90px; + float: none; + } + + .slider + { + margin-top: -10px; + margin-bottom: -20px; + float: right; + } +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/css/style.css b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/css/style.css index 4cb6b85a..b43b7e74 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/css/style.css +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/css/style.css @@ -390,3 +390,7 @@ and (orientation : portrait) { .backgroundRed { background:#F00; } + +.backgroundGray { + background:gray; +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/marker.png b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/marker.png deleted file mode 100644 index 3929bbb5..00000000 Binary files a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/marker.png and /dev/null differ diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/pointer.png b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/pointer.png new file mode 100644 index 00000000..3929bbb5 Binary files /dev/null and b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/pointer.png differ diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/ringM2M.png b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/ringM2M.png new file mode 100644 index 00000000..568707b6 Binary files /dev/null and b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/images/ringM2M.png differ diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/app.js b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/app.js index a3049813..d0a1431d 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/app.js +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/app.js @@ -7,41 +7,58 @@ angular.module('app', ['uiSwitch']).controller('MainController', function($scope var cameraCanceler = $q.defer(); var timerForDevicesUpdate = null; var timerForNotifications = null; - - $scope.imgModules = { - 'temperature':'temp.jpg', - 'noise':'noise.jpg', - 'relativeHumidity':'humidity.png', - 'atmosphericPressureSensor':'pressure.jpg', - 'extendedCarbonDioxideSensor':'co2.png', - 'contactSensor':'open_door_35.png', - 'motionSensor':'motion_sensor.png', - 'energyConsumption': 'power_consumption.png' - }; - - $scope.moduleFilterDefinition = { - 'temperature':'curT0', - 'noise':'noise', - 'relativeHumidity':'relHy', - 'atmosphericPressureSensor':'atmPe', - 'extendedCarbonDioxideSensor':'cDeVe', - 'contactSensor':'alarm', - 'motionSensor':'alarm', - 'energyConsumption':'power', - 'numberValue': 'numVe' - }; + + $scope.moduleDisplay = { + 'temperature' : [{ + 'img': 'temp.jpg', + 'dataPoint': 'curT0' + }], + 'acousticSensor': [{ + 'img': 'noise.jpg', + 'dataPoint': 'louds' + }], + 'barometer': [{ + 'img': 'pressure.jpg', + 'dataPoint': 'atmPe' + }], + 'airQualitySensor': [ + { + 'img': 'humidity.png', + 'dataPoint': 'senHy' + }, + { + 'img': 'co2.png', + 'dataPoint': 'co2' + } + ], + 'contactSensor': [{ + 'img': 'open_door_35.png', + 'dataPoint': 'alarm' + }], + 'motionSensor': [{ + 'img': 'motion_sensor.png', + 'dataPoint': 'alarm' + }], + 'energyConsumption': [{ + 'img': 'power_consumption.png', + 'dataPoint': 'power' + }], + 'numberValue': [{ + 'img': '', + 'dataPoint': 'numVe' + }] + }; $scope.datapointsNamePerModule = { "brightness": ["brigs"], "colourSaturation": ["colSn"], "binarySwitch" : ["powSe"], "temperature" : ["minVe", "unit", "curT0", "maxVe"], - "noise" : ["noise"], - "extendedCarbonDioxideSensor" : ["cDeVe", "alarm"], - "atmosphericPressureSensor" : ["atmPe"], - "relativeHumidity" : ["relHy"], + "acousticSensor" : ["louds"], + "airQualitySensor" : ["co2", "senHy"], + "barometer" : ["atmPe"], "contactSensor" : ["alarm"], - "streaming" : ["frmt", "psWd", "login", "url"], + "sessionDescription" : ["sdp", "ur1"], "personSensor" : ["detPs"], "motionSensor" : ["alarm"], "colour" : ["red", "green", "blue"], @@ -59,6 +76,7 @@ angular.module('app', ['uiSwitch']).controller('MainController', function($scope $scope.hls = null; $scope.mjpegPlayer = null; $scope.credentials =''; + $scope.bearer = ''; $scope.imgPath = "dot.png"; @@ -69,7 +87,7 @@ angular.module('app', ['uiSwitch']).controller('MainController', function($scope $scope.name=""; $scope.currentUrl = new URL(window.location); - $scope.sessionId = $scope.currentUrl.searchParams.get("sessionId"); + $scope.changeHueRGBInterval = null; $scope.clickedModule = {}; @@ -77,15 +95,14 @@ angular.module('app', ['uiSwitch']).controller('MainController', function($scope $scope.load = function() { var req = { method: 'GET', - url: $scope.urlBase + '/Home_Monitoring_Application/in-cse/context', - params: {sessionId: $scope.sessionId} + url: $scope.urlBase + '/Home_Monitoring_Application/in-cse/context' }; $http(req).success(function (response, status, headers, config) { $scope.cseContext = response; }); - }; /*"~/dt-in-cse/dt-in-name"*/ /* ~/cseId/cseName */ + }; /*"~/in-cse/in-name"*/ /* ~/cseId/cseName */ $scope.load(); $scope.count = 0; @@ -95,24 +112,28 @@ angular.module('app', ['uiSwitch']).controller('MainController', function($scope // default polling interval in ms var defaultModulePolling = 180000; -// // blacklist module polling interval in ms -// var blModules = ["runMode","streaming","colour","colourSaturation","faultDetection"]; -// -// // fast polling interval in ms -// var fastModulePolling = 3000; -// var fastModules = ["binarySwitch","energyConsumption","lock"]; - $scope.getDevicesAsArray = function() { return Object.values($scope.devices); }; $scope.getModulesFromDevice = function(device) { - console.log("getModules for " + device.name); +// console.log("getModules for " + device.name); return Object.values(device.modules); }; + + $scope.getElementsToBeDisplayed = function(module) { + var el = $scope.moduleDisplay[module.name] + var toBeDisplayed = []; + for (var i=0; i picker.square; + + // Process + picker.mousemove(event); + return false; + } + + //////////////////////////////////////////////////// + // Mousemove handler + /////// + picker.mousemove = function (event) { + // Get coordinates relative to colorPicker center + var pos = picker.pointerCoordinates(event); + + // Set new HSL parameters + if (picker.pointerDrag) { + var hue = Math.atan2(pos.x, -pos.y) / 6.28; + if (hue < 0) + hue += 1 + picker.setHSL([hue, picker.hsl[1], picker.hsl[2]]); + window['global_Value_'+htmlBlock.id+'_hue']=hue; + } + return false; + } + + //////////////////////////////////////////////////// + // Mouseup handler + /////// + picker.mouseup = function () { + // Uncapture mouse + $(document).unbind('mousemove', picker.mousemove); + $(document).unbind('mouseup', picker.mouseup); + document.isDragged = false; + } + + //////////////////////////////////////////////////// + // Update the markers and styles + /////// + picker.updateDisplay = function () { + // Marker position update + var angle = picker.hsl[0] * 6.28; + $('.ringPointer', e).css({ + left: Math.round(Math.sin(angle) * picker.radius + picker.width / 2) + 'px', + top: Math.round(-Math.cos(angle) * picker.radius + picker.width / 2) + 'px' + }); + + // Current color visualization + $('.color', e).css('backgroundColor', rgbToString(hslToRgb([picker.hsl[0], 1, 0.5]))); + + // Linked elements or callback + if (typeof picker.callback == 'object') { + // Set background/foreground color + $(picker.callback).css({ + backgroundColor: picker.color, + color: picker.hsl[2] > 0.5 ? '#000' : '#fff' + }); + + + // Change linked value + $(picker.callback).each(function() { + if (this.value && this.value != picker.color) { + this.value = picker.color; + } + }); + } + else if (typeof picker.callback == 'function') { + picker.callback.call(picker, picker.color); + } + } + + //////////////////////////////////////////////////// + // Get absolute position of element + /////// + picker.absolutePosition = function (el) { + var pos = { x: el.offsetLeft, y: el.offsetTop }; + // Resolve relative to offsetParent + if (el.offsetParent) { + var tmp = picker.absolutePosition(el.offsetParent); + pos.x += tmp.x; + pos.y += tmp.y; + } + return pos; + }; + + + // Install mousedown handler + $('*', e).mousedown(picker.mousedown); + + // Init color + picker.setColor('#000000'); + + // Set linked elements/callback + if (callback) { + picker.attachCallback(callback); + } +} \ No newline at end of file diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/color_tools.js b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/color_tools.js new file mode 100644 index 00000000..7b3d6c3a --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/color_tools.js @@ -0,0 +1,77 @@ +function hslToHsv(hsl) { + var h = hsl[0]; + var v = hsl[2]+hsl[1]*(hsl[2]<.5?hsl[2]:1-hsl[2]) + var s = 2*hsl[1]*(hsl[2]<.5?hsl[2]:1-hsl[2])/v; + return [h, s, v]; +} + +function hsvToHsl(hsv) { + var h = hsv[0]; + var l = (2-hsv[1])*hsv[2]/2; + var s = 0; + if (l>0) + s = hsv[1]*hsv[2]/(l<0.5?2*l:2-2*l); + return [h, s, l]; +} + +function hueToRgb(m1, m2, h) { + h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h); + if (h * 6 < 1) return m1 + (m2 - m1) * h * 6; + if (h * 2 < 1) return m2; + if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6; + return m1; +} + +function hslToRgb(hsl) { + var m1, m2, r, g, b; + var h = hsl[0], s = hsl[1], l = hsl[2]; + m2 = (l <= 0.5) ? l * (1 + s) : l + s - l * s; + m1 = l * 2 - m2; + return [hueToRgb(m1, m2, h+0.33333), + hueToRgb(m1, m2, h), + hueToRgb(m1, m2, h-0.33333)]; +} + +function rgbToHsl(rgb) { + var min, max, delta, h, s, l; + var r = rgb[0], g = rgb[1], b = rgb[2]; + min = Math.min(r, Math.min(g, b)); + max = Math.max(r, Math.max(g, b)); + delta = max - min; + l = (min + max) / 2; + s = 0; + if (l > 0 && l < 1) { + s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l)); + } + h = 0; + if (delta > 0) { + if (max == r && max != g) h += (g - b) / delta; + if (max == g && max != b) h += (2 + (b - r) / delta); + if (max == b && max != r) h += (4 + (r - g) / delta); + h /= 6; + } + return [h, s, l]; +} + +/* Convert RGB color to string and vice versa (for CSS use) */ +function rgbToString(rgb) { + var r = Math.round(rgb[0] * 255); + var g = Math.round(rgb[1] * 255); + var b = Math.round(rgb[2] * 255); + return '#' + (r < 16 ? '0' : '') + r.toString(16) + + (g < 16 ? '0' : '') + g.toString(16) + + (b < 16 ? '0' : '') + b.toString(16); +} + +function stringToRGB(color) { + if (color.length == 7) { + return [parseInt('0x' + color.substring(1, 3)) / 255, + parseInt('0x' + color.substring(3, 5)) / 255, + parseInt('0x' + color.substring(5, 7)) / 255]; + } + else if (color.length == 4) { + return [parseInt('0x' + color.substring(1, 2)) / 15, + parseInt('0x' + color.substring(2, 3)) / 15, + parseInt('0x' + color.substring(3, 4)) / 15]; + } +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/farbtastic.js b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/farbtastic.js deleted file mode 100644 index dfb2da54..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/js/farbtastic.js +++ /dev/null @@ -1,465 +0,0 @@ -/** - * Farbtastic Color Picker 1.2 - * Š 2008 Steven Wittens - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -function writeNewLightModule () -{ - var htmlText='
'+ - '
'+ - '
'+ - ''+ - '
'+ - ''+ - '
'+ - '
'+ - '
'+ - ''+ - '
'+ - '
'+ - '
'; - - return htmlText; - -} - - -function hslToRgb(h, s, l){ - var r, g, b; - - if(s == 0){ - r = g = b = l; // achromatic - }else{ - var hue2rgb = function hue2rgb(p, q, t){ - if(t < 0) t += 1; - if(t > 1) t -= 1; - if(t < 1/6) return p + (q - p) * 6 * t; - if(t < 1/2) return q; - if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; - return p; - } - - var q = l < 0.5 ? l * (1 + s) : l + s - l * s; - var p = 2 * l - q; - r = hue2rgb(p, q, h + 1/3); - g = hue2rgb(p, q, h); - b = hue2rgb(p, q, h - 1/3); - } - - return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)]; -} - -/** - * Converts an RGB color value to HSL. Conversion formula - * adapted from http://en.wikipedia.org/wiki/HSL_color_space. - * Assumes r, g, and b are contained in the set [0, 255] and - * returns h, s, and l in the set [0, 1]. - * - * @param {number} r The red color value - * @param {number} g The green color value - * @param {number} b The blue color value - * @return {Array} The HSL representation - */ -function rgbToHsl(r, g, b){ - r /= 255, g /= 255, b /= 255; - var max = Math.max(r, g, b), min = Math.min(r, g, b); - var h, s, l = (max + min) / 2; - - if(max == min){ - h = s = 0; // achromatic - }else{ - var d = max - min; - s = l > 0.5 ? d / (2 - max - min) : d / (max + min); - switch(max){ - case r: h = (g - b) / d + (g < b ? 6 : 0); break; - case g: h = (b - r) / d + 2; break; - case b: h = (r - g) / d + 4; break; - } - h /= 6; - } - - return [h, s, l]; -} - -jQuery.fn.farbtastic = function (callback) { - $.farbtastic(this, callback); - return this; -}; - -jQuery.farbtastic = function (container, callback) { - var container = $(container).get(0); - return container.farbtastic || (container.farbtastic = new jQuery._farbtastic(container, callback)); -} - -jQuery._farbtastic = function (container, callback) { - // Store farbtastic object - var fb = this; - - var e = $('.farbtastic', container); - fb.wheel = $('.wheel', container).get(0); - // Dimensions - fb.radius = 32; - fb.square = 39; - fb.width = 70; - //document.getElementById("labellum1a").innerHTML = ' ' + container.id; - // Fix background PNGs in IE6 - if (navigator.appVersion.match(/MSIE [0-6]\./)) { - $('*', e).each(function () { - if (this.currentStyle.backgroundImage != 'none') { - var image = this.currentStyle.backgroundImage; - image = this.currentStyle.backgroundImage.substring(5, image.length - 2); - $(this).css({ - 'backgroundImage': 'none', - 'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')" - }); - } - }); - } - - /** - * Link to the given element(s) or callback. - */ - fb.linkTo = function (callback) { - // Unbind previous nodes - if (typeof fb.callback == 'object') { - $(fb.callback).unbind('keyup', fb.updateValue); - } - - // Reset color - fb.color = null; - - // Bind callback or elements - if (typeof callback == 'function') { - fb.callback = callback; - } - else if (typeof callback == 'object' || typeof callback == 'string') { - fb.callback = $(callback); - fb.callback.bind('keyup', fb.updateValue); - if (fb.callback.get(0).value) { - fb.setColor(fb.callback.get(0).value); - } - } - return this; - } - fb.updateValue = function (event) { - if (this.value && this.value != fb.color) { - fb.setColor(this.value); - } - } - - /** - * Change color with HTML syntax #123456 - */ - fb.setColor = function (color) { - var unpack = fb.unpack(color); - if (fb.color != color && unpack) { - fb.color = color; - fb.rgb = unpack; - fb.hsl = fb.RGBToHSL(fb.rgb); - fb.hsv = fb.HSLToHSV(fb.hsl); - fb.updateDisplay(); - } - return this; - } - - /** - * Change color with HSL triplet [0..1, 0..1, 0..1] - */ - fb.setHSL = function (hsl) { - fb.hsl = hsl.map(Number); - fb.hsv = fb.HSLToHSV(fb.hsl); - fb.rgb = fb.HSLToRGB(fb.hsl); - fb.color = fb.pack(fb.rgb); - fb.updateDisplay(); - return this; - } - - /** - * Change color with Red, Green and Blue values of 0..255 - */ - fb.setRGB = function (r, g, b) { - fb.rgb = [r/255, g/255, b/255]; - fb.hsl = fb.RGBToHSL(fb.rgb); - fb.hsv = fb.HSLToHSV(fb.hsl); - fb.color = fb.pack(fb.rgb); - fb.updateDisplay(); - return this; - } - - /** - * Change color with HSV triplet [0..1, 0..1, 0..1] - */ - fb.setHSV = function (hsv) { - fb.hsv = hsv.map(Number); - fb.hsl = fb.HSVToHSL(fb.hsv); - fb.rgb = fb.HSLToRGB(fb.hsl); - fb.color = fb.pack(fb.rgb); - fb.updateDisplay(); - return this; - } - - /** - * Return color as RGB triplet [0..255, 0..255, 0..255] - */ - fb.getRGB = function () { - return [Math.round(fb.rgb[0] * 255), Math.round(fb.rgb[1] * 255), Math.round(fb.rgb[2] * 255) ]; - } - ///////////////////////////////////////////////////// - - /** - * Retrieve the coordinates of the given event relative to the center - * of the widget. - */ - fb.widgetCoords = function (event) { - var x, y; - var el = event.target || event.srcElement; - var reference = fb.wheel; - - if (typeof event.offsetX != 'undefined') { - // Use offset coordinates and find common offsetParent - var pos = { x: event.offsetX, y: event.offsetY }; - - // Send the coordinates upwards through the offsetParent chain. - var e = el; - while (e) { - e.mouseX = pos.x; - e.mouseY = pos.y; - pos.x += e.offsetLeft; - pos.y += e.offsetTop; - e = e.offsetParent; - } - - // Look for the coordinates starting from the wheel widget. - var e = reference; - var offset = { x: 0, y: 0 } - while (e) { - if (typeof e.mouseX != 'undefined') { - x = e.mouseX - offset.x; - y = e.mouseY - offset.y; - break; - } - offset.x += e.offsetLeft; - offset.y += e.offsetTop; - e = e.offsetParent; - } - - // Reset stored coordinates - e = el; - while (e) { - e.mouseX = undefined; - e.mouseY = undefined; - e = e.offsetParent; - } - } - else { - // Use absolute coordinates - var pos = fb.absolutePosition(reference); - x = (event.pageX || 0*(event.clientX + $('html').get(0).scrollLeft)) - pos.x; - y = (event.pageY || 0*(event.clientY + $('html').get(0).scrollTop)) - pos.y; - } - // Subtract distance to middle - return { x: x - fb.width / 2, y: y - fb.width / 2 }; - } - - /** - * Mousedown handler - */ - fb.mousedown = function (event) { - // Capture mouse - if (!document.dragging) { - $(document).bind('mousemove', fb.mousemove).bind('mouseup', fb.mouseup); - document.dragging = true; - } - - // Check which area is being dragged - var pos = fb.widgetCoords(event); - fb.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > fb.square; - - - - // Process - fb.mousemove(event); - return false; - } - - /** - * Mousemove handler - */ - fb.mousemove = function (event) { - // Get coordinates relative to color picker center - var pos = fb.widgetCoords(event); - - // Set new HSL parameters - if (fb.circleDrag) { - var hue = Math.atan2(pos.x, -pos.y) / 6.28; - if (hue < 0) hue += 1; -// fb.setHSL([hue, (document.getElementById(container.id+"_slider_saturation").value), (document.getElementById(container.id+"_slider_lumination").value)]); - fb.setHSL([hue, fb.hsl[1], fb.hsl[2]]); - window['global_Value_'+container.id+'_hue']=hue; - } - - return false; - } - - /** - * Mouseup handler - */ - fb.mouseup = function () { - // Uncapture mouse - $(document).unbind('mousemove', fb.mousemove); - $(document).unbind('mouseup', fb.mouseup); - document.dragging = false; - } - - /** - * Update the markers and styles - */ - fb.updateDisplay = function () { - - // Markers - var angle = fb.hsl[0] * 6.28; - $('.h-marker', e).css({ - left: Math.round(Math.sin(angle) * fb.radius + fb.width / 2) + 'px', - top: Math.round(-Math.cos(angle) * fb.radius + fb.width / 2) + 'px' - }); - - // Saturation/Luminance gradient - $('.color', e).css('backgroundColor', fb.pack(fb.HSLToRGB([fb.hsl[0], 1, 0.5]))); - - // Linked elements or callback - if (typeof fb.callback == 'object') { - // Set background/foreground color - $(fb.callback).css({ - backgroundColor: fb.color, - color: fb.hsl[2] > 0.5 ? '#000' : '#fff' - }); - - // Change linked value - $(fb.callback).each(function() { - if (this.value && this.value != fb.color) { - this.value = fb.color; - } - }); - } - else if (typeof fb.callback == 'function') { - fb.callback.call(fb, fb.color); - } - } - - /** - * Get absolute position of element - */ - fb.absolutePosition = function (el) { - var r = { x: el.offsetLeft, y: el.offsetTop }; - // Resolve relative to offsetParent - if (el.offsetParent) { - var tmp = fb.absolutePosition(el.offsetParent); - r.x += tmp.x; - r.y += tmp.y; - } - return r; - }; - - /* Various color utility functions */ - fb.pack = function (rgb) { - var r = Math.round(rgb[0] * 255); - var g = Math.round(rgb[1] * 255); - var b = Math.round(rgb[2] * 255); - return '#' + (r < 16 ? '0' : '') + r.toString(16) + - (g < 16 ? '0' : '') + g.toString(16) + - (b < 16 ? '0' : '') + b.toString(16); - } - - fb.unpack = function (color) { - if (color.length == 7) { - return [parseInt('0x' + color.substring(1, 3)) / 255, - parseInt('0x' + color.substring(3, 5)) / 255, - parseInt('0x' + color.substring(5, 7)) / 255]; - } - else if (color.length == 4) { - return [parseInt('0x' + color.substring(1, 2)) / 15, - parseInt('0x' + color.substring(2, 3)) / 15, - parseInt('0x' + color.substring(3, 4)) / 15]; - } - } - - fb.HSLToHSV = function (hsl) { - var h = hsl[0]; - var v = hsl[2]+hsl[1]*(hsl[2]<.5?hsl[2]:1-hsl[2]) - var s = 2*hsl[1]*(hsl[2]<.5?hsl[2]:1-hsl[2])/v; - return [h, s, v]; - } - - fb.HSVToHSL = function (hsv) { - var h = hsv[0]; - var l = (2-hsv[1])*hsv[2]/2; - var s = 0; - if (l>0) - s = hsv[1]*hsv[2]/(l<0.5?2*l:2-2*l); - return [h, s, l]; - } - - fb.HSLToRGB = function (hsl) { - var m1, m2, r, g, b; - var h = hsl[0], s = hsl[1], l = hsl[2]; - m2 = (l <= 0.5) ? l * (s + 1) : l + s - l*s; - m1 = l * 2 - m2; - return [this.hueToRGB(m1, m2, h+0.33333), - this.hueToRGB(m1, m2, h), - this.hueToRGB(m1, m2, h-0.33333)]; - } - - fb.hueToRGB = function (m1, m2, h) { - h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h); - if (h * 6 < 1) return m1 + (m2 - m1) * h * 6; - if (h * 2 < 1) return m2; - if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6; - return m1; - } - - fb.RGBToHSL = function (rgb) { - var min, max, delta, h, s, l; - var r = rgb[0], g = rgb[1], b = rgb[2]; - min = Math.min(r, Math.min(g, b)); - max = Math.max(r, Math.max(g, b)); - delta = max - min; - l = (min + max) / 2; - s = 0; - if (l > 0 && l < 1) { - s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l)); - } - h = 0; - if (delta > 0) { - if (max == r && max != g) h += (g - b) / delta; - if (max == g && max != b) h += (2 + (b - r) / delta); - if (max == b && max != r) h += (4 + (r - g) / delta); - h /= 6; - } - return [h, s, l]; - } - - // Install mousedown handler (the others are set on the document on-demand) - $('*', e).mousedown(fb.mousedown); - - // Init color - fb.setColor('#000000'); - - // Set linked elements/callback - if (callback) { - fb.linkTo(callback); - } -} \ No newline at end of file diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/login.html b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/login.html index dab55b8d..3f107783 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/login.html +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/login.html @@ -1,75 +1,90 @@ - - - - - - - Smart Home | login - - - - - - - -
- -
- - + + + + + + + Smart Home | login + + + + + + + + +
+ +
+ + diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/monitor.html b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/monitor.html index 9286361d..7dfdeb06 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/monitor.html +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/org.eclipse.om2m.sdt.home.monitoring/src/main/resources/webapps/monitor.html @@ -19,9 +19,10 @@ - - - + + + + @@ -43,7 +44,7 @@
- +
@@ -83,15 +84,21 @@
  • + ng-class="{'backgroundRed' : device.isUpdated, 'backgroundGray' : !device.enable}">
    {{device.name}}
    - + @@ -110,8 +117,10 @@
    -
    -
    +
    +
    +
    +
    diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/pom.xml b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/pom.xml index 0e8ce1ed..1ed28e0c 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/pom.xml +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.applications/pom.xml @@ -1,37 +1,41 @@ - - - - - - 4.0.0 - - org.eclipse.om2m.sdt.home.applications - pom - 1.1.0-SNAPSHOT - SDT Applications for oneM2M, Home domain - - - org.eclipse.om2m - org.eclipse.om2m.sdt - 1.1.0-SNAPSHOT - - - - - - org.apache.maven.plugins - maven-release-plugin - 2.5.3 - - - - - - org.eclipse.om2m.sdt.home.monitoring - - - + + + + + + 4.0.0 + + org.eclipse.om2m.sdt.home.applications + pom + 1.1.0-SNAPSHOT + SDT Applications for oneM2M, Home domain + + + org.eclipse.om2m + org.eclipse.om2m.sdt + 1.1.0-SNAPSHOT + + + + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + + + + + org.eclipse.om2m.sdt.home.monitoring + + org.eclipse.om2m.sdt.home.applications.authentication.service + + + + diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.cloud/src/main/java/org/eclipse/om2m/sdt/home/cloud/ResourceDiscovery.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.cloud/src/main/java/org/eclipse/om2m/sdt/home/cloud/ResourceDiscovery.java index 1d96b90c..6c75466a 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.cloud/src/main/java/org/eclipse/om2m/sdt/home/cloud/ResourceDiscovery.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.cloud/src/main/java/org/eclipse/om2m/sdt/home/cloud/ResourceDiscovery.java @@ -139,7 +139,7 @@ public class ResourceDiscovery { Activator.logger.info("No serial number property. Take id instead."); serial = deviceId; } else { - serial = serialAttr.getCustomAttributeValue(); + serial = serialAttr.getValue(); } GenericDevice device = (GenericDevice) Activator.DOMAIN.getDevice(deviceId); if (device == null) { @@ -159,14 +159,14 @@ public class ResourceDiscovery { } for (CustomAttribute attr : deviceFlexContainer.getCustomAttributes()) { Activator.logger.info("dev CustomAttribute: " + attr); - PropertyType propType = PropertyType.fromShortName(attr.getCustomAttributeName()); + PropertyType propType = PropertyType.fromShortName(attr.getShortName()); if (propType != null) { - Property prop = new Property(propType, attr.getCustomAttributeValue()); + Property prop = new Property(propType, attr.getValue()); // device.addProperty(prop); - device.addProperty(propType, attr.getCustomAttributeValue()); + device.addProperty(propType, attr.getValue()); } else { Activator.logger.warning("Unknown custom attribute: " - + attr.getCustomAttributeName()); + + attr.getShortName()); } } // Search children resources: modules @@ -204,9 +204,9 @@ public class ResourceDiscovery { List dpAttrs = new ArrayList(); for (CustomAttribute attr : moduleFlexContainer.getCustomAttributes()) { Activator.logger.info("mod CustomAttribute(1): " + attr); - PropertyType propType = PropertyType.fromShortName(attr.getCustomAttributeName()); + PropertyType propType = PropertyType.fromShortName(attr.getShortName()); if (propType != null) { - Property prop = new Property(propType, attr.getCustomAttributeValue()); + Property prop = new Property(propType, attr.getValue()); props.add(prop); } else { dpAttrs.add(attr); @@ -231,10 +231,10 @@ public class ResourceDiscovery { List dps = new ArrayList(); for (CustomAttribute attr : dpAttrs) { Activator.logger.info("mod CustomAttribute(2): " + attr); - DatapointType datapointType = DatapointType.fromShortName(attr.getCustomAttributeName()); + DatapointType datapointType = DatapointType.fromShortName(attr.getShortName()); if (datapointType == null) { Activator.logger.warning("Unknown custom attribute, neither property nor datapoint: " - + attr.getCustomAttributeName()); + + attr.getShortName()); continue; } String type = datapointType.getDataType().getTypeChoice().getOneM2MType(); @@ -259,7 +259,7 @@ public class ResourceDiscovery { Activator.logger.info("datapoints: " + dps); Map dpsMap = new HashMap(); for (DataPoint dp : dps) { - dpsMap.put(dp.getShortDefinitionType(), dp); + dpsMap.put(dp.getShortName(), dp); } Class clazz = Class.forName(className); if (modName.startsWith(cntDef + "__")) { @@ -319,7 +319,7 @@ public class ResourceDiscovery { // new DataType(type, SimpleType.getSimpleType(type))) { // public void setValue(Object value) { // try { -// SDTUtil.setValue(attr, value); +// TypeConverter.setValue(attr, value); // updateAttribute(uri, attr); // } catch (Exception e) { // Activator.logger.warning("Could not set arg", e); @@ -370,7 +370,7 @@ public class ResourceDiscovery { private static IntegerDataPoint getIntegerDataPoint(final CustomAttribute attr, final String uri) { - return new IntegerDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new IntegerDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Integer val) throws DataPointException { try { @@ -383,7 +383,7 @@ public class ResourceDiscovery { @Override public Integer doGetValue() throws DataPointException { try { - return (Integer) retrieveAttribute(uri, attr.getCustomAttributeName(), "xs:integer"); + return (Integer) retrieveAttribute(uri, attr.getShortName(), "xs:integer"); } catch (Exception e) { throw new DataPointException(e); } @@ -393,7 +393,7 @@ public class ResourceDiscovery { private static BooleanDataPoint getBooleanDataPoint(final CustomAttribute attr, final String uri) { - BooleanDataPoint ret = new BooleanDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + BooleanDataPoint ret = new BooleanDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Boolean val) throws DataPointException { try { @@ -406,7 +406,7 @@ public class ResourceDiscovery { @Override public Boolean doGetValue() throws DataPointException { try { - return (Boolean) retrieveAttribute(uri, attr.getCustomAttributeName(), "xs:boolean"); + return (Boolean) retrieveAttribute(uri, attr.getShortName(), "xs:boolean"); } catch (Exception e) { throw new DataPointException(e); } @@ -417,7 +417,7 @@ public class ResourceDiscovery { private static StringDataPoint getStringDataPoint(final CustomAttribute attr, final String uri) { - return new StringDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new StringDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(String val) throws DataPointException { try { @@ -430,7 +430,7 @@ public class ResourceDiscovery { @Override public String doGetValue() throws DataPointException { try { - return (String) retrieveAttribute(uri, attr.getCustomAttributeName(), "xs:string"); + return (String) retrieveAttribute(uri, attr.getShortName(), "xs:string"); } catch (Exception e) { throw new DataPointException(e); } @@ -440,7 +440,7 @@ public class ResourceDiscovery { private static ByteDataPoint getByteDataPoint(final CustomAttribute attr, final String uri) { - return new ByteDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new ByteDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Byte val) throws DataPointException { try { @@ -453,7 +453,7 @@ public class ResourceDiscovery { @Override public Byte doGetValue() throws DataPointException { try { - return (Byte) retrieveAttribute(uri, attr.getCustomAttributeName(), "xs:byte"); + return (Byte) retrieveAttribute(uri, attr.getShortName(), "xs:byte"); } catch (Exception e) { throw new DataPointException(e); } @@ -463,7 +463,7 @@ public class ResourceDiscovery { private static FloatDataPoint getFloatDataPoint(final CustomAttribute attr, final String uri) { - return new FloatDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new FloatDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Float val) throws DataPointException { try { @@ -476,7 +476,7 @@ public class ResourceDiscovery { @Override public Float doGetValue() throws DataPointException { try { - return (Float) retrieveAttribute(uri, attr.getCustomAttributeName(), "xs:float"); + return (Float) retrieveAttribute(uri, attr.getShortName(), "xs:float"); } catch (Exception e) { throw new DataPointException(e); } @@ -486,7 +486,7 @@ public class ResourceDiscovery { private static DateTimeDataPoint getDateTimeDataPoint(final CustomAttribute attr, final String uri) { - return new DateTimeDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new DateTimeDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Date val) throws DataPointException { try { @@ -499,7 +499,7 @@ public class ResourceDiscovery { @Override public Date doGetValue() throws DataPointException { try { - return (Date) retrieveAttribute(uri, attr.getCustomAttributeName(), "xs:datetime"); + return (Date) retrieveAttribute(uri, attr.getShortName(), "xs:datetime"); } catch (Exception e) { throw new DataPointException(e); } @@ -509,7 +509,7 @@ public class ResourceDiscovery { private static DateDataPoint getDateDataPoint(final CustomAttribute attr, final String uri) { - return new DateDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new DateDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Date val) throws DataPointException { try { @@ -522,7 +522,7 @@ public class ResourceDiscovery { @Override public Date doGetValue() throws DataPointException { try { - return (Date) retrieveAttribute(uri, attr.getCustomAttributeName(), "xs:date"); + return (Date) retrieveAttribute(uri, attr.getShortName(), "xs:date"); } catch (Exception e) { throw new DataPointException(e); } @@ -532,7 +532,7 @@ public class ResourceDiscovery { private static TimeDataPoint getTimeDataPoint(final CustomAttribute attr, final String uri) { - return new TimeDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new TimeDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Date val) throws DataPointException { try { @@ -545,7 +545,7 @@ public class ResourceDiscovery { @Override public Date doGetValue() throws DataPointException { try { - return (Date) retrieveAttribute(uri, attr.getCustomAttributeName(), "xs:time"); + return (Date) retrieveAttribute(uri, attr.getShortName(), "xs:time"); } catch (Exception e) { throw new DataPointException(e); } @@ -555,7 +555,7 @@ public class ResourceDiscovery { private static ArrayDataPoint getArrayDataPoint(final CustomAttribute attr, final String uri) { - return new ArrayDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new ArrayDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(List val) throws DataPointException { try { @@ -569,7 +569,7 @@ public class ResourceDiscovery { @Override public List doGetValue() throws DataPointException { try { - return (List) retrieveAttribute(uri, attr.getCustomAttributeName(), "xs:array"); + return (List) retrieveAttribute(uri, attr.getShortName(), "xs:array"); } catch (Exception e) { throw new DataPointException(e); } @@ -586,7 +586,7 @@ public class ResourceDiscovery { Class clazz = Class.forName(className); return (EnumDataPoint) clazz.getConstructor(Identifiers.class, EnumDataPoint.class) - .newInstance(DatapointType.fromShortName(attr.getCustomAttributeName()), + .newInstance(DatapointType.fromShortName(attr.getShortName()), new EnumDataPoint(null) { @Override public void doSetValue(Integer val) throws DataPointException { @@ -600,7 +600,7 @@ public class ResourceDiscovery { @Override public Integer doGetValue() throws DataPointException { try { - return (Integer) retrieveAttribute(uri, attr.getCustomAttributeName(), "xs:integer"); + return (Integer) retrieveAttribute(uri, attr.getShortName(), "xs:integer"); } catch (Exception e) { throw new DataPointException(e); } @@ -686,7 +686,7 @@ public class ResourceDiscovery { if (! ResponseStatusCode.UPDATED.equals(response.getResponseStatusCode())) throw new Exception("Error invoking cloud action: " + response.getResponseStatusCode()); CustomAttribute ret = ((AbstractFlexContainer) response.getContent()).getCustomAttribute("output"); - return (ret == null) ? null : ret.getCustomAttributeValue(); + return (ret == null) ? null : ret.getValue(); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.cloud/src/main/java/org/eclipse/om2m/sdt/home/cloud/SDTUtil.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.cloud/src/main/java/org/eclipse/om2m/sdt/home/cloud/SDTUtil.java index 9f017489..65811f3c 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.cloud/src/main/java/org/eclipse/om2m/sdt/home/cloud/SDTUtil.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.cloud/src/main/java/org/eclipse/om2m/sdt/home/cloud/SDTUtil.java @@ -23,7 +23,7 @@ public class SDTUtil { public static Object getValue(CustomAttribute attr, String type) throws Exception { return (attr == null) ? null - : getValue(attr.getCustomAttributeValue(), type); + : getValue(attr.getValue(), type); } public static Object getValue(String value, String type) throws Exception { @@ -59,7 +59,7 @@ public class SDTUtil { public static void setValue(CustomAttribute attr, String type, Object val) throws Exception { if (val == null) { - attr.setCustomAttributeValue(null); + attr.setValue(null); return; } switch (type) { @@ -69,10 +69,10 @@ public class SDTUtil { case "xs:boolean": case "xs:byte": case "xs:uri": - attr.setCustomAttributeValue(val.toString()); return; - case "xs:datetime": attr.setCustomAttributeValue(dateTimeFormat.format((Date)val)); return; - case "xs:time": attr.setCustomAttributeValue(timeFormat.format((Date)val)); return; - case "xs:date": attr.setCustomAttributeValue(dateFormat.format((Date)val)); return; + attr.setValue(val.toString()); return; + case "xs:datetime": attr.setValue(dateTimeFormat.format((Date)val)); return; + case "xs:time": attr.setValue(timeFormat.format((Date)val)); return; + case "xs:date": attr.setValue(dateFormat.format((Date)val)); return; case "xs:enum": String ret = ""; boolean first = true; @@ -81,11 +81,11 @@ public class SDTUtil { else first = false; ret += s.toString(); } - attr.setCustomAttributeValue(ret); return; + attr.setValue(ret); return; case "xs:blob": return;// TODO serialize byte array default: if (type.startsWith("hd:")) - attr.setCustomAttributeValue(val.toString()); + attr.setValue(val.toString()); return; } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.driver/META-INF/MANIFEST.MF b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.driver/META-INF/MANIFEST.MF index b9411e89..7481cbe8 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.driver/META-INF/MANIFEST.MF +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.driver/META-INF/MANIFEST.MF @@ -5,7 +5,8 @@ Bundle-SymbolicName: org.eclipse.om2m.sdt.home.driver Bundle-Version: 1.1.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-ClassPath: . -Import-Package: org.eclipse.om2m.sdt, +Import-Package: org.apache.commons.logging, + org.eclipse.om2m.sdt, org.eclipse.om2m.sdt.exceptions, org.eclipse.om2m.sdt.home.devices, org.eclipse.om2m.sdt.home.modules, diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.driver/src/main/java/org/eclipse/om2m/sdt/home/driver/Logger.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.driver/src/main/java/org/eclipse/om2m/sdt/home/driver/Logger.java index 7af041fe..27a39c07 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.driver/src/main/java/org/eclipse/om2m/sdt/home/driver/Logger.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.driver/src/main/java/org/eclipse/om2m/sdt/home/driver/Logger.java @@ -7,18 +7,14 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.driver; -import org.osgi.service.log.LogService; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; public class Logger { + private static Log LOG = LogFactory.getLog(Logger.class); static private final String PREFIX = "[ONEM2M."; - static private final String[] LEVELS = new String[] { - "ERROR ", "WARNING ", "INFO ", "DEBUG " - }; - - static private LogService logService; - private String protocol; @@ -26,78 +22,62 @@ public class Logger { this.protocol = protocol; } - public final void setLogService(final LogService log) { - logService = log; - } - - public final void unsetLogService() { - logService = null; - } - public final void debug(final String message) { - print(LogService.LOG_DEBUG, null, message); + LOG.debug(createLogMsg(null, message)); } public final void debug(final String message, final Class clazz) { - print(LogService.LOG_DEBUG, clazz, message); + LOG.debug(createLogMsg(clazz, message)); } public final void info(final String message) { - print(LogService.LOG_INFO, null, message); + LOG.info(createLogMsg(null, message)); } public final void info(final String message, final Class clazz) { - print(LogService.LOG_INFO, clazz, message); + LOG.info(createLogMsg( clazz, message)); } public final void warning(final String message) { - print(LogService.LOG_WARNING, null, message); + LOG.warn(createLogMsg(null, message)); } public final void warning(final String message, final Throwable e) { - print(LogService.LOG_WARNING, null, message, e); + LOG.warn(createLogMsg(null, message), e); } public final void warning(final String message, final Class clazz) { - print(LogService.LOG_WARNING, clazz, message); + LOG.warn(createLogMsg(clazz, message)); } public final void warning(final String message, final Class clazz, final Throwable e) { - print(LogService.LOG_WARNING, clazz, message, e); + LOG.warn(createLogMsg( clazz, message), e); } public final void error(final String message) { - print(LogService.LOG_ERROR, null, message); + LOG.error(createLogMsg(null, message)); } public final void error(final String message, final Throwable e) { - print(LogService.LOG_ERROR, null, message, e); - } + LOG.error(createLogMsg(null, message), e); + } public final void error(final String message, final Class clazz) { - print(LogService.LOG_ERROR, clazz, message); + LOG.error(createLogMsg(clazz, message)); } public final void error(final String message, final Class clazz, final Throwable e) { - print(LogService.LOG_ERROR, clazz, message, e); - } + LOG.error(createLogMsg(clazz, message), e); - private final void print(final int level, final Class clazz, final String message) { - String msg = PREFIX + protocol + ((clazz == null) ? "] " : "." + clazz.getSimpleName() + "] ") + message; - if (logService != null) - logService.log(level, msg); - else - System.out.println(LEVELS[level-1] + msg); } - private final void print(final int level, final Class clazz, final String message, final Throwable e) { - String msg = PREFIX + protocol + ((clazz == null) ? "] " : "." + clazz.getSimpleName() + "] ") + message; - if (logService != null) - logService.log(level, msg, e); - else - System.out.println(LEVELS[level-1] + msg + ": " + e.getMessage()); - if (e != null) - e.printStackTrace(); + private final String createLogMsg(final Class clazz, final String message) { + return PREFIX + protocol + ((clazz == null) ? "] " : "." + clazz.getSimpleName() + "] ") + message; } - + + // Method kept for compatibility reasons + public void setLogService(LogService log) {} + + // Method kept for compatibility reasons + public void unsetLogService( ) {} } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOFloodDetector.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOFloodDetector.java index f1ba1439..73275053 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOFloodDetector.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOFloodDetector.java @@ -20,6 +20,7 @@ import org.eclipse.om2m.sdt.home.modules.AbstractAlarmSensor; import org.eclipse.om2m.sdt.home.modules.FaultDetection; import org.eclipse.om2m.sdt.home.modules.WaterSensor; import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.ModuleType; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; import org.osgi.service.enocean.EnOceanDevice; @@ -104,7 +105,8 @@ public class EOFloodDetector extends FloodDetector implements EnOceanSDTDevice { sensor = new WaterSensor("WaterSensor_" + eoDevice.getChipId(), domain, alarm); addModule((WaterSensor)sensor); } else { - sensor = new AbstractAlarmSensor("AbstractAlarmSensor_" + eoDevice.getChipId(), domain, alarm); + sensor = new AbstractAlarmSensor("AbstractAlarmSensor_" + eoDevice.getChipId(), domain, + alarm, ModuleType.waterSensor); addModule(sensor); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOLight.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOLight.java index e0ff486d..6f204fa9 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOLight.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOLight.java @@ -23,7 +23,6 @@ import org.eclipse.om2m.sdt.home.modules.BinarySwitch; import org.eclipse.om2m.sdt.home.modules.Colour; import org.eclipse.om2m.sdt.home.modules.ColourSaturation; import org.eclipse.om2m.sdt.home.modules.FaultDetection; -import org.eclipse.om2m.sdt.home.modules.RunMode; import org.eclipse.om2m.sdt.home.types.DatapointType; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; @@ -56,12 +55,6 @@ public class EOLight extends Light implements EnOceanSDTDevice { Activator.logger.warning("Error addFaultDetection", e); } try { -// addRunState(); - addRunMode(); - } catch (Exception e) { - Activator.logger.warning("Error addRunMode", e); - } - try { addColour(); } catch (Exception e) { Activator.logger.warning("Error addColour", e); @@ -119,68 +112,6 @@ public class EOLight extends Light implements EnOceanSDTDevice { addModule(faultDetection); } -// private void addRunState() { -// RunState runState = new RunState("RunState_" + eoDevice.getChipId(), domain, -// new JobStates(new EnumDataPoint(null) { -// @Override -// public void doSetValue(Integer val) throws DataPointException { -// throw new DataPointException("Not implemented"); -// } -// @Override -// public Integer doGetValue() throws DataPointException { -// return null; -// } -// }), -// new ArrayDataPoint(DatapointType.jobStates) { -// @Override -// public List doGetValue() throws DataPointException { -// return null; -// } -// }, -// new MachineState(new EnumDataPoint(null) { -// @Override -// public void doSetValue(Integer val) throws DataPointException { -// throw new DataPointException("Not implemented"); -// } -// @Override -// public Integer doGetValue() throws DataPointException { -// return null; -// } -// }), -// new ArrayDataPoint(DatapointType.machineStates) { -// @Override -// public List doGetValue() throws DataPointException { -// return null; -// } -// }); -// addModule(runState); -// } - - private void addRunMode() { - RunMode runMode = new RunMode("RunMode_" + eoDevice.getChipId(), domain, - new ArrayDataPoint(DatapointType.operationMode) { - @Override - public void doSetValue(List values) throws DataPointException { - throw new DataPointException("Not implemented"); - } - @Override - public List doGetValue() throws DataPointException { - return null; - } - }, - new ArrayDataPoint(DatapointType.supportedModes) { - @Override - public void doSetValue(List value) throws DataPointException { - throw new DataPointException("Not implemented"); - } - @Override - public List doGetValue() throws DataPointException { - return null; - } - }); - addModule(runMode); - } - private void addColour() { Colour colour = new Colour("colour_" + eoDevice.getChipId(), domain, new IntegerDataPoint(DatapointType.red) { @@ -216,7 +147,7 @@ public class EOLight extends Light implements EnOceanSDTDevice { private void addColourSaturation() { ColourSaturation colourSaturation = new ColourSaturation("colourSaturation_" + eoDevice.getChipId(), domain, - new IntegerDataPoint(DatapointType.colourSat) { + new IntegerDataPoint(DatapointType.colourSaturation) { @Override public void doSetValue(Integer value) throws DataPointException { } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOLightBlindControl.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOLightBlindControl.java index 4ed69659..20b0a89f 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOLightBlindControl.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOLightBlindControl.java @@ -13,7 +13,7 @@ import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.Event; import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.devices.SwitchButton; +import org.eclipse.om2m.sdt.home.devices.Switch; import org.eclipse.om2m.sdt.home.driver.Utils; import org.eclipse.om2m.sdt.home.enocean.Activator.EnOceanSDTDevice; import org.eclipse.om2m.sdt.home.modules.FaultDetection; @@ -26,7 +26,7 @@ import org.osgi.service.enocean.EnOceanDevice; import org.osgi.service.enocean.EnOceanMessage; @SuppressWarnings("rawtypes") -public class EOLightBlindControl extends SwitchButton implements EnOceanSDTDevice { +public class EOLightBlindControl extends Switch implements EnOceanSDTDevice { private final EnOceanDevice eoDevice; private Domain domain; @@ -67,11 +67,11 @@ public class EOLightBlindControl extends SwitchButton implements EnOceanSDTDevic } catch (Exception e) { Activator.logger.warning("Error addBinarySwitch", e); } - try { - addFaultDetection(); - } catch (Exception e) { - Activator.logger.warning("Error addFaultDetection", e); - } +// try { +// addFaultDetection(); +// } catch (Exception e) { +// Activator.logger.warning("Error addFaultDetection", e); +// } } @Override @@ -132,16 +132,16 @@ public class EOLightBlindControl extends SwitchButton implements EnOceanSDTDevic addModule(button); } - private void addFaultDetection() { - faultDetection = new FaultDetection("FaultDetection_" + eoDevice.getChipId(), domain, - new BooleanDataPoint(DatapointType.status) { - @Override - public Boolean doGetValue() throws DataPointException { - return false; - } - }); - addModule(faultDetection); - } +// private void addFaultDetection() { +// faultDetection = new FaultDetection("FaultDetection_" + eoDevice.getChipId(), domain, +// new BooleanDataPoint(DatapointType.status) { +// @Override +// public Boolean doGetValue() throws DataPointException { +// return false; +// } +// }); +// addModule(faultDetection); +// } private void addSmokeSensor() { status = new BooleanDataPoint(DatapointType.alarm) { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOWaterValve.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOWaterValve.java index 3c1cf3b1..ab26f198 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOWaterValve.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.enocean/src/main/java/org/eclipse/om2m/sdt/home/enocean/EOWaterValve.java @@ -12,7 +12,6 @@ import java.util.List; import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.Event; import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.devices.WaterValve; import org.eclipse.om2m.sdt.home.driver.Utils; @@ -40,7 +39,7 @@ public class EOWaterValve extends WaterValve implements EnOceanSDTDevice { private org.eclipse.om2m.sdt.home.modules.LiquidLevel waterLevel; private LiquidLevel liquidLevelDP; - private Integer liquidLevel = LiquidLevel.maximum; + private LiquidLevel.Values liquidLevel = LiquidLevel.Values.maximum; public EOWaterValve(EnOceanDevice device, Domain domain, String serial, BundleContext context) { @@ -97,10 +96,10 @@ public class EOWaterValve extends WaterValve implements EnOceanSDTDevice { String msg; if (feedback == 1) { msg = "Closed"; - liquidLevel = LiquidLevel.zero; + liquidLevel = LiquidLevel.Values.zero; } else if (feedback == 2) { msg = "Opened"; - liquidLevel = LiquidLevel.maximum; + liquidLevel = LiquidLevel.Values.maximum; } else { msg = "Not defined"; liquidLevel = null; @@ -114,9 +113,9 @@ public class EOWaterValve extends WaterValve implements EnOceanSDTDevice { } private void addWaterLevel() { - liquidLevelDP = new LiquidLevel(new EnumDataPoint(null) { + liquidLevelDP = new LiquidLevel() { @Override - public void doSetValue(Integer value) throws DataPointException { + public void doSetValue(LiquidLevel.Values value) throws DataPointException { try { turn(value); } catch (DataPointException e) { @@ -126,13 +125,14 @@ public class EOWaterValve extends WaterValve implements EnOceanSDTDevice { } } @Override - public Integer doGetValue() throws DataPointException { + public LiquidLevel.Values doGetValue() throws DataPointException { if (liquidLevel == null) throw new DataPointException("Unknown"); return liquidLevel; } - }); - waterLevel = new org.eclipse.om2m.sdt.home.modules.LiquidLevel("Level_" + eoDevice.getChipId(), domain, liquidLevelDP); + }; + waterLevel = new org.eclipse.om2m.sdt.home.modules.LiquidLevel("Level_" + eoDevice.getChipId(), + domain, liquidLevelDP); Activator.logger.info("add LiquidLevel module: " + waterLevel); addModule(waterLevel); @@ -149,18 +149,13 @@ public class EOWaterValve extends WaterValve implements EnOceanSDTDevice { addModule(faultDetection); } - private void turn(int value) throws DataPointException { + private void turn(LiquidLevel.Values value) throws DataPointException { final String command; - switch (value) { - case LiquidLevel.zero: + if (value == LiquidLevel.Values.zero) { command = "HARDCODED_TURN_OFF"; - break; - case LiquidLevel.maximum: + } else if (value == LiquidLevel.Values.maximum) { command = "HARDCODED_APPAIR_TURN_ON"; - break; - default: - throw new DataPointException("Invalid value " + value); - } + } else throw new DataPointException("Invalid value " + value); EnOceanRPC appairRPC = new EnOceanRPC() { private int senderId = 0x00000000; public void setSenderId(int chipId) { @@ -191,7 +186,7 @@ public class EOWaterValve extends WaterValve implements EnOceanSDTDevice { }; Activator.logger.info("Water pump available, " - + ((value == LiquidLevel.zero) ? "close it!" : "Open it!"), + + ((value == LiquidLevel.Values.zero) ? "close it!" : "Open it!"), EOWaterValve.class); eoDevice.invoke(appairRPC, handlerTurnRPC); Activator.logger.info("OK!", EOWaterValve.class); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.hue/src/main/java/org/eclipse/om2m/sdt/home/hue/HomeLight.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.hue/src/main/java/org/eclipse/om2m/sdt/home/hue/HomeLight.java index ac7f1f44..a77c8135 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.hue/src/main/java/org/eclipse/om2m/sdt/home/hue/HomeLight.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.hue/src/main/java/org/eclipse/om2m/sdt/home/hue/HomeLight.java @@ -11,18 +11,14 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.hue; -import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.om2m.hue.api.HueLightDevice; -import org.eclipse.om2m.hue.api.types.AlertMode; -import org.eclipse.om2m.hue.api.types.LightEffect; import org.eclipse.om2m.hue.api.types.LightState; import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.datapoints.ArrayDataPoint; import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; import org.eclipse.om2m.sdt.datapoints.IntegerDataPoint; import org.eclipse.om2m.sdt.exceptions.AccessException; @@ -36,7 +32,6 @@ import org.eclipse.om2m.sdt.home.modules.Brightness; import org.eclipse.om2m.sdt.home.modules.Colour; import org.eclipse.om2m.sdt.home.modules.ColourSaturation; import org.eclipse.om2m.sdt.home.modules.FaultDetection; -import org.eclipse.om2m.sdt.home.modules.RunMode; import org.eclipse.om2m.sdt.home.types.DatapointType; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; @@ -75,12 +70,6 @@ public class HomeLight extends Light { Activator.logger.warning("Error addFaultDetection", e); } try { -// addRunState(); - addRunMode(); - } catch (Exception e) { - Activator.logger.warning("Error addRunState", e); - } - try { addColour(); } catch (Exception e) { Activator.logger.warning("Error addLight", e); @@ -148,107 +137,6 @@ public class HomeLight extends Light { addModule(faultDetection); } - private void addRunMode() { - RunMode runMode = new RunMode("RunMode_" + getId(), domain, - new ArrayDataPoint(DatapointType.operationMode) { - @Override - public void doSetValue(List values) throws DataPointException { - if ((values == null) || values.isEmpty()) - return; - if (! hueLight.isReachable()) { - throw new DataPointException("Not reachable"); - } - LightState state = new LightState(hueLight.isOn()); - for (String value : values) {//.split(",")) { - if (value.equals("effect.none")) - state.setEffect(LightEffect.NONE); - else if (value.equals("effect.colorloop")) - state.setEffect(LightEffect.COLORLOOP); - else if (value.equals("alert.none")) - state.setAlert(AlertMode.NONE); - else if (value.equals("alert.lselect")) - state.setAlert(AlertMode.L_SELECT); - else if (value.equals("alert.select")) - state.setAlert(AlertMode.SELECT); - } - hueLight.setState(state); - } - - @Override - public List doGetValue() throws DataPointException { - if (!hueLight.isReachable()) { - throw new DataPointException("Not reachable"); - } - LightState state = hueLight.getState(); - return Arrays.asList("effect." + LightEffect.getLightEffect(state.getEffect()), - "alert." + AlertMode.getAlertMode(state.getAlert())); - } - }, - new ArrayDataPoint(DatapointType.supportedModes) { - @Override - public void doSetValue(List value) throws DataPointException { - throw new DataPointException("Not implemented"); - } - - @Override - public List doGetValue() throws DataPointException { - return Arrays.asList("effect.none", "effect.colorloop", - "alert.none", "alert.lselect", "alert.select"); - } - }); - addModule(runMode); - } - -// private void addRunState() { -// RunState runState = new RunState("RunState_" + getId(), domain, -// new JobStates(new EnumDataPoint(null) { -// @Override -// public void doSetValue(Integer val) throws DataPointException { -// throw new DataPointException("Not implemented"); -// } -// @Override -// public Integer doGetValue() throws DataPointException { -// LightState state = hueLight.getState(); -// int effect = state.getEffect(); -// if (effect == LightEffect.COLORLOOP) -// return JobStates.colorloop; -// int alert = state.getAlert(); -// if (alert == AlertMode.L_SELECT) -// return JobStates.lselect; -// if (alert == AlertMode.SELECT) -// return JobStates.select; -// return JobStates.noeffect; -// } -// }), -// new ArrayDataPoint(DatapointType.jobStates) { -// @Override -// public List doGetValue() throws DataPointException { -// return Arrays.asList(JobStates.noeffect, JobStates.colorloop, -// JobStates.noalert, JobStates.lselect, JobStates.select); -// } -// }, -// new MachineState(new EnumDataPoint(null) { -// @Override -// public void doSetValue(Integer val) throws DataPointException { -// throw new DataPointException("Not implemented"); -// } -// @Override -// public Integer doGetValue() throws DataPointException { -// if (! hueLight.isReachable()) -// return MachineState.error; -// return hueLight.isOn() ? MachineState.active : MachineState.stopped; -// } -// }), -// new ArrayDataPoint(DatapointType.machineStates) { -// @Override -// public List doGetValue() throws DataPointException { -// return Arrays.asList(MachineState.error, -// MachineState.active, MachineState.stopped); -// } -// }); -// addModule(runState); -// } - private void addColour() { Colour colour = new Colour("colour_" + getId(), domain, new IntegerDataPoint(DatapointType.red) { @@ -329,7 +217,7 @@ public class HomeLight extends Light { private void addColourSaturation() { ColourSaturation colourSaturation = new ColourSaturation("colourSaturation_" + getId(), domain, - new IntegerDataPoint(DatapointType.colourSat) { + new IntegerDataPoint(DatapointType.colourSaturation) { @Override public void doSetValue(Integer value) throws DataPointException { if (! hueLight.isReachable()) { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/.classpath b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/.classpath deleted file mode 100644 index b82e5828..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/.project b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/.project deleted file mode 100644 index 11ef1b44..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - com.orange.basedriver.lifx - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/LIFXDevice.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/LIFXDevice.java index 102b0763..4800ad11 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/LIFXDevice.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/LIFXDevice.java @@ -239,6 +239,7 @@ public abstract class LIFXDevice { public abstract void setLightState(int newPower, double newHue, double newSaturation, double newKelvin, double newBrightness, int duration) throws Exception; + public abstract void setLightState(int newPower, int red, int green, int blue, int duration) throws Exception; public String getLabel() throws Exception { return label; diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/cloud/DiscoveryCloud.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/cloud/DiscoveryCloud.java index 8cb2a90c..c71e89b3 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/cloud/DiscoveryCloud.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/cloud/DiscoveryCloud.java @@ -124,12 +124,12 @@ public class DiscoveryCloud extends Discovery { boolean deviceRemoved = false; // 2016 11 28 - BONNARDEL Gregory // do not remove LIFX device -// synchronized (devices) { -// if (devices.containsKey(device.getId())) { -// devices.remove(device.getId()); -// deviceRemoved = true; -// } -// } + // synchronized (devices) { + // if (devices.containsKey(device.getId())) { + // devices.remove(device.getId()); + // deviceRemoved = true; + // } + // } if (deviceRemoved) { notifyAllListeners_DeviceLeft(device); @@ -166,12 +166,13 @@ public class DiscoveryCloud extends Discovery { httpUrlConnection = (HttpURLConnection) new URL(LIGHT_URL + lifxDevice.getId() + "/state").openConnection(); httpUrlConnection.setRequestMethod("PUT"); httpUrlConnection.setRequestProperty("Authorization", "Bearer " + lifxDevice.getAuthenticationToken()); + httpUrlConnection.setRequestProperty("Content-Type", "application/json"); String data = "{"; if (power != null) { data += "\"power\":\"" + power + "\","; } - + if (brightness != null) { data += "\"brightness\":" + brightness + ","; } @@ -186,7 +187,49 @@ public class DiscoveryCloud extends Discovery { if (saturation != null) { data += "saturation:" + saturation; } - + + data += "\","; + } + if (duration != null) { + data += "\"duration\":" + duration + ","; + } + if (data.endsWith(",")) { + data = data.substring(0, data.length() - 1); + } + data += "}"; + + httpUrlConnection.setDoOutput(true); + httpUrlConnection.setDoInput(true); + + httpUrlConnection.getOutputStream().write(data.getBytes()); + httpUrlConnection.connect(); + System.out.println(httpUrlConnection.getResponseMessage()); + + if (httpUrlConnection.getResponseCode() == 207) { + + } + } + + public static void setLightPower(LIFXDeviceCloud lifxDevice, String power, Integer red, Integer green, Integer blue, + Integer duration) throws MalformedURLException, IOException { + HttpURLConnection httpUrlConnection = null; + httpUrlConnection = (HttpURLConnection) new URL(LIGHT_URL + lifxDevice.getId() + "/state").openConnection(); + httpUrlConnection.setRequestMethod("PUT"); + httpUrlConnection.setRequestProperty("Authorization", "Bearer " + lifxDevice.getAuthenticationToken()); + httpUrlConnection.setRequestProperty("Content-Type", "application/json"); + + String data = "{"; + if (power != null) { + data += "\"power\":\"" + power + "\","; + } + + if ((red != null) || (green != null) || (blue != null)) { + data += "\"color\":\"rgb:"; + data += red; + data += ","; + data += green; + data += ","; + data += blue; data += "\","; } if (duration != null) { @@ -196,12 +239,13 @@ public class DiscoveryCloud extends Discovery { data = data.substring(0, data.length() - 1); } data += "}"; - + httpUrlConnection.setDoOutput(true); httpUrlConnection.setDoInput(true); httpUrlConnection.getOutputStream().write(data.getBytes()); httpUrlConnection.connect(); + System.out.println(httpUrlConnection.getResponseMessage()); if (httpUrlConnection.getResponseCode() == 207) { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/cloud/LIFXDeviceCloud.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/cloud/LIFXDeviceCloud.java index e797947e..152bda87 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/cloud/LIFXDeviceCloud.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/cloud/LIFXDeviceCloud.java @@ -97,7 +97,7 @@ public class LIFXDeviceCloud extends LIFXDevice { @Override public void setBrightness(double brightness, double duration) throws Exception { - DiscoveryCloud.setLightPower(this, null, null, null, null, brightness / 65535d, duration); + DiscoveryCloud.setLightPower(this, null, (Double) null, null, null, brightness / 65535d, duration); super.setBrightness(brightness); } @@ -139,7 +139,7 @@ public class LIFXDeviceCloud extends LIFXDevice { @Override public void setPower(int newPower, int duration) throws Exception { - DiscoveryCloud.setLightPower(this, (newPower == 0 ? "off" : "on"), null, null, null, null, (double) duration); + DiscoveryCloud.setLightPower(this, (newPower == 0 ? "off" : "on"), (Double)null, null, null, null, (double) duration); super.setPower(newPower, duration); } @@ -154,6 +154,14 @@ public class LIFXDeviceCloud extends LIFXDevice { super.setKelvin(newKelvin); super.setBrightness(newBrightness); } + + @Override + public void setLightState(int newPower, int red, int green, int blue, int duration) throws Exception { + DiscoveryCloud.setLightPower(this, (newPower == 0 ? "off" : "on"), red, green, blue, duration); + + DiscoveryCloud.updateLightState(this); + + } public static LIFXDeviceCloud fromJson(JSONObject json, String pAuthenticationToken) { @@ -219,4 +227,6 @@ public class LIFXDeviceCloud extends LIFXDevice { return value; } + + } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/lan/LIFXDeviceLan.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/lan/LIFXDeviceLan.java index 639287df..722d88f8 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/lan/LIFXDeviceLan.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/impl/lan/LIFXDeviceLan.java @@ -106,6 +106,10 @@ public class LIFXDeviceLan extends LIFXDevice implements LIFXDeviceListener { executeSetPowerMessage(newPower, duration); executeSetColorMessage((int)newHue, (int)newSaturation, (int)newBrightness, (int) newKelvin, duration); } + + @Override + public void setLightState(int newPower, int red, int green, int blue, int duration) throws Exception { + } public String getLabel() throws Exception { executeGetLightMessage(); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/sdt/LIFXSDTDevice.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/sdt/LIFXSDTDevice.java index b01c23f7..fe0515c7 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/sdt/LIFXSDTDevice.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.lifx/src/main/java/org/eclipse/om2m/sdt/home/lifx/sdt/LIFXSDTDevice.java @@ -189,31 +189,8 @@ public class LIFXSDTDevice extends Light { } private void setColors(Integer red, Integer green, Integer blue) throws Exception { - // get current state - int h = Math.round((float) (lifxDevice.getHue() / 65565d * 360d)); - int s = Math.round((float) (lifxDevice.getSaturation() / 65535d * 100d)); - int v = Math.round((float) (lifxDevice.getBrightness() / 65535d * 100d)); - // convert current color in rgb - int[] rgb = HSVtoRGB(h, s, v); - - // update values - if (red != null) - rgb[RED] = red; - if (green != null) - rgb[GREEN] = green; - if (blue != null) - rgb[BLUE] = blue; - - // compute HSV - int[] hsv = RGBtoHSB(rgb[RED], rgb[GREEN], rgb[BLUE]); - - // set new state - double newHue = ((double)hsv[0]) / 360d * 65535d; - double newSaturation = ((double) hsv[1]) / 100d * 65535d; - double newBrightness = ((double) hsv[2]) / 100d * 65535d; - - lifxDevice.setLightState(65535, newHue, newSaturation, lifxDevice.getKelvin(), newBrightness, 0); + lifxDevice.setLightState(65535, red, green, blue, 0); } private Integer getColor(int colorIndex) throws Exception { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/Activator.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/Activator.java index 8e4c4772..0efe694b 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/Activator.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/Activator.java @@ -54,22 +54,23 @@ public class Activator implements BundleActivator { running = true; devices = new ArrayList(); -// devices.add(new MockedWaterValve(getId(), getSerial(), domain)); -// devices.add(new MockedSmokeDetector(getId(), getSerial(), domain)); -// devices.add(new MockedWarningDevice(getId(), getSerial(), domain)); -// devices.add(new MockedFloodDetector(getId(), getSerial(), domain)); -// devices.add(new MockedSmartElectricMeter(getId(), getSerial(), domain)); + devices.add(new MockedWaterValve(getId(), getSerial(), domain)); + devices.add(new MockedSmokeDetector(getId(), getSerial(), domain)); + devices.add(new MockedWarningDevice(getId(), getSerial(), domain)); + devices.add(new MockedFloodDetector(getId(), getSerial(), domain)); + devices.add(new MockedSmartElectricMeter(getId(), getSerial(), domain)); devices.add(new MockedLight(getId(), getSerial(), domain)); devices.add(new MockedDoor(getId(), getSerial(), domain, true)); devices.add(new MockedDoor(getId(), getSerial(), domain, false)); devices.add(new MockedCamera(getId(), getSerial(), domain)); devices.add(new MockedWeatherStation(getId(), getSerial(), domain)); - devices.add(new MockedSwitchButton(getId(), getSerial(), domain)); - devices.add(new MockedDeviceNumberDevice(getId(), getSerial(), domain)); - devices.add(new MockedThermometer(getId(), getSerial(), domain)); -// devices.add(new MockedThermostat(getId(), getSerial(), domain)); + devices.add(new MockedSwitch(getId(), getSerial(), domain)); + devices.add(new MockedThermometer(getId(), getSerial(), domain, true)); + devices.add(new MockedThermometer(getId(), getSerial(), domain, false)); + devices.add(new MockedThermostat(getId(), getSerial(), domain)); // devices.add(new MockedDoor(getId(), getSerial(), domain)); -// devices.add(new MockedCamera(getId(), getSerial(), domain)); + devices.add(new MockedCamera(getId(), getSerial(), domain)); + devices.add(new MockedKettle(getId(), getSerial(), domain)); for (GenericDevice dev : devices) { install(dev); @@ -92,7 +93,7 @@ public class Activator implements BundleActivator { } } } - });//.start(); + }).start(); } catch (Exception e) { e.printStackTrace(); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedCamera.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedCamera.java index 2ac86351..d7cbb826 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedCamera.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedCamera.java @@ -8,13 +8,20 @@ package org.eclipse.om2m.sdt.home.mocked.devices; import java.util.Arrays; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; import org.eclipse.om2m.sdt.datapoints.ArrayDataPoint; +import org.eclipse.om2m.sdt.datapoints.StringDataPoint; +import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.devices.Camera; -import org.eclipse.om2m.sdt.home.mocked.modules.MockedStreaming; +import org.eclipse.om2m.sdt.home.mocked.modules.MockedPlayerControl; +import org.eclipse.om2m.sdt.home.mocked.modules.MockedSessionDescription; +import org.eclipse.om2m.sdt.home.modules.Credentials; import org.eclipse.om2m.sdt.home.modules.PersonSensor; import org.eclipse.om2m.sdt.home.types.DatapointType; import org.osgi.framework.ServiceRegistration; @@ -23,20 +30,60 @@ import org.osgi.framework.ServiceRegistration; public class MockedCamera extends Camera implements MockedDevice { private List serviceRegistrations; + + private static String login = "toto"; + private static String password = "mdp"; public MockedCamera(String id, String serial, Domain domain) { super(id, serial, domain); // Module FaultDetection - addModule(new MockedStreaming("streaming_" + id, domain)); + setSessionDescription(new MockedSessionDescription("sdp_" + id, domain)); - addModule(new PersonSensor("personSensor_" + id, domain, + setPersonSensor(new PersonSensor("personSensor_" + id, domain, new ArrayDataPoint(DatapointType.detectedPersons) { @Override public List doGetValue() throws DataPointException { return Arrays.asList("admin", "Phil"); } })); + + setPlayerControl(new MockedPlayerControl("playerCtrl_" + id, domain)); + + Credentials cred = new Credentials("cred_" + id, domain); + cred.setLoginName(new StringDataPoint(DatapointType.loginName) { + @Override + public String getValue() throws DataPointException, AccessException { + System.out.println("getValue loginName: " + doGetValue()); + return "Not readable"; + } + @Override + protected String doGetValue() throws DataPointException { + return login; + } + @Override + protected void doSetValue(String s) throws DataPointException { + System.out.println("doSetValue loginName: " + s); + login = s; + } + }); + cred.setPassword(new StringDataPoint(DatapointType.password) { + @Override + public String getValue() throws DataPointException, AccessException { + System.out.println("getValue password: " + doGetValue()); + return "Not readable"; + } + @Override + protected String doGetValue() throws DataPointException { + return password; + } + @Override + protected void doSetValue(String s) throws DataPointException { + System.out.println("doSetValue password: " + s); + password = s; + } + }); + setCredentials(cred); } public void registerDevice() { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedDeviceNumberDevice.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedDeviceNumberDevice.java deleted file mode 100644 index 23fa4d9b..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedDeviceNumberDevice.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.eclipse.om2m.sdt.home.mocked.devices; - -import java.util.List; - -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.home.devices.DeviceNumberDevice; -import org.eclipse.om2m.sdt.home.mocked.modules.MockedBinarySwitch; -import org.eclipse.om2m.sdt.home.mocked.modules.MockedFaultDetection; -import org.eclipse.om2m.sdt.home.mocked.modules.MockedNumberValue; -import org.osgi.framework.ServiceRegistration; - -public class MockedDeviceNumberDevice extends DeviceNumberDevice implements MockedDevice { - - private List serviceRegistrations; - - public MockedDeviceNumberDevice(String id, String serial, Domain domain) { - super(id, serial, domain); - - // binarySwitch - addModule(new MockedBinarySwitch("binarySwitch_" + id, domain)); - - // faultDetection - addModule(new MockedFaultDetection("faultDetection_" + id, domain)); - - // numberValue - addModule(new MockedNumberValue("numberValue_" + id, domain)); - - } - - @Override - public void registerDevice() { - if (! ((serviceRegistrations == null) || serviceRegistrations.isEmpty())) { - return; - } - serviceRegistrations = Activator.register(this); - } - - @Override - public void unregisterDevice() { - if (serviceRegistrations == null) - return; - for (ServiceRegistration reg : serviceRegistrations) { - reg.unregister(); - } - serviceRegistrations.clear(); - - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedKettle.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedKettle.java new file mode 100644 index 00000000..2126df74 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedKettle.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.mocked.devices; + +import java.util.List; + +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.datapoints.FloatDataPoint; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.devices.Kettle; +import org.eclipse.om2m.sdt.home.mocked.modules.MockedBinarySwitch; +import org.eclipse.om2m.sdt.home.mocked.modules.MockedFaultDetection; +import org.eclipse.om2m.sdt.home.mocked.modules.MockedTemperature; +import org.eclipse.om2m.sdt.home.modules.LiquidLevel; +import org.eclipse.om2m.sdt.home.modules.Temperature; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.osgi.framework.ServiceRegistration; + +@SuppressWarnings("rawtypes") +public class MockedKettle extends Kettle implements MockedDevice { + + static private final int MIN = 15; + static private final int MAX = 35; + + private List serviceRegistrations; + private float temp; + private Temperature temperature; + private boolean running; + private int delta; + + public MockedKettle(String id, String serial, Domain domain) { + super(id, serial, domain); + + // Module FaultDetection + addModule(new MockedFaultDetection("faultDetection_" + id, domain)); + + // Module BinarySwitch + addModule(new MockedBinarySwitch("binarySwitch_" + id, domain)); + + temperature = new MockedTemperature("temperature_" + id, domain, + new FloatDataPoint(DatapointType.currentTemperature) { + @Override + public Float doGetValue() throws DataPointException { + return temp; + } + }); + addModule(temperature); + + addModule(new LiquidLevel("LiquidLevel_" + getId(), domain, + new org.eclipse.om2m.sdt.home.types.LiquidLevel() { + @Override + public Values doGetValue() throws DataPointException { + return Values.values()[(int)(Math.random() * 5)]; + } + })); + } + + public void registerDevice() { + running = true; + if (! ((serviceRegistrations == null) || serviceRegistrations.isEmpty())) { + // already registered + return; + } + serviceRegistrations = Activator.register(this); + } + + public void unregisterDevice() { + running = false; + if (serviceRegistrations == null) + return; + for (ServiceRegistration reg : serviceRegistrations) { + reg.unregister(); + } + serviceRegistrations.clear(); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedLight.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedLight.java index b1950d90..bae73ab5 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedLight.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedLight.java @@ -16,7 +16,7 @@ import org.eclipse.om2m.sdt.home.devices.Light; import org.eclipse.om2m.sdt.home.mocked.modules.MockedBinarySwitch; import org.eclipse.om2m.sdt.home.mocked.modules.MockedColour; import org.eclipse.om2m.sdt.home.mocked.modules.MockedFaultDetection; -import org.eclipse.om2m.sdt.home.mocked.modules.MockedRunMode; +import org.eclipse.om2m.sdt.home.mocked.modules.MockedRunState; import org.eclipse.om2m.sdt.home.modules.Brightness; import org.eclipse.om2m.sdt.home.modules.ColourSaturation; import org.eclipse.om2m.sdt.home.types.DatapointType; @@ -37,14 +37,13 @@ public class MockedLight extends Light implements MockedDevice { addModule(new MockedBinarySwitch("binarySwitch_" + id, domain)); // Module RunState -// addModule(new MockedRunState("runMode_" + id, domain)); - addModule(new MockedRunMode("runMode_" + id, domain)); + addModule(new MockedRunState("runState_" + id, domain)); // Module Color addModule(new MockedColour("colour_" + id, domain)); addModule(new ColourSaturation("colourSaturation_" + id, domain, - new IntegerDataPoint(DatapointType.colourSat) { + new IntegerDataPoint(DatapointType.colourSaturation) { private Integer v = new Integer((int)(Math.random() * 100)); @Override public void doSetValue(Integer value) throws DataPointException { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSmartElectricMeter.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSmartElectricMeter.java index f756e45a..75d40e0e 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSmartElectricMeter.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSmartElectricMeter.java @@ -20,7 +20,7 @@ import org.eclipse.om2m.sdt.home.mocked.modules.MockedClock; import org.eclipse.om2m.sdt.home.mocked.modules.MockedEnergyConsumption; import org.eclipse.om2m.sdt.home.mocked.modules.MockedEnergyGeneration; import org.eclipse.om2m.sdt.home.mocked.modules.MockedFaultDetection; -import org.eclipse.om2m.sdt.home.mocked.modules.MockedRunMode; +import org.eclipse.om2m.sdt.home.mocked.modules.MockedRunState; import org.eclipse.om2m.sdt.home.modules.EnergyConsumption; import org.eclipse.om2m.sdt.home.types.DatapointType; import org.osgi.framework.ServiceRegistration; @@ -55,8 +55,7 @@ public class MockedSmartElectricMeter extends SmartElectricMeter implements Mock addModule(new MockedClock("clock_" + id, domain)); // runMode -// addModule(new MockedRunState("runState_" + id, domain)); - addModule(new MockedRunMode("runMode_" + id, domain)); + addModule(new MockedRunState("runState_" + id, domain)); // energyGeneration addModule(new MockedEnergyGeneration("energyGeneration_" + id, domain)); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSwitch.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSwitch.java new file mode 100644 index 00000000..361ffb8d --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSwitch.java @@ -0,0 +1,84 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.mocked.devices; + +import java.util.List; + +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Event; +import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.devices.Switch; +import org.eclipse.om2m.sdt.home.modules.PushButton; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.osgi.framework.ServiceRegistration; + +@SuppressWarnings("rawtypes") +public class MockedSwitch extends Switch implements MockedDevice { + + private List serviceRegistrations; + private boolean running; + private PushButton pushButton; + private boolean pushed; + + public MockedSwitch(String id, String serial, Domain domain) { + super(id, serial, domain); + + pushButton = new PushButton("pushButton_" + id, domain, + new BooleanDataPoint(DatapointType.pushed) { + @Override + public Boolean doGetValue() throws DataPointException { + return pushed; + } + } + ); + addModule(pushButton); + } + + public void registerDevice() { + if (! ((serviceRegistrations == null) || serviceRegistrations.isEmpty())) { + return; + } + serviceRegistrations = Activator.register(this); + running = true; + new Thread(new Runnable() { + @Override + public void run() { + System.out.println("start thread " + pushButton); + while (running) { + try { + Thread.sleep((int) (30000 + 5000 * Math.random())); + System.out.println("Generating Push Button event"); + Event evt = new Event("PUSH"); + pushed = ! pushed; + evt.setValue(pushed); + evt.addDataPoint(pushButton.getDataPointByShortName( + DatapointType.pushed.getShortName())); + pushButton.addEvent(evt); + } catch (Throwable e) { + System.out.println("Error generating event"); + e.printStackTrace(); + running = false; + } + } + System.out.println("stopped thread"); + } + }).start(); + } + + public void unregisterDevice() { + running = false; + if (serviceRegistrations == null) + return; + for (ServiceRegistration reg : serviceRegistrations) { + reg.unregister(); + } + serviceRegistrations.clear(); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSwitchButton.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSwitchButton.java deleted file mode 100644 index 92267e93..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedSwitchButton.java +++ /dev/null @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.mocked.devices; - -import java.util.List; - -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Event; -import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.devices.SwitchButton; -import org.eclipse.om2m.sdt.home.modules.PushButton; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.osgi.framework.ServiceRegistration; - -@SuppressWarnings("rawtypes") -public class MockedSwitchButton extends SwitchButton implements MockedDevice { - - private List serviceRegistrations; - private boolean running; - private PushButton pushButton; - private boolean pushed; - - public MockedSwitchButton(String id, String serial, Domain domain) { - super(id, serial, domain); - - pushButton = new PushButton("pushButton_" + id, domain, - new BooleanDataPoint(DatapointType.pushed) { - @Override - public Boolean doGetValue() throws DataPointException { - return pushed; - } - } - ); - addModule(pushButton); - } - - public void registerDevice() { - if (! ((serviceRegistrations == null) || serviceRegistrations.isEmpty())) { - return; - } - serviceRegistrations = Activator.register(this); - running = true; - new Thread(new Runnable() { - @Override - public void run() { - System.out.println("start thread " + pushButton); - while (running) { - try { - Thread.sleep((int) (30000 + 5000 * Math.random())); - System.out.println("Generating Push Button event"); - Event evt = new Event("PUSH"); - pushed = ! pushed; - evt.setValue(pushed); - evt.addDataPoint(pushButton.getDataPointByShortName( - DatapointType.pushed.getShortName())); - pushButton.addEvent(evt); - } catch (Throwable e) { - System.out.println("Error generating event"); - e.printStackTrace(); - running = false; - } - } - System.out.println("stopped thread"); - } - }).start(); - } - - public void unregisterDevice() { - running = false; - if (serviceRegistrations == null) - return; - for (ServiceRegistration reg : serviceRegistrations) { - reg.unregister(); - } - serviceRegistrations.clear(); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedThermometer.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedThermometer.java index 52faa9ef..50b7214f 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedThermometer.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedThermometer.java @@ -31,10 +31,10 @@ public class MockedThermometer extends TemperatureDetector implements MockedDevi private boolean running; private int delta; - public MockedThermometer(String id, String serial, Domain domain) { + public MockedThermometer(String id, String serial, Domain domain, boolean b) { super(id, serial, domain); - temperature = new MockedTemperature("temperature_" + id, domain, + temperature = new MockedTemperature("temperature_" + id, domain, b, new FloatDataPoint(DatapointType.currentTemperature) { @Override public Float doGetValue() throws DataPointException { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWarningDevice.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWarningDevice.java index 5a2bb51c..546e0f98 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWarningDevice.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWarningDevice.java @@ -10,13 +10,13 @@ package org.eclipse.om2m.sdt.home.mocked.devices; import java.util.List; import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.home.devices.WarningDevice; +import org.eclipse.om2m.sdt.home.devices.Warning; import org.eclipse.om2m.sdt.home.mocked.modules.MockedAlarmSpeaker; import org.eclipse.om2m.sdt.home.mocked.modules.MockedFaultDetection; import org.osgi.framework.ServiceRegistration; @SuppressWarnings("rawtypes") -public class MockedWarningDevice extends WarningDevice implements MockedDevice { +public class MockedWarningDevice extends Warning implements MockedDevice { private List serviceRegistrations; diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWaterValve.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWaterValve.java index 01877f1c..cda7f5a5 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWaterValve.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWaterValve.java @@ -10,11 +10,8 @@ package org.eclipse.om2m.sdt.home.mocked.devices; import java.util.List; import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.devices.WaterValve; -import org.eclipse.om2m.sdt.home.mocked.modules.MockedFaultDetection; -import org.eclipse.om2m.sdt.home.types.DatapointType; import org.eclipse.om2m.sdt.home.types.LiquidLevel; import org.osgi.framework.ServiceRegistration; @@ -28,18 +25,18 @@ public class MockedWaterValve extends WaterValve implements MockedDevice { // Datapoints addModule(new org.eclipse.om2m.sdt.home.modules.LiquidLevel("waterLevel_" + id, domain, - new LiquidLevel(new EnumDataPoint(DatapointType.liquidLevel) { - private Integer openLevel = LiquidLevel.zero; + new LiquidLevel() { + private LiquidLevel.Values openLevel = LiquidLevel.Values.zero; @Override - public void doSetValue(Integer value) throws DataPointException { + public void doSetValue(LiquidLevel.Values value) throws DataPointException { openLevel = value; Activator.logger.info("openLevel set " + value); } @Override - public Integer doGetValue() throws DataPointException { + public LiquidLevel.Values doGetValue() throws DataPointException { return openLevel; } - }))); + })); // addModule(new MockedFaultDetection("faultDetection_" + id, domain)); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWeatherStation.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWeatherStation.java index 7ac3e870..2e6d7926 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWeatherStation.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/devices/MockedWeatherStation.java @@ -16,8 +16,9 @@ import org.eclipse.om2m.sdt.datapoints.IntegerDataPoint; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.devices.WeatherStation; import org.eclipse.om2m.sdt.home.mocked.modules.MockedTemperature; -import org.eclipse.om2m.sdt.home.modules.Noise; -import org.eclipse.om2m.sdt.home.modules.RelativeHumidity; +import org.eclipse.om2m.sdt.home.modules.AcousticSensor; +import org.eclipse.om2m.sdt.home.modules.AirQualitySensor; +import org.eclipse.om2m.sdt.home.modules.Barometer; import org.eclipse.om2m.sdt.home.modules.Temperature; import org.eclipse.om2m.sdt.home.types.DatapointType; import org.osgi.framework.ServiceRegistration; @@ -30,9 +31,7 @@ public class MockedWeatherStation extends WeatherStation implements MockedDevice private List serviceRegistrations; private float temp; - private float humidity; private Temperature temperature; - private RelativeHumidity relativeHumidity; private boolean running; private int delta = 1; @@ -48,23 +47,41 @@ public class MockedWeatherStation extends WeatherStation implements MockedDevice }); addModule(temperature); - relativeHumidity = new RelativeHumidity("humidity_" + id, domain, - new FloatDataPoint(DatapointType.relativeHumidity) { - @Override - public Float doGetValue() throws DataPointException { - return humidity; - } - }); - addModule(relativeHumidity); - - addModule(new Noise("noise_" + id, domain, - new IntegerDataPoint(DatapointType.noise) { - @Override - protected Integer doGetValue() throws DataPointException { - return 37; - } - })); - + AirQualitySensor airQuality = new AirQualitySensor("airQuality_" + id, domain); + setAirQualitySensor(airQuality); + airQuality.setSensorHumidity(new IntegerDataPoint(DatapointType.sensorHumidity) { + @Override + protected Integer doGetValue() throws DataPointException { + return (int) (Math.random() * 100); + } + }); + // co2 + airQuality.setCo2(new IntegerDataPoint(DatapointType.co2) { + @Override + protected Integer doGetValue() throws DataPointException { + return (int) (Math.random() * 100000); + } + }); + + // noise + setAcousticSensor(new AcousticSensor("noise_" + id, domain, + new FloatDataPoint(DatapointType.loudness) { + @Override + protected Float doGetValue() throws DataPointException { + return (float) (Math.random() * 100); + } + })); + + // pressure + setBarometer(new Barometer("atmosphericPressure_" + id, + domain, + new FloatDataPoint(DatapointType.atmosphericPressure) { + @Override + protected Float doGetValue() throws DataPointException { + return (float) (990 + Math.random() * 70); + } + })); + new MyThread().start(); } @@ -96,7 +113,6 @@ public class MockedWeatherStation extends WeatherStation implements MockedDevice if ((temp <= MIN) || (temp >= MAX)) { delta = -delta; } - humidity = (float) (Math.random() * 100); Event evt = new Event("ALARM"); evt.addDataPoint(temperature.getDataPointByShortName( DatapointType.currentTemperature.getShortName())); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedAlarmSpeaker.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedAlarmSpeaker.java index 01f81dcc..2e3c9759 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedAlarmSpeaker.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedAlarmSpeaker.java @@ -9,7 +9,6 @@ package org.eclipse.om2m.sdt.home.mocked.modules; import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.mocked.devices.Activator; import org.eclipse.om2m.sdt.home.modules.AlarmSpeaker; @@ -34,18 +33,18 @@ public class MockedAlarmSpeaker extends AlarmSpeaker { } ); - setTone(new Tone(new EnumDataPoint(null) { - private Integer tone = Tone.Silent; + setTone(new Tone() { + private Tone.Values tone = Tone.Values.doorbell; @Override - public void doSetValue(Integer value) throws DataPointException { + public void doSetValue(Tone.Values value) throws DataPointException { tone = value; Activator.logger.info("tone " + tone); } @Override - public Integer doGetValue() throws DataPointException { + public Tone.Values doGetValue() throws DataPointException { return tone; } - })); + }); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedDoorStatus.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedDoorStatus.java index b9b7c929..60731b92 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedDoorStatus.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedDoorStatus.java @@ -8,7 +8,6 @@ package org.eclipse.om2m.sdt.home.mocked.modules; import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.modules.DoorStatus; import org.eclipse.om2m.sdt.home.types.DoorState; @@ -17,14 +16,14 @@ public class MockedDoorStatus extends DoorStatus { public MockedDoorStatus(String name, Domain domain) { super(name, domain, - new DoorState(new EnumDataPoint(null) { - private int state = DoorState.Closed; + new DoorState() { + private DoorState.Values state = DoorState.Values.closed; @Override - public Integer doGetValue() throws DataPointException { + public DoorState.Values doGetValue() throws DataPointException { return state; } } - )); + ); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedLock.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedLock.java index 7a2b420b..ddde47df 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedLock.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedLock.java @@ -17,7 +17,7 @@ public class MockedLock extends Lock { public MockedLock(String name, Domain domain, boolean openOnly) { super(name, domain, - new BooleanDataPoint(DatapointType.doorLock) { + new BooleanDataPoint(DatapointType.lock) { private boolean state = true; @Override public Boolean doGetValue() throws DataPointException { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedPlayerControl.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedPlayerControl.java new file mode 100644 index 00000000..e41e5b69 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedPlayerControl.java @@ -0,0 +1,41 @@ +package org.eclipse.om2m.sdt.home.mocked.modules; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.datapoints.ArrayDataPoint; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.modules.PlayerControl; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.PlayerMode; + +public class MockedPlayerControl extends PlayerControl { + + static private List supportedPlayerModes = + Arrays.asList(PlayerMode.Values.values()); + + static private PlayerMode.Values currentPlayerMode = + PlayerMode.Values.values()[(int)(Math.random() * supportedPlayerModes.size())]; + + public MockedPlayerControl(final String name, final Domain domain) { + super(name, domain, + new PlayerMode() { + @Override + protected PlayerMode.Values doGetValue() throws DataPointException { + return currentPlayerMode; + } + @Override + protected void doSetValue(PlayerMode.Values v) throws DataPointException { + currentPlayerMode = v; + } + }, + new ArrayDataPoint(DatapointType.supportedPlayerModes) { + @Override + public List doGetValue() throws DataPointException { + return supportedPlayerModes; + } + }); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedRunMode.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedRunMode.java deleted file mode 100644 index 7e2c61e8..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedRunMode.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.mocked.modules; - -import java.util.Arrays; -import java.util.List; - -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.ArrayDataPoint; -import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.modules.RunMode; -import org.eclipse.om2m.sdt.home.types.DatapointType; - -public class MockedRunMode extends RunMode { - - public MockedRunMode(String name, Domain domain) { - super(name, domain, - new ArrayDataPoint(DatapointType.operationMode) { - private List operationModes = Arrays.asList("mode1", "mode2", "mode3"); - @Override - public List doGetValue() throws DataPointException { - return operationModes; - } - @Override - public void doSetValue(List vals) throws DataPointException { - operationModes = vals; - } - }, - new ArrayDataPoint(DatapointType.supportedModes) { - private List supportedModes = Arrays.asList("mode1", "mode3"); - @Override - public List doGetValue() throws DataPointException { - return supportedModes; - } - @Override - public void doSetValue(List value) throws DataPointException { - supportedModes = value; - } - }); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedRunState.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedRunState.java new file mode 100644 index 00000000..5c70a61d --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedRunState.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.mocked.modules; + +import java.util.Arrays; +import java.util.List; + +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.datapoints.ArrayDataPoint; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.modules.RunState; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.JobState; +import org.eclipse.om2m.sdt.home.types.MachineState; + +public class MockedRunState extends RunState { + + static private List jobStates = + Arrays.asList(JobState.Values.values()); + + static private List machineStates = + Arrays.asList(MachineState.Values.values()); + + static private MachineState.Values state; + + public MockedRunState(String name, Domain domain) { + super(name, domain, + new JobState() { + @Override + protected JobState.Values doGetValue() throws DataPointException { + return jobStates.get((int) (Math.random() * jobStates.size())); + } + }, + new ArrayDataPoint(DatapointType.jobStates) { + @Override + public List doGetValue() throws DataPointException { + return jobStates; + } + }, + new MachineState() { + @Override + protected MachineState.Values doGetValue() throws DataPointException { + if (state == null) { + state = machineStates.get((int) (Math.random() * machineStates.size())); + } + return state; + } + @Override + public void doSetValue(MachineState.Values value) throws DataPointException { + state = value; + } + }, + new ArrayDataPoint(DatapointType.machineStates) { + @Override + public List doGetValue() throws DataPointException { + return machineStates; + } + }); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedSessionDescription.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedSessionDescription.java new file mode 100644 index 00000000..9d802023 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedSessionDescription.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.mocked.modules; + +import java.net.URI; +import java.net.URISyntaxException; + +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.datapoints.StringDataPoint; +import org.eclipse.om2m.sdt.datapoints.UriDataPoint; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.modules.SessionDescription; +import org.eclipse.om2m.sdt.home.types.DatapointType; + +public class MockedSessionDescription extends SessionDescription { + + public MockedSessionDescription(String name, Domain domain) { + super(name, domain); + setUrl(new UriDataPoint(DatapointType.url) { + @Override + protected URI doGetValue() throws DataPointException { + try { + return new URI("https://xxx.yyy.zzz"); + } catch (URISyntaxException e) { + throw new DataPointException(e); + } + } + }); + setSdp(new StringDataPoint(DatapointType.sdp) { + @Override + protected String doGetValue() throws DataPointException { + return "HLS"; + } + }); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedStreaming.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedStreaming.java deleted file mode 100644 index d014a85d..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedStreaming.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.mocked.modules; - -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.StringDataPoint; -import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.modules.Streaming; -import org.eclipse.om2m.sdt.home.types.DatapointType; - -public class MockedStreaming extends Streaming { - - public MockedStreaming(String name, Domain domain) { - super(name, domain, - new StringDataPoint(DatapointType.url) { - @Override - public String doGetValue() throws DataPointException { - return "my url"; - } - }, - new StringDataPoint(DatapointType.login) { - @Override - public String doGetValue() throws DataPointException { - return "my login"; - } - }, - new StringDataPoint(DatapointType.password) { - @Override - public String doGetValue() throws DataPointException { - return "my password"; - } - }, - new StringDataPoint(DatapointType.format) { - @Override - public String doGetValue() throws DataPointException { - return "HLS"; - } - } - ); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedTemperature.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedTemperature.java index 8af969bf..f223d1b9 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedTemperature.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.mocked.devices/src/main/java/org/eclipse/om2m/sdt/home/mocked/modules/MockedTemperature.java @@ -7,8 +7,6 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.mocked.modules; -import java.nio.charset.Charset; - import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.datapoints.FloatDataPoint; import org.eclipse.om2m.sdt.datapoints.StringDataPoint; @@ -19,21 +17,26 @@ import org.eclipse.om2m.sdt.home.types.DatapointType; public class MockedTemperature extends Temperature { public MockedTemperature(String name, Domain domain, FloatDataPoint currentTemperature) { + this(name, domain, true, currentTemperature); + } + + public MockedTemperature(String name, Domain domain, final boolean b, FloatDataPoint currentTemperature) { super(name, domain, currentTemperature); - setStepValue(new FloatDataPoint(DatapointType.stepValue) { - @Override - public Float doGetValue() throws DataPointException { - return (float) 1; - } - }); - - setUnit(new StringDataPoint(DatapointType.unit) { - @Override - protected String doGetValue() throws DataPointException { - return "°C"; - } - }); + if (b) { + setStepValue(new FloatDataPoint(DatapointType.stepValue) { + @Override + public Float doGetValue() throws DataPointException { + return null;//(float) 1; + } + }); + setUnit(new StringDataPoint(DatapointType.unit) { + @Override + protected String doGetValue() throws DataPointException { + return null;// "°C"; + } + }); + } } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/.classpath b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/.classpath deleted file mode 100644 index 3c425631..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/.project b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/.project deleted file mode 100644 index 107f4a6c..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/.project +++ /dev/null @@ -1,39 +0,0 @@ - - - org.onem2m.home.netatmo - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - org.eclipse.pde.ds.core.builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/model/Home.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/model/Home.java index 48873427..b7af85c7 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/model/Home.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/model/Home.java @@ -90,7 +90,7 @@ public class Home { currentCamera.setVpnUrl(pCamera.getVpnUrl()); return true; } else { - // add case + // add new camera cameras.put(pCamera.getId(), pCamera); return false; } @@ -129,7 +129,6 @@ public class Home { @Override public String toString() { StringBuffer sb = new StringBuffer(); - sb.append("Home(id=").append(id).append(", name=").append(name).append(", persons=["); Map ps = getPersons(); for(Person p : ps.values()) { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/model/WelcomeCamera.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/model/WelcomeCamera.java index 7c1ce5c5..ac2537a3 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/model/WelcomeCamera.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/model/WelcomeCamera.java @@ -87,20 +87,8 @@ public class WelcomeCamera { @Override public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append("Camera(id="); - sb.append(id); - sb.append(", name="); - sb.append(name); - sb.append(", type=" + type); - sb.append(", isOn="); - sb.append(isOn); - sb.append(", alimOk="); - sb.append(alimOk); - sb.append(", sdOk="); - sb.append(sdOk); - sb.append(")"); - return sb.toString(); + return "Camera(id=" + id + ", name=" + name + ", type=" + type + + ", isOn=" + isOn + ", alimOk=" + alimOk + ", sdOk=" + sdOk + ")"; } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWeatherStation.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWeatherStation.java index c64345a6..60b001a9 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWeatherStation.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWeatherStation.java @@ -11,17 +11,15 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.List; -import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; import org.eclipse.om2m.sdt.datapoints.FloatDataPoint; import org.eclipse.om2m.sdt.datapoints.IntegerDataPoint; import org.eclipse.om2m.sdt.datapoints.StringDataPoint; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.devices.WeatherStation; import org.eclipse.om2m.sdt.home.driver.Utils; -import org.eclipse.om2m.sdt.home.modules.AtmosphericPressureSensor; -import org.eclipse.om2m.sdt.home.modules.ExtendedCarbonDioxideSensor; -import org.eclipse.om2m.sdt.home.modules.Noise; -import org.eclipse.om2m.sdt.home.modules.RelativeHumidity; +import org.eclipse.om2m.sdt.home.modules.AcousticSensor; +import org.eclipse.om2m.sdt.home.modules.AirQualitySensor; +import org.eclipse.om2m.sdt.home.modules.Barometer; import org.eclipse.om2m.sdt.home.modules.Temperature; import org.eclipse.om2m.sdt.home.netatmo.impl.Activator; import org.eclipse.om2m.sdt.home.netatmo.model.WeatherStationModule; @@ -52,26 +50,26 @@ public class SDTWeatherStation extends WeatherStation { if (stationOrModule.getDataTypes().contains(WeatherStationModule.TEMPERATURE_DATA_TYPE)) { // temperature - setTemperature(new Temperature("temperature_" + getId(), Activator.NETATMO_DOMAIN, + setIndoorTemperature(new Temperature("temperature_" + getId(), Activator.NETATMO_DOMAIN, new FloatDataPoint(DatapointType.currentTemperature) { @Override protected Float doGetValue() throws DataPointException { return new Double(stationOrModule.getCurrentTemperature()).floatValue(); } })); - getTemperature().setMinValue(new FloatDataPoint(DatapointType.minValue) { + getIndoorTemperature().setMinValue(new FloatDataPoint(DatapointType.minValue) { @Override protected Float doGetValue() throws DataPointException { return new Double(stationOrModule.getMinTemperature()).floatValue(); } }); - getTemperature().setMaxValue(new FloatDataPoint(DatapointType.maxValue) { + getIndoorTemperature().setMaxValue(new FloatDataPoint(DatapointType.maxValue) { @Override protected Float doGetValue() throws DataPointException { return new Double(stationOrModule.getMaxTemperature()).floatValue(); } }); - getTemperature().setUnit(new StringDataPoint(DatapointType.unit) { + getIndoorTemperature().setUnit(new StringDataPoint(DatapointType.unit) { @Override protected String doGetValue() throws DataPointException { return "°C"; @@ -79,32 +77,20 @@ public class SDTWeatherStation extends WeatherStation { }); } - if (stationOrModule.getDataTypes().contains(WeatherStationModule.HUMIDITY_DATA_TYPE)) { - // humidity - setRelativeHumidity(new RelativeHumidity("relativeHumidity_" + getId(), - Activator.NETATMO_DOMAIN, - new FloatDataPoint(DatapointType.relativeHumidity) { - @Override - protected Float doGetValue() throws DataPointException { - return (float) stationOrModule.getHumidity(); - } - })); - } - if (stationOrModule.getDataTypes().contains(WeatherStationModule.NOISE_DATA_TYPE)) { // noise - setNoise(new Noise("noise_" + getId(), Activator.NETATMO_DOMAIN, - new IntegerDataPoint(DatapointType.noise) { + setAcousticSensor(new AcousticSensor("noise_" + getId(), Activator.NETATMO_DOMAIN, + new FloatDataPoint(DatapointType.loudness) { @Override - protected Integer doGetValue() throws DataPointException { - return new Long(stationOrModule.getNoise()).intValue(); + protected Float doGetValue() throws DataPointException { + return (float)stationOrModule.getNoise(); } })); } if (stationOrModule.getDataTypes().contains(WeatherStationModule.PRESSURE_DATA_TYPE)) { // pressure - setAtmosphericPressureSensor(new AtmosphericPressureSensor("atmosphericPressureSensor_" + getId(), + setBarometer(new Barometer("atmosphericPressureSensor_" + getId(), Activator.NETATMO_DOMAIN, new FloatDataPoint(DatapointType.atmosphericPressure) { @Override @@ -114,22 +100,26 @@ public class SDTWeatherStation extends WeatherStation { })); } + AirQualitySensor airQuality = new AirQualitySensor("airQuality_" + getId(), Activator.NETATMO_DOMAIN); + setAirQualitySensor(airQuality); + + if (stationOrModule.getDataTypes().contains(WeatherStationModule.HUMIDITY_DATA_TYPE)) { + airQuality.setSensorHumidity(new IntegerDataPoint(DatapointType.sensorHumidity) { + @Override + protected Integer doGetValue() throws DataPointException { + return (int) stationOrModule.getHumidity(); + } + }); + } + if (stationOrModule.getDataTypes().contains(WeatherStationModule.CO2_DATA_TYPE)) { // co2 - setExtendedCarbonDioxideSensor(new ExtendedCarbonDioxideSensor("extendedCarbonDioxideSensor_" + getId(), - Activator.NETATMO_DOMAIN, - new BooleanDataPoint(DatapointType.alarm) { - @Override - protected Boolean doGetValue() throws DataPointException { - return stationOrModule.getCo2() >= 600; - } - }, - new IntegerDataPoint(DatapointType.carbonDioxideValue) { - @Override - protected Integer doGetValue() throws DataPointException { - return new Long(stationOrModule.getCo2()).intValue(); - } - })); + airQuality.setCo2(new IntegerDataPoint(DatapointType.co2) { + @Override + protected Integer doGetValue() throws DataPointException { + return (int)stationOrModule.getCo2(); + } + }); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWelcomeCameraDevice.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWelcomeCameraDevice.java index e614ef00..1d87a6fa 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWelcomeCameraDevice.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/main/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWelcomeCameraDevice.java @@ -8,8 +8,11 @@ package org.eclipse.om2m.sdt.home.netatmo.sdt; import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -17,16 +20,19 @@ import java.util.Map; import org.eclipse.om2m.sdt.datapoints.ArrayDataPoint; import org.eclipse.om2m.sdt.datapoints.StringDataPoint; +import org.eclipse.om2m.sdt.datapoints.UriDataPoint; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.devices.Camera; import org.eclipse.om2m.sdt.home.driver.Logger; import org.eclipse.om2m.sdt.home.driver.Utils; import org.eclipse.om2m.sdt.home.modules.PersonSensor; -import org.eclipse.om2m.sdt.home.modules.Streaming; +import org.eclipse.om2m.sdt.home.modules.PlayerControl; +import org.eclipse.om2m.sdt.home.modules.SessionDescription; import org.eclipse.om2m.sdt.home.netatmo.impl.Activator; import org.eclipse.om2m.sdt.home.netatmo.model.DetectedPerson; import org.eclipse.om2m.sdt.home.netatmo.model.WelcomeCamera; import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.PlayerMode; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; @@ -35,6 +41,10 @@ public class SDTWelcomeCameraDevice extends Camera { private static final long DEFAULT_DETECTION_THRESHOLD = 75000; // 75 s private static final Logger LOGGER = new Logger("Netatmo"); + + static private List supportedPlayerModes = + Arrays.asList(PlayerMode.Values.play, PlayerMode.Values.stop, + PlayerMode.Values.pause, PlayerMode.Values.resume); private final WelcomeCamera camera; private List serviceRegistrations; @@ -82,33 +92,55 @@ public class SDTWelcomeCameraDevice extends Camera { } })); - setStreaming(new Streaming("streaming_" + getId(), Activator.NETATMO_DOMAIN, - new StringDataPoint(DatapointType.url) { - @Override - protected String doGetValue() throws DataPointException { - if (camera.getUseLocalUrl()) { - return camera.getVpnUrl() + "/live/index_local.m3u8"; - } else { - return camera.getVpnUrl() + "/live/index.m3u8"; - } + SessionDescription sdp = new SessionDescription("sdp_" + getId(), Activator.NETATMO_DOMAIN); + sdp.setUrl(new UriDataPoint(DatapointType.url) { + @Override + protected URI doGetValue() throws DataPointException { + try { + return new URI(camera.getVpnUrl() + "/live/" + + (camera.getUseLocalUrl() ? "index_local.m3u8" : "index.m3u8")); + } catch (URISyntaxException e) { + throw new DataPointException(e); } - }, - new StringDataPoint(DatapointType.login) { + } + }); + sdp.setSdp(new StringDataPoint(DatapointType.sdp) { + @Override + protected String doGetValue() throws DataPointException { + return "HLS"; + } + }); +// sdp.setLogin(new StringDataPoint(DatapointType.login) { +// @Override +// protected String doGetValue() throws DataPointException { +// return ""; +// } +// }); +// sdp.setPassword(new StringDataPoint(DatapointType.password) { +// @Override +// protected String doGetValue() throws DataPointException { +// return ""; +// } +// }); + setSessionDescription(sdp); + + setPlayerControl(new PlayerControl("player_" + getId(), Activator.NETATMO_DOMAIN, + new PlayerMode() { @Override - protected String doGetValue() throws DataPointException { - return ""; + protected PlayerMode.Values doGetValue() throws DataPointException { + return camera.getAlimOk() ? + (camera.getIsOn() ? PlayerMode.Values.play : PlayerMode.Values.stop) + : PlayerMode.Values.pause; } - }, - new StringDataPoint(DatapointType.password) { @Override - protected String doGetValue() throws DataPointException { - return ""; + protected void doSetValue(PlayerMode.Values v) throws DataPointException { + throw new DataPointException("Not implemented"); } - }, - new StringDataPoint(DatapointType.format) { + }, + new ArrayDataPoint(DatapointType.supportedPlayerModes) { @Override - protected String doGetValue() throws DataPointException { - return "HLS"; + public List doGetValue() throws DataPointException { + return supportedPlayerModes; } })); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/test/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWelcomeCameraDeviceTestCase.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/test/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWelcomeCameraDeviceTestCase.java index ef5bdaa3..431f0295 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/test/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWelcomeCameraDeviceTestCase.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.netatmo/src/test/java/org/eclipse/om2m/sdt/home/netatmo/sdt/SDTWelcomeCameraDeviceTestCase.java @@ -52,8 +52,8 @@ public class SDTWelcomeCameraDeviceTestCase extends TestCase { welcomeCamera.setUseLocalUrl(Boolean.TRUE); sdtWelcomeCamera = new SDTWelcomeCameraDevice(welcomeCamera, 1000); - assertNotNull(sdtWelcomeCamera.getStreaming().getUrlValue()); - assertTrue(sdtWelcomeCamera.getStreaming().getUrlValue().equals(VPN_URL + "/live/index_local.m3u8")); + assertNotNull(sdtWelcomeCamera.getSessionDescription().getUrl()); + assertTrue(sdtWelcomeCamera.getSessionDescription().getUrl().toString().equals(VPN_URL + "/live/index_local.m3u8")); } @@ -61,23 +61,23 @@ public class SDTWelcomeCameraDeviceTestCase extends TestCase { welcomeCamera.setUseLocalUrl(Boolean.FALSE); sdtWelcomeCamera = new SDTWelcomeCameraDevice(welcomeCamera, 1000); - assertNotNull(sdtWelcomeCamera.getStreaming().getUrlValue()); - assertTrue(sdtWelcomeCamera.getStreaming().getUrlValue().equals(VPN_URL + "/live/index.m3u8")); + assertNotNull(sdtWelcomeCamera.getSessionDescription().getUrl()); + assertTrue(sdtWelcomeCamera.getSessionDescription().getUrl().toString().equals(VPN_URL + "/live/index.m3u8")); } - public void testPassword() throws Exception { - sdtWelcomeCamera = new SDTWelcomeCameraDevice(welcomeCamera, 1000); - assertEquals(sdtWelcomeCamera.getStreaming().getPasswordValue(), ""); - } - - public void testLogin() throws Exception { - sdtWelcomeCamera = new SDTWelcomeCameraDevice(welcomeCamera, 1000); - assertEquals(sdtWelcomeCamera.getStreaming().getLoginValue(), ""); - } +// public void testPassword() throws Exception { +// sdtWelcomeCamera = new SDTWelcomeCameraDevice(welcomeCamera, 1000); +// assertEquals(sdtWelcomeCamera.getSessionDescription().getPassword(), ""); +// } +// +// public void testLogin() throws Exception { +// sdtWelcomeCamera = new SDTWelcomeCameraDevice(welcomeCamera, 1000); +// assertEquals(sdtWelcomeCamera.getSessionDescription().getLogin(), ""); +// } public void testFormat() throws Exception { sdtWelcomeCamera = new SDTWelcomeCameraDevice(welcomeCamera, 1000); - assertEquals(sdtWelcomeCamera.getStreaming().getFormatValue(), "HLS"); + assertEquals(sdtWelcomeCamera.getSessionDescription().getSdp(), "HLS"); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/.classpath b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/.classpath deleted file mode 100644 index 98ddc48e..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/.project b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/.project deleted file mode 100644 index 0d640823..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.onem2m.sdt.home.smartercoffee - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/Activator.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/Activator.java index d2835cc6..8aab60ae 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/Activator.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/Activator.java @@ -66,13 +66,13 @@ public class Activator implements ManagedService, BundleActivator { //test(); } - public void test(){ + public void test() { try{ System.out.println("URUCHOMIONO TEST"); //logger.debug("SENDING REQUEST TO SMARTER COFFEE"); sCoffee.getBrewing().setCupsNumber(1); - sCoffee.getBrewing().setStrength(TasteStrength.zero); + sCoffee.getBrewing().setStrength(TasteStrength.Values.zero); //sCoffee.getKeepWarm(); sCoffee.getKeepWarm().setPowerState(true); //sCoffee.getGrinder().setUseGrinder(true); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/SmarterCoffeeMachine.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/SmarterCoffeeMachine.java index 06933297..b8618820 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/SmarterCoffeeMachine.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/SmarterCoffeeMachine.java @@ -11,7 +11,6 @@ import java.util.List; import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; import org.eclipse.om2m.sdt.datapoints.IntegerDataPoint; import org.eclipse.om2m.sdt.datapoints.StringDataPoint; import org.eclipse.om2m.sdt.exceptions.AccessException; @@ -144,26 +143,28 @@ public class SmarterCoffeeMachine extends CoffeeMachine{ smarterCoffee.setNumberOfCups(value); } }, - new TasteStrength(new EnumDataPoint(null) { - int strength = TasteStrength.zero; + new TasteStrength() { + TasteStrength.Values strength = TasteStrength.Values.zero; @Override - protected Integer doGetValue() throws DataPointException { + protected TasteStrength.Values doGetValue() throws DataPointException { return strength; } @Override - protected void doSetValue(Integer value) throws DataPointException { + protected void doSetValue(TasteStrength.Values value) throws DataPointException { strength = value; - if (value >= TasteStrength.zero && value < TasteStrength.medium) { + if (value.ordinal() >= TasteStrength.Values.zero.ordinal() + && value.ordinal() < TasteStrength.Values.medium.ordinal()) { smarterCoffee.setBrewStrength(SmarterCoffeeCommands.BREW_STRENGTH_0); } - else if (value == TasteStrength.medium) { + else if (value == TasteStrength.Values.medium) { smarterCoffee.setBrewStrength(SmarterCoffeeCommands.BREW_STRENGTH_1); } - else if (value > TasteStrength.medium && value <= TasteStrength.maximum) { + else if (value.ordinal() > TasteStrength.Values.medium.ordinal() + && value.ordinal() <= TasteStrength.Values.maximum.ordinal()) { smarterCoffee.setBrewStrength(SmarterCoffeeCommands.BREW_STRENGTH_2); } } - })); + }); addModule(brewing); } @@ -183,7 +184,7 @@ public class SmarterCoffeeMachine extends CoffeeMachine{ System.out.println("start brewing swtich"); smarterCoffee.start(getGrinder().getUseGrinder(), getBrewing().getCupsNumber(), - getBrewing().getStrength(), + getBrewing().getStrength().ordinal(), getKeepWarm().getPowerState());//tu się powinno pojawić getKeepWarm(); //smarterCoffee.start(true, 1, getBrewing().getStrength(), false); } catch (AccessException e) { @@ -228,13 +229,13 @@ public class SmarterCoffeeMachine extends CoffeeMachine{ Activator.logger.info("add WaterStatus starting"); org.eclipse.om2m.sdt.home.modules.LiquidLevel waterStatus = new org.eclipse.om2m.sdt.home.modules.LiquidLevel("waterStatus", domain, - new LiquidLevel(DatapointType.water, new EnumDataPoint(null) { + new LiquidLevel(DatapointType.water) { @Override - protected Integer doGetValue() throws DataPointException { + protected LiquidLevel.Values doGetValue() throws DataPointException { smarterCoffee.getStatus(); return smarterCoffee.getWaterStatus(); } - })); + }); addModule(waterStatus); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/communication/SmarterCoffeeCommunication.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/communication/SmarterCoffeeCommunication.java index 2cc487e8..a9688a54 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/communication/SmarterCoffeeCommunication.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/communication/SmarterCoffeeCommunication.java @@ -10,6 +10,7 @@ package org.eclipse.om2m.sdt.home.smartercoffee.communication; import java.util.Date; import org.eclipse.om2m.sdt.home.smartercoffee.Activator; +import org.eclipse.om2m.sdt.home.types.LiquidLevel; import org.eclipse.om2m.sdt.home.types.TasteStrength; public class SmarterCoffeeCommunication { @@ -48,13 +49,13 @@ public class SmarterCoffeeCommunication { public void start(boolean useGrinder, int numberOfCups, int sdtStrength, boolean keepWarm) { byte strength = 0; - if (sdtStrength >= TasteStrength.zero && sdtStrength < TasteStrength.medium) { + if (sdtStrength >= TasteStrength.Values.zero.ordinal() && sdtStrength < TasteStrength.Values.medium.ordinal()) { strength = SmarterCoffeeCommands.BREW_STRENGTH_0; } - else if (sdtStrength == TasteStrength.medium) { + else if (sdtStrength == TasteStrength.Values.medium.ordinal()) { strength = SmarterCoffeeCommands.BREW_STRENGTH_1; } - else if (sdtStrength > TasteStrength.medium && sdtStrength <= TasteStrength.maximum) { + else if (sdtStrength > TasteStrength.Values.medium.ordinal() && sdtStrength <= TasteStrength.Values.maximum.ordinal()) { strength = SmarterCoffeeCommands.BREW_STRENGTH_2; } @@ -109,7 +110,7 @@ public class SmarterCoffeeCommunication { return status.getCoffeePreparationStatus(); } - public int getWaterStatus() { + public LiquidLevel.Values getWaterStatus() { return status.getWaterLevel(); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/communication/SmarterCoffeeStatus.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/communication/SmarterCoffeeStatus.java index 9aadc23b..eb030dc7 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/communication/SmarterCoffeeStatus.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smartercoffee/src/main/java/org/eclipse/om2m/sdt/home/smartercoffee/communication/SmarterCoffeeStatus.java @@ -194,25 +194,23 @@ public class SmarterCoffeeStatus { this.coffeeReady = coffeeReady; } - public int getWaterLevel() { - + public LiquidLevel.Values getWaterLevel() { System.out.println("raw water level=" + waterLevel); - if(waterLevel == 0){ - return LiquidLevel.low; + if (waterLevel == 0) { + return LiquidLevel.Values.low; } - if(waterLevel == 17){ //about HALF -> from about level 7 on the right side of the tank - return LiquidLevel.medium; + if (waterLevel == 17) { //about HALF -> from about level 7 on the right side of the tank + return LiquidLevel.Values.medium; } - if(waterLevel == 18){ //from about level 7 to 10 - return LiquidLevel.high; + if (waterLevel == 18) { //from about level 7 to 10 + return LiquidLevel.Values.high; } - if(waterLevel == 19){ //almost FULL -> from about level 10 - return LiquidLevel.maximum; + if (waterLevel == 19) { //almost FULL -> from about level 10 + return LiquidLevel.Values.maximum; } - else{ - return -1; + else { + return LiquidLevel.Values.zero; } - } public void setKeepWarm(boolean keepWarm) { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/META-INF/MANIFEST.MF b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/META-INF/MANIFEST.MF index 945e9fc4..290a95e0 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/META-INF/MANIFEST.MF +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: org.eclipse.om2m.sdt.home.smarterkettle Bundle-SymbolicName: org.eclipse.om2m.sdt.home.smarterkettle -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.1.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-Activator: org.eclipse.om2m.sdt.home.smarterkettle.Activator Bundle-ClassPath: . diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/pom.xml b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/pom.xml index 7f467440..2de967a3 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/pom.xml +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/pom.xml @@ -15,7 +15,7 @@ org.eclipse.om2m org.eclipse.om2m.sdt - 1.0.0-SNAPSHOT + 1.1.0-SNAPSHOT org.eclipse.om2m.sdt.home.smarterkettle diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/Activator.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/Activator.java index bd0d0a1a..e0939b98 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/Activator.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/Activator.java @@ -14,15 +14,19 @@ import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.ActionException; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.HomeDomain; +import org.eclipse.om2m.sdt.home.driver.Logger; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.service.cm.ConfigurationException; import org.osgi.service.cm.ManagedService; +import org.osgi.service.log.LogService; public class Activator implements ManagedService, BundleActivator { + static public Logger LOGGER; + private BundleContext context; - private Boolean activated; + private boolean activated; private Domain domain; private static final String ID = "SmarterKettle"; @@ -31,25 +35,27 @@ public class Activator implements ManagedService, BundleActivator { public Activator() { - this.domain = new HomeDomain("Smarter Kettle Domain"); + LOGGER = new Logger("SMARTER"); } private void addKettleMachine(String ip, int port){ - System.out.println("AddKettleMachine"); - System.out.println(ip + ":" + port); - - + LOGGER.info("AddKettleMachine"); + LOGGER.info(ip + ":" + port); sKettle = new SmarterKettle(ID + idNum++, domain, ip, port); - sKettle.register(context); - } @Override - public void start(BundleContext context) throws Exception { - System.out.println("Bundle kettle machine starting"); - this.context = context; + public void start(BundleContext ctxt) throws Exception { + try { + LOGGER = new Logger("SMARTER"); + LOGGER.setLogService((LogService) ctxt.getService( + ctxt.getServiceReference(LogService.class.getName()))); + } catch (Exception ignored) { + } + LOGGER.info("Bundle kettle machine starting"); + this.context = ctxt; activated = true; addKettleMachine("10.0.1.27", 2081); @@ -57,56 +63,40 @@ public class Activator implements ManagedService, BundleActivator { } public void test() throws ActionException, AccessException, InterruptedException, DataPointException{ - System.out.println("----Test----"); - - if(!sKettle.getFaultDetection().getStatus()){ - System.out.println("KOD bledu: " + sKettle.getFaultDetection().getCode() + " Opis: " + sKettle.getFaultDetection().getDescription()); - } - else{ - System.out.println("Brak błędów"); + LOGGER.info("----Test----"); + if (sKettle.getFaultDetection().getStatus()) { + LOGGER.info("kettle OK"); + } else { + LOGGER.info("Error code: " + sKettle.getFaultDetection().getCode() + + " / " + sKettle.getFaultDetection().getDescription()); } - - - System.out.println("----Test modułu temperatury---"); + LOGGER.info("----Test module temperature---"); sKettle.getTemperature().setTargetTemperature(50); sKettle.getTemperature().setTargetTemperature(50); + LOGGER.info("Current: " + sKettle.getTemperature().getCurrentTemperature()); + LOGGER.info("Target: " + sKettle.getTemperature().getTargetTemperature()); + LOGGER.info("Max: " + sKettle.getTemperature().getMaxValue()); + LOGGER.info("Min: " + sKettle.getTemperature().getMinValue()); + LOGGER.info("Step: " + sKettle.getTemperature().getStepValue()); - System.out.println("Current: " + sKettle.getTemperature().getCurrentTemperature()); - System.out.println("Target: " + sKettle.getTemperature().getTargetTemperature()); - System.out.println("Max: " + sKettle.getTemperature().getMaxValue()); - System.out.println("Min: " + sKettle.getTemperature().getMinValue()); - System.out.println("Step: " + sKettle.getTemperature().getStepValue()); - - - - - sKettle.getBoilingSwitch().toggle(); - - - System.out.println("Test modułu BOILING"); - System.out.println("Spradzenie statusu za pomocą modułu BOILING"); - //System.out.println("Czy gotuje: " + sKettle.getBoiling().getStatus()); - System.out.println("Czy goutje: " + sKettle.getBoilingSwitch().getPowerState()); - - - + sKettle.getBinarySwitch().toggle(); + LOGGER.info("Boiling: " + sKettle.getBinarySwitch().getPowerState()); } - @Override public void updated(Dictionary properties) throws ConfigurationException { - System.out.println("Uptaded"); + LOGGER.info("Uptaded"); addKettleMachine("10.0.1.28", 2081); - } - @Override public void stop(BundleContext context) throws Exception { activated = false; + if (sKettle != null) + sKettle.unregister(); } + } - diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/SmarterKettle.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/SmarterKettle.java index 351dca61..0b349530 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/SmarterKettle.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/SmarterKettle.java @@ -20,12 +20,13 @@ import org.eclipse.om2m.sdt.home.actions.Toggle; import org.eclipse.om2m.sdt.home.devices.Kettle; import org.eclipse.om2m.sdt.home.driver.Utils; import org.eclipse.om2m.sdt.home.modules.BinarySwitch; +import org.eclipse.om2m.sdt.home.modules.Boiler; import org.eclipse.om2m.sdt.home.modules.FaultDetection; +import org.eclipse.om2m.sdt.home.modules.LiquidLevel; import org.eclipse.om2m.sdt.home.modules.Temperature; import org.eclipse.om2m.sdt.home.smarterkettle.communication.SmarterKettleCommunication; import org.eclipse.om2m.sdt.home.types.DatapointType; import org.eclipse.om2m.sdt.home.types.ModuleType; -import org.eclipse.om2m.sdt.home.types.TasteStrength; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceRegistration; @@ -37,11 +38,6 @@ public class SmarterKettle extends Kettle { private SmarterKettleCommunication smarterKettle; - private IntegerDataPoint cupsNumber; - private BooleanDataPoint keepWarm; - private TasteStrength strength; - private IntegerDataPoint status; - public SmarterKettle(String id, Domain domain, String ip , int port) { super(id, id, domain); @@ -50,10 +46,23 @@ public class SmarterKettle extends Kettle { addBinarySwitch(); addFaultDetection(); addTemperature(); + addModule(new LiquidLevel("LiquidLevel_" + getId(), domain, + new org.eclipse.om2m.sdt.home.types.LiquidLevel() { + @Override + public Values doGetValue() throws DataPointException { + return smarterKettle.getStatus().getWaterLevel(); + } + })); + addModule(new Boiler(ip, domain, new BooleanDataPoint(DatapointType.status) { + @Override + protected Boolean doGetValue() throws DataPointException { + return smarterKettle.getStatus().isBoiling(); + } + })); setDeviceManufacturer("Smarter"); setDeviceName("SmarterKettle 2.0"); } - + public void register(BundleContext context) { registrations = Utils.register(this, context); } @@ -119,7 +128,7 @@ public class SmarterKettle extends Kettle { //*****************Temperature Module******************* - private void addTemperature(){ + private void addTemperature() { Temperature temperature = new Temperature("Temperature_" + getId(), domain, new FloatDataPoint(DatapointType.currentTemperature) { @Override @@ -163,5 +172,14 @@ public class SmarterKettle extends Kettle { }); addModule(temperature); } - + + public void unregister() { + if (registrations == null) + return; + for (ServiceRegistration reg : registrations) { + reg.unregister(); + } + registrations.clear(); + } + } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleCommunication.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleCommunication.java index cf8b4f85..23e441a5 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleCommunication.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleCommunication.java @@ -7,6 +7,8 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.smarterkettle.communication; +import static org.eclipse.om2m.sdt.home.smarterkettle.Activator.LOGGER; + public class SmarterKettleCommunication { private SmarterKettleStatus kettleStatus; @@ -19,7 +21,6 @@ public class SmarterKettleCommunication { kettleStatus = new SmarterKettleStatus(); } - public void startKettle(int temperature){ byte[] request = new byte[4]; request[0] = SmarterKettleCommands.START_KETTLE; @@ -61,8 +62,7 @@ public class SmarterKettleCommunication { kettleStatus.setCurrentTemperature(Byte.toUnsignedInt(statusAnswer[2])); kettleStatus.setBoiling(statusAnswer[1] != 0); kettleStatus.setPlugged(statusAnswer[3] == 8); - kettleStatus.setWaterLevel(Byte.toUnsignedInt(statusAnswer[4])); - kettleStatus.setWaterLevelEnum(Byte.toUnsignedInt(statusAnswer[4])); + kettleStatus.setWaterLevel(Byte.toUnsignedInt(statusAnswer[4])); } public Boolean getFaultDetection() { @@ -84,7 +84,7 @@ public class SmarterKettleCommunication { private void send(byte[] request) { TCPConnection tcp = new TCPConnection(ip, port); tcp.setWaitForResponse(true); - System.out.println("send: 0:" + request[0] + "| 1: " + request[1] + "| 2: " + request[2] + "| 3: " + request[3] + "|"); + LOGGER.info("send: 0:" + request[0] + "| 1: " + request[1] + "| 2: " + request[2] + "| 3: " + request[3] + "|"); tcp.sendTCPPacket(request); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleMain.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleMain.java index 0e396f12..8dca69f1 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleMain.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleMain.java @@ -7,14 +7,16 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.smarterkettle.communication; +import static org.eclipse.om2m.sdt.home.smarterkettle.Activator.LOGGER; + import java.util.Scanner; public class SmarterKettleMain { public static void main(String[] args) throws InterruptedException { - System.out.println("Smart Kettle 2.0"); - System.out.println("1 - start, 2 - stop, 3- checkStatus"); + LOGGER.info("Smart Kettle 2.0"); + LOGGER.info("1 - start, 2 - stop, 3- checkStatus"); while (true) { SmarterKettleCommunication kettle = new SmarterKettleCommunication("10.0.1.27", 2081); @@ -24,7 +26,7 @@ public class SmarterKettleMain { switch (action) { case 1: - System.out.println("Temperatura: "); + LOGGER.info("Temperature: "); inputString = input.nextLine(); int temperature = Integer.parseInt(inputString); kettle.startKettle(temperature); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleStatus.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleStatus.java index 06262117..3e3f77ee 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleStatus.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/SmarterKettleStatus.java @@ -7,57 +7,56 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.smarterkettle.communication; +import org.eclipse.om2m.sdt.home.types.LiquidLevel; + public class SmarterKettleStatus { - public final SmarterKettleStatusDescriptor NO_FAULT = new SmarterKettleStatusDescriptor(0, "No faults detected"); - public final SmarterKettleStatusDescriptor UNREACHABLE = new SmarterKettleStatusDescriptor(-1, "Kettle is unreachable"); - public final SmarterKettleStatusDescriptor WATER_ERROR = new SmarterKettleStatusDescriptor(-2, "There's no water in the kettle"); - public final SmarterKettleStatusDescriptor UNPLUGGED = new SmarterKettleStatusDescriptor(-3, "Kettle isn't plugged"); - - public final SmarterKettleStatusDescriptor BOILING_IN_PROGRESS = new SmarterKettleStatusDescriptor(1, "Boiling in progress"); - - private enum WaterLevels { - EMPTY, LOW, HALF, QUARTER, FULL; + class StatusDescriptor { + + private int code; + private String description; + + public StatusDescriptor(int code, String desc) { + this.code = code; + this.description = desc; + } + } + + public final StatusDescriptor NO_FAULT = new StatusDescriptor(0, "No fault detected"); + public final StatusDescriptor UNREACHABLE = new StatusDescriptor(-1, "Kettle is unreachable"); + public final StatusDescriptor WATER_ERROR = new StatusDescriptor(-2, "No water in the kettle"); + public final StatusDescriptor UNPLUGGED = new StatusDescriptor(-3, "Kettle not plugged"); + public final StatusDescriptor BOILING_IN_PROGRESS = new StatusDescriptor(1, "Boiling in progress"); private int currentTemperature = 0; - private int waterLevel = 0; - - private WaterLevels waterLevelName = WaterLevels.EMPTY; + private LiquidLevel.Values waterLevel = LiquidLevel.Values.zero; private boolean isPlugged = false; private boolean isBoiling = false; private boolean isEmpty = false; private int targetTemperature = 30; - private int minTemperature = 20;; + private int minTemperature = 20; private int maxTemperature = 100; private int stepTemperature = 1; public int getCode() { if (!isPlugged) - return UNPLUGGED.getCode(); + return UNPLUGGED.code; else if (isEmpty) - return WATER_ERROR.getCode(); + return WATER_ERROR.code; else - return NO_FAULT.getCode(); + return NO_FAULT.code; } public String getDescription() { if (!isPlugged) - return UNPLUGGED.getDescription(); + return UNPLUGGED.description; else if (isEmpty) - return WATER_ERROR.getDescription(); + return WATER_ERROR.description; else - return NO_FAULT.getDescription(); - } - - public WaterLevels getWaterLevelName() { - return waterLevelName; - } - - public void setWaterLevelName(WaterLevels waterLevelName) { - this.waterLevelName = waterLevelName; + return NO_FAULT.description; } public int getCurrentTemperature() { @@ -68,25 +67,21 @@ public class SmarterKettleStatus { this.currentTemperature = currentTemperature; } - public int getWaterLevel() { + public LiquidLevel.Values getWaterLevel() { return waterLevel; } - public void setWaterLevel(int waterLevel) { - this.waterLevel = waterLevel; - } - - public void setWaterLevelEnum(int level) { + public void setWaterLevel(int level) { if (level >= 190) - waterLevelName = WaterLevels.FULL; - else if (level < 190 && level >= 120) - waterLevelName = WaterLevels.QUARTER; - else if (level < 120 && level >= 80) - waterLevelName = WaterLevels.HALF; - else if (level < 80 && level >= 20) - waterLevelName = WaterLevels.LOW; + waterLevel = LiquidLevel.Values.maximum; + else if (level >= 120) + waterLevel = LiquidLevel.Values.high; + else if (level >= 80) + waterLevel = LiquidLevel.Values.medium; + else if (level >= 20) + waterLevel = LiquidLevel.Values.low; else - waterLevelName = WaterLevels.EMPTY; + waterLevel = LiquidLevel.Values.zero; } public boolean isPlugged() { @@ -149,5 +144,4 @@ public class SmarterKettleStatus { this.stepTemperature = stepTemperature; } - -} \ No newline at end of file +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/TCPConnection.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/TCPConnection.java index 69a0d0e9..74fe97b8 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/TCPConnection.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.smarterkettle/src/main/java/org/eclipse/om2m/sdt/home/smarterkettle/communication/TCPConnection.java @@ -7,6 +7,8 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.smarterkettle.communication; +import static org.eclipse.om2m.sdt.home.smarterkettle.Activator.LOGGER; + import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; @@ -37,19 +39,12 @@ public class TCPConnection { if (! waitForResponse) { socket.close(); } else { - /*if(bytes2send[0] == SmarterCoffeeCommands.HEADER_START){ - - } - else{*/ readBytes(socket); - //socket.close(); } } catch (UnknownHostException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + LOGGER.warning("", e); } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + LOGGER.warning("", e); } } @@ -82,17 +77,9 @@ public class TCPConnection { if (socket != null) { InputStream in = socket.getInputStream(); while (!statusMsg) { - int iterator = 0; while ((charsRead = in.read(buffer)) != -1) { - iterator++; if (charsRead == 3) break; //ACK received if (charsRead > 3) statusMsg = true; //Status received -// for (int i = 0; i < charsRead; i++) { -// if (i == 2) -// System.out.print( "Temp ( " + i + ")" +": " + Byte.toUnsignedInt(buffer[i]) + " | "); -// else -// System.out.print( i +": " + Byte.toUnsignedInt(buffer[i]) + " | "); -// } if (buffer[charsRead-1] == SmarterKettleCommands.END_OF_MESSAGE) break; } @@ -110,9 +97,9 @@ public class TCPConnection { return readBytes(socket); //socket.close(); } catch (UnknownHostException e) { - e.printStackTrace(); + LOGGER.warning("", e); } catch (IOException e) { - e.printStackTrace(); + LOGGER.warning("", e); } return new byte[7]; } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.tester/src/main/java/org/eclipse/om2m/sdt/home/tester/Activator.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.tester/src/main/java/org/eclipse/om2m/sdt/home/tester/Activator.java index 57063965..2286e6b8 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.tester/src/main/java/org/eclipse/om2m/sdt/home/tester/Activator.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.tester/src/main/java/org/eclipse/om2m/sdt/home/tester/Activator.java @@ -34,6 +34,7 @@ import org.eclipse.om2m.sdt.home.devices.WaterValve; import org.eclipse.om2m.sdt.home.modules.AlarmSpeaker; import org.eclipse.om2m.sdt.home.modules.AudioVolume; import org.eclipse.om2m.sdt.home.types.LiquidLevel; +import org.eclipse.om2m.sdt.home.types.MachineState; import org.eclipse.om2m.sdt.types.Array; import org.eclipse.om2m.sdt.types.DataType.TypeChoice; import org.eclipse.om2m.sdt.types.SimpleType; @@ -141,18 +142,14 @@ public class Activator implements SDTEventListener { light.getColour().setBlue((int) Math.random() * 255); Thread.sleep(2000); light.getColourSaturation().setColourSat((int) Math.random() * 100); - List modes = light.getRunMode().getSupportedModes(); - if (! modes.isEmpty()) { - String mode = modes.get((int) (Math.random() * modes.size())); - Logger.info("set run mode: " + mode + " from supported " + modes); - light.getRunMode().setOperationMode(mode); + if (light.getRunState() != null) { + List modes = light.getRunState().getMachineStates(); + if (! modes.isEmpty()) { + MachineState.Values mode = modes.get((int) (Math.random() * modes.size())); + Logger.info("set run state: " + mode + " from supported " + modes); + light.getRunState().setMachineState(mode); + } } -// List states = light.getRunState().getJobStates(); -// if (! states.isEmpty()) { -// Integer mode = states.get((int) (Math.random() * states.size())); -// Logger.info("set run state: " + mode + " from supported " + states); -// light.getRunState().setJobState(mode); -// } } } Thread.sleep(1000); @@ -160,7 +157,8 @@ public class Activator implements SDTEventListener { Logger.info("light color: r=" + light.getColour().getRed() + ", g=" + light.getColour().getGreen() + ", b=" + light.getColour().getBlue()); Logger.info("light color saturation: " + light.getColourSaturation().getColourSat()); - Logger.info("light states: " + light.getRunMode().getSupportedModes()); + if (light.getRunState() != null) + Logger.info("light states: " + light.getRunState().getMachineStates()); } Thread.sleep(1000); for (Light light : lights) { @@ -311,15 +309,15 @@ public class Activator implements SDTEventListener { if (valveTests == 0) return; try { - int on = LiquidLevel.zero; + LiquidLevel.Values on = LiquidLevel.Values.zero; try { on = valve.getWaterLevel().getLiquidLevel(); Logger.info("test valve: " + on); } catch (Exception e) { Logger.warning("", e); } - on = (on == LiquidLevel.zero) ? LiquidLevel.maximum - : LiquidLevel.zero; + on = (on == LiquidLevel.Values.zero) ? LiquidLevel.Values.maximum + : LiquidLevel.Values.zero; valve.getWaterLevel().setLiquidLevel(on); Logger.info("test valve: OK"); } catch (Exception e) { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.utils/src/main/java/org/eclipse/om2m/sdt/home/utils/SDTDiscovery.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.utils/src/main/java/org/eclipse/om2m/sdt/home/utils/SDTDiscovery.java index 24f3d5e2..d58ef24f 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.utils/src/main/java/org/eclipse/om2m/sdt/home/utils/SDTDiscovery.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.utils/src/main/java/org/eclipse/om2m/sdt/home/utils/SDTDiscovery.java @@ -257,7 +257,7 @@ public class SDTDiscovery implements ISDTDiscovery { Activator.LOGGER.info("No serial number property. Take id instead."); serial = deviceId; } else { - serial = serialAttr.getCustomAttributeValue(); + serial = serialAttr.getValue(); } Domain domain = cloud ? cloudDomain : localDomain; GenericDevice device = (GenericDevice) domain.getDevice(deviceId); @@ -277,13 +277,13 @@ public class SDTDiscovery implements ISDTDiscovery { Activator.LOGGER.info("Created SDT device " + device); } for (CustomAttribute attr : deviceFlex.getCustomAttributes()) { - Activator.LOGGER.info("dev CustomAttribute: " + attr.getCustomAttributeName() - + "/" + attr.getCustomAttributeValue()); - PropertyType propType = PropertyType.fromShortName(attr.getCustomAttributeName()); + Activator.LOGGER.info("dev CustomAttribute: " + attr.getShortName() + + "/" + attr.getValue()); + PropertyType propType = PropertyType.fromShortName(attr.getShortName()); if (propType != null) { // Property prop = new Property(propType, attr.getCustomAttributeValue()); // device.addProperty(prop); - device.addProperty(propType, attr.getCustomAttributeValue()); + device.addProperty(propType, attr.getValue()); } } // Search children resources: modules @@ -320,11 +320,11 @@ public class SDTDiscovery implements ISDTDiscovery { List props = new ArrayList(); List dpAttrs = new ArrayList(); for (CustomAttribute attr : moduleFlex.getCustomAttributes()) { - Activator.LOGGER.info("CustomAttribute(1): " + attr.getCustomAttributeName() - + "/" + attr.getCustomAttributeValue()); - PropertyType propType = PropertyType.fromShortName(attr.getCustomAttributeName()); + Activator.LOGGER.info("CustomAttribute(1): " + attr.getShortName() + + "/" + attr.getValue()); + PropertyType propType = PropertyType.fromShortName(attr.getShortName()); if (propType != null) { - Property prop = new Property(propType, attr.getCustomAttributeValue()); + Property prop = new Property(propType, attr.getValue()); props.add(prop); } else { dpAttrs.add(attr); @@ -347,10 +347,10 @@ public class SDTDiscovery implements ISDTDiscovery { + cntDef.substring(idx + 1); List dps = new ArrayList(); for (CustomAttribute attr : dpAttrs) { - DatapointType datapointType = DatapointType.fromShortName(attr.getCustomAttributeName()); + DatapointType datapointType = DatapointType.fromShortName(attr.getShortName()); if (datapointType == null) { Activator.LOGGER.warn("Unknown custom attribute, neither property nor datapoint: " - + attr.getCustomAttributeName()); + + attr.getShortName()); continue; } String type = datapointType.getDataType().getTypeChoice().getOneM2MType(); @@ -374,7 +374,7 @@ public class SDTDiscovery implements ISDTDiscovery { } Map dpsMap = new HashMap(); for (DataPoint dp : dps) { - dpsMap.put(dp.getShortDefinitionType(), dp); + dpsMap.put(dp.getShortName(), dp); } Class clazz = Class.forName(className); if (modName.startsWith(cntDef + "__")) { @@ -434,7 +434,7 @@ public class SDTDiscovery implements ISDTDiscovery { // new DataType(type, SimpleType.getSimpleType(type))) { // public void setValue(Object value) { // try { -// SDTUtil.setValue(attr, value); +// TypeConverter.setValue(attr, value); // updateAttribute(uri, attr, cred); // } catch (Exception e) { // Activator.LOGGER.warn("Could not set arg", e); @@ -484,7 +484,7 @@ public class SDTDiscovery implements ISDTDiscovery { private IntegerDataPoint getIntegerDataPoint(final CustomAttribute attr, final String uri, final String cred) { - return new IntegerDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new IntegerDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Integer val) throws DataPointException { try { @@ -498,7 +498,7 @@ public class SDTDiscovery implements ISDTDiscovery { public Integer doGetValue() throws DataPointException { try { return (Integer) retrieveAttribute(uri, - attr.getCustomAttributeName(), cred); + attr.getShortName(), cred); } catch (Exception e) { throw new DataPointException(e); } @@ -508,7 +508,7 @@ public class SDTDiscovery implements ISDTDiscovery { private BooleanDataPoint getBooleanDataPoint(final CustomAttribute attr, final String uri, final String cred) { - BooleanDataPoint ret = new BooleanDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + BooleanDataPoint ret = new BooleanDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Boolean val) throws DataPointException { try { @@ -522,7 +522,7 @@ public class SDTDiscovery implements ISDTDiscovery { public Boolean doGetValue() throws DataPointException { try { return (Boolean) retrieveAttribute(uri, - attr.getCustomAttributeName(), cred); + attr.getShortName(), cred); } catch (Exception e) { throw new DataPointException(e); } @@ -533,7 +533,7 @@ public class SDTDiscovery implements ISDTDiscovery { private StringDataPoint getStringDataPoint(final CustomAttribute attr, final String uri, final String cred) { - return new StringDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new StringDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(String val) throws DataPointException { try { @@ -547,7 +547,7 @@ public class SDTDiscovery implements ISDTDiscovery { public String doGetValue() throws DataPointException { try { return (String) retrieveAttribute(uri, - attr.getCustomAttributeName(), cred); + attr.getShortName(), cred); } catch (Exception e) { throw new DataPointException(e); } @@ -557,7 +557,7 @@ public class SDTDiscovery implements ISDTDiscovery { private ByteDataPoint getByteDataPoint(final CustomAttribute attr, final String uri, final String cred) { - return new ByteDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new ByteDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Byte val) throws DataPointException { try { @@ -571,7 +571,7 @@ public class SDTDiscovery implements ISDTDiscovery { public Byte doGetValue() throws DataPointException { try { return (Byte) retrieveAttribute(uri, - attr.getCustomAttributeName(), cred); + attr.getShortName(), cred); } catch (Exception e) { throw new DataPointException(e); } @@ -581,7 +581,7 @@ public class SDTDiscovery implements ISDTDiscovery { private FloatDataPoint getFloatDataPoint(final CustomAttribute attr, final String uri, final String cred) { - return new FloatDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new FloatDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Float val) throws DataPointException { try { @@ -595,7 +595,7 @@ public class SDTDiscovery implements ISDTDiscovery { public Float doGetValue() throws DataPointException { try { return (Float) retrieveAttribute(uri, - attr.getCustomAttributeName(), cred); + attr.getShortName(), cred); } catch (Exception e) { throw new DataPointException(e); } @@ -605,7 +605,7 @@ public class SDTDiscovery implements ISDTDiscovery { private DateTimeDataPoint getDateTimeDataPoint(final CustomAttribute attr, final String uri, final String cred) { - return new DateTimeDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new DateTimeDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Date val) throws DataPointException { try { @@ -619,7 +619,7 @@ public class SDTDiscovery implements ISDTDiscovery { public Date doGetValue() throws DataPointException { try { return (Date) retrieveAttribute(uri, - attr.getCustomAttributeName(), cred); + attr.getShortName(), cred); } catch (Exception e) { throw new DataPointException(e); } @@ -629,7 +629,7 @@ public class SDTDiscovery implements ISDTDiscovery { private DateDataPoint getDateDataPoint(final CustomAttribute attr, final String uri, final String cred) { - return new DateDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new DateDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Date val) throws DataPointException { try { @@ -643,7 +643,7 @@ public class SDTDiscovery implements ISDTDiscovery { public Date doGetValue() throws DataPointException { try { return (Date) retrieveAttribute(uri, - attr.getCustomAttributeName(), cred); + attr.getShortName(), cred); } catch (Exception e) { throw new DataPointException(e); } @@ -653,7 +653,7 @@ public class SDTDiscovery implements ISDTDiscovery { private TimeDataPoint getTimeDataPoint(final CustomAttribute attr, final String uri, final String cred) { - return new TimeDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new TimeDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(Date val) throws DataPointException { try { @@ -667,7 +667,7 @@ public class SDTDiscovery implements ISDTDiscovery { public Date doGetValue() throws DataPointException { try { return (Date) retrieveAttribute(uri, - attr.getCustomAttributeName(), cred); + attr.getShortName(), cred); } catch (Exception e) { throw new DataPointException(e); } @@ -677,7 +677,7 @@ public class SDTDiscovery implements ISDTDiscovery { private ArrayDataPoint getArrayDataPoint(final CustomAttribute attr, final String uri, final String cred) { - return new ArrayDataPoint(DatapointType.fromShortName(attr.getCustomAttributeName())) { + return new ArrayDataPoint(DatapointType.fromShortName(attr.getShortName())) { @Override public void doSetValue(List val) throws DataPointException { try { @@ -692,7 +692,7 @@ public class SDTDiscovery implements ISDTDiscovery { public List doGetValue() throws DataPointException { try { return (List) retrieveAttribute(uri, - attr.getCustomAttributeName(), cred); + attr.getShortName(), cred); } catch (Exception e) { throw new DataPointException(e); } @@ -709,7 +709,7 @@ public class SDTDiscovery implements ISDTDiscovery { Class clazz = Class.forName(className); return (EnumDataPoint) clazz.getConstructor(Identifiers.class, EnumDataPoint.class) - .newInstance(DatapointType.fromShortName(attr.getCustomAttributeName()), + .newInstance(DatapointType.fromShortName(attr.getShortName()), new EnumDataPoint(null) { @Override public void doSetValue(Integer val) throws DataPointException { @@ -724,7 +724,7 @@ public class SDTDiscovery implements ISDTDiscovery { public Integer doGetValue() throws DataPointException { try { return (Integer) retrieveAttribute(uri, - attr.getCustomAttributeName(), cred); + attr.getShortName(), cred); } catch (Exception e) { throw new DataPointException(e); } @@ -823,7 +823,7 @@ public class SDTDiscovery implements ISDTDiscovery { if (! ResponseStatusCode.UPDATED.equals(resp.getResponseStatusCode())) throw new Exception("Error invoking cloud action: " + resp.getResponseStatusCode()); CustomAttribute ret = ((AbstractFlexContainer) resp.getContent()).getCustomAttribute("output"); - return (ret == null) ? null : ret.getCustomAttributeValue(); + return (ret == null) ? null : ret.getValue(); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.utils/src/main/java/org/eclipse/om2m/sdt/home/utils/SDTUtil.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.utils/src/main/java/org/eclipse/om2m/sdt/home/utils/SDTUtil.java index b9a8149b..d8cde179 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.utils/src/main/java/org/eclipse/om2m/sdt/home/utils/SDTUtil.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home.utils/src/main/java/org/eclipse/om2m/sdt/home/utils/SDTUtil.java @@ -23,7 +23,7 @@ public class SDTUtil { public static Object getValue(CustomAttribute attr, String type) throws Exception { return (attr == null) ? null - : getValue(attr.getCustomAttributeValue(), type); + : getValue(attr.getValue(), type); } public static Object getValue(String value, String type) throws Exception { @@ -62,7 +62,7 @@ public class SDTUtil { public static void setValue(CustomAttribute attr, Object val, String type) throws Exception { if (val == null) { - attr.setCustomAttributeValue(null); + attr.setValue(null); return; } switch (type) { @@ -72,10 +72,10 @@ public class SDTUtil { case "xs:boolean": case "xs:byte": case "xs:uri": - attr.setCustomAttributeValue(val.toString()); return; - case "xs:datetime": attr.setCustomAttributeValue(dateTimeFormat.format((Date)val)); return; - case "xs:time": attr.setCustomAttributeValue(timeFormat.format((Date)val)); return; - case "xs:date": attr.setCustomAttributeValue(dateFormat.format((Date)val)); return; + attr.setValue(val.toString()); return; + case "xs:datetime": attr.setValue(dateTimeFormat.format((Date)val)); return; + case "xs:time": attr.setValue(timeFormat.format((Date)val)); return; + case "xs:date": attr.setValue(dateFormat.format((Date)val)); return; case "xs:enum": String ret = ""; boolean first = true; @@ -84,11 +84,11 @@ public class SDTUtil { else first = false; ret += s.toString(); } - attr.setCustomAttributeValue(ret); return; + attr.setValue(ret); return; case "xs:blob": return;// TODO serialize byte array default: if (type.startsWith("hd:")) - attr.setCustomAttributeValue(val.toString()); + attr.setValue(val.toString()); return; } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/META-INF/MANIFEST.MF b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/META-INF/MANIFEST.MF index 6ee3b081..56017c45 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/META-INF/MANIFEST.MF +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/META-INF/MANIFEST.MF @@ -6,10 +6,17 @@ Bundle-Version: 1.1.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-Activator: org.eclipse.om2m.sdt.home.utils.Activator Bundle-ClassPath: . -Export-Package: org.eclipse.om2m.sdt.home,org.eclipse.om2m.sdt.home.ac - tions,org.eclipse.om2m.sdt.home.devices,org.eclipse.om2m.sdt.home.mod - ules,org.eclipse.om2m.sdt.home.types,org.eclipse.om2m.sdt.home.utils -Import-Package: org.eclipse.om2m.sdt, +Export-Package: + org.eclipse.om2m.sdt.home, + org.eclipse.om2m.sdt.home.actions, + org.eclipse.om2m.sdt.home.devices, + org.eclipse.om2m.sdt.home.modules, + org.eclipse.om2m.sdt.home.types, + org.eclipse.om2m.sdt.home.utils +Import-Package: + org.eclipse.om2m.commons.resource, + org.eclipse.om2m.commons.resource.flexcontainerspec, + org.eclipse.om2m.sdt, org.eclipse.om2m.sdt.args, org.eclipse.om2m.sdt.datapoints, org.eclipse.om2m.sdt.exceptions, diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/actions/NextTrack.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/actions/NextTrack.java new file mode 100644 index 00000000..ff91b0f8 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/actions/NextTrack.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.actions; + +import org.eclipse.om2m.sdt.args.Command; +import org.eclipse.om2m.sdt.exceptions.AccessException; +import org.eclipse.om2m.sdt.exceptions.ActionException; +import org.eclipse.om2m.sdt.home.types.ActionType; + +public abstract class NextTrack extends Command { + + public NextTrack(String name) { + super(name, ActionType.nextTrack); + setDoc("Go forward to a next chapter, section or similar marker in the media."); + } + + public final void nextTrack() throws ActionException, AccessException { + invoke(); + } + + abstract protected void doNextTrack() throws ActionException; + + @Override + protected Object doInvoke() throws ActionException { + doNextTrack(); + return null; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/actions/PreviousTrack.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/actions/PreviousTrack.java new file mode 100644 index 00000000..7af4f559 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/actions/PreviousTrack.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.actions; + +import org.eclipse.om2m.sdt.args.Command; +import org.eclipse.om2m.sdt.exceptions.AccessException; +import org.eclipse.om2m.sdt.exceptions.ActionException; +import org.eclipse.om2m.sdt.home.types.ActionType; + +public abstract class PreviousTrack extends Command { + + public PreviousTrack(String name) { + super(name, ActionType.previousTrack); + setDoc("Go back to a previous chapter, section or similar marker in the media."); + } + + public final void previousTrack() throws AccessException, ActionException { + invoke(); + } + + abstract protected void doPreviousTrack() throws ActionException; + + @Override + protected Object doInvoke() throws ActionException { + doPreviousTrack(); + return null; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/AirQualityMonitor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/AirQualityMonitor.java new file mode 100644 index 00000000..cbcce303 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/AirQualityMonitor.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.devices; + +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.home.modules.AirQualitySensor; +import org.eclipse.om2m.sdt.home.types.DeviceType; + +public class AirQualityMonitor extends GenericDevice { + + private AirQualitySensor airQualitySensor; + + public AirQualityMonitor(final String id, final String serial, final Domain domain) { + super(id, serial, DeviceType.deviceAirQualityMonitor, domain); + } + + public void addModule(Module module) { + if (module instanceof AirQualitySensor) + addModule((AirQualitySensor)module); + else + super.addModule(module); + } + + public void addModule(AirQualitySensor airQualitySensor) { + this.airQualitySensor = airQualitySensor; + super.addModule(airQualitySensor); + } + + public AirQualitySensor getAirQualitySensor() { + return airQualitySensor; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Camera.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Camera.java index 0ed935c7..20e7885f 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Camera.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Camera.java @@ -9,16 +9,20 @@ package org.eclipse.om2m.sdt.home.devices; import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.home.modules.Credentials; import org.eclipse.om2m.sdt.home.modules.MotionSensor; import org.eclipse.om2m.sdt.home.modules.PersonSensor; -import org.eclipse.om2m.sdt.home.modules.Streaming; +import org.eclipse.om2m.sdt.home.modules.PlayerControl; +import org.eclipse.om2m.sdt.home.modules.SessionDescription; import org.eclipse.om2m.sdt.home.types.DeviceType; public class Camera extends GenericDevice { private MotionSensor motionSensor; + private SessionDescription sessionDescription; + private PlayerControl playerControl; private PersonSensor personSensor; - private Streaming streaming; + private Credentials credentials; public Camera(String id, String serial, Domain domain) { super(id, serial, DeviceType.deviceCamera, domain); @@ -29,14 +33,18 @@ public class Camera extends GenericDevice { setMotionSensor((MotionSensor)module); else if (module instanceof PersonSensor) setPersonSensor((PersonSensor)module); - else if (module instanceof Streaming) - setStreaming((Streaming)module); + else if (module instanceof SessionDescription) + setSessionDescription((SessionDescription)module); + else if (module instanceof PlayerControl) + setPlayerControl((PlayerControl)module); + else if (module instanceof Credentials) + setCredentials((Credentials)module); else super.addModule(module); } - public void setMotionSensor(MotionSensor pMotionSensor) { - this.motionSensor = pMotionSensor; + public void setMotionSensor(MotionSensor mod) { + this.motionSensor = mod; super.addModule(motionSensor); } @@ -44,8 +52,8 @@ public class Camera extends GenericDevice { return motionSensor; } - public void setPersonSensor(PersonSensor pPersonSensor) { - this.personSensor = pPersonSensor; + public void setPersonSensor(PersonSensor mod) { + this.personSensor = mod; super.addModule(personSensor); } @@ -53,13 +61,31 @@ public class Camera extends GenericDevice { return personSensor; } - public void setStreaming(Streaming pStreaming) { - this.streaming = pStreaming; - super.addModule(streaming); + public void setSessionDescription(SessionDescription mod) { + this.sessionDescription = mod; + super.addModule(sessionDescription); } - public Streaming getStreaming() { - return streaming; + public SessionDescription getSessionDescription() { + return sessionDescription; + } + + public void setPlayerControl(PlayerControl mod) { + this.playerControl = mod; + super.addModule(playerControl); + } + + public PlayerControl getPlayerControl() { + return playerControl; + } + + public void setCredentials(Credentials mod) { + this.credentials = mod; + super.addModule(credentials); + } + + public Credentials getCredentials() { + return credentials; } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/CoffeeMachine.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/CoffeeMachine.java index 5f46125d..758123ad 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/CoffeeMachine.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/CoffeeMachine.java @@ -19,13 +19,13 @@ import org.eclipse.om2m.sdt.home.modules.Foaming; import org.eclipse.om2m.sdt.home.modules.Grinder; import org.eclipse.om2m.sdt.home.modules.KeepWarm; import org.eclipse.om2m.sdt.home.modules.LiquidLevel; -import org.eclipse.om2m.sdt.home.modules.RunMode; +import org.eclipse.om2m.sdt.home.modules.RunState; import org.eclipse.om2m.sdt.home.types.DeviceType; public class CoffeeMachine extends GenericDevice { private FaultDetection faultDetection; - private RunMode runMode; + private RunState runState; private Clock clock; private Brewing brewing; private LiquidLevel waterStatus; @@ -44,8 +44,8 @@ public class CoffeeMachine extends GenericDevice { public void addModule(Module module) { if (module instanceof FaultDetection) addModule((FaultDetection)module); - else if (module instanceof RunMode) - addModule((RunMode)module); + else if (module instanceof RunState) + addModule((RunState)module); else if (module instanceof Clock) addModule((Clock)module); else if (module instanceof Brewing) @@ -93,9 +93,9 @@ public class CoffeeMachine extends GenericDevice { } - public void addModule(RunMode mod) { - this.runMode = mod; - super.addModule(runMode); + public void addModule(RunState mod) { + this.runState = mod; + super.addModule(runState); } public void addModule(Clock mod) { @@ -144,8 +144,8 @@ public class CoffeeMachine extends GenericDevice { return faultDetection; } - public RunMode getRunMode() { - return runMode; + public RunState getRunState() { + return runState; } public Clock getClock() { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/DeviceNumberDevice.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/DeviceNumberDevice.java deleted file mode 100644 index 0eef89a7..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/DeviceNumberDevice.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2017 Deutsche Telekom. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.devices; - -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.home.modules.NumberValue; -import org.eclipse.om2m.sdt.home.types.DeviceType; - -public class DeviceNumberDevice extends GenericActuator { - - private NumberValue numberValue; - - public DeviceNumberDevice(final String id, final String serial, final Domain domain) { - super(id, serial, DeviceType.deviceNumberDevice, domain); - } - - public void addModule(Module module) { - if (module instanceof org.eclipse.om2m.sdt.home.modules.NumberValue) - addModule((NumberValue)module); - else - super.addModule(module); - } - - public void addModule(NumberValue numberValue) { - this.numberValue = numberValue; - super.addModule(numberValue); - } - - public NumberValue getNumberValue() { - return numberValue; - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/GenericDevice.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/GenericDevice.java index 0559ddb0..4cf11e7e 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/GenericDevice.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/GenericDevice.java @@ -44,15 +44,11 @@ public class GenericDevice extends Device { private Property presentationURL; private Property cloud; - public GenericDevice(final String id, final String serial, final Domain domain) { - this(id, serial, DeviceType.undefinedVendorExt, domain); - } - public GenericDevice(final String id, final String serial, final DeviceType type, final Domain domain) { super(id, domain, type); this.type = type; - deviceType = new Property(PropertyType.deviceType, Integer.toString(type.getValue())); + deviceType = new Property(PropertyType.deviceType, type.getDefinition()); deviceType.setType(SimpleType.Integer); deviceType.setDoc("Device type"); super.addProperty(deviceType); @@ -106,7 +102,7 @@ public class GenericDevice extends Device { protected void setDeviceType(DeviceType type) { this.type = type; - this.deviceType.setValue(Integer.toString(type.getValue())); + this.deviceType.setValue(type.getDefinition()); } public DeviceType getDeviceType() { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/GenericSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/GenericSensor.java index 3320cf00..8a318835 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/GenericSensor.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/GenericSensor.java @@ -10,9 +10,7 @@ package org.eclipse.om2m.sdt.home.devices; import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.Module; import org.eclipse.om2m.sdt.home.modules.AbstractAlarmSensor; -import org.eclipse.om2m.sdt.home.modules.ContactSensor; import org.eclipse.om2m.sdt.home.modules.FaultDetection; -import org.eclipse.om2m.sdt.home.modules.MotionSensor; import org.eclipse.om2m.sdt.home.modules.SmokeSensor; import org.eclipse.om2m.sdt.home.modules.WaterSensor; import org.eclipse.om2m.sdt.home.types.DeviceType; @@ -23,10 +21,6 @@ public class GenericSensor extends GenericDevice { protected FaultDetection faultDetection; - public GenericSensor(final String id, final String serial, final Domain domain) { - super(id, serial, domain); - } - public GenericSensor(final String id, final String serial, final DeviceType type, final Domain domain) { super(id, serial, type, domain); @@ -46,12 +40,8 @@ public class GenericSensor extends GenericDevice { super.addModule(sensor); if (sensor instanceof SmokeSensor) setDeviceType(DeviceType.deviceSmokeDetector); - else if (sensor instanceof MotionSensor) - setDeviceType(DeviceType.deviceMotionDetector); else if (sensor instanceof WaterSensor) setDeviceType(DeviceType.deviceFloodDetector); - else if (sensor instanceof ContactSensor) - setDeviceType(DeviceType.deviceContactDetector); } public void addModule(FaultDetection faultDetection) { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/HomeCCTV.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/HomeCCTV.java new file mode 100644 index 00000000..b1dabf5b --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/HomeCCTV.java @@ -0,0 +1,187 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.devices; + +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.home.modules.AcousticSensor; +import org.eclipse.om2m.sdt.home.modules.AirQualitySensor; +import org.eclipse.om2m.sdt.home.modules.AlarmSpeaker; +import org.eclipse.om2m.sdt.home.modules.BinarySwitch; +import org.eclipse.om2m.sdt.home.modules.FaultDetection; +import org.eclipse.om2m.sdt.home.modules.MotionSensor; +import org.eclipse.om2m.sdt.home.modules.PlayerControl; +import org.eclipse.om2m.sdt.home.modules.RunState; +import org.eclipse.om2m.sdt.home.modules.SessionDescription; +import org.eclipse.om2m.sdt.home.modules.SmokeSensor; +import org.eclipse.om2m.sdt.home.types.DeviceType; + +public class HomeCCTV extends GenericDevice { + + private BinarySwitch binarySwitch; + private SessionDescription sessionDescription; + private PlayerControl playerControl; + private RunState runState; + private MotionSensor motionSensor; + private AirQualitySensor airQualitySensor; +// private OzoneMeter ozoneMeter; + private SmokeSensor smokeSensor; + private AcousticSensor acousticSensor; +// private ImpactSensor impactSensor; + private FaultDetection faultDetection; + private AlarmSpeaker alarmSpeaker; +; + + public HomeCCTV(String id, String serial, Domain domain) { + super(id, serial, DeviceType.deviceHomeCCTV, domain); + } + + public void addModule(Module module) { + if (module instanceof BinarySwitch) + setBinarySwitch((BinarySwitch)module); + else if (module instanceof SessionDescription) + setSessionDescription((SessionDescription)module); + else if (module instanceof PlayerControl) + setPlayerControl((PlayerControl)module); + else if (module instanceof RunState) + setRunState((RunState)module); + else if (module instanceof MotionSensor) + setMotionSensor((MotionSensor)module); + else if (module instanceof AirQualitySensor) + setAirQualitySensor((AirQualitySensor)module); + else if (module instanceof SmokeSensor) + setSmokeSensor((SmokeSensor)module); + else if (module instanceof AcousticSensor) + setAcousticSensor((AcousticSensor)module); + else if (module instanceof FaultDetection) + setFaultDetection((FaultDetection)module); + else if (module instanceof AlarmSpeaker) + setAlarmSpeaker((AlarmSpeaker)module); + else + super.addModule(module); + } + + public void setBinarySwitch(BinarySwitch pBinarySwitch) { + this.binarySwitch = pBinarySwitch; + super.addModule(binarySwitch); + } + + public void unsetBinarySwitch(BinarySwitch pBinarySwitch) { + if (binarySwitch != null) { + removeModule(binarySwitch.getName()); + this.binarySwitch = null; + } + } + + public BinarySwitch getBinarySwitch() { + return binarySwitch; + } + + public void setSessionDescription(SessionDescription pSessionDescription) { + this.sessionDescription = pSessionDescription; + super.addModule(sessionDescription); + } + + public void unsetSessionDescription(SessionDescription pSessionDescription) { + if (sessionDescription != null) { + removeModule(sessionDescription.getName()); + this.sessionDescription = null; + } + } + + public SessionDescription getSessionDescription() { + return sessionDescription; + } + + public void setPlayerControl(PlayerControl pPlayerControl) { + this.playerControl = pPlayerControl; + super.addModule(playerControl); + } + + public void unsetPlayerControl(PlayerControl pPlayerControl) { + if (playerControl != null) { + removeModule(playerControl.getName()); + this.playerControl = null; + } + } + + public PlayerControl getPlayerControl() { + return playerControl; + } + + public void setRunState(RunState pRunState) { + this.runState = pRunState; + super.addModule(runState); + } + + public void unsetRunState(RunState runState) { + if (runState != null) { + removeModule(runState.getName()); + this.runState = null; + } + } + + public RunState getRunState() { + return runState; + } + + public void setMotionSensor(MotionSensor pMotionSensor) { + this.motionSensor = pMotionSensor; + super.addModule(motionSensor); + } + + public MotionSensor getMotionSensor() { + return motionSensor; + } + + public void setAlarmSpeaker(AlarmSpeaker alarmSpeaker) { + this.alarmSpeaker = alarmSpeaker; + super.addModule(alarmSpeaker); + } + + public AlarmSpeaker getAlarmSpeaker() { + return alarmSpeaker; + } + + public void setFaultDetection(FaultDetection faultDetection) { + this.faultDetection = faultDetection; + super.addModule(faultDetection); + } + + public FaultDetection getFaultDetection() { + return faultDetection; + } + + public void setAcousticSensor(AcousticSensor acousticSensor) { + this.acousticSensor = acousticSensor; + super.addModule(acousticSensor); + } + + public AcousticSensor getAcousticSensor() { + return acousticSensor; + } + + public SmokeSensor setSmokeSensor() { + return smokeSensor; + } + + public void setSmokeSensor(SmokeSensor smokeSensor) { + this.smokeSensor = smokeSensor; + super.addModule(smokeSensor); + } + + public void setAirQualitySensor(AirQualitySensor airQualitySensor) { + this.airQualitySensor = airQualitySensor; + super.addModule(airQualitySensor); + } + + public AirQualitySensor getAirQualitySensor() { + return airQualitySensor; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Kettle.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Kettle.java index 78163238..b339f296 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Kettle.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Kettle.java @@ -10,10 +10,10 @@ package org.eclipse.om2m.sdt.home.devices; import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.Module; import org.eclipse.om2m.sdt.home.modules.BinarySwitch; -import org.eclipse.om2m.sdt.home.modules.Boiling; +import org.eclipse.om2m.sdt.home.modules.Boiler; import org.eclipse.om2m.sdt.home.modules.FaultDetection; import org.eclipse.om2m.sdt.home.modules.KeepWarm; -import org.eclipse.om2m.sdt.home.modules.RunMode; +import org.eclipse.om2m.sdt.home.modules.LiquidLevel; import org.eclipse.om2m.sdt.home.modules.RunState; import org.eclipse.om2m.sdt.home.modules.Temperature; import org.eclipse.om2m.sdt.home.types.DeviceType; @@ -21,40 +21,34 @@ import org.eclipse.om2m.sdt.home.types.DeviceType; public class Kettle extends GenericDevice { private FaultDetection faultDetection; - private RunMode runMode; - //private LiquidRemaining waterLevel; - private BinarySwitch boilingSwitch; + private RunState runState; + private LiquidLevel waterLevel; + private BinarySwitch binarySwitch; private Temperature temperature; - //private Boiling boiling; + private Boiler boiler; private KeepWarm keepWarm; - public Kettle(String id, String serial, DeviceType type, Domain domain) { - super(id, serial, DeviceType.deviceKettle, domain); - } - public Kettle(final String id, final String serial, final Domain domain){ super(id, serial, DeviceType.deviceKettle, domain); } public void addModule(Module module){ - if(module instanceof FaultDetection) + if (module instanceof FaultDetection) addModule((FaultDetection)module); - else if(module instanceof RunMode) - addModule((RunMode)module); - /*else if(module instanceof LiquidRemaining) - addModule((LiquidRemaining)module);*/ - else if(module instanceof BinarySwitch) + else if (module instanceof RunState) + addModule((RunState)module); + else if (module instanceof LiquidLevel) + addModule((LiquidLevel)module); + else if (module instanceof BinarySwitch) addModule((BinarySwitch)module); - else if(module instanceof KeepWarm) + else if (module instanceof KeepWarm) addModule((KeepWarm)module); - else if(module instanceof Temperature) + else if (module instanceof Temperature) addModule((Temperature)module); - else if(module instanceof Boiling) - addModule((Boiling)module); + else if (module instanceof Boiler) + addModule((Boiler)module); else super.addModule(module); - - } //******************ADD MODULES****************** @@ -64,32 +58,32 @@ public class Kettle extends GenericDevice { super.addModule(faultDetection); } - public void addModule(RunMode mod){ - this.runMode = mod; - super.addModule(runMode); + public void addModule(RunState mod) { + this.runState = mod; + super.addModule(runState); } - /*(public void addModule(Boiling mod){ - this.boiling = mod; - super.addModule(boiling); + public void addModule(Boiler mod) { + this.boiler = mod; + super.addModule(boiler); } - */ - /*public void addModule(LiquidRemaining mod){ + + public void addModule(LiquidLevel mod){ this.waterLevel = mod; super.addModule(waterLevel); - }*/ + } - public void addModule(BinarySwitch mod){ - this.boilingSwitch = mod; - super.addModule(boilingSwitch); + public void addModule(BinarySwitch mod) { + this.binarySwitch = mod; + super.addModule(binarySwitch); } - public void addModule(Temperature mod){ + public void addModule(Temperature mod) { this.temperature = mod; super.addModule(temperature); } - public void addModule(KeepWarm mod){ + public void addModule(KeepWarm mod) { this.keepWarm = mod; super.addModule(keepWarm); } @@ -100,36 +94,29 @@ public class Kettle extends GenericDevice { return faultDetection; } - public Temperature getTemperature(){ + public Temperature getTemperature() { return temperature; } - public KeepWarm getKeepWarm(){ + public KeepWarm getKeepWarm() { return keepWarm; } - public RunMode getRunMode() { - return runMode; + public RunState getRunState() { + return runState; } - /*public LiquidRemaining getWaterLevel() { + public LiquidLevel getWaterLevel() { return waterLevel; - }*/ - - public BinarySwitch getBoilingSwitch() { - return boilingSwitch; } - /* - public Boiling getBoiling() { - - return boiling; + public BinarySwitch getBinarySwitch() { + return binarySwitch; } - public void setBoiling(Boiling boiling) { - this.boiling = boiling; + public Boiler getBoiler() { + return boiler; } - */ } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Light.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Light.java index eb543b1d..9297379f 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Light.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Light.java @@ -14,7 +14,7 @@ import org.eclipse.om2m.sdt.home.modules.BinarySwitch; import org.eclipse.om2m.sdt.home.modules.Colour; import org.eclipse.om2m.sdt.home.modules.ColourSaturation; import org.eclipse.om2m.sdt.home.modules.FaultDetection; -import org.eclipse.om2m.sdt.home.modules.RunMode; +import org.eclipse.om2m.sdt.home.modules.RunState; import org.eclipse.om2m.sdt.home.types.DeviceType; public class Light extends GenericDevice { @@ -23,7 +23,7 @@ public class Light extends GenericDevice { private BinarySwitch binarySwitch; - private RunMode runMode; + private RunState runState; private Colour colour; @@ -38,8 +38,8 @@ public class Light extends GenericDevice { addModule((FaultDetection)module); else if (module instanceof BinarySwitch) addModule((BinarySwitch)module); - else if (module instanceof RunMode) - addModule((RunMode)module); + else if (module instanceof RunState) + addModule((RunState)module); else if (module instanceof Colour) addModule((Colour)module); else if (module instanceof ColourSaturation) @@ -68,9 +68,9 @@ public class Light extends GenericDevice { super.addModule(binarySwitch); } - public void addModule(RunMode mod) { - this.runMode = mod; - super.addModule(runMode); + public void addModule(RunState mod) { + this.runState = mod; + super.addModule(runState); } public FaultDetection getFaultDetection() { @@ -83,8 +83,8 @@ public class Light extends GenericDevice { return binarySwitch; } - public RunMode getRunMode() { - return runMode; + public RunState getRunState() { + return runState; } public Colour getColour() { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/MotionDetector.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/MotionDetector.java index d05a3645..859c4cd9 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/MotionDetector.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/MotionDetector.java @@ -9,10 +9,11 @@ package org.eclipse.om2m.sdt.home.devices; import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.home.modules.MotionSensor; +import org.eclipse.om2m.sdt.home.modules.SmokeSensor; import org.eclipse.om2m.sdt.home.types.DeviceType; public class MotionDetector extends GenericSensor { - + public MotionDetector(final String id, final String serial, final Domain domain) { super(id, serial, DeviceType.deviceMotionDetector, domain); setDeviceSubModelName("MOTION"); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SmartElectricMeter.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SmartElectricMeter.java index 4201a116..76a5298d 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SmartElectricMeter.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SmartElectricMeter.java @@ -15,7 +15,7 @@ import org.eclipse.om2m.sdt.home.modules.Clock; import org.eclipse.om2m.sdt.home.modules.EnergyConsumption; import org.eclipse.om2m.sdt.home.modules.EnergyGeneration; import org.eclipse.om2m.sdt.home.modules.FaultDetection; -import org.eclipse.om2m.sdt.home.modules.RunMode; +import org.eclipse.om2m.sdt.home.modules.RunState; import org.eclipse.om2m.sdt.home.types.DeviceType; import org.eclipse.om2m.sdt.home.types.PropertyType; import org.eclipse.om2m.sdt.types.SimpleType; @@ -25,7 +25,7 @@ public class SmartElectricMeter extends GenericDevice { private BinarySwitch binarySwitch; private EnergyConsumption energyConsumption; private FaultDetection faultDetection; - private RunMode runMode; + private RunState runState; private Clock clock; private EnergyGeneration generationMeter; @@ -48,8 +48,8 @@ public class SmartElectricMeter extends GenericDevice { addModule((EnergyConsumption)module); else if (module instanceof BinarySwitch) addModule((BinarySwitch)module); - else if (module instanceof RunMode) - addModule((RunMode)module); + else if (module instanceof RunState) + addModule((RunState)module); else if (module instanceof Clock) addModule((Clock)module); else if (module instanceof EnergyGeneration) @@ -73,9 +73,9 @@ public class SmartElectricMeter extends GenericDevice { super.addModule(faultDetection); } - public void addModule(RunMode runMode) { - this.runMode = runMode; - super.addModule(runMode); + public void addModule(RunState runState) { + this.runState = runState; + super.addModule(runState); } public void addModule(Clock clock) { @@ -100,8 +100,8 @@ public class SmartElectricMeter extends GenericDevice { return binarySwitch; } - public RunMode getRunMode() { - return runMode; + public RunState getRunState() { + return runState; } public Clock getClock() { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SmokeExtractor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SmokeExtractor.java deleted file mode 100644 index c12b57d1..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SmokeExtractor.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.devices; - -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.home.types.DeviceType; - -public class SmokeExtractor extends GenericActuator { - - public SmokeExtractor(final String id, final String serial, final Domain domain) { - super(id, serial, DeviceType.deviceSmokeExtractor, domain); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Switch.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Switch.java new file mode 100644 index 00000000..246ebb6b --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Switch.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.devices; + +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.home.modules.PushButton; +import org.eclipse.om2m.sdt.home.types.DeviceType; + +public class Switch extends GenericDevice { + + private PushButton button; + + public Switch(final String id, final String serial, final Domain domain) { + super(id, serial, DeviceType.deviceSwitch, domain); + } + + public void addModule(Module module) { + if (module instanceof PushButton) + addModule((PushButton)module); + else + super.addModule(module); + } + + public void addModule(PushButton button) { + this.button = button; + super.addModule(button); + } + + public PushButton getPushButton() { + return button; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SwitchButton.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SwitchButton.java deleted file mode 100644 index 4fffa553..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/SwitchButton.java +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.devices; - -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.home.modules.PushButton; -import org.eclipse.om2m.sdt.home.types.DeviceType; - -public class SwitchButton extends GenericDevice { - - private PushButton buttonSwitch; - - - public SwitchButton(final String id, final String serial, final Domain domain) { - super(id, serial, DeviceType.deviceSwitchButton, domain); - } - - public void addModule(Module module) { - if (module instanceof PushButton) - addModule((PushButton)module); - else - super.addModule(module); - } - - public void addModule(PushButton buttonSwitch) { - this.buttonSwitch = buttonSwitch; - super.addModule(buttonSwitch); - } - - public PushButton getButtonSwitch() { - return buttonSwitch; - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Thermostat.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Thermostat.java index e97ec733..a2d3830e 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Thermostat.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Thermostat.java @@ -9,14 +9,14 @@ package org.eclipse.om2m.sdt.home.devices; import org.eclipse.om2m.sdt.Domain; import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.home.modules.RunMode; +import org.eclipse.om2m.sdt.home.modules.RunState; import org.eclipse.om2m.sdt.home.modules.Temperature; import org.eclipse.om2m.sdt.home.modules.Timer; import org.eclipse.om2m.sdt.home.types.DeviceType; public class Thermostat extends GenericDevice { - private RunMode runMode; + private RunState runState; private Temperature temperature; private Timer timer; @@ -25,8 +25,8 @@ public class Thermostat extends GenericDevice { } public void addModule(Module module) { - if (module instanceof RunMode) - addModule((RunMode)module); + if (module instanceof RunState) + addModule((RunState)module); else if (module instanceof Temperature) addModule((Temperature)module); else if (module instanceof Timer) @@ -35,9 +35,9 @@ public class Thermostat extends GenericDevice { super.addModule(module); } - public void addModule(RunMode runMode) { - this.runMode = runMode; - super.addModule(runMode); + public void addModule(RunState runState) { + this.runState = runState; + super.addModule(runState); } public void addModule(Temperature temperature) { @@ -50,8 +50,8 @@ public class Thermostat extends GenericDevice { super.addModule(timer); } - public RunMode getRunMode() { - return runMode; + public RunState getRunState() { + return runState; } public Temperature getTemperature() { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Warning.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Warning.java new file mode 100644 index 00000000..f03ff3fc --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/Warning.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.devices; + +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.home.modules.AlarmSpeaker; +import org.eclipse.om2m.sdt.home.modules.FaultDetection; +import org.eclipse.om2m.sdt.home.types.DeviceType; + +public class Warning extends GenericDevice { + + private AlarmSpeaker alarmSpeaker; + private FaultDetection faultDetection; + + public Warning(final String id, final String serial, final Domain domain) { + super(id, serial, DeviceType.deviceWarning, domain); + } + + public void addModule(Module module) { + if (module instanceof AlarmSpeaker) + addModule((AlarmSpeaker)module); + else if (module instanceof FaultDetection) + addModule((FaultDetection)module); + else + super.addModule(module); + } + + public void addModule(AlarmSpeaker alarmSpeaker) { + this.alarmSpeaker = alarmSpeaker; + super.addModule(alarmSpeaker); + } + + public void addModule(FaultDetection faultDetection) { + this.faultDetection = faultDetection; + super.addModule(faultDetection); + } + + public AlarmSpeaker getAlarmSpeaker() { + return alarmSpeaker; + } + + public FaultDetection getFaultDetection() { + return faultDetection; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WarningDevice.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WarningDevice.java deleted file mode 100644 index e5de909c..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WarningDevice.java +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.devices; - -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.home.modules.AlarmSpeaker; -import org.eclipse.om2m.sdt.home.modules.FaultDetection; -import org.eclipse.om2m.sdt.home.types.DeviceType; - -public class WarningDevice extends GenericDevice { - - private AlarmSpeaker alarmSpeaker; - private FaultDetection faultDetection; - - public WarningDevice(final String id, final String serial, final Domain domain) { - super(id, serial, DeviceType.deviceWarningDevice, domain); - } - - public void addModule(Module module) { - if (module instanceof AlarmSpeaker) - addModule((AlarmSpeaker)module); - else if (module instanceof FaultDetection) - addModule((FaultDetection)module); - else - super.addModule(module); - } - - public void addModule(AlarmSpeaker alarmSpeaker) { - this.alarmSpeaker = alarmSpeaker; - super.addModule(alarmSpeaker); - } - - public void addModule(FaultDetection faultDetection) { - this.faultDetection = faultDetection; - super.addModule(faultDetection); - } - - public AlarmSpeaker getAlarmSpeaker() { - return alarmSpeaker; - } - - public FaultDetection getFaultDetection() { - return faultDetection; - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WaterHeater.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WaterHeater.java index 76130ff0..49ad4e5f 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WaterHeater.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WaterHeater.java @@ -14,7 +14,7 @@ import org.eclipse.om2m.sdt.home.modules.Boiler; import org.eclipse.om2m.sdt.home.modules.Clock; import org.eclipse.om2m.sdt.home.modules.FaultDetection; import org.eclipse.om2m.sdt.home.modules.HotWaterSupply; -import org.eclipse.om2m.sdt.home.modules.RunMode; +import org.eclipse.om2m.sdt.home.modules.RunState; import org.eclipse.om2m.sdt.home.types.DeviceType; public class WaterHeater extends GenericDevice { @@ -23,7 +23,7 @@ public class WaterHeater extends GenericDevice { private BinarySwitch binarySwitch; - private RunMode runMode; + private RunState runState; private Clock clock; @@ -41,8 +41,8 @@ public class WaterHeater extends GenericDevice { addModule((BinarySwitch)module); else if (module instanceof FaultDetection) addModule((FaultDetection)module); - else if (module instanceof RunMode) - addModule((RunMode)module); + else if (module instanceof RunState) + addModule((RunState)module); else if (module instanceof Clock) addModule((Clock)module); else if (module instanceof Boiler) @@ -63,9 +63,9 @@ public class WaterHeater extends GenericDevice { super.addModule(binarySwitch); } - public void addModule(RunMode runMode) { - this.runMode = runMode; - super.addModule(runMode); + public void addModule(RunState runState) { + this.runState = runState; + super.addModule(runState); } public void addModule(Clock clock) { @@ -91,8 +91,8 @@ public class WaterHeater extends GenericDevice { return binarySwitch; } - public RunMode getRunMode() { - return runMode; + public RunState getRunState() { + return runState; } public Clock getClock() { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WeatherStation.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WeatherStation.java index 68cc42a6..51c08918 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WeatherStation.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/devices/WeatherStation.java @@ -8,124 +8,89 @@ package org.eclipse.om2m.sdt.home.devices; import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.home.modules.AtmosphericPressureSensor; -import org.eclipse.om2m.sdt.home.modules.ExtendedCarbonDioxideSensor; -import org.eclipse.om2m.sdt.home.modules.Noise; -import org.eclipse.om2m.sdt.home.modules.RelativeHumidity; +import org.eclipse.om2m.sdt.home.modules.AcousticSensor; +import org.eclipse.om2m.sdt.home.modules.AirQualitySensor; +import org.eclipse.om2m.sdt.home.modules.Anemometer; +import org.eclipse.om2m.sdt.home.modules.Barometer; import org.eclipse.om2m.sdt.home.modules.Temperature; +import org.eclipse.om2m.sdt.home.modules.UvSensor; import org.eclipse.om2m.sdt.home.types.DeviceType; public class WeatherStation extends GenericDevice { - private Temperature temperature; - private RelativeHumidity relativeHumidity; - private AtmosphericPressureSensor atmosphericPressureSensor; - private Noise noise; - private ExtendedCarbonDioxideSensor extendedCarbonDioxideSensor; + private Temperature indoorTemp; + private Temperature outdoorTemp; + private Barometer barometer; + private AcousticSensor noise; + private AirQualitySensor airQuality; + private Anemometer anemometer; + private UvSensor uvSensor; public WeatherStation(String id, String serial, Domain domain) { super(id, serial, DeviceType.deviceWeatherStation, domain); } - - public void addModule(Module module) { - if (module instanceof Temperature) - setTemperature((Temperature)module); - else if (module instanceof RelativeHumidity) - setRelativeHumidity((RelativeHumidity)module); - else if (module instanceof AtmosphericPressureSensor) - setAtmosphericPressureSensor((AtmosphericPressureSensor)module); - else if (module instanceof Noise) - setNoise((Noise)module); - else if (module instanceof ExtendedCarbonDioxideSensor) - setExtendedCarbonDioxideSensor((ExtendedCarbonDioxideSensor)module); - else - super.addModule(module); - } - // temperature - optional - public void setTemperature(Temperature pTemperature) { - this.temperature = pTemperature; - super.addModule(temperature); + public void setIndoorTemperature(Temperature temp) { + this.indoorTemp = temp; + super.addModule(indoorTemp); } - public void unsetTemperature(Temperature pTemperature) { - if (temperature != null) { - removeModule(temperature.getName()); - this.temperature = null; - } + public Temperature getIndoorTemperature() { + return indoorTemp; } - public Temperature getTemperature() { - return temperature; + public void setOutdoorTemperature(Temperature temp) { + this.outdoorTemp = temp; + super.addModule(outdoorTemp); } - // relative humidity - optional - public void setRelativeHumidity(RelativeHumidity pRelativeHumidity) { - this.relativeHumidity = pRelativeHumidity; - super.addModule(relativeHumidity); + public Temperature getOutdoorTemperature() { + return outdoorTemp; } - public void unsetRelativeHumidity(RelativeHumidity pRelativeHumidity) { - if (relativeHumidity != null) { - removeModule(relativeHumidity.getName()); - this.relativeHumidity = null; - } + public void setAirQualitySensor(AirQualitySensor airQuality) { + this.airQuality = airQuality; + super.addModule(airQuality); } - public RelativeHumidity getRelativeHumidity() { - return relativeHumidity; + public AirQualitySensor getAirQualitySensor() { + return airQuality; } - // atmosphericPressureSensor - optional - public void setAtmosphericPressureSensor(AtmosphericPressureSensor pAtmosphericPressureSensor) { - this.atmosphericPressureSensor = pAtmosphericPressureSensor; - super.addModule(atmosphericPressureSensor); + public void setBarometer(Barometer pAtmosphericPressureSensor) { + this.barometer = pAtmosphericPressureSensor; + super.addModule(barometer); } - public void unsetAtmosphericPressureSensor(AtmosphericPressureSensor pAtmosphericPressureSensor) { - if (atmosphericPressureSensor != null) { - removeModule(atmosphericPressureSensor.getName()); - this.atmosphericPressureSensor = null; - } + public Barometer getBarometer() { + return barometer; } - public AtmosphericPressureSensor getAtmosphericPressureSensor() { - return atmosphericPressureSensor; - } - - // noise - optional - public void setNoise(Noise pNoise) { + public void setAcousticSensor(AcousticSensor pNoise) { this.noise = pNoise; super.addModule(noise); } - - public void unsetNoise(Noise noise) { - if (noise != null) { - removeModule(noise.getName()); - this.noise = null; - } - } - public Noise getNoise() { + public AcousticSensor getAcousticSensor() { return noise; } - - // extendedCarbonDioxide - optional - public void setExtendedCarbonDioxideSensor(ExtendedCarbonDioxideSensor pExtendedCarbonDioxideSensor) { - this.extendedCarbonDioxideSensor = pExtendedCarbonDioxideSensor; - super.addModule(extendedCarbonDioxideSensor); + + public void setUvSensor(UvSensor uvSensor) { + this.uvSensor = uvSensor; + super.addModule(uvSensor); } - public void unsetExtendCarbonDioxideSensor(ExtendedCarbonDioxideSensor pExtendedCarbonDioxideSensor) { - if (extendedCarbonDioxideSensor != null) { - removeModule(extendedCarbonDioxideSensor.getName()); - extendedCarbonDioxideSensor = null; - } + public UvSensor getUvSensor() { + return uvSensor; + } + + public void setAnemometer(Anemometer anemometer) { + this.anemometer = anemometer; + super.addModule(anemometer); } - public ExtendedCarbonDioxideSensor getExtendedCarbonDioxideSensor() { - return extendedCarbonDioxideSensor; + public Anemometer getAnemometer() { + return anemometer; } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AbstractAlarmSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AbstractAlarmSensor.java index 8ce043e2..2db185c1 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AbstractAlarmSensor.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AbstractAlarmSensor.java @@ -19,9 +19,9 @@ public class AbstractAlarmSensor extends Module { private BooleanDataPoint alarm; - public AbstractAlarmSensor(final String name, final Domain domain, BooleanDataPoint alarm) { - this(name, domain, alarm, ModuleType.abstractAlarmSensor); - } +// public AbstractAlarmSensor(final String name, final Domain domain, BooleanDataPoint alarm) { +// this(name, domain, alarm, ModuleType.abstractAlarmSensor); +// } public AbstractAlarmSensor(final String name, final Domain domain, BooleanDataPoint alarm, ModuleType type) { @@ -32,7 +32,7 @@ public class AbstractAlarmSensor extends Module { BooleanDataPoint alarm, ModuleType type, String doc) { super(name, domain, type); if ((alarm == null) || - ! alarm.getShortDefinitionType().equals(DatapointType.alarm.getShortName())) { + ! alarm.getShortName().equals(DatapointType.alarm.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong alarm datapoint: " + alarm); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AcousticSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AcousticSensor.java new file mode 100644 index 00000000..e2b32de3 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AcousticSensor.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.modules; + +import java.util.Map; + +import org.eclipse.om2m.sdt.DataPoint; +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.datapoints.FloatDataPoint; +import org.eclipse.om2m.sdt.datapoints.IntegerDataPoint; +import org.eclipse.om2m.sdt.exceptions.AccessException; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.ModuleType; + +public class AcousticSensor extends Module { + + private IntegerDataPoint acousticStatus; + private FloatDataPoint loudness; + + public AcousticSensor(final String name, final Domain domain, FloatDataPoint loudness) { + super(name, domain, ModuleType.acousticSensor); + + if ((loudness == null) || + ! loudness.getShortName().equals(DatapointType.loudness.getShortName())) { + domain.removeModule(getName()); + throw new IllegalArgumentException("Wrong loudness datapoint: " + loudness); + } + this.loudness = loudness; + this.loudness.setWritable(false); + this.loudness.setDoc("The unit of measure of the loudness is \"dB2\"."); + addDataPoint(this.loudness); + } + + public AcousticSensor(final String name, final Domain domain, Map dps) { + this(name, domain, (FloatDataPoint) dps.get(DatapointType.loudness.getShortName())); + IntegerDataPoint acousticStatus = (IntegerDataPoint) dps.get(DatapointType.acousticStatus.getShortName()); + if (acousticStatus != null) + setAcousticStatus(acousticStatus); + } + + public float getLoudness() throws DataPointException, AccessException { + return loudness.getValue(); + } + + public void setAcousticStatus(IntegerDataPoint dp) { + acousticStatus = dp; + acousticStatus.setOptional(true); + acousticStatus.setWritable(false); + acousticStatus.setDoc("The acousticStatus is expressed in percent, whereas a value of 0 means \"no sound\" and a value of 100 means \"most noisy\"."); + addDataPoint(acousticStatus); + } + + public int getAcousticStatus() throws DataPointException, AccessException { + if (acousticStatus == null) + throw new DataPointException("Not implemented"); + return acousticStatus.getValue(); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AirQualitySensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AirQualitySensor.java new file mode 100644 index 00000000..8606e885 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AirQualitySensor.java @@ -0,0 +1,229 @@ +/* +******************************************************************************** + * Copyright (c) 2014, 2018 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + ******************************************************************************** + +ModuleClass : AirQualitySensor + +ThThis ModuleClass provides capabilities for a monitoring sensor that measures the air quality. + +Created: 2018-06-21 15:18:21 +*/ + +package org.eclipse.om2m.sdt.home.modules; + +import java.util.Map; + +import org.eclipse.om2m.sdt.DataPoint; +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; +import org.eclipse.om2m.sdt.datapoints.IntegerDataPoint; +import org.eclipse.om2m.sdt.exceptions.AccessException; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.ModuleType; + +public class AirQualitySensor extends Module { + + private BooleanDataPoint monitoringEnabled; + private IntegerDataPoint sensorPM1; + private IntegerDataPoint sensorPM2; + private IntegerDataPoint sensorPM10; + private IntegerDataPoint sensorOdor; + private IntegerDataPoint sensorHumidity; + private IntegerDataPoint co2; + private IntegerDataPoint co; + private IntegerDataPoint ch2o; + private IntegerDataPoint voc; + + public AirQualitySensor (final String name, final Domain domain) { + super(name, domain, ModuleType.airQualitySensor); + } + + public AirQualitySensor(final String name, final Domain domain, Map dps) { + this(name, domain); + BooleanDataPoint bdp = (BooleanDataPoint) dps.get(DatapointType.monitoringEnabled.getShortName()); + if (bdp != null) + setMonitoringEnabled(bdp); + IntegerDataPoint dp = (IntegerDataPoint) dps.get(DatapointType.sensorPM1.getShortName()); + if (dp != null) + setSensorPM1(dp); + dp = (IntegerDataPoint) dps.get(DatapointType.sensorPM2.getShortName()); + if (dp != null) + setSensorPM2(dp); + dp = (IntegerDataPoint) dps.get(DatapointType.sensorPM10.getShortName()); + if (dp != null) + setSensorPM10(dp); + dp = (IntegerDataPoint) dps.get(DatapointType.sensorOdor.getShortName()); + if (dp != null) + setSensorOdor(dp); + dp = (IntegerDataPoint) dps.get(DatapointType.sensorHumidity.getShortName()); + if (dp != null) + setSensorHumidity(dp); + dp = (IntegerDataPoint) dps.get(DatapointType.co.getShortName()); + if (dp != null) + setCo(dp); + dp = (IntegerDataPoint) dps.get(DatapointType.co2.getShortName()); + if (dp != null) + setCo2(dp); + dp = (IntegerDataPoint) dps.get(DatapointType.ch2o.getShortName()); + if (dp != null) + setCh2o(dp); + dp = (IntegerDataPoint) dps.get(DatapointType.voc.getShortName()); + if (dp != null) + setVoc(dp); + } + + public void setMonitoringEnabled(BooleanDataPoint sv) { + monitoringEnabled = sv; + monitoringEnabled.setWritable(true); + monitoringEnabled.setOptional(true); + monitoringEnabled.setDoc("The current status of monitoring. \"True\" indicates enabled, and \"False\" indicates not enabled."); + addDataPoint(monitoringEnabled); + } + + public boolean getMonitoringEnabled() throws DataPointException, AccessException { + if (monitoringEnabled == null) + throw new DataPointException("Not implemented"); + return monitoringEnabled.getValue(); + } + + public void setMonitoringEnabled(boolean b) throws DataPointException, AccessException { + if (monitoringEnabled == null) + throw new DataPointException("Not implemented"); + monitoringEnabled.setValue(b); + } + + public void setSensorPM1(IntegerDataPoint sv) { + sensorPM1 = sv; + sensorPM1.setWritable(false); + sensorPM1.setOptional(true); + sensorPM1.setDoc("The concentration of particle matter under 1㎛.. The minimum value is 0, and the maximum value is 1000."); + addDataPoint(sensorPM1); + } + + public int getSensorPM1() throws DataPointException, AccessException { + if (sensorPM1 == null) + throw new DataPointException("Not implemented"); + return sensorPM1.getValue(); + } + + public void setSensorPM2(IntegerDataPoint sv) { + sensorPM2 = sv; + sensorPM2.setWritable(false); + sensorPM2.setOptional(true); + sensorPM2.setDoc("The concentration of particle matter under 2.5㎛. The minimum value is 0, and the maximum value is 1000."); + addDataPoint(sensorPM2); + } + + public int getSensorPM2() throws DataPointException, AccessException { + if (sensorPM2 == null) + throw new DataPointException("Not implemented"); + return sensorPM2.getValue(); + } + + public void setSensorPM10(IntegerDataPoint sv) { + sensorPM10 = sv; + sensorPM10.setWritable(false); + sensorPM10.setOptional(true); + sensorPM10.setDoc("The concentration of particle matter under 10㎛. The minimum value is 0, and the maximum value is 1000."); + addDataPoint(sensorPM10); + } + + public int getSensorPM10() throws DataPointException, AccessException { + if (sensorPM10 == null) + throw new DataPointException("Not implemented"); + return sensorPM10.getValue(); + } + + public void setSensorOdor(IntegerDataPoint sv) { + sensorOdor = sv; + sensorOdor.setWritable(false); + sensorOdor.setOptional(true); + sensorOdor.setDoc("The concentration of odor that reflects air pollution. The minimum value is 0, and the maximum valu is 1000."); + addDataPoint(sensorOdor); + } + + public int getSensorOdor() throws DataPointException, AccessException { + if (sensorOdor == null) + throw new DataPointException("Not implemented"); + return sensorOdor.getValue(); + } + + public void setSensorHumidity(IntegerDataPoint sv) { + sensorHumidity = sv; + sensorHumidity.setWritable(false); + sensorHumidity.setOptional(true); + sensorHumidity.setDoc("The measured humidity. The minimum value is 0, and the maximum value is 100."); + addDataPoint(sensorHumidity); + } + + public int getSensorHumidity() throws DataPointException, AccessException { + if (sensorHumidity == null) + throw new DataPointException("Not implemented"); + return sensorHumidity.getValue(); + } + + public void setCo2(IntegerDataPoint sv) { + co2 = sv; + co2.setWritable(false); + co2.setOptional(true); + co2.setDoc("This value indicates the CO2 level in ppm (parts per million)."); + addDataPoint(co2); + } + + public int getCo2() throws DataPointException, AccessException { + if (co2 == null) + throw new DataPointException("Not implemented"); + return co2.getValue(); + } + + public void setCo(IntegerDataPoint sv) { + co = sv; + co.setWritable(false); + co.setOptional(true); + co.setDoc("This value indicates the CO level in ppm."); + addDataPoint(co); + } + + public int getCo() throws DataPointException, AccessException { + if (co == null) + throw new DataPointException("Not implemented"); + return co.getValue(); + } + + public void setCh2o(IntegerDataPoint sv) { + ch2o = sv; + ch2o.setWritable(false); + ch2o.setOptional(true); + ch2o.setDoc("This value indicates the CH2O level in ppm."); + addDataPoint(ch2o); + } + + public int getCh2o() throws DataPointException, AccessException { + if (ch2o == null) + throw new DataPointException("Not implemented"); + return ch2o.getValue(); + } + + + public void setVoc(IntegerDataPoint sv) { + voc = sv; + voc.setWritable(false); + voc.setOptional(true); + voc.setDoc("This value indicates the VOC (Volatile Organic Compounds) value in ppm."); + addDataPoint(voc); + } + + public int getVoc() throws DataPointException, AccessException { + if (voc == null) + throw new DataPointException("Not implemented"); + return voc.getValue(); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AlarmSpeaker.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AlarmSpeaker.java index 0089eb93..cfaf77f6 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AlarmSpeaker.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AlarmSpeaker.java @@ -30,7 +30,7 @@ public class AlarmSpeaker extends Module { super(name, domain, ModuleType.alarmSpeaker); if ((alarmStatus == null) || - ! alarmStatus.getShortDefinitionType().equals(DatapointType.alarmStatus.getShortName())) { + ! alarmStatus.getShortName().equals(DatapointType.alarmStatus.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong alarmStatus datapoint: " + alarmStatus); } @@ -68,13 +68,13 @@ public class AlarmSpeaker extends Module { addDataPoint(tone); } - public int getTone() throws DataPointException, AccessException { + public Tone.Values getTone() throws DataPointException, AccessException { if (tone == null) throw new UnsupportedOperationException("Not implemented"); return tone.getValue(); } - public void setTone(int v) throws DataPointException, AccessException { + public void setTone(Tone.Values v) throws DataPointException, AccessException { if (tone == null) throw new UnsupportedOperationException("Not implemented"); tone.setValue(v); @@ -87,13 +87,13 @@ public class AlarmSpeaker extends Module { addDataPoint(light); } - public int getLight() throws DataPointException, AccessException { + public AlertColourCode.Values getLight() throws DataPointException, AccessException { if (light == null) throw new UnsupportedOperationException("Not implemented"); return light.getValue(); } - public void setLight(int v) throws DataPointException, AccessException { + public void setLight(AlertColourCode.Values v) throws DataPointException, AccessException { if (light == null) throw new UnsupportedOperationException("Not implemented"); light.setValue(v); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Anemometer.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Anemometer.java new file mode 100644 index 00000000..af26463e --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Anemometer.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.modules; + +import java.util.Map; + +import org.eclipse.om2m.sdt.DataPoint; +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.datapoints.FloatDataPoint; +import org.eclipse.om2m.sdt.exceptions.AccessException; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.ModuleType; + +public class Anemometer extends Module { + + private FloatDataPoint speed; + + public Anemometer(final String name, final Domain domain, FloatDataPoint speed) { + super(name, domain, ModuleType.anemometer); + + if ((speed == null) || + ! speed.getShortName().equals(DatapointType.speed.getShortName())) { + domain.removeModule(getName()); + throw new IllegalArgumentException("Wrong speed datapoint: " + speed); + } + this.speed = speed; + this.speed.setWritable(false); + this.speed.setDoc("The unit of measure of the speed is \"dB2\"."); + addDataPoint(this.speed); + } + + public Anemometer(final String name, final Domain domain, Map dps) { + this(name, domain, (FloatDataPoint) dps.get(DatapointType.loudness.getShortName())); + } + + public float getSpeed() throws DataPointException, AccessException { + return speed.getValue(); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AtmosphericPressureSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AtmosphericPressureSensor.java deleted file mode 100644 index b80ea26f..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AtmosphericPressureSensor.java +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.datapoints.FloatDataPoint; -import org.eclipse.om2m.sdt.exceptions.AccessException; -import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class AtmosphericPressureSensor extends Module { - - private FloatDataPoint atmosphericPressure; - - public AtmosphericPressureSensor(final String name, final Domain domain, - FloatDataPoint atmosphericPressure) { - super(name, domain, ModuleType.atmosphericPressureSensor); - - if ((atmosphericPressure == null) || - ! atmosphericPressure.getShortDefinitionType().equals(DatapointType.atmosphericPressure.getShortName())) { - domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong atmosphericPressure datapoint: " + atmosphericPressure); - } - this.atmosphericPressure = atmosphericPressure; - this.atmosphericPressure.setWritable(false); - this.atmosphericPressure.getDataType().setUnitOfMeasure("Mbar"); - this.atmosphericPressure.setDoc("Current Atmospheric Pressure In Mbar"); - addDataPoint(this.atmosphericPressure); - } - - public AtmosphericPressureSensor(final String name, final Domain domain, - Map dps) { - this(name, domain, (FloatDataPoint) dps.get(DatapointType.atmosphericPressure.getShortName())); - } - - public float getAtmosphericPressure() throws DataPointException, AccessException { - return atmosphericPressure.getValue(); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AudioVolume.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AudioVolume.java index 4facd7d6..d6329f2b 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AudioVolume.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/AudioVolume.java @@ -40,7 +40,7 @@ public class AudioVolume extends Module { super(name, domain, ModuleType.audioVolume); if ((muteEnabled == null) || - ! muteEnabled.getShortDefinitionType().equals(DatapointType.muteEnabled.getShortName())) { + ! muteEnabled.getShortName().equals(DatapointType.muteEnabled.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong muteEnabled datapoint: " + muteEnabled); } @@ -49,7 +49,7 @@ public class AudioVolume extends Module { addDataPoint(this.muteEnabled); if ((volumePercentage == null) || - ! volumePercentage.getShortDefinitionType().equals(DatapointType.volumePercentage.getShortName())) { + ! volumePercentage.getShortName().equals(DatapointType.volumePercentage.getShortName())) { throw new IllegalArgumentException("Wrong volumePercentage datapoint: " + volumePercentage); } this.volumePercentage = volumePercentage; diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Barometer.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Barometer.java new file mode 100644 index 00000000..f3250399 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Barometer.java @@ -0,0 +1,118 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.modules; + +import java.util.Map; + +import org.eclipse.om2m.sdt.DataPoint; +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.datapoints.FloatDataPoint; +import org.eclipse.om2m.sdt.datapoints.IntegerDataPoint; +import org.eclipse.om2m.sdt.datapoints.StringDataPoint; +import org.eclipse.om2m.sdt.exceptions.AccessException; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.ModuleType; + +public class Barometer extends Module { + + private FloatDataPoint atmosphericPressure; + private StringDataPoint unit; + private IntegerDataPoint minPressureThreshhold; + private IntegerDataPoint maxPressureThreshhold; + + public Barometer(final String name, final Domain domain, + FloatDataPoint atmosphericPressure) { + super(name, domain, ModuleType.barometer); + + if ((atmosphericPressure == null) || + ! atmosphericPressure.getShortName().equals(DatapointType.atmosphericPressure.getShortName())) { + domain.removeModule(getName()); + throw new IllegalArgumentException("Wrong atmosphericPressure datapoint: " + atmosphericPressure); + } + this.atmosphericPressure = atmosphericPressure; + this.atmosphericPressure.setWritable(false); + this.atmosphericPressure.getDataType().setUnitOfMeasure("Mbar"); + this.atmosphericPressure.setDoc("Current Atmospheric Pressure In Mbar"); + addDataPoint(this.atmosphericPressure); + } + + public Barometer(final String name, final Domain domain, + Map dps) { + this(name, domain, (FloatDataPoint) dps.get(DatapointType.atmosphericPressure.getShortName())); + IntegerDataPoint idp = (IntegerDataPoint) dps.get(DatapointType.minPressureThreshhold.getShortName()); + if (idp != null) + setMinPressureThreshhold(idp); + idp = (IntegerDataPoint) dps.get(DatapointType.maxPressureThreshhold.getShortName()); + if (idp != null) + setMaxPressureThreshhold(idp); + StringDataPoint sdp = (StringDataPoint) dps.get(DatapointType.unit.getShortName()); + if (sdp != null) + setUnit(sdp); + } + + public float getAtmosphericPressure() throws DataPointException, AccessException { + return atmosphericPressure.getValue(); + } + + private void setMinPressureThreshhold(IntegerDataPoint dp) { + this.minPressureThreshhold = dp; + this.minPressureThreshhold.setOptional(true); + this.minPressureThreshhold.setWritable(true); + this.minPressureThreshhold.setDoc("The min threshhold to trigger the alarm."); + addDataPoint(minPressureThreshhold); + } + + public int getMinPressureThreshhold() throws DataPointException, AccessException { + if (minPressureThreshhold == null) + throw new DataPointException("Not implemented"); + return minPressureThreshhold.getValue(); + } + + public void setMinPressureThreshhold(int v) throws DataPointException, AccessException { + if (minPressureThreshhold == null) + throw new DataPointException("Not implemented"); + minPressureThreshhold.setValue(v); + } + + private void setMaxPressureThreshhold(IntegerDataPoint dp) { + this.maxPressureThreshhold = dp; + this.maxPressureThreshhold.setOptional(true); + this.maxPressureThreshhold.setWritable(true); + this.maxPressureThreshhold.setDoc("The max threshhold to trigger the alarm."); + addDataPoint(maxPressureThreshhold); + } + + public int getMaxPressureThreshhold() throws DataPointException, AccessException { + if (maxPressureThreshhold == null) + throw new DataPointException("Not implemented"); + return maxPressureThreshhold.getValue(); + } + + public void setMaxPressureThreshhold(int v) throws DataPointException, AccessException { + if (maxPressureThreshhold == null) + throw new DataPointException("Not implemented"); + maxPressureThreshhold.setValue(v); + } + + private void setUnit(StringDataPoint dp) { + this.unit = dp; + this.unit.setOptional(true); + this.unit.setWritable(false); + this.unit.setDoc("The unit used for atmospheric pressure. The default unit is hectopascal (hPa)."); + addDataPoint(unit); + } + + public String getUnit() throws DataPointException, AccessException { + if (unit == null) + throw new DataPointException("Not implemented"); + return unit.getValue(); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Battery.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Battery.java index 71d9ec60..a07bae8a 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Battery.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Battery.java @@ -43,7 +43,7 @@ public class Battery extends Module { super(name, domain, ModuleType.battery); if ((level == null) || - ! level.getShortDefinitionType().equals(DatapointType.level.getShortName())) { + ! level.getShortName().equals(DatapointType.level.getShortName())) { throw new IllegalArgumentException("Wrong level datapoint: " + level); } this.level = level; diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/BinarySwitch.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/BinarySwitch.java index 51e920f2..c859a43c 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/BinarySwitch.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/BinarySwitch.java @@ -39,7 +39,7 @@ public class BinarySwitch extends Module { super(name, domain, type); if ((powerState == null) || - ! powerState.getShortDefinitionType().equals(DatapointType.powerState.getShortName())) { + ! powerState.getShortName().equals(DatapointType.powerState.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong powerState datapoint: " + powerState); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Boiler.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Boiler.java index 4d3bea9f..e0293ba4 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Boiler.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Boiler.java @@ -26,7 +26,7 @@ public class Boiler extends Module { super(name, domain, ModuleType.boiler); if ((status == null) || - ! status.getShortDefinitionType().equals(DatapointType.status.getShortName())) { + ! status.getShortName().equals(DatapointType.status.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong status datapoint: " + status); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Boiling.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Boiling.java deleted file mode 100644 index bc65e699..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Boiling.java +++ /dev/null @@ -1,63 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.datapoints.IntegerDataPoint; -import org.eclipse.om2m.sdt.exceptions.AccessException; -import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class Boiling extends Module { - - private BooleanDataPoint keepWarm; - private IntegerDataPoint status; - - public Boiling(String name, Domain domain, - BooleanDataPoint keepWarm, IntegerDataPoint status) { - super(name, domain, ModuleType.boiling); - - if ((status == null) || - ! status.getShortDefinitionType().equals(DatapointType.status.getShortName())) { - domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong status datapoint: " + status); - } - this.status = status; - this.status.setDoc("The current status of the machine which prepares the drinks. Status equals 1 means the boiling is ongoing, 0 means the boiling is not ongoing."); - status.setReadable(true); - addDataPoint(this.status); - -// if ((keepWarm == null) || -// ! keepWarm.getShortDefinitionType().equals(DatapointType.keepWarm.getShortName())) { -// throw new IllegalArgumentException("Wrong status datapoint: " + keepWarm); -// } - this.keepWarm = keepWarm; - this.keepWarm.setDoc("The current status of the keeping a drink warm after brewing enabling. “True” indicates enabled, and “False” indicates not enabled"); - addDataPoint(this.keepWarm); - } - - public Boolean getKeepWarm() throws DataPointException, AccessException{ - return keepWarm.getValue(); - } - - public int getStatus() throws DataPointException, AccessException{ - return status.getValue(); - } - - public void setKeepWarm(Boolean v) throws DataPointException, AccessException{ - keepWarm.setValue(v); - } - - public void setStatus(int v) throws DataPointException, AccessException{ - status.setValue(v); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Brewing.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Brewing.java index da36647d..691339ee 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Brewing.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Brewing.java @@ -21,7 +21,7 @@ public class Brewing extends Module{ super(name, domain, ModuleType.brewing); if ((cupsNumber == null) || - ! cupsNumber.getShortDefinitionType().equals(DatapointType.cupsNumber.getShortName())) { + ! cupsNumber.getShortName().equals(DatapointType.cupsNumber.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong cupsNumber datapoint: " + cupsNumber); } @@ -30,7 +30,7 @@ public class Brewing extends Module{ addDataPoint(this.cupsNumber); if ((strength == null) || - ! strength.getShortDefinitionType().equals(DatapointType.strength.getShortName())) { + ! strength.getShortName().equals(DatapointType.strength.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong strength datapoint: " + strength); } @@ -52,11 +52,11 @@ public class Brewing extends Module{ cupsNumber.setValue(v); } - public int getStrength() throws DataPointException, AccessException { + public TasteStrength.Values getStrength() throws DataPointException, AccessException { return strength.getValue(); } - public void setStrength(int v) throws DataPointException, AccessException { + public void setStrength(TasteStrength.Values v) throws DataPointException, AccessException { strength.setValue(v); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Brightness.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Brightness.java index 23b86fce..d14ee3b0 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Brightness.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Brightness.java @@ -26,7 +26,7 @@ public class Brightness extends Module { super(name, domain, ModuleType.brightness); if ((brightness == null) || - ! brightness.getShortDefinitionType().equals(DatapointType.brightness.getShortName())) { + ! brightness.getShortName().equals(DatapointType.brightness.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong brightness datapoint: " + brightness); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/CarbonDioxideSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/CarbonDioxideSensor.java deleted file mode 100644 index f609712e..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/CarbonDioxideSensor.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class CarbonDioxideSensor extends AbstractAlarmSensor { - - public CarbonDioxideSensor(String name, Domain domain, - BooleanDataPoint alarm) { - super(name, domain, alarm, ModuleType.carbonDioxideSensor); - } - - public CarbonDioxideSensor(String name, Domain domain, ModuleType moduleType, - BooleanDataPoint alarm) { - super(name, domain, alarm, moduleType); - } - - public CarbonDioxideSensor(final String name, final Domain domain, Map dps) { - this(name, domain, (BooleanDataPoint) dps.get(DatapointType.alarm.getShortName())); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/CarbonMonoxideSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/CarbonMonoxideSensor.java deleted file mode 100644 index 334d575a..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/CarbonMonoxideSensor.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class CarbonMonoxideSensor extends AbstractAlarmSensor { - - public CarbonMonoxideSensor(String name, Domain domain, - BooleanDataPoint alarm) { - super(name, domain, alarm, ModuleType.carbonMonoxideSensor); - } - - public CarbonMonoxideSensor(final String name, final Domain domain, Map dps) { - this(name, domain, (BooleanDataPoint) dps.get(DatapointType.alarm.getShortName())); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Clock.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Clock.java index 2596520f..89a594d8 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Clock.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Clock.java @@ -30,7 +30,7 @@ public class Clock extends Module { super(name, domain, ModuleType.clock); if ((currentDate == null) || - ! currentDate.getShortDefinitionType().equals(DatapointType.currentDate.getShortName())) { + ! currentDate.getShortName().equals(DatapointType.currentDate.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong currentDate datapoint: " + currentDate); } @@ -39,7 +39,7 @@ public class Clock extends Module { addDataPoint(currentDate); if ((currentTime == null) || - ! currentTime.getShortDefinitionType().equals(DatapointType.currentTime.getShortName())) { + ! currentTime.getShortName().equals(DatapointType.currentTime.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong currentTime datapoint: " + currentTime); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Colour.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Colour.java index bc8cae39..a9781b1e 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Colour.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Colour.java @@ -30,7 +30,7 @@ public class Colour extends Module { setExtends(domain.getName(), "Colour"); if ((red == null) || - ! red.getShortDefinitionType().equals(DatapointType.red.getShortName())) { + ! red.getShortName().equals(DatapointType.red.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong red datapoint: " + red); } @@ -39,7 +39,7 @@ public class Colour extends Module { addDataPoint(this.red); if ((green == null) || - ! green.getShortDefinitionType().equals(DatapointType.green.getShortName())) { + ! green.getShortName().equals(DatapointType.green.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong green datapoint: " + green); } @@ -48,7 +48,7 @@ public class Colour extends Module { addDataPoint(this.green); if ((blue == null) || - ! blue.getShortDefinitionType().equals(DatapointType.blue.getShortName())) { + ! blue.getShortName().equals(DatapointType.blue.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong blue datapoint: " + blue); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ColourSaturation.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ColourSaturation.java index a4152549..dffa5ac4 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ColourSaturation.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ColourSaturation.java @@ -27,16 +27,16 @@ public class ColourSaturation extends Module { setExtends(domain.getName(), "ColourSaturation"); if ((colourSat == null) || - ! colourSat.getShortDefinitionType().equals(DatapointType.colourSat.getShortName())) { + ! colourSat.getShortName().equals(DatapointType.colourSaturation.getShortName())) { domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong colourSat datapoint: " + colourSat); + throw new IllegalArgumentException("Wrong colourSaturation datapoint: " + colourSat); } this.colourSat = colourSat; addDataPoint(this.colourSat); } public ColourSaturation(final String name, final Domain domain, Map dps) { - this(name, domain, (IntegerDataPoint) dps.get(DatapointType.colourSat.getShortName())); + this(name, domain, (IntegerDataPoint) dps.get(DatapointType.colourSaturation.getShortName())); } public int getColourSat() throws DataPointException, AccessException { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ContactSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ContactSensor.java index 0fd0dcba..481bdb4a 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ContactSensor.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ContactSensor.java @@ -16,9 +16,10 @@ import org.eclipse.om2m.sdt.home.types.DatapointType; import org.eclipse.om2m.sdt.home.types.ModuleType; public class ContactSensor extends AbstractAlarmSensor { - - public ContactSensor(String name, Domain domain, BooleanDataPoint alarm) { - super(name, domain, alarm, ModuleType.contactSensor); + + public ContactSensor(final String name, final Domain domain, BooleanDataPoint alarm) { + super(name, domain, alarm, ModuleType.contactSensor, + "The detection of the contact occurrence."); } public ContactSensor(final String name, final Domain domain, Map dps) { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Credentials.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Credentials.java new file mode 100644 index 00000000..9f03130c --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Credentials.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.modules; + +import java.util.Map; + +import org.eclipse.om2m.sdt.DataPoint; +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.datapoints.StringDataPoint; +import org.eclipse.om2m.sdt.exceptions.AccessException; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.ModuleType; + +public class Credentials extends Module { + + private StringDataPoint loginName; + private StringDataPoint password; + private StringDataPoint token; + + + public Credentials(final String name, final Domain domain) { + super(name, domain, ModuleType.credentials); + } + + public Credentials(final String name, final Domain domain, Map dps) { + this(name, domain); + StringDataPoint dp = (StringDataPoint) dps.get(DatapointType.loginName.getShortName()); + if (dp != null) + setLoginName(dp); + dp = (StringDataPoint) dps.get(DatapointType.password.getShortName()); + if (dp != null) + setPassword(dp); + dp = (StringDataPoint) dps.get(DatapointType.token.getShortName()); + if (dp != null) + setToken(dp); + } + + public void setLoginName(StringDataPoint dp) { + this.loginName = dp; + this.loginName.setOptional(true); + this.loginName.setReadable(false); + this.loginName.setWritable(true); + this.loginName.setDoc("The user’s login name."); + addDataPoint(loginName); + } + + public void setLoginName(String s) throws DataPointException, AccessException { + if (loginName == null) + throw new DataPointException("Not implemented"); + loginName.setValue(s); + } + + public void setPassword(StringDataPoint dp) { + this.password = dp; + this.password.setOptional(true); + this.password.setReadable(false); + this.password.setWritable(true); + this.password.setDoc("The user’s password."); + addDataPoint(password); + } + + public void setPassword(String s) throws DataPointException, AccessException { + if (password == null) + throw new DataPointException("Not implemented"); + password.setValue(s); + } + + public void setToken(StringDataPoint dp) { + this.token = dp; + this.token.setOptional(true); + this.token.setReadable(false); + this.token.setWritable(true); + this.token.setDoc("An authentication token, for example an OAuth token."); + addDataPoint(token); + } + + public void setToken(String s) throws DataPointException, AccessException { + if (token == null) + throw new DataPointException("Not implemented"); + token.setValue(s); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/DoorStatus.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/DoorStatus.java index b36cf4c2..8255cd46 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/DoorStatus.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/DoorStatus.java @@ -33,7 +33,7 @@ public class DoorStatus extends Module { super(name, domain, ModuleType.doorStatus); if ((state == null) || - ! state.getShortDefinitionType().equals(DatapointType.doorState.getShortName())) { + ! state.getShortName().equals(DatapointType.doorState.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong doorState datapoint: " + state); } @@ -53,7 +53,7 @@ public class DoorStatus extends Module { setOpenAlarm(openAlarm); } - public int getDoorState() throws DataPointException, AccessException { + public DoorState.Values getDoorState() throws DataPointException, AccessException { return doorState.getValue(); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/EnergyConsumption.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/EnergyConsumption.java index a2019fdf..96454b2d 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/EnergyConsumption.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/EnergyConsumption.java @@ -38,7 +38,7 @@ public class EnergyConsumption extends Module { super(name, domain, ModuleType.energyConsumption); if ((power == null) || - ! power.getShortDefinitionType().equals(DatapointType.power.getShortName())) { + ! power.getShortName().equals(DatapointType.power.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong power datapoint: " + power); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/EnergyOverloadCircuitBreaker.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/EnergyOverloadCircuitBreaker.java deleted file mode 100644 index d0526b8b..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/EnergyOverloadCircuitBreaker.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class EnergyOverloadCircuitBreaker extends AbstractAlarmSensor { - - public EnergyOverloadCircuitBreaker(String name, Domain domain, - BooleanDataPoint alarm) { - super(name, domain, alarm, ModuleType.energyOverloadCircuitBreaker); - } - - public EnergyOverloadCircuitBreaker(final String name, final Domain domain, Map dps) { - this(name, domain, (BooleanDataPoint) dps.get(DatapointType.alarm.getShortName())); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ExtendedCarbonDioxideSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ExtendedCarbonDioxideSensor.java deleted file mode 100644 index 51134902..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/ExtendedCarbonDioxideSensor.java +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.datapoints.IntegerDataPoint; -import org.eclipse.om2m.sdt.exceptions.AccessException; -import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class ExtendedCarbonDioxideSensor extends CarbonDioxideSensor { - - private IntegerDataPoint carbonDioxideValue; - - public ExtendedCarbonDioxideSensor(String name, Domain domain, BooleanDataPoint alarm, - IntegerDataPoint carbonDioxideValue) { - super(name, domain, ModuleType.extendedCarbonDioxideSensor, alarm); - - if ((carbonDioxideValue == null) || - ! carbonDioxideValue.getShortDefinitionType().equals(DatapointType.carbonDioxideValue.getShortName())) { - domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong carbonDioxideValue datapoint: " + carbonDioxideValue); - } - this.carbonDioxideValue = carbonDioxideValue; - this.carbonDioxideValue.setWritable(false); - addDataPoint(carbonDioxideValue); - } - - public ExtendedCarbonDioxideSensor(final String name, final Domain domain, - Map dps) { - this(name, domain, (BooleanDataPoint) dps.get(DatapointType.alarm.getShortName()), - (IntegerDataPoint) dps.get(DatapointType.carbonDioxideValue.getShortName())); - } - - public int getCarbonDioxideValue() throws DataPointException, AccessException { - return carbonDioxideValue.getValue(); - } - - public IntegerDataPoint getCarbonDioxide() { - return carbonDioxideValue; - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/FaultDetection.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/FaultDetection.java index bb329f96..820f0336 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/FaultDetection.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/FaultDetection.java @@ -30,7 +30,7 @@ public class FaultDetection extends Module { super(name, domain, ModuleType.faultDetection); if ((status == null) || - ! status.getShortDefinitionType().equals(DatapointType.status.getShortName())) { + ! status.getShortName().equals(DatapointType.status.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong status datapoint: " + status); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Foaming.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Foaming.java index af99c522..dc10d6a6 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Foaming.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Foaming.java @@ -26,7 +26,7 @@ public class Foaming extends Module{ super(name, domain, ModuleType.foaming); if ((foamingStrength == null) || - ! foamingStrength.getShortDefinitionType().equals(DatapointType.foamingStrength.getShortName())) { + ! foamingStrength.getShortName().equals(DatapointType.foamingStrength.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong foamingStrength datapoint: " + foamingStrength); } @@ -39,11 +39,11 @@ public class Foaming extends Module{ this(name, domain, (FoamStrength) dps.get(DatapointType.foamingStrength.getShortName())); } - public int getFoamingStrength() throws DataPointException, AccessException{ + public FoamStrength.Values getFoamingStrength() throws DataPointException, AccessException{ return foamingStrength.getValue(); } - public void setFoamingStrength(int v) throws DataPointException, AccessException{ + public void setFoamingStrength(FoamStrength.Values v) throws DataPointException, AccessException{ this.foamingStrength.setValue(v); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/GenericSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/GenericSensor.java index 283c4237..e9a19bad 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/GenericSensor.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/GenericSensor.java @@ -8,22 +8,16 @@ package org.eclipse.om2m.sdt.home.modules; import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Module; import org.eclipse.om2m.sdt.Identifiers; +import org.eclipse.om2m.sdt.Module; import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.types.ModuleType; public class GenericSensor extends Module { private BooleanDataPoint value; - public GenericSensor(final String name, final Domain domain, - BooleanDataPoint value) { - this(name, domain, value, ModuleType.genericSensor); - } - public GenericSensor(final String name, final Domain domain, BooleanDataPoint value, Identifiers identifiers) { super(name, domain, identifiers); diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/GlassBreakSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/GlassBreakSensor.java deleted file mode 100644 index 22484c7a..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/GlassBreakSensor.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class GlassBreakSensor extends AbstractAlarmSensor { - - public GlassBreakSensor(String name, Domain domain, - BooleanDataPoint alarm) { - super(name, domain, alarm, ModuleType.glassBreakSensor); - } - - public GlassBreakSensor(final String name, final Domain domain, Map dps) { - this(name, domain, (BooleanDataPoint) dps.get(DatapointType.alarm.getShortName())); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Grinder.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Grinder.java index 001d8cd6..d9e2aa44 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Grinder.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Grinder.java @@ -31,7 +31,7 @@ public class Grinder extends Module { setExtends(domain.getName(), "Grinder"); if ((useGrinder == null) || - ! useGrinder.getShortDefinitionType().equals(DatapointType.useGrinder.getShortName())) { + ! useGrinder.getShortName().equals(DatapointType.useGrinder.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong useGrinder datapoint: " + useGrinder); } @@ -40,7 +40,7 @@ public class Grinder extends Module { addDataPoint(this.useGrinder); if ((coarseness == null) || - ! coarseness.getShortDefinitionType().equals(DatapointType.coarseness.getShortName())) { + ! coarseness.getShortName().equals(DatapointType.coarseness.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong coarseness datapoint: " + coarseness); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/HotWaterSupply.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/HotWaterSupply.java index 4c5ebd43..e1f3d2ef 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/HotWaterSupply.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/HotWaterSupply.java @@ -27,7 +27,7 @@ public class HotWaterSupply extends Module { super(name, domain, ModuleType.hotWaterSupply); if ((status == null) || - ! status.getShortDefinitionType().equals(DatapointType.status.getShortName())) { + ! status.getShortName().equals(DatapointType.status.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong status datapoint: " + status); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/LiquidLevel.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/LiquidLevel.java index 69a9fdfa..e8f1cae9 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/LiquidLevel.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/LiquidLevel.java @@ -15,6 +15,7 @@ import org.eclipse.om2m.sdt.Module; import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.LiquidLevel.Values; import org.eclipse.om2m.sdt.home.types.ModuleType; public class LiquidLevel extends Module { @@ -26,7 +27,7 @@ public class LiquidLevel extends Module { super(name, domain, ModuleType.liquidLevel); if ((liquidLevel == null) || - ! liquidLevel.getShortDefinitionType().equals(DatapointType.liquidLevel.getShortName())) { + ! liquidLevel.getShortName().equals(DatapointType.liquidLevel.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong liquidLevel datapoint: " + liquidLevel); } @@ -39,11 +40,11 @@ public class LiquidLevel extends Module { this(name, domain, (org.eclipse.om2m.sdt.home.types.LiquidLevel) dps.get(DatapointType.liquidLevel.getShortName())); } - public int getLiquidLevel() throws DataPointException, AccessException { + public Values getLiquidLevel() throws DataPointException, AccessException { return liquidLevel.getValue(); } - public void setLiquidLevel(int v) throws DataPointException, AccessException { + public void setLiquidLevel(Values v) throws DataPointException, AccessException { liquidLevel.setValue(v); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Lock.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Lock.java index eb132f52..b2991f8f 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Lock.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Lock.java @@ -33,7 +33,7 @@ public class Lock extends Module { super(name, domain, ModuleType.lock); if ((doorLock == null) || - ! doorLock.getShortDefinitionType().equals(DatapointType.doorLock.getShortName())) { + ! doorLock.getShortName().equals(DatapointType.lock.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong doorLock datapoint: " + doorLock); } @@ -48,7 +48,7 @@ public class Lock extends Module { } public Lock(final String name, final Domain domain, Map dps) { - this(name, domain, (BooleanDataPoint) dps.get(DatapointType.doorLock.getShortName())); + this(name, domain, (BooleanDataPoint) dps.get(DatapointType.lock.getShortName())); } public void setDoorLock(boolean c) throws DataPointException, AccessException { diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Noise.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Noise.java deleted file mode 100644 index 469f9c7d..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Noise.java +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.datapoints.IntegerDataPoint; -import org.eclipse.om2m.sdt.exceptions.AccessException; -import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class Noise extends Module { - - private IntegerDataPoint noise; - - public Noise(String name, Domain domain, IntegerDataPoint noise) { - super(name, domain, ModuleType.noise); - if ((noise == null) || - ! noise.getShortDefinitionType().equals(DatapointType.noise.getShortName())) { - domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong noise datapoint: " + noise); - } - this.noise = noise; - this.noise.setWritable(false); - addDataPoint(this.noise); - } - - public Noise(final String name, final Domain domain, Map dps) { - this(name, domain, (IntegerDataPoint) dps.get(DatapointType.noise.getShortName())); - } - - public int getNoise() throws DataPointException, AccessException { - return noise.getValue(); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/NumberValue.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/NumberValue.java index b618405b..7914ab83 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/NumberValue.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/NumberValue.java @@ -49,7 +49,7 @@ public class NumberValue extends Module { super(name, domain, type); // numberValue is a mandatory data point - if ((numberValue == null) || ! numberValue.getShortDefinitionType().equals(DatapointType.numberValue.getShortName())) { + if ((numberValue == null) || ! numberValue.getShortName().equals(DatapointType.numberValue.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong numberValue datapoint: " + numberValue); } @@ -61,7 +61,7 @@ public class NumberValue extends Module { if (minValue != null) { - if (! minValue.getShortDefinitionType().equals(DatapointType.minValue.getShortName())) { + if (! minValue.getShortName().equals(DatapointType.minValue.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong minValue datapoint: " + minValue); } @@ -73,7 +73,7 @@ public class NumberValue extends Module { } if (maxValue != null) { - if (! maxValue.getShortDefinitionType().equals(DatapointType.maxValue.getShortName())) { + if (! maxValue.getShortName().equals(DatapointType.maxValue.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong maxValue datapoint: " + maxValue); } @@ -85,7 +85,7 @@ public class NumberValue extends Module { } if (defaultValue != null) { - if (! defaultValue.getShortDefinitionType().equals(DatapointType.defaultValue.getShortName())) { + if (! defaultValue.getShortName().equals(DatapointType.defaultValue.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong defaultValue datapoint: " + defaultValue); } @@ -97,7 +97,7 @@ public class NumberValue extends Module { } if (step != null) { - if (! step.getShortDefinitionType().equals(DatapointType.step.getShortName())) { + if (! step.getShortName().equals(DatapointType.step.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong step datapoint: " + step); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PersonSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PersonSensor.java index 0ad2e3b7..3d5f71cb 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PersonSensor.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PersonSensor.java @@ -27,7 +27,7 @@ public class PersonSensor extends Module { final ArrayDataPoint detectedPersons) { super(name, domain, ModuleType.personSensor); if ((detectedPersons == null) || - ! detectedPersons.getShortDefinitionType().equals(DatapointType.detectedPersons.getShortName())) { + ! detectedPersons.getShortName().equals(DatapointType.detectedPersons.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong detectedPersons datapoint: " + detectedPersons); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PlayerControl.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PlayerControl.java new file mode 100644 index 00000000..7e00cff0 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PlayerControl.java @@ -0,0 +1,155 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.modules; + +import java.util.List; +import java.util.Map; + +import org.eclipse.om2m.sdt.Action; +import org.eclipse.om2m.sdt.DataPoint; +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.args.Command; +import org.eclipse.om2m.sdt.datapoints.ArrayDataPoint; +import org.eclipse.om2m.sdt.datapoints.FloatDataPoint; +import org.eclipse.om2m.sdt.datapoints.StringDataPoint; +import org.eclipse.om2m.sdt.exceptions.AccessException; +import org.eclipse.om2m.sdt.exceptions.ActionException; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.actions.NextTrack; +import org.eclipse.om2m.sdt.home.actions.PreviousTrack; +import org.eclipse.om2m.sdt.home.types.ActionType; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.ModuleType; +import org.eclipse.om2m.sdt.home.types.PlayerMode; + +public class PlayerControl extends Module { + + private PlayerMode currentPlayerMode; + private StringDataPoint currentPlayerModeName; + private ArrayDataPoint supportedPlayerModes; + private FloatDataPoint speedFactor; + + private Action nextTrack; + private Action previousTrack; + + public PlayerControl(final String name, final Domain domain, + PlayerMode currentPlayerMode, ArrayDataPoint supportedPlayerModes) { + super(name, domain, ModuleType.playerControl); + + if ((currentPlayerMode == null) || + ! currentPlayerMode.getShortName().equals(DatapointType.currentPlayerMode.getShortName())) { + domain.removeModule(getName()); + throw new IllegalArgumentException("Wrong currentPlayerMode datapoint: " + currentPlayerMode); + } + this.currentPlayerMode = currentPlayerMode; + this.currentPlayerMode.setWritable(true); + this.currentPlayerMode.setDoc("The current mode of the player."); + addDataPoint(this.currentPlayerMode); + + if ((supportedPlayerModes == null) || + ! supportedPlayerModes.getShortName().equals(DatapointType.supportedPlayerModes.getShortName())) { + throw new IllegalArgumentException("Wrong supportedPlayerModes datapoint: " + supportedPlayerModes); + } + this.supportedPlayerModes = supportedPlayerModes; + this.supportedPlayerModes.setWritable(false); + this.supportedPlayerModes.setDoc("List of supported modes for a player."); + addDataPoint(this.supportedPlayerModes); + } + + public PlayerControl(final String name, final Domain domain, Map dps) { + this(name, domain, + (PlayerMode) dps.get(DatapointType.currentPlayerMode.getShortName()), + (ArrayDataPoint) dps.get(DatapointType.supportedPlayerModes.getShortName())); + StringDataPoint currentPlayerModeName = (StringDataPoint) dps.get(DatapointType.currentPlayerModeName.getShortName()); + if (currentPlayerModeName != null) + setCurrentPlayerModeName(currentPlayerModeName); + FloatDataPoint speedFactor = (FloatDataPoint) dps.get(DatapointType.speedFactor.getShortName()); + if (speedFactor != null) + setSpeedFactor(speedFactor); + } + + public void addAction(Action action) { + if (action.getShortDefinitionName().equals(ActionType.nextTrack.getShortName())) { + this.nextTrack = action; + super.addAction(nextTrack); + } else if (action.getShortDefinitionName().equals(ActionType.previousTrack.getShortName())) { + this.previousTrack = action; + super.addAction(previousTrack); + } else { + throw new IllegalArgumentException("Wrong action: " + action); + } + } + + public void setNextTrack(NextTrack nextTrack) { + addAction(nextTrack); + } + + public void setPreviousTrack(PreviousTrack previousTrack) { + addAction(previousTrack); + } + + public void nextTrack() throws ActionException, AccessException { + if (nextTrack == null) + throw new ActionException("Not implemented"); + ((Command)nextTrack).invoke(null); + } + + public void previousTrack() throws ActionException, AccessException { + if (previousTrack == null) + throw new ActionException("Not implemented"); + ((Command)previousTrack).invoke(null); + } + + public PlayerMode.Values getPlayerMode() throws DataPointException, AccessException { + return currentPlayerMode.getValue(); + } + + public void setPlayerMode(PlayerMode.Values v) throws DataPointException, AccessException { + currentPlayerMode.setValue(v); + } + + public List getSupportedPlayerModes() throws DataPointException, AccessException { + return supportedPlayerModes.getValue(); + } + + public void setCurrentPlayerModeName(StringDataPoint sv) { + currentPlayerModeName = sv; + currentPlayerModeName.setWritable(false); + currentPlayerModeName.setOptional(true); + currentPlayerModeName.setDoc("Name of current player mode in string. This can be used when “currentPlayerMode” is vendor-specific."); + addDataPoint(currentPlayerModeName); + } + + public String getCurrentPlayerModeName() throws DataPointException, AccessException { + if (currentPlayerModeName == null) + throw new DataPointException("Not implemented"); + return currentPlayerModeName.getValue(); + } + + public void setSpeedFactor(FloatDataPoint mv) { + speedFactor = mv; + speedFactor.setWritable(true); + speedFactor.setOptional(true); + speedFactor.setDoc("The optional factor of speeding up or slowing down playback, rewind or fast forward."); + addDataPoint(speedFactor); + } + + public float getSpeedFactor() throws DataPointException, AccessException { + if (speedFactor == null) + throw new DataPointException("Not implemented"); + return speedFactor.getValue(); + } + + public void setSpeedFactor(float v) throws DataPointException, AccessException { + if (speedFactor == null) + throw new DataPointException("Not implemented"); + speedFactor.setValue(v); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PresenceSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PresenceSensor.java deleted file mode 100644 index 9c8fc88a..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PresenceSensor.java +++ /dev/null @@ -1,28 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class PresenceSensor extends AbstractAlarmSensor { - - public PresenceSensor(String name, Domain domain, BooleanDataPoint alarm) { - super(name, domain, alarm, ModuleType.presenceSensor); - } - - public PresenceSensor(final String name, final Domain domain, Map dps) { - this(name, domain, (BooleanDataPoint) dps.get(DatapointType.alarm.getShortName())); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PushButton.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PushButton.java index 31ecfaf8..5eef4ecd 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PushButton.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/PushButton.java @@ -27,7 +27,7 @@ public class PushButton extends Module { super(name, domain, ModuleType.pushButton); if ((pushed == null) || - ! pushed.getShortDefinitionType().equals(DatapointType.pushed.getShortName())) { + ! pushed.getShortName().equals(DatapointType.pushed.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong pushed datapoint: " + pushed); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RelativeHumidity.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RelativeHumidity.java index 89486425..05197a31 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RelativeHumidity.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RelativeHumidity.java @@ -29,7 +29,7 @@ public class RelativeHumidity extends Module { super(name, domain, ModuleType.relativeHumidity); if ((relativeHumidity == null) || - ! relativeHumidity.getShortDefinitionType().equals(DatapointType.relativeHumidity.getShortName())) { + ! relativeHumidity.getShortName().equals(DatapointType.relativeHumidity.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong relativeHumidity datapoint: " + relativeHumidity); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RunMode.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RunMode.java deleted file mode 100644 index cde09bb4..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RunMode.java +++ /dev/null @@ -1,88 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.datapoints.ArrayDataPoint; -import org.eclipse.om2m.sdt.exceptions.AccessException; -import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -@SuppressWarnings("unchecked") -public class RunMode extends Module { - - private ArrayDataPoint operationMode; - private ArrayDataPoint supportedModes; - - public RunMode(final String name, final Domain domain, - ArrayDataPoint operationMode, - ArrayDataPoint supportedModes) { - super(name, domain, ModuleType.runMode); - - if ((operationMode == null) || - ! operationMode.getShortDefinitionType().equals(DatapointType.operationMode.getShortName())) { - domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong operationMode datapoint: " + operationMode); - } - this.operationMode = operationMode; - this.operationMode.setDoc("Comma separated list of the currently active mode(s)"); - addDataPoint(this.operationMode); - - if ((supportedModes == null) || - ! supportedModes.getShortDefinitionType().equals(DatapointType.supportedModes.getShortName())) { - domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong supportedModes datapoint: " + supportedModes); - } - this.supportedModes = supportedModes; - this.supportedModes.setDoc("Comma separated list of possible modes the device supports"); - addDataPoint(this.supportedModes); - } - - public RunMode(final String name, final Domain domain, Map dps) { - this(name, domain, - (ArrayDataPoint) dps.get(DatapointType.operationMode.getShortName()), - (ArrayDataPoint) dps.get(DatapointType.supportedModes.getShortName())); - } - - public List getOperationMode() throws DataPointException, AccessException { - return operationMode.getValue(); - } - - public void setOperationMode(List v) throws DataPointException, AccessException { - List modes = getSupportedModes(); - for (String s : v) { - if (! modes.contains(s)) { - throw new DataPointException("value " + s + " is not permitted"); - } - } - this.operationMode.setValue(v); - } - - public void setOperationMode(String v) throws DataPointException, AccessException { - if (! getSupportedModes().contains(v)) { - throw new DataPointException("value " + v + " is not permitted"); - } - this.operationMode.setValue(Arrays.asList(v)); - } - - public List getSupportedModes() throws DataPointException, AccessException { - return supportedModes.getValue(); - } - - public void setSupportedModes(List v) throws DataPointException, AccessException { - this.supportedModes.setValue(v); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RunState.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RunState.java index c20af953..4c5ac6be 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RunState.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/RunState.java @@ -18,35 +18,36 @@ import org.eclipse.om2m.sdt.datapoints.FloatDataPoint; import org.eclipse.om2m.sdt.exceptions.AccessException; import org.eclipse.om2m.sdt.exceptions.DataPointException; import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.JobStates; +import org.eclipse.om2m.sdt.home.types.JobState; import org.eclipse.om2m.sdt.home.types.MachineState; import org.eclipse.om2m.sdt.home.types.ModuleType; public class RunState extends Module { - private JobStates currentJobState; - private ArrayDataPoint jobStates; + private JobState currentJobState; + private ArrayDataPoint jobStates; private MachineState currentMachineState; - private ArrayDataPoint machineStates; + private ArrayDataPoint machineStates; private FloatDataPoint progressPercentage; public RunState(final String name, final Domain domain, - JobStates jobState, ArrayDataPoint jobStates, - MachineState machineState, ArrayDataPoint machineStates) { - super(name, domain, ModuleType.runMode); + JobState jobState, ArrayDataPoint jobStates, + MachineState machineState, ArrayDataPoint machineStates) { + super(name, domain, ModuleType.runState); if ((jobState == null) || - ! jobState.getShortDefinitionType().equals(DatapointType.currentJobState.getShortName())) { + ! jobState.getShortName().equals(DatapointType.currentJobState.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong currentJobState datapoint: " + jobState); } this.currentJobState = jobState; + this.currentJobState.setWritable(false); this.currentJobState.setDoc("Currently active job state. The value of this property shall be idle unless the value of currentMachineState property is active"); addDataPoint(this.currentJobState); if ((jobStates == null) || - ! jobStates.getShortDefinitionType().equals(DatapointType.jobStates.getShortName())) { + ! jobStates.getShortName().equals(DatapointType.jobStates.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong jobStates datapoint: " + jobStates); } @@ -56,7 +57,7 @@ public class RunState extends Module { addDataPoint(this.jobStates); if ((machineState == null) || - ! machineState.getShortDefinitionType().equals(DatapointType.currentMachineState.getShortName())) { + ! machineState.getShortName().equals(DatapointType.currentMachineState.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong currentMachineState datapoint: " + machineState); } @@ -65,7 +66,7 @@ public class RunState extends Module { addDataPoint(this.currentMachineState); if ((machineStates == null) || - ! machineStates.getShortDefinitionType().equals(DatapointType.machineStates.getShortName())) { + ! machineStates.getShortName().equals(DatapointType.machineStates.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong machineStates datapoint: " + machineStates); } @@ -78,42 +79,40 @@ public class RunState extends Module { @SuppressWarnings("unchecked") public RunState(final String name, final Domain domain, Map dps) { this(name, domain, - (JobStates) dps.get(DatapointType.currentJobState.getShortName()), - (ArrayDataPoint) dps.get(DatapointType.jobStates.getShortName()), + (JobState) dps.get(DatapointType.currentJobState.getShortName()), + (ArrayDataPoint) dps.get(DatapointType.jobStates.getShortName()), (MachineState) dps.get(DatapointType.currentMachineState.getShortName()), - (ArrayDataPoint) dps.get(DatapointType.machineStates.getShortName())); + (ArrayDataPoint) dps.get(DatapointType.machineStates.getShortName())); FloatDataPoint progressPercentage = (FloatDataPoint) dps.get(DatapointType.progressPercentage.getShortName()); if (progressPercentage != null) setProgressPercentage(progressPercentage); } - public int getJobState() throws DataPointException, AccessException { + public JobState.Values getJobState() throws DataPointException, AccessException { return currentJobState.getValue(); } - public void setJobState(int v) throws DataPointException, AccessException { - if (! getJobStates().contains(v)) { - throw new DataPointException("value " + v + " is not permitted"); - } + public void setJobState(JobState.Values v) throws DataPointException, AccessException { currentJobState.setValue(v); } - public List getJobStates() throws DataPointException, AccessException { + public List getJobStates() throws DataPointException, AccessException { return jobStates.getValue(); } - public int getMachineState() throws DataPointException, AccessException { + public void setJobStates(List states) throws DataPointException, AccessException { + jobStates.setValue(states); + } + + public MachineState.Values getMachineState() throws DataPointException, AccessException { return currentMachineState.getValue(); } - public void setMachineState(int v) throws DataPointException, AccessException { - if (! getMachineStates().contains(v)) { - throw new DataPointException("value " + v + " is not permitted"); - } + public void setMachineState(MachineState.Values v) throws DataPointException, AccessException { currentMachineState.setValue(v); } - public List getMachineStates() throws DataPointException, AccessException { + public List getMachineStates() throws DataPointException, AccessException { return machineStates.getValue(); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/SessionDescription.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/SessionDescription.java new file mode 100644 index 00000000..0babd1d7 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/SessionDescription.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.modules; + +import java.net.URI; +import java.util.Map; + +import org.eclipse.om2m.sdt.DataPoint; +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.datapoints.StringDataPoint; +import org.eclipse.om2m.sdt.datapoints.UriDataPoint; +import org.eclipse.om2m.sdt.exceptions.AccessException; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.ModuleType; + +public class SessionDescription extends Module { + + private UriDataPoint url; + private StringDataPoint sdp; + + public SessionDescription(final String name, final Domain domain) { + super(name, domain, ModuleType.sessionDescription); + } + + public SessionDescription(final String name, final Domain domain, Map dps) { + this(name, domain); + UriDataPoint url = (UriDataPoint) dps.get(DatapointType.url.getShortName()); + if (url != null) + setUrl(url); + StringDataPoint sdp = (StringDataPoint) dps.get(DatapointType.sdp.getShortName()); + if (sdp != null) + setSdp(sdp); + } + + public void setUrl(UriDataPoint dp) { + this.url = dp; + url.setOptional(true); + url.setWritable(false); + url.setDoc("A URL at which the specified media can be accessed."); + addDataPoint(url); + } + + public URI getUrl() throws DataPointException, AccessException { + if (url == null) + throw new DataPointException("Not implemented"); + return url.getValue(); + } + + public void setSdp(StringDataPoint dp) { + sdp = dp; + sdp.setOptional(true); + sdp.setWritable(false); + sdp.setDoc("Media description using SDP. One or more comma separated multiple SDP lines (SDP media or attribute line) can be included using SDP description syntax as defined in the SDP specification in RFC4566."); + addDataPoint(sdp); + } + + public String getSdp() throws DataPointException, AccessException { + if (sdp == null) + throw new DataPointException("Not implemented"); + return sdp.getValue(); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/SmokeSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/SmokeSensor.java index 16cfef6c..8b0b9e11 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/SmokeSensor.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/SmokeSensor.java @@ -21,16 +21,24 @@ import org.eclipse.om2m.sdt.home.types.ModuleType; public class SmokeSensor extends AbstractAlarmSensor { private IntegerDataPoint detectedTime; - + private IntegerDataPoint smokeThreshhold; + private IntegerDataPoint currentValue; + public SmokeSensor(final String name, final Domain domain, BooleanDataPoint alarm) { super(name, domain, alarm, ModuleType.smokeSensor, "The detection of smoke."); } public SmokeSensor(final String name, final Domain domain, Map dps) { this(name, domain, (BooleanDataPoint) dps.get(DatapointType.alarm.getShortName())); - IntegerDataPoint detectedTime = (IntegerDataPoint) dps.get(DatapointType.detectedTime.getShortName()); - if (detectedTime != null) - setDetectedTime(detectedTime); + IntegerDataPoint dp = (IntegerDataPoint) dps.get(DatapointType.detectedTime.getShortName()); + if (dp != null) + setDetectedTime(dp); + dp = (IntegerDataPoint) dps.get(DatapointType.smokeThreshhold.getShortName()); + if (dp != null) + setSmokeThreshhold(dp); + dp = (IntegerDataPoint) dps.get(DatapointType.currentValue.getShortName()); + if (dp != null) + setCurrentValue(dp); } public void setDetectedTime(IntegerDataPoint dp) { @@ -52,4 +60,37 @@ public class SmokeSensor extends AbstractAlarmSensor { detectedTime.setValue(v); } + private void setCurrentValue(IntegerDataPoint dp) { + currentValue = dp; + currentValue.setOptional(true); + currentValue.setWritable(false); + currentValue.setDoc("The current data value of the smoke sensor."); + addDataPoint(currentValue); + } + + public int getCurrentValue() throws DataPointException, AccessException { + if (currentValue == null) + throw new DataPointException("Not implemented"); + return currentValue.getValue(); + } + + private void setSmokeThreshhold(IntegerDataPoint dp) { + smokeThreshhold = dp; + smokeThreshhold.setOptional(true); + smokeThreshhold.setDoc("The threshhold to trigger the alarm. The unit of measure is ppm."); + addDataPoint(smokeThreshhold); + } + + public int getSmokeThreshhold() throws DataPointException, AccessException { + if (smokeThreshhold == null) + throw new DataPointException("Not implemented"); + return smokeThreshhold.getValue(); + } + + public void setSmokeThreshhold(int v) throws DataPointException, AccessException { + if (smokeThreshhold == null) + throw new DataPointException("Not implemented"); + smokeThreshhold.setValue(v); + } + } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Streaming.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Streaming.java deleted file mode 100644 index 207d9060..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Streaming.java +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.Module; -import org.eclipse.om2m.sdt.datapoints.StringDataPoint; -import org.eclipse.om2m.sdt.exceptions.AccessException; -import org.eclipse.om2m.sdt.exceptions.DataPointException; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class Streaming extends Module { - - private final StringDataPoint url; - private final StringDataPoint login; - private final StringDataPoint password; - private final StringDataPoint format; - - public Streaming(String name, Domain domain, - final StringDataPoint url, final StringDataPoint login, - final StringDataPoint password, final StringDataPoint format) { - super(name, domain, ModuleType.streaming); - if ((url == null) || - ! url.getShortDefinitionType().equals(DatapointType.url.getShortName())) { - domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong url datapoint: " + url); - } - this.url = url; - this.url.setWritable(false); - addDataPoint(this.url); - - if ((login == null) || - ! login.getShortDefinitionType().equals(DatapointType.login.getShortName())) { - domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong login datapoint: " + login); - } - this.login = login; - this.login.setWritable(false); - addDataPoint(this.login); - - if ((password == null) || - ! password.getShortDefinitionType().equals(DatapointType.password.getShortName())) { - domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong password datapoint: " + password); - } - this.password = password; - this.password.setWritable(false); - addDataPoint(this.password); - - if ((format == null) || - ! format.getShortDefinitionType().equals(DatapointType.format.getShortName())) { - domain.removeModule(getName()); - throw new IllegalArgumentException("Wrong format datapoint: " + format); - } - this.format = format; - this.format.setWritable(false); - addDataPoint(this.format); - } - - public Streaming(final String name, final Domain domain, Map dps) { - this(name, domain, (StringDataPoint) dps.get(DatapointType.url.getShortName()), - (StringDataPoint) dps.get(DatapointType.login.getShortName()), - (StringDataPoint) dps.get(DatapointType.password.getShortName()), - (StringDataPoint) dps.get(DatapointType.format.getShortName())); - } - - public String getUrlValue() throws DataPointException, AccessException { - return url.getValue(); - } - - public String getLoginValue() throws DataPointException, AccessException { - return login.getValue(); - } - - public String getPasswordValue() throws DataPointException, AccessException { - return password.getValue(); - } - - public String getFormatValue() throws DataPointException, AccessException { - return format.getValue(); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Temperature.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Temperature.java index 9f7cdcc7..4e6d65ce 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Temperature.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/Temperature.java @@ -32,7 +32,7 @@ public class Temperature extends Module { super(name, domain, ModuleType.temperature); if ((currentTemperature == null) || - ! currentTemperature.getShortDefinitionType().equals(DatapointType.currentTemperature.getShortName())) { + ! currentTemperature.getShortName().equals(DatapointType.currentTemperature.getShortName())) { domain.removeModule(getName()); throw new IllegalArgumentException("Wrong currentTemperature datapoint: " + currentTemperature); } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/TouchSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/TouchSensor.java deleted file mode 100644 index eb3458bb..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/TouchSensor.java +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.modules; - -import java.util.Map; - -import org.eclipse.om2m.sdt.DataPoint; -import org.eclipse.om2m.sdt.Domain; -import org.eclipse.om2m.sdt.datapoints.BooleanDataPoint; -import org.eclipse.om2m.sdt.home.types.DatapointType; -import org.eclipse.om2m.sdt.home.types.ModuleType; - -public class TouchSensor extends AbstractAlarmSensor { - - public TouchSensor(String name, Domain domain, - BooleanDataPoint alarm) { - super(name, domain, alarm, ModuleType.touchSensor); - } - - public TouchSensor(final String name, final Domain domain, Map dps) { - this(name, domain, (BooleanDataPoint) dps.get(DatapointType.alarm.getShortName())); - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/UvSensor.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/UvSensor.java new file mode 100644 index 00000000..e1cb250c --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/modules/UvSensor.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.modules; + +import java.util.Map; + +import org.eclipse.om2m.sdt.DataPoint; +import org.eclipse.om2m.sdt.Domain; +import org.eclipse.om2m.sdt.Module; +import org.eclipse.om2m.sdt.datapoints.FloatDataPoint; +import org.eclipse.om2m.sdt.exceptions.AccessException; +import org.eclipse.om2m.sdt.exceptions.DataPointException; +import org.eclipse.om2m.sdt.home.types.DatapointType; +import org.eclipse.om2m.sdt.home.types.ModuleType; +import org.eclipse.om2m.sdt.home.types.UvStatus; + +public class UvSensor extends Module { + + private UvStatus uvStatus; + private FloatDataPoint uvValue; + + public UvSensor(final String name, final Domain domain, FloatDataPoint uvValue) { + super(name, domain, ModuleType.uvSensor); + if ((uvValue == null) || + ! uvValue.getShortName().equals(DatapointType.uvValue.getShortName())) { + domain.removeModule(getName()); + throw new IllegalArgumentException("Wrong uvValue datapoint: " + uvValue); + } + setDoc("This ModuleClass describes the capabilities of an ultraviolet sensor."); + this.uvValue = uvValue; + this.uvValue.setWritable(false); + this.uvValue.setDoc("The measure of the UV intensity of radiation in mW/cm^2"); + addDataPoint(uvValue); + } + + public UvSensor(final String name, final Domain domain, Map dps) { + this(name, domain, (FloatDataPoint) dps.get(DatapointType.uvValue.getShortName())); + UvStatus uvStatus = (UvStatus) dps.get(DatapointType.uvStatus.getShortName()); + if (uvStatus != null) + setUvStatus(uvStatus); + } + + protected void setUvStatus(UvStatus dp) { + uvStatus = dp; + uvStatus.setOptional(true); + uvStatus.setWritable(false); + uvStatus.setDoc("Indicates the level of the UV radiation status (see clause 5.6.30)."); + addDataPoint(uvStatus); + } + + public float getUvValue() throws DataPointException, AccessException { + return uvValue.getValue(); + } + + public UvStatus.Values getSensitivity() throws DataPointException, AccessException { + if (uvStatus == null) + throw new DataPointException("Not implemented"); + return uvStatus.getValue(); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/ActionType.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/ActionType.java index 4322a6e8..3d6ef3ff 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/ActionType.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/ActionType.java @@ -11,58 +11,44 @@ import org.eclipse.om2m.sdt.Identifiers; public enum ActionType implements Identifiers { - activateClockTimer(1, "timer.activateClockTimer", "activateClockTimer", "acCTr"), - deactivateClockTimer(2, "timer.deactivateClockTimer", "deactivateClockTimer","deCTr"), - downChannel(3, "televisionChannel.downChannel", "downChannel", "dowCl"), - downVolume(4, "audioVolume.downVolume", "downVolume", "dowVe"), - toggle(5, "binarySwitch.toggle", "toggle", "togge"), - upChannel(6, "televisionChannel.upChannel", "upChannel", "uphCl"), - upVolume(7, "audioVolume.upVolume", "upVolume", "upVol"), + activateClockTimer, + deactivateClockTimer, + downChannel, + downVolume, + toggle, + upChannel, + upVolume, - resetNumberValue(8,"numbervalue.resetNumberValue", "resetNumberValue", "reNVe"), // Added by Andreas Kraft - incrementNumberValue(9, "numbervalue.incrementNumberValue", "incrementNumberValue", "inNVe"), // Added by Andreas Kraft - decrementNumberValue(10, "numbervalue.decrementNumberValue", "decrementNumberValue", "deNVe"); // Added by Andreas Kraft + nextTrack, + previousTrack, - static private final String PATH = "org.onem2m.home.moduleclass."; + resetNumberValue, + incrementNumberValue, + decrementNumberValue; - private int value; - private String def; - private final String longDefinitionName; - private final String shortDefinitionName; + private final String longName; + private final String shortName; + private final String cnd; - ActionType(final int v, final String s, final String longDef, final String shortDef) { - value = v; - def = s; - longDefinitionName = longDef; - shortDefinitionName = shortDef; + ActionType() { + longName = toString(); + shortName = FlexContainers.getFlexShortName(longName); + cnd = FlexContainers.getContainerDefinition(longName); } - - public int getValue() { - return value; - } @Override public String getDefinition() { - return PATH + def; + return cnd; } @Override public String getShortName() { - return shortDefinitionName; + return shortName; } @Override public String getLongName() { - return longDefinitionName; + return longName; } - public static ActionType fromValue(int v) { - for (ActionType c: ActionType.values()) { - if (c.value == v) { - return c; - } - } - throw new IllegalArgumentException("Undefined value " + v); - } - } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/AlertColourCode.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/AlertColourCode.java index 6cf9920b..fb820cb9 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/AlertColourCode.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/AlertColourCode.java @@ -7,25 +7,21 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.types; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.om2m.sdt.Identifiers; -import org.eclipse.om2m.sdt.datapoints.ClonedEnum; import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; -public class AlertColourCode extends ClonedEnum { +public abstract class AlertColourCode extends EnumDataPoint { - static public final int Red = 1; - static public final int Green = 2; + static public enum Values { + red, green + } - static private List values = Arrays.asList( - Red, Green - ); - - public AlertColourCode(Identifiers identifiers, EnumDataPoint dp) { - super(identifiers, HomeDataType.AlertColourCode, dp); - setValidValues(values); + public AlertColourCode() { + this(DatapointType.light); + } + + public AlertColourCode(DatapointType dt) { + super(dt, HomeDataType.AlertColourCode); + setValidValues(Values.values()); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DatapointType.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DatapointType.java index ea11ff7d..f1d131da 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DatapointType.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DatapointType.java @@ -10,140 +10,155 @@ package org.eclipse.om2m.sdt.home.types; import org.eclipse.om2m.sdt.Identifiers; import org.eclipse.om2m.sdt.types.DataType; -public enum DatapointType implements Identifiers { +public enum DatapointType implements Identifiers.Typed { - absoluteEnergyConsumption("absoluteEnergyConsumption", "abECn", DataType.Float), - absoluteStartTime("absoluteStartTime", "abSTe", DataType.Time), - absoluteStopTime("absoluteStopTime", "abST0", DataType.Time), - alarm("alarm", "alarm", DataType.Boolean), - alarmStatus("alarmStatus", "alaSs", DataType.Boolean), - availableChannels("availableChannels", "avaCs", DataType.Integer), - bath("bath", "bath", DataType.Boolean), - batteryThreshold("batteryThreshold", "batTd", DataType.Integer), - blue("blue", "blue", DataType.Integer), - bone("bone", "bone", DataType.Float), - brightness("brightness", "brigs", DataType.Integer), - capacity("capacity", "capay", DataType.Integer), - channelId("channelId", "chaId", DataType.Integer), - charging("charging", "charg", DataType.Boolean), - code("code", "code", DataType.Integer), - colourSat("colourSat", "colSn", DataType.Integer), - current("current", "currt", DataType.Float), - currentDate("currentDate", "curDe", DataType.Date), - currentTemperature("currentTemperature", "curT0", DataType.Float), - currentTime("currentTime", "curTe", DataType.Time), - defrost("defrost", "defrt", DataType.Boolean), - description("description", "descn", DataType.String), - desiredHumidity("desiredHumidity", "desHy", DataType.Float), - detectedTime("detectedTime", "detTe", DataType.Datetime), - diastolicPressure("diastolicPressure", "diaPe", DataType.Integer), - directionAuto("directionAuto", "dirAo", DataType.Boolean), - directionDown("directionDown", "dirDn", DataType.Boolean), - directionLeft("directionLeft", "dirLt", DataType.Boolean), - directionRight("directionRight", "dirRt", DataType.Boolean), - directionUp("directionUp", "dirUp", DataType.Boolean), - discharging("discharging", "discg", DataType.Boolean), - doorState("doorState", "dooSt", DataType.Integer), - duration("duration", "duran", DataType.Integer), - estimatedTimeToEnd("estimatedTimeToEnd", "eTTEd", DataType.Integer), - fat("fat", "fat", DataType.Float), - filterLifetime("filterLifetime", "filLe", DataType.Integer), - frequency("frequency", "freqy", DataType.Float), - green("green", "green", DataType.Integer), - height("height", "heigt", DataType.Float), - inputSourceID("inputSourceID", "inSId", DataType.Integer), - kcal("kcal", "kcal", DataType.Float), - keyNumber("keyNumber", "keyNr", DataType.Integer), - level("level", "level", DataType.Integer), - light("light", "light", DataType.Integer), - liquidLevel("liquidLevel", "liqLv", DataType.Integer), - lowBattery("lowBattery", "lowBy", DataType.Boolean), - lqi("lqi", "lqi", DataType.Integer), - maxValue("maxValue", "maxVe", DataType.Float), - minValue("minValue", "minVe", DataType.Float), - multiplyingFactors("multiplyingFactors", "mulFs", DataType.Float), - muscle("muscle", "musce", DataType.Float), - muteEnabled("muteEnabled", "mutEd", DataType.Boolean), - openAlarm("openAlarm", "opeAm", DataType.Boolean), - openDuration("openDuration", "opeDn", DataType.Time), - operationMode("operationMode", "opeMe", DataType.Integer), - oxygenSaturation("oxygenSaturation", "oxySn", DataType.Integer), - power("power", "power", DataType.Float), - powerGenerationData("powerGenerationData", "poGDa", DataType.Float), - powerSaveEnabled("powerSaveEnabled", "poSEd", DataType.Boolean), - powerState("powerState", "powSe", DataType.Boolean), - previousChannel("previousChannel", "preCl", DataType.Integer), - pulseRate("pulseRate", "pulRe", DataType.Integer), - pushed("pushed", "pusBn", DataType.Boolean), - rapidCool("rapidCool", "rapCl", DataType.Boolean), - rapidFreeze("rapidFreeze", "rapFe", DataType.Boolean), - red("red", "red", DataType.Integer), - referenceTimer("referenceTimer", "refTr", DataType.Integer), - relativeHumidity("relativeHumidity", "relHy", DataType.Float), - resistance("resistance", "resie", DataType.Float), - rinseLevel("rinseLevel", "rinLl", DataType.Integer), - roundingEnergyConsumption("roundingEnergyConsumption", "roECn", DataType.Integer), - roundingEnergyGeneration("roundingEnergyGeneration", "roEGn", DataType.Integer), - rssi("rssi", "rssi", DataType.Float), - runningTime("runningTime", "runTe", DataType.Integer), - sensitivity("sensitivity", "sensy", DataType.Integer), - significantDigits("significantDigits", "sigDs", DataType.Integer), - silentTime("silentTime", "silTe", DataType.Integer), - status("status", "stats", DataType.Boolean), - stepValue("stepValue", "steVe", DataType.Float), - strength("strength", "streh", DataType.Integer), - supportedInputSources("supportedInputSources", "suISs", DataType.Integer), - supportedModes("supportedModes", "supMs", DataType.Integer), - systolicPressure("systolicPressure", "sysPe", DataType.Integer), - targetDuration("targetDuration", "tarDn", DataType.Integer), - targetTemperature("targetTemperature", "tarTe", DataType.Float), - targetTimeToStart("targetTimeToStart", "tTTSt", DataType.Integer), - targetTimeToStop("targetTimeToStop", "tTTSp", DataType.Integer), - temperature("temperature", "tempe", DataType.Float), - temperatureThreshhold("temperatureThreshhold", "temTd", DataType.Integer), - tone("tone", "tone", DataType.Integer), - turboEnabled("turboEnabled", "turEd", DataType.Boolean), - unit("unit", "unit", DataType.String), - visceraFat("visceraFat", "visFt", DataType.Float), - voltage("voltage", "volte", DataType.Float), - volumePercentage("volumePercentage", "volPe", DataType.Integer), - water("water", "water", DataType.Float), - weight("weight", "weigt", DataType.Float), - - atmosphericPressure("atmosphericPressure", "atmPe", DataType.Float), - carbonDioxideValue("carbonDioxideValue", "cDeVe", DataType.Float), - coarseness("coarseness", "coass", DataType.Integer), - cupsNumber("cupsNumber", "cupsN", DataType.Integer), - currentJobState("currentJobState", "curJS", DataType.String), - currentMachineState("currentMachineState", "curMS", DataType.String), - detectedPersons("detectedPersons", "detPs", DataType.String), - doorLock("doorLock", "dooLk", DataType.Boolean), - foamingStrength("foamingStrength", "foaSt", DataType.Integer), - format("format", "frmt", DataType.String), - jobStates("jobStates", "jobSt", DataType.String), - login("login", "login", DataType.String), - machineStates("machineStates", "mchSt", DataType.String), - noise("noise", "noise", DataType.Integer), - password("password", "psWd", DataType.String), - progressPercentage("progressPercentage", "prgPc", DataType.Integer), - url("url", "url", DataType.String), - useGrinder("useGrinder", "useGr", DataType.Boolean), - - numberValue("numberValue", "numVe", DataType.Float), // Added by Andreas Kraft - defaultValue("defaultValue", "defVe", DataType.Float), // Added by Andreas Kraft - step("step", "step", DataType.Float), // Added by Andreas Kraft - - undefinedVendorExt("undefinedVendorExt", "undef", DataType.String); + absoluteEnergyConsumption, + absoluteStartTime, + absoluteStopTime, + acousticStatus, + alarm, + alarmStatus, + atmosphericPressure, + availableChannels, + bath, + batteryThreshold, + blue, + bone, + brightness, + capacity, + ch2o, + channelId, + charging, + co, + co2, + coarseness, + code, + colourSaturation, + cupsNumber, + current, + currentDate, + currentJobState, + currentMachineState, + currentPlayerMode, + currentPlayerModeName, + currentTemperature, + currentTime, + currentValue, + defaultValue, + defrost, + description, + desiredHumidity, + detectedPersons, + detectedTime, + diastolicPressure, + discharging, + doorState, + duration, + estimatedTimeToEnd, + fat, + filterLifetime, + foamingStrength, + frequency, + grainsRemaining, + green, + height, + jobStates, + kcal, + keyNumber, + level, + light, + liquidLevel, + lock, + loginName, + loudness, + lowBattery, + lqi, + machineStates, + maxPressureThreshhold, + maxValue, + mediaID, + mediaName, + mediaType, + minPressureThreshhold, + minValue, + monitoringEnabled, + multiplyingFactors, + muscle, + muteEnabled, + numberValue, + openAlarm, + openDuration, + oxygenSaturation, + password, + power, + powerGenerationData, + powerSaveEnabled, + powerState, + previousChannel, + progressPercentage, + pulseRate, + pushed, + rapidCool, + rapidFreeze, + red, + referenceTimer, + relativeHumidity, + resistance, + roundingEnergyConsumption, + roundingEnergyGeneration, + rssi, + runningTime, + sdp, + sensitivity, + sensorHumidity, + sensorOdor, + sensorPM1, + sensorPM10, + sensorPM2, + significantDigits, + silentTime, + smokeThreshhold, + speed, + speedFactor, + spinLevelStrength, + status, + step, + stepValue, + strength, + supportedMediaSources, + supportedPlayerModes, + systolicPressure, + targetDuration, + targetTemperature, + targetTimeToStart, + targetTimeToStop, + temperature, + temperatureThreshhold, + token, + tone, + turboEnabled, + unit, + url, + useGrinder, + uvStatus, + uvValue, + visceraFat, + voc, + voltage, + volumePercentage, + water, + weight, + ; private final String longDefinitionName; private final String shortDefinitionName; private final DataType dataType; - DatapointType(String longDef, String shortDef, DataType pDataType) { - longDefinitionName = longDef; - shortDefinitionName = shortDef; - dataType = pDataType; - + DatapointType() { + longDefinitionName = toString(); + String[] dp = FlexContainers.getDataPoint(longDefinitionName); + shortDefinitionName = dp[0]; + dataType = HomeDataType.getDataType(dp[1]); } /** @@ -167,6 +182,7 @@ public enum DatapointType implements Identifiers { return null; } + @Override public DataType getDataType() { return dataType; } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DeviceType.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DeviceType.java index 5b2e53f1..2f34d441 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DeviceType.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DeviceType.java @@ -11,72 +11,63 @@ import org.eclipse.om2m.sdt.Identifiers; public enum DeviceType implements Identifiers { - deviceAirConditioner(1, "deviceAirConditioner", "deviceAirConditioner", "deACr"), - deviceClothesWasher(2, "deviceClothesWasher", "deviceClothesWasher", "deCWr"), - deviceElectricVehicleCharger(3, "deviceElectricVehicleCharger", "deviceElectricVehicleCharger", "dEVCr"), - deviceLight(4, "deviceLight", "deviceLight", "devLt"), - deviceMicrogeneration (5, "deviceMicrogeneration", "deviceMicrogeneration", "devMn"), - deviceOven(6, "deviceOven", "deviceOven", "devOn"), - deviceRefrigerator(7, "deviceRefrigerator", "deviceRefrigerator", "devRr"), - deviceRobotCleaner(8, "deviceRobotCleaner", "deviceRobotCleaner", "devRCr"), - deviceSmartElectricMeter(9, "deviceSmartElectricMeter", "deviceSmartElectricMeter", "dSEMr"), - deviceStorageBattery(10, "deviceStorageBattery", "deviceStorageBattery", "deSBy"), - deviceTelevision(11, "deviceTelevision", "deviceTelevision", "devTn"), - deviceThermostat(12, "deviceThermostat", "deviceThermostat", "devTt"), - deviceWaterHeater(13, "deviceWaterHeater", "deviceWaterHeater", "devWHr"), - deviceCoffeeMachine(14, "deviceCoffeeMachine", "deviceCoffeeMachine", "dCeMe"), - deviceKettle(15, "deviceKettle", "deviceKettle", "dKtle"), + deviceAirConditioner, + deviceAirQualityMonitor, + deviceClothesWasher, + deviceElectricVehicleCharger, + deviceLight, + deviceMicrogeneration, + deviceOven, + deviceRefrigerator, + deviceRobotCleaner, + deviceSmartElectricMeter, + deviceStorageBattery, + deviceTelevision, + deviceThermostat, + deviceWaterHeater, + deviceCoffeeMachine, + deviceKettle, - deviceDoor(100, "deviceDoor", "deviceDoor", "devDr"), - deviceSmokeExtractor(101, "deviceSmokeExtractor", "deviceSmokeExtractor", "dSeEr"), - deviceSwitchButton(102, "deviceSwitchButton", "deviceSwitchButton", "deSBn"), - deviceWarningDevice(103, "deviceWarningDevice", "deviceWarningDevice", "deWDe"), + deviceDoor, +// deviceSmokeExtractor, + deviceSwitch, + deviceWarning, - deviceGasValve(200, "deviceGasValve", "deviceGasValve", "dGsVe"), - deviceWaterValve(201, "deviceWaterValve", "deviceWaterValve", "deWVe"), + deviceGasValve, + deviceWaterValve, - deviceFloodDetector(300, "deviceFloodDetector", "deviceFloodDetector", "deFDr"), - deviceMotionDetector(301, "deviceMotionDetector", "deviceMotionDetector", "deMDr"), - deviceSmokeDetector(302, "deviceSmokeDetector", "deviceSmokeDetector", "deSDr"), - deviceTemperatureDetector(303, "deviceTemperatureDetector", "deviceTemperatureDetector", "deTDr"), - deviceContactDetector(304, "deviceContactDetector", "deviceContactDetector", "deCDr"), + deviceContactDetector, + deviceFloodDetector, + deviceMotionDetector, + deviceSmokeDetector, + deviceTemperatureDetector, - deviceCamera(400, "deviceCamera", "deviceCamera", "devCa"), - deviceWeatherStation(500, "deviceWeatherStation", "deviceWeatherStation", "deWSn"), - deviceNumberDevice(600, "deviceNumberDevice", "deviceNumberDevice", "deNDe"), +// deviceCamera2, + deviceCamera, + deviceWeatherStation, + deviceHomeCCTV, + ; - undefinedVendorExt(0, "undefinedVendorExt", "", ""); + private final String longName; + private final String shortName; + private final String cnd; - static public final String PATH = "org.onem2m.home.device."; - - private int value; - private final String def; - private final String longDefinitionName; - private final String shortDefinitionName; - - DeviceType(int v, String s, String longDef, String shortDef) { - value = v; - def = s; - longDefinitionName = longDef; - shortDefinitionName = shortDef; + DeviceType() { + longName = toString(); + shortName = FlexContainers.getFlexShortName(longName); + cnd = FlexContainers.getContainerDefinition(longName); } - - public int getValue() { - return value; - } public String getDefinition() { - return PATH + def; + return cnd; } - - /** * @return the longDefinitionName */ @Override public String getLongName() { - return longDefinitionName; + return longName; } /** @@ -84,25 +75,7 @@ public enum DeviceType implements Identifiers { */ @Override public String getShortName() { - return shortDefinitionName; + return shortName; } - public static DeviceType fromValue(int v) { - for (DeviceType c: DeviceType.values()) { - if (c.value == v) { - return c; - } - } - throw new IllegalArgumentException("Undefined value " + v); - } - - public static DeviceType fromValue(String def) { - for (DeviceType c: DeviceType.values()) { - if (c.def.equals(def)) { - return c; - } - } - throw new IllegalArgumentException("Undefined definition " + def); - } - } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DoorState.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DoorState.java index c1a42746..a7978a08 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DoorState.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/DoorState.java @@ -7,32 +7,21 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.types; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.om2m.sdt.Identifiers; -import org.eclipse.om2m.sdt.datapoints.ClonedEnum; import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; -public class DoorState extends ClonedEnum { +public abstract class DoorState extends EnumDataPoint { - static public final int Closed = 1; - static public final int Open = 2; - static public final int Opening = 3; - static public final int Closing = 4; - static public final int Stopped = 5; + static public enum Values { + closed, open, opening, closing, stopped + } - static private List values = Arrays.asList( - Closed, Open, Opening, Closing, Stopped - ); - - public DoorState(EnumDataPoint dp) { - this(DatapointType.doorState, dp); + public DoorState() { + this(DatapointType.doorState); } - public DoorState(Identifiers name, EnumDataPoint dp) { - super(name, HomeDataType.DoorState, dp); - setValidValues(values); + public DoorState(DatapointType dt) { + super(dt, HomeDataType.DoorState); + setValidValues(Values.values()); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/FlexContainers.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/FlexContainers.java new file mode 100644 index 00000000..79e413b3 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/FlexContainers.java @@ -0,0 +1,62 @@ +package org.eclipse.om2m.sdt.home.types; + +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.om2m.commons.resource.AbstractFlexContainer; +import org.eclipse.om2m.commons.resource.CustomAttribute; +import org.eclipse.om2m.commons.resource.flexcontainerspec.ObjectFactory; + +public class FlexContainers { + + private static final String PREFIX = "create"; + private static final String SUFFIX = "Annc"; + + static private ObjectFactory factory = ObjectFactory.getInstance(); + + private static Map flexNames; + private static Map dpNames; + + static { + flexNames = new HashMap(); + dpNames = new HashMap(); + for (Method m : ObjectFactory.class.getMethods()) { + String method = m.getName(); + if (method.endsWith(SUFFIX) || ! method.startsWith(PREFIX)) + continue; + try { + AbstractFlexContainer flex = (AbstractFlexContainer) m.invoke(factory, new Object[0]); + flexNames.put(flex.getLongName(), new String[] { flex.getShortName(), + flex.getContainerDefinition() }); + for (CustomAttribute ca : flex.getCustomAttributes()) { + dpNames.put(ca.getLongName(), new String[] { ca.getShortName(), ca.getType() }); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + public static String getFlexShortName(String longName) { + String[] ret = flexNames.get(longName); + if (ret == null) + throw new UnknownError("No valid flexContainer for " + longName); + return ret[0]; + } + + public static String getContainerDefinition(String longName) { + String[] ret = flexNames.get(longName); + if (ret == null) + throw new UnknownError("No valid flexContainer for " + longName); + return ret[1]; + } + + public static String[] getDataPoint(String longName) { + String[] ret = dpNames.get(longName); + if (ret == null) + throw new UnknownError("No valid flexContainer for " + longName); + return ret; + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/FoamStrength.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/FoamStrength.java index 58d3f0eb..e41de917 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/FoamStrength.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/FoamStrength.java @@ -7,30 +7,21 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.types; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.om2m.sdt.Identifiers; -import org.eclipse.om2m.sdt.datapoints.ClonedEnum; import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; -public class FoamStrength extends ClonedEnum { - - static public final int zero = 1; - static public final int medium = 2; - static public final int maximum = 3; +public abstract class FoamStrength extends EnumDataPoint { - static private List values = Arrays.asList( - zero, medium, maximum - ); - - public FoamStrength(EnumDataPoint dp) { - this(DatapointType.foamingStrength, dp); + static public enum Values { + zero, low, medium, high, maximum + } + + public FoamStrength() { + this(DatapointType.foamingStrength); } - public FoamStrength(Identifiers name, EnumDataPoint dp) { - super(name, HomeDataType.FoamStrength, dp); - setValidValues(values); + public FoamStrength(DatapointType dt) { + super(dt, HomeDataType.FoamStrength); + setValidValues(Values.values()); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/GrainsLevel.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/GrainsLevel.java new file mode 100644 index 00000000..35355010 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/GrainsLevel.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.types; + +import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; + +public abstract class GrainsLevel extends EnumDataPoint { + + static public enum Values { + zero, low, medium, high, maximum + } + + public GrainsLevel() { + this(DatapointType.grainsRemaining); + } + + public GrainsLevel(DatapointType dp) { + super(dp, HomeDataType.GrainsLevel); + setValidValues(Values.values()); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/GrindCoarseness.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/GrindCoarseness.java new file mode 100644 index 00000000..7abf8df7 --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/GrindCoarseness.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.types; + +import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; + +public abstract class GrindCoarseness extends EnumDataPoint { + + static public enum Values { + ultrafine, fine, medium, coarse, coarsest + } + + public GrindCoarseness() { + this(DatapointType.coarseness); + } + + public GrindCoarseness(DatapointType dp) { + super(dp, HomeDataType.GrindCoarseness); + setValidValues(Values.values()); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeBasicType.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeBasicType.java index f31dd525..40017b13 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeBasicType.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeBasicType.java @@ -11,28 +11,70 @@ import org.eclipse.om2m.sdt.types.BasicType; public class HomeBasicType extends BasicType { - static public final HomeBasicType DEVICETYPE = new HomeBasicType("deviceType", Integer.class); - static public final HomeBasicType SUPPORTEDINPUTSOURCES = new HomeBasicType("supportedInputSources", Integer.class); - static public final HomeBasicType LIQUIDLEVEL = new HomeBasicType("liquidLevel", Integer.class); - static public final HomeBasicType SPINLEVELSTRENGTH = new HomeBasicType("spinLevelStrength", Integer.class); - static public final HomeBasicType DOORSTATE = new HomeBasicType("doorState", Integer.class); - static public final HomeBasicType TONE = new HomeBasicType("tone", Integer.class); - static public final HomeBasicType JOBSTATES = new HomeBasicType("jobStates", Integer.class); - static public final HomeBasicType ALERTCOLOURCODE = new HomeBasicType("alertColourCode", Integer.class); - static public final HomeBasicType WATERFLOWSTRENGTH = new HomeBasicType("waterFlowStrength", Integer.class); - static public final HomeBasicType WINDSTRENGTH = new HomeBasicType("windStrength", Integer.class); - static public final HomeBasicType GRAINSLEVEL = new HomeBasicType("grainsLevel", Integer.class); - static public final HomeBasicType FOAMSTRENGTH = new HomeBasicType("foamStrength", Integer.class); - static public final HomeBasicType TASTESTRENGTH = new HomeBasicType("tasteStrength", Integer.class); - static public final HomeBasicType GRINDCOARSENESS = new HomeBasicType("grindCoarseness", Integer.class); - static public final HomeBasicType MACHINESTATE = new HomeBasicType("machineState", Integer.class); - static public final HomeBasicType WASHINGCOURSE = new HomeBasicType("washingCourse", Integer.class); - static public final HomeBasicType GENERALTEMPERATURE = new HomeBasicType("generalTemperature", Integer.class); - static public final HomeBasicType GENERALLEVEL = new HomeBasicType("generalLevel", Integer.class); - static public final HomeBasicType GENERALSPEED = new HomeBasicType("generalSpeed", Integer.class); - + static private final String PREFIX = "hd:enum"; + static private final String S_ALERTCOLOURCODE = PREFIX + "AlertColourCode"; + static private final String S_DOORSTATE = PREFIX + "DoorState"; + static private final String S_FOAMSTRENGTH = PREFIX + "FoamStrength"; + static private final String S_GENERALLEVEL = PREFIX + "GeneralLevel"; + static private final String S_GENERALSPEED = PREFIX + "GeneralSpeed"; + static private final String S_GENERALTEMPERATURE = PREFIX + "GeneralTemperature"; + static private final String S_GRAINSLEVEL = PREFIX + "GrainsLevel"; + static private final String S_GRINDCOARSENESS = PREFIX + "GrindCoarseness"; + static private final String S_JOBSTATE = PREFIX + "JobState"; + static private final String S_LIQUIDLEVEL = PREFIX + "LiquidLevel"; + static private final String S_MACHINESTATE = PREFIX + "MachineState"; + static private final String S_PLAYERMODE = PREFIX + "PlayerMode"; + static private final String S_SPINLEVELSTRENGTH = PREFIX + "SpinLevelStrength"; + static private final String S_SUPPORTEDMEDIASOURCES = PREFIX + "SupportedMediaSource"; + static private final String S_TASTESTRENGTH = PREFIX + "TasteStrength"; + static private final String S_TONE = PREFIX + "Tone"; + static private final String S_WASHINGCOURSE = PREFIX + "washingCourse"; + static private final String S_WATERFLOWSTRENGTH = PREFIX + "WaterFlowStrength"; + static private final String S_WINDSTRENGTH = PREFIX + "WindStrength"; + static private final String S_UVSTATUS = PREFIX + "UvStatus"; + + static public final HomeBasicType AlertColourCode = new HomeBasicType(S_ALERTCOLOURCODE, AlertColourCode.Values.class); + static public final HomeBasicType DoorState = new HomeBasicType(S_DOORSTATE, DoorState.Values.class); + static public final HomeBasicType FoamStrength = new HomeBasicType(S_FOAMSTRENGTH, FoamStrength.Values.class); + static public final HomeBasicType GENERALLEVEL = new HomeBasicType(S_GENERALLEVEL, Integer.class); + static public final HomeBasicType GENERALSPEED = new HomeBasicType(S_GENERALSPEED, Integer.class); + static public final HomeBasicType GENERALTEMPERATURE = new HomeBasicType(S_GENERALTEMPERATURE, Integer.class); + static public final HomeBasicType GrainsLevel = new HomeBasicType(S_GRAINSLEVEL, GrainsLevel.Values.class); + static public final HomeBasicType GrindCoarseness = new HomeBasicType(S_GRINDCOARSENESS, GrindCoarseness.Values.class); + static public final HomeBasicType JobState = new HomeBasicType(S_JOBSTATE, JobState.Values.class); + static public final HomeBasicType LiquidLevel = new HomeBasicType(S_LIQUIDLEVEL, LiquidLevel.Values.class); + static public final HomeBasicType MachineState = new HomeBasicType(S_MACHINESTATE, MachineState.Values.class); + static public final HomeBasicType PlayerMode = new HomeBasicType(S_PLAYERMODE, PlayerMode.Values.class); + static public final HomeBasicType SpinLevel = new HomeBasicType(S_SPINLEVELSTRENGTH, SpinLevel.Values.class); + static public final HomeBasicType SupportedMediaSources = new HomeBasicType(S_SUPPORTEDMEDIASOURCES, SupportedMediaSources.Values.class); + static public final HomeBasicType TasteStrength = new HomeBasicType(S_TASTESTRENGTH, TasteStrength.Values.class); + static public final HomeBasicType Tone = new HomeBasicType(S_TONE, Tone.Values.class); + static public final HomeBasicType WASHINGCOURSE = new HomeBasicType(S_WASHINGCOURSE, Integer.class); + static public final HomeBasicType WATERFLOWSTRENGTH = new HomeBasicType(S_WATERFLOWSTRENGTH, Integer.class); + static public final HomeBasicType WINDSTRENGTH = new HomeBasicType(S_WINDSTRENGTH, Integer.class); + static public final HomeBasicType UVSTATUS = new HomeBasicType(S_UVSTATUS, Integer.class); + + protected HomeBasicType(String v, Class c) { super(v, c); } - + + public Object fromString(String val) throws Exception { + if (val == null) + return null; + if (getClazz().equals(Integer.class)) + return Integer.parseInt(val); + if (getClazz().isEnum()) { + for (Object item : getClazz().getEnumConstants()) { + if (val.equals(item.toString())) + return item; + } + } + return null; + } + + public String toString(Object val) { + return (val == null) ? null : val.toString(); + } + } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeDataType.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeDataType.java index 65efbfe9..8375e057 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeDataType.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeDataType.java @@ -7,32 +7,49 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.types; +import org.eclipse.om2m.sdt.types.Array; import org.eclipse.om2m.sdt.types.DataType; public class HomeDataType extends DataType { - static public final HomeDataType DeviceType = new HomeDataType("deviceType", HomeSimpleType.DeviceType); - static public final HomeDataType SupportedInputSources = new HomeDataType("supportedInputSources", HomeSimpleType.SupportedInputSources); - static public final HomeDataType LiquidLevel = new HomeDataType("liquidLevel", HomeSimpleType.LiquidLevel); - static public final HomeDataType SpinLevelStrength = new HomeDataType("spinLevelStrength", HomeSimpleType.SpinLevelStrength); - static public final HomeDataType DoorState = new HomeDataType("doorState", HomeSimpleType.DoorState); - static public final HomeDataType Tone = new HomeDataType("tone", HomeSimpleType.Tone); - static public final HomeDataType JobStates = new HomeDataType("jobStates", HomeSimpleType.JobStates); - static public final HomeDataType AlertColourCode = new HomeDataType("alertColourCode", HomeSimpleType.AlertColourCode); - static public final HomeDataType WaterFlowStrength = new HomeDataType("waterFlowStrength", HomeSimpleType.WaterFlowStrength); - static public final HomeDataType WindStrength = new HomeDataType("windStrength", HomeSimpleType.WindStrength); - static public final HomeDataType GrainsLevel = new HomeDataType("grainsLevel", HomeSimpleType.GrainsLevel); - static public final HomeDataType FoamStrength = new HomeDataType("foamStrength", HomeSimpleType.FoamStrength); - static public final HomeDataType TasteStrength = new HomeDataType("tasteStrength", HomeSimpleType.TasteStrength); - static public final HomeDataType GrindCoarseness = new HomeDataType("grindCoarseness", HomeSimpleType.GrindCoarseness); - static public final HomeDataType MachineState = new HomeDataType("machineState", HomeSimpleType.MachineState); - static public final HomeDataType WashingCourse = new HomeDataType("washingCourse", HomeSimpleType.WashingCourse); - static public final HomeDataType GeneralTemperature = new HomeDataType("generalTemperature", HomeSimpleType.GeneralTemperature); - static public final HomeDataType GeneralLevel = new HomeDataType("generalLevel", HomeSimpleType.GeneralLevel); - static public final HomeDataType GeneralSpeed = new HomeDataType("generalSpeed", HomeSimpleType.GeneralSpeed); - - public HomeDataType(final String name, final TypeChoice type) { - super(name, type); + static public final HomeDataType AlertColourCode = new HomeDataType(HomeSimpleType.AlertColourCode); + static public final HomeDataType DoorState = new HomeDataType(HomeSimpleType.DoorState); + static public final HomeDataType FoamStrength = new HomeDataType(HomeSimpleType.FoamStrength); + static public final HomeDataType GeneralLevel = new HomeDataType(HomeSimpleType.GeneralLevel); + static public final HomeDataType GeneralSpeed = new HomeDataType(HomeSimpleType.GeneralSpeed); + static public final HomeDataType GeneralTemperature = new HomeDataType(HomeSimpleType.GeneralTemperature); + static public final HomeDataType GrainsLevel = new HomeDataType(HomeSimpleType.GrainsLevel); + static public final HomeDataType GrindCoarseness = new HomeDataType(HomeSimpleType.GrindCoarseness); + static public final HomeDataType JobState = new HomeDataType(HomeSimpleType.JobState); + static public final HomeDataType LiquidLevel = new HomeDataType(HomeSimpleType.LiquidLevel); + static public final HomeDataType MachineState = new HomeDataType(HomeSimpleType.MachineState); + static public final HomeDataType PlayerMode = new HomeDataType(HomeSimpleType.PlayerMode); + static public final HomeDataType SpinLevelStrength = new HomeDataType(HomeSimpleType.SpinLevelStrength); + static public final HomeDataType SupportedMediaSources = new HomeDataType(HomeSimpleType.SupportedMediaSources); + static public final HomeDataType TasteStrength = new HomeDataType(HomeSimpleType.TasteStrength); + static public final HomeDataType Tone = new HomeDataType(HomeSimpleType.Tone); + static public final HomeDataType WashingCourse = new HomeDataType(HomeSimpleType.WashingCourse); + static public final HomeDataType WaterFlowStrength = new HomeDataType(HomeSimpleType.WaterFlowStrength); + static public final HomeDataType WindStrength = new HomeDataType(HomeSimpleType.WindStrength); + static public final HomeDataType UvStatus = new HomeDataType(HomeSimpleType.UvStatus); + + public HomeDataType(final TypeChoice type) { + super(type); } + static public DataType getDataType(final String name) { + String s = name.trim(); + DataType ret = DataType.getDataType(s); + if (ret != null) + return ret; + if (s.startsWith("[")) { + DataType dt = getDataType(s.substring(1, s.length()-1)); + return (dt == null) ? null : new DataType(new Array<>(dt)); + } + HomeSimpleType st = (HomeSimpleType) HomeSimpleType.getSimpleType(s); + if (st != null) + return new HomeDataType(st); + return null; + } + } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeSimpleType.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeSimpleType.java index 2ce254b2..3116991d 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeSimpleType.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/HomeSimpleType.java @@ -12,32 +12,29 @@ import org.eclipse.om2m.sdt.types.SimpleType; public class HomeSimpleType extends SimpleType { - static public final HomeSimpleType AlertColourCode = new HomeSimpleType(HomeBasicType.ALERTCOLOURCODE); - static public final HomeSimpleType DeviceType = new HomeSimpleType(HomeBasicType.DEVICETYPE); - static public final HomeSimpleType SupportedInputSources = new HomeSimpleType(HomeBasicType.SUPPORTEDINPUTSOURCES); - static public final HomeSimpleType LiquidLevel = new HomeSimpleType(HomeBasicType.LIQUIDLEVEL); - static public final HomeSimpleType SpinLevelStrength = new HomeSimpleType(HomeBasicType.SPINLEVELSTRENGTH); - static public final HomeSimpleType DoorState = new HomeSimpleType(HomeBasicType.DOORSTATE); - static public final HomeSimpleType Tone = new HomeSimpleType(HomeBasicType.TONE); - static public final HomeSimpleType JobStates = new HomeSimpleType(HomeBasicType.JOBSTATES); - static public final HomeSimpleType WaterFlowStrength = new HomeSimpleType(HomeBasicType.WATERFLOWSTRENGTH); - static public final HomeSimpleType WindStrength = new HomeSimpleType(HomeBasicType.WINDSTRENGTH); - static public final HomeSimpleType GrainsLevel = new HomeSimpleType(HomeBasicType.GRAINSLEVEL); - static public final HomeSimpleType FoamStrength = new HomeSimpleType(HomeBasicType.FOAMSTRENGTH); - static public final HomeSimpleType TasteStrength = new HomeSimpleType(HomeBasicType.TASTESTRENGTH); - static public final HomeSimpleType GrindCoarseness = new HomeSimpleType(HomeBasicType.GRINDCOARSENESS); - static public final HomeSimpleType MachineState = new HomeSimpleType(HomeBasicType.MACHINESTATE); - static public final HomeSimpleType WashingCourse = new HomeSimpleType(HomeBasicType.WASHINGCOURSE); - static public final HomeSimpleType GeneralTemperature = new HomeSimpleType(HomeBasicType.GENERALTEMPERATURE); + static public final HomeSimpleType AlertColourCode = new HomeSimpleType(HomeBasicType.AlertColourCode); + static public final HomeSimpleType DoorState = new HomeSimpleType(HomeBasicType.DoorState); + static public final HomeSimpleType FoamStrength = new HomeSimpleType(HomeBasicType.FoamStrength); static public final HomeSimpleType GeneralLevel = new HomeSimpleType(HomeBasicType.GENERALLEVEL); static public final HomeSimpleType GeneralSpeed = new HomeSimpleType(HomeBasicType.GENERALSPEED); + static public final HomeSimpleType GeneralTemperature = new HomeSimpleType(HomeBasicType.GENERALTEMPERATURE); + static public final HomeSimpleType GrainsLevel = new HomeSimpleType(HomeBasicType.GrainsLevel); + static public final HomeSimpleType GrindCoarseness = new HomeSimpleType(HomeBasicType.GrindCoarseness); + static public final HomeSimpleType JobState = new HomeSimpleType(HomeBasicType.JobState); + static public final HomeSimpleType LiquidLevel = new HomeSimpleType(HomeBasicType.LiquidLevel); + static public final HomeSimpleType MachineState = new HomeSimpleType(HomeBasicType.MachineState); + static public final HomeSimpleType PlayerMode = new HomeSimpleType(HomeBasicType.PlayerMode); + static public final HomeSimpleType SpinLevelStrength = new HomeSimpleType(HomeBasicType.SpinLevel); + static public final HomeSimpleType SupportedMediaSources = new HomeSimpleType(HomeBasicType.SupportedMediaSources); + static public final HomeSimpleType TasteStrength = new HomeSimpleType(HomeBasicType.TasteStrength); + static public final HomeSimpleType Tone = new HomeSimpleType(HomeBasicType.Tone); + static public final HomeSimpleType WashingCourse = new HomeSimpleType(HomeBasicType.WASHINGCOURSE); + static public final HomeSimpleType WaterFlowStrength = new HomeSimpleType(HomeBasicType.WATERFLOWSTRENGTH); + static public final HomeSimpleType WindStrength = new HomeSimpleType(HomeBasicType.WINDSTRENGTH); + static public final HomeSimpleType UvStatus = new HomeSimpleType(HomeBasicType.UVSTATUS); protected HomeSimpleType(final BasicType type) { super(type); } - - public String getOneM2MType() { - return "hd:" + getType().getValue(); - } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/JobState.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/JobState.java new file mode 100644 index 00000000..e6f7e79c --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/JobState.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.types; + +import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; + +public abstract class JobState extends EnumDataPoint { + + static public enum Values { + aborted, cancelled, completed, paused, pending, processing + } + + public JobState() { + this(DatapointType.currentJobState); + } + + public JobState(DatapointType dt) { + super(dt, HomeDataType.JobState); + setValidValues(Values.values()); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/JobStates.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/JobStates.java deleted file mode 100644 index 3181f81e..00000000 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/JobStates.java +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.sdt.home.types; - -import java.util.Arrays; -import java.util.List; - -import org.eclipse.om2m.sdt.Identifiers; -import org.eclipse.om2m.sdt.datapoints.ClonedEnum; -import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; - -public class JobStates extends ClonedEnum { - -// 0~99 Reserved for future use -// 100~199 Reserved for deviceAirConditioner -// 200 idle This value is for deviceClothesWasher and indicates idle state. -// 201 preWash This value is for deviceClothesWasher and indicates pre-washing state. pre-wash is a cold water cycle that runs prior to the main wash cycle. It is used for heavily soiled laundy. -// 202 wash This value is for deviceClothesWasher and indicates washing state. -// 203 rinse This value is for deviceClothesWasher and indicates rinsing state. -// 204 spin This value is for deviceClothesWasher and indicates spinning state. -// 205 dry This value is for deviceClothesWasher and indicates drying state. -// 206 airDry This value is for deviceClothesWasher and indicates air-drying state. In airDry state, a rotating wheel circulates air to get fresh air used to dry laundry. -// 207 wrinkleProof This value is for deviceClothesWasher and indicates wrinkleProof state. -// 208 soak This value is for deviceClothesWasher and indicates soak state. -// 209~299 Reserved for deviceClothesWasher -// 300~399 Reserved for deviceElectricVehicleCharger -// 400~499 Reserved for deviceLight -// 500~599 Reserved for deviceMicrogeneration -// 600 warmingUp This value is for deviceOven and indicates warmingUp state. -// 601 cooking This value is for deviceOven and indicates cooking state. -// 602 cooling This value is for deviceOven and indicates cooling state. -// 603~699 Reserved for deviceOven -// 700~799 Reserved for deviceRefrigerator -// 800 charging This value is for deviceRobotCleaner and indicates charging state. -// 801 homing This value is for deviceRobotCleaner and indicates homing state. -// 802 docking This value is for deviceRobotCleaner and indicates docking state. -// 803~899 Reserved for deviceRobotCleaner -// 900~999 Reserved for deviceSmartElectricMeter -// 1000~1099 Reserved for deviceStorageBattery -// 1100~1199 Reserved for deviceTelevision -// 1200 antifreeze This mode sets the thermostat to a minimum temperature to avoid home system to freeze when the habitants are not there for a long time -// 1201 manual This mode allows for direct change of the temperature indication for the thermostat by the user. -// 1202 eco This is to set the thermostat to the economic mode -// 1203 program The program mode is used to set the thermostat to a predefined mode -// 1204~1299 Reserved for deviceThermostat -// 1300~1399 Reserved for deviceWaterHeater -// 1400~1499 Reserved for deviceCoffeeMachine - - static public final int idle = 200; - static public final int preWash = 201; - static public final int wash = 202; - static public final int rinse = 203; - static public final int spin = 204; - static public final int dry = 205; - static public final int airDry = 206; - static public final int wrinkleProof = 207; - static public final int soak = 208; - - static public final int noeffect = 400; - static public final int colorloop = 401; - static public final int noalert = 402; - static public final int lselect = 403; - static public final int select = 404; - - static public final int warmingUp = 600; - static public final int cooking = 601; - static public final int cooling = 602; - - static public final int charging = 800; - static public final int homing = 801; - static public final int docking = 802; - - static public final int antifreeze = 1200; - static public final int manual = 1201; - static public final int eco = 1202; - static public final int program = 1203; - - static private List values = Arrays.asList( - idle, preWash, wash, rinse, spin, dry, airDry, wrinkleProof, soak, - noeffect, colorloop, noalert, lselect, select, - warmingUp, cooking, cooling, - charging, homing, docking, - antifreeze, manual, eco, program - ); - - public JobStates(EnumDataPoint dp) { - this(DatapointType.currentJobState, dp); - } - - public JobStates(Identifiers name, EnumDataPoint dp) { - super(name, HomeDataType.JobStates, dp); - setValidValues(values); - } - - static public List getValues() { - return values; - } - -} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/LiquidLevel.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/LiquidLevel.java index 9f448160..b49bda0e 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/LiquidLevel.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/LiquidLevel.java @@ -7,32 +7,21 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.types; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.om2m.sdt.Identifiers; -import org.eclipse.om2m.sdt.datapoints.ClonedEnum; import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; -public class LiquidLevel extends ClonedEnum { +public abstract class LiquidLevel extends EnumDataPoint { - static public final int zero = 1; - static public final int low = 2; - static public final int medium = 3; - static public final int high = 4; - static public final int maximum = 5; + static public enum Values { + zero, low, medium, high, maximum + } - static private List values = Arrays.asList( - zero, low, medium, high, maximum - ); - - public LiquidLevel(EnumDataPoint dp) { - this(DatapointType.liquidLevel, dp); + public LiquidLevel() { + this(DatapointType.liquidLevel); } - public LiquidLevel(Identifiers names, EnumDataPoint dp) { - super(names, HomeDataType.LiquidLevel, dp); - setValidValues(values); + public LiquidLevel(DatapointType dp) { + super(dp, HomeDataType.LiquidLevel); + setValidValues(Values.values()); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/MachineState.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/MachineState.java index 1a6e35b3..0bfe22e9 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/MachineState.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/MachineState.java @@ -7,49 +7,21 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.types; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.om2m.sdt.Identifiers; -import org.eclipse.om2m.sdt.datapoints.ClonedEnum; import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; -public class MachineState extends ClonedEnum { +public abstract class MachineState extends EnumDataPoint { -// 1 idle Machine is ready to operate -// 2 active Machine is operating its functions -// 3 reserved Reservation is made by user -// 4 paused Operation is paused by user -// 5 cancelled Operation is cancelled by user -// 6 stopped Operation is stopped/aborted by some other reasons -// 7 complete Operation is complete -// 8 error Error has occurred -// 9 diagnostic Machine reports diagnostic information to the server -// 10 test Particular functions run for test - - static public final int idle = 1; - static public final int active = 2; - static public final int reserved = 3; - static public final int paused = 4; - static public final int cancelled = 5; - static public final int stopped = 6; - static public final int complete = 7; - static public final int error = 8; - static public final int diagnostic = 9; - static public final int test = 10; + static public enum Values { + idle, preActive, active, reserved, stopped, error, diagnostic, test, maintenance, clear, charging + } - static private List values = Arrays.asList( - idle, active, reserved, paused, cancelled, - stopped, complete, error, diagnostic, test - ); - - public MachineState(EnumDataPoint dp) { - this(DatapointType.currentMachineState, dp); + public MachineState() { + this(DatapointType.currentMachineState); } - - public MachineState(Identifiers name, EnumDataPoint dp) { - super(name, HomeDataType.MachineState, dp); - setValidValues(values); + + public MachineState(DatapointType dt) { + super(dt, HomeDataType.MachineState); + setValidValues(Values.values()); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/ModuleType.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/ModuleType.java index e4690f0e..862942f7 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/ModuleType.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/ModuleType.java @@ -11,101 +11,75 @@ import org.eclipse.om2m.sdt.Identifiers; public enum ModuleType implements Identifiers { - alarmSpeaker(1, "alarmSpeaker", "alarmSpeaker", "alaSr"), - audioVideoInput(2, "audioVideoInput", "audioVideoInput","auVIt"), - audioVolume(3, "audioVolume", "audioVolume", "audVe"), - battery(4, "battery", "battery", "batty"), - binarySwitch(5, "binarySwitch", "binarySwitch", "binSh"), - bioElectricalImpedanceAnalysis(6, "bioElectricalImpedanceAnalysis", "bioElectricalImpedanceAnalysis", "bEIAs"), - boiler(7, "boiler", "boiler", "boilr"), - brightness(8, "brightness", "brightness", "brigs"), - clock(9, "clock", "clock", "clock"), - colour(10, "colour", "colour", "color"), - colourSaturation(11, "colourSaturation", "colourSaturation", "colSn"), - doorStatus(12, "doorStatus", "doorStatus", "dooSs"), - electricVehicleConnector(13, "electricVehicleConnector", "electricVehicleConnector", "elVCr"), - energyConsumption(14, "energyConsumption", "energyConsumption", "eneCn"), - energyGeneration(15, "energyGeneration", "energyGeneration", "eneGn"), - faultDetection(16, "faultDetection", "faultDetection", "fauDn"), - height(17, "height", "height", "heigt"), - hotWaterSupply(18, "hotWaterSupply", "hotWaterSupply", "hoWSy"), - keypad(19, "keypad", "keypad", "keypd"), - motionSensor(20, "motionSensor", "motionSensor", "motSr"), - oximeter(21, "oximeter", "oximeter", "oximr"), - powerSave(22, "powerSave", "powerSave", "powS0"), - pushButton(23, "pushButton", "pushButton", "pusBn"), - recorder(24, "recorder", "recorder", "recor"), - refrigeration(25, "refrigeration", "refrigeration", "refrn"), - relativeHumidity(26, "relativeHumidity", "relativeHumidity", "relHy"), - //rinseLevel(27, "rinseLevel"), - runState(27, "runState", "runState", "runSt"), - runMode(28, "runMode", "runMode", "runMe"), - signalStrength(29, "signalStrength", "signalStrength", "sigSh"), - smokeSensor(30, "smokeSensor", "smokeSensor", "smoSr"), - spinLevel(31, "spinLevel", "spinLevel", "spiLl"), - televisionChannel(32, "televisionChannel", "televisionChannel", "telCl"), - temperature(33, "temperature", "temperature", "tempe"), - temperatureAlarm(34, "temperatureAlarm", "temperatureAlarm", "temAm"), - timer(35, "timer", "timer", "timer"), - turbo(36, "turbo", "turbo", "turbo"), - waterFlow(37, "waterFlow", "waterFlow", "watFw"), - liquidLevel(38, "liquidLevel", "liquidLevel", "liqLl"), - waterSensor(39, "waterSensor", "waterSensor", "watSr"), - weight(40, "weight", "weight", "weigt"), - wind(41, "wind", "wind", "wind"), + acousticSensor, + airQualitySensor, + alarmSpeaker, + anemometer, + audioVolume, + barometer, + battery, + binarySwitch, + bioElectricalImpedanceAnalysis, + boiler, + brewing, + brightness, + clock, + colour, + colourSaturation, + contactSensor, + credentials, + doorStatus, + electricVehicleConnector, + energyConsumption, + energyGeneration, + faultDetection, + foaming, + grinder, + height, + hotWaterSupply, + keepWarm, + keypad, + liquidLevel, + lock, + motionSensor, + numberValue, + oximeter, + personSensor, + playerControl, + powerSave, + pushButton, + recorder, + refrigeration, + relativeHumidity, + runState, + sessionDescription, + signalStrength, + smokeSensor, + spinLevel, + televisionChannel, + temperature, + temperatureAlarm, + timer, + turbo, + uvSensor, + waterFlow, + waterSensor, + weight, + ; - /****ADDED by Maciek****/ + private final String longName; + private final String shortName; + private final String cnd; - grinder(42, "grinder", "grinder", "gridr"), - foaming(43, "foaming", "foaming", "fomng"), - brewing(44, "brewing", "brewing", "brwng"), - boiling(45, "boiling", "boiling", "bling"), - keepWarm(46, "keepwarm", "keepwarm", "kWarm"), - - /***********************/ - - atmosphericPressureSensor(100, "atmosphericPressureSensor", "atmosphericPressureSensor", "atPSr"), - carbonDioxideSensor(101, "carbonDioxideSensor", "carbonDioxideSensor", "cbDSr"), - carbonMonoxideSensor(102, "carbonMonoxideSensor", "carbonMonoxideSensor", "cbMSr"), - contactSensor(103, "contactSensor", "contactSensor", "conSr"), - dimming(104, "dimming", "dimming", "dimng"), - energyOverloadCircuitBreaker(105, "energyOverloadCircuitBreaker", "energyOverloadCircuitBreaker", "eOCBr"), - genericSensor(106, "genericSensor", "genericSensor", "genSr"), - glassBreakSensor(107, "glassBreakSensor", "glassBreakSensor", "gBkSr"), - presenceSensor(108, "presenceSensor", "presenceSensor", "preSr"), - touchSensor(109, "touchSensor", "touchSensor", "touSr"), - lock(110, "lock", "lock", "lock"), - - personSensor(150, "personSensor", "personSensor", "perSr"), - streaming(151, "streaming", "streaming", "streg"), - noise(152, "noise", "noise", "noise"), - extendedCarbonDioxideSensor(153, "extendedCarbonDioxideSensor", "extendedCarbonDioxideSensor", "eCDSr"), - - numberValue(154, "numberValue", "numberValue", "numVe"), // Added by Andreas Kraft - - - abstractAlarmSensor(200, "abstractAlarmSensor", "abstractAlarmSensor", "aAlSr"); - - static private final String PATH = "org.onem2m.home.moduleclass."; - - private int value; - private final String def; - private final String longDefinitionName; - private final String shortDefinitionName; - - ModuleType(final int v, final String s, final String longDef, final String shortDef) { - value = v; - def = s; - longDefinitionName = longDef; - shortDefinitionName = shortDef; + ModuleType() { + longName = toString(); + shortName = FlexContainers.getFlexShortName(longName); + cnd = FlexContainers.getContainerDefinition(longName); +// System.out.println("MOD " + longName + "/" + shortName + "/" + cnd); } - - public int getValue() { - return value; - } public String getDefinition() { - return PATH + def; + return cnd; } /** @@ -113,7 +87,7 @@ public enum ModuleType implements Identifiers { */ @Override public String getLongName() { - return longDefinitionName; + return longName; } /** @@ -121,16 +95,7 @@ public enum ModuleType implements Identifiers { */ @Override public String getShortName() { - return shortDefinitionName; + return shortName; } - public static ModuleType fromValue(int v) { - for (ModuleType c: ModuleType.values()) { - if (c.value == v) { - return c; - } - } - throw new IllegalArgumentException("Undefined value " + v); - } - } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/PlayerMode.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/PlayerMode.java new file mode 100644 index 00000000..fa5064cf --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/PlayerMode.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.types; + +import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; + +public abstract class PlayerMode extends EnumDataPoint { + + static public enum Values { + stop, play, pause, resume, record, rewind, fastRewind, forward, fastForward, searchPrevious, searchNext + } + + public PlayerMode() { + this(DatapointType.currentPlayerMode); + } + + public PlayerMode(DatapointType dt) { + super(dt, HomeDataType.PlayerMode); + setValidValues(Values.values()); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/SpinLevel.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/SpinLevel.java new file mode 100644 index 00000000..cdab319e --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/SpinLevel.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.types; + +import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; + +public abstract class SpinLevel extends EnumDataPoint { + + static public enum Values { + zero, sensitive, weak, medium, strong, maximum + } + + public SpinLevel() { + this(DatapointType.spinLevelStrength); + } + + public SpinLevel(DatapointType dp) { + super(dp, HomeDataType.SpinLevelStrength); + setValidValues(Values.values()); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/SupportedMediaSources.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/SupportedMediaSources.java new file mode 100644 index 00000000..089b266c --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/SupportedMediaSources.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.types; + +import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; + +public abstract class SupportedMediaSources extends EnumDataPoint { + + static public enum Values { + tuner, component, composite, svideo, rgb, dvi, hdmi, displayPort, scart, externalStorage, network + } + + public SupportedMediaSources() { + this(DatapointType.supportedMediaSources); + } + + public SupportedMediaSources(DatapointType dp) { + super(dp, HomeDataType.SupportedMediaSources); + setValidValues(Values.values()); + } + +} diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/TasteStrength.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/TasteStrength.java index 3479479b..c8d094c3 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/TasteStrength.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/TasteStrength.java @@ -7,32 +7,21 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.types; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.om2m.sdt.Identifiers; -import org.eclipse.om2m.sdt.datapoints.ClonedEnum; import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; -public class TasteStrength extends ClonedEnum { - - static public final int zero = 1; - static public final int sensitive = 2; - static public final int medium = 3; - static public final int strong = 4; - static public final int maximum = 5; +public abstract class TasteStrength extends EnumDataPoint { - static private List values = Arrays.asList( - zero, sensitive, medium, strong, maximum - ); - - public TasteStrength(EnumDataPoint dp) { - this(DatapointType.strength, dp); + static public enum Values { + zero, sensitive, medium, strong, maximum } - - public TasteStrength(Identifiers name, EnumDataPoint dp) { - super(name, HomeDataType.TasteStrength, dp); - setValidValues(values); + + public TasteStrength() { + this(DatapointType.strength); + } + + public TasteStrength(DatapointType dp) { + super(dp, HomeDataType.TasteStrength); + setValidValues(Values.values()); } } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/Tone.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/Tone.java index d2ed13e0..37f955f3 100644 --- a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/Tone.java +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/Tone.java @@ -7,33 +7,21 @@ *******************************************************************************/ package org.eclipse.om2m.sdt.home.types; -import java.util.Arrays; -import java.util.List; - -import org.eclipse.om2m.sdt.Identifiers; -import org.eclipse.om2m.sdt.datapoints.ClonedEnum; import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; -public class Tone extends ClonedEnum { - - static public final int Fire = 1; - static public final int Theft = 2; - static public final int Emergency = 3; - static public final int Doorbell = 4; - static public final int DeviceFail = 5; - static public final int Silent = 6; +public abstract class Tone extends EnumDataPoint { - static private List values = Arrays.asList( - Fire, Theft, Emergency, Doorbell, DeviceFail, Silent - ); - - public Tone(EnumDataPoint dp) { - this(DatapointType.tone, dp); + static public enum Values { + fire, theft, emergency, doorbell, deviceFail } - public Tone(Identifiers identifiers, EnumDataPoint dp) { - super(identifiers, HomeDataType.Tone, dp); - setValidValues(values); + public Tone() { + this(DatapointType.tone); } + public Tone(DatapointType dt) { + super(dt, HomeDataType.Tone); + setValidValues(Values.values()); + } + } diff --git a/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/UvStatus.java b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/UvStatus.java new file mode 100644 index 00000000..cad6036f --- /dev/null +++ b/org.eclipse.om2m.sdt/org.eclipse.om2m.sdt.home/src/main/java/org/eclipse/om2m/sdt/home/types/UvStatus.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.sdt.home.types; + +import org.eclipse.om2m.sdt.datapoints.EnumDataPoint; + +public abstract class UvStatus extends EnumDataPoint { + + static public enum Values { + good, normal, bad, veryBad, danger + } + + public UvStatus() { + this(DatapointType.uvStatus); + } + + public UvStatus(DatapointType dt) { + super(dt, HomeDataType.UvStatus); + setValidValues(Values.values()); + } + +} diff --git a/org.eclipse.om2m.sdt/pom.xml b/org.eclipse.om2m.sdt/pom.xml index 903e36fd..907d1e05 100644 --- a/org.eclipse.om2m.sdt/pom.xml +++ b/org.eclipse.om2m.sdt/pom.xml @@ -46,6 +46,7 @@ org.eclipse.om2m.sdt.home.lifx org.eclipse.om2m.sdt.home.netatmo org.eclipse.om2m.sdt.home.smartercoffee + org.eclipse.om2m.sdt.home.smarterkettle org.eclipse.om2m.sdt.home.mocked.devices org.eclipse.om2m.sdt.home.utils org.eclipse.om2m.sdt.home.applications diff --git a/org.eclipse.om2m.site.asn-cse/.project b/org.eclipse.om2m.site.asn-cse/.project deleted file mode 100644 index 1b4d0aeb..00000000 --- a/org.eclipse.om2m.site.asn-cse/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.om2m.site.asn-cse - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/org.eclipse.om2m.site.in-cse/.project b/org.eclipse.om2m.site.in-cse/.project deleted file mode 100644 index 17132491..00000000 --- a/org.eclipse.om2m.site.in-cse/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.om2m.site.in-cse - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/org.eclipse.om2m.site.in-cse/log4j.configuration b/org.eclipse.om2m.site.in-cse/log4j.configuration index 24e3cdb8..4287686c 100644 --- a/org.eclipse.om2m.site.in-cse/log4j.configuration +++ b/org.eclipse.om2m.site.in-cse/log4j.configuration @@ -1,4 +1,4 @@ -log4j.rootLogger=INFO, stdout, file +log4j.rootLogger=INFO, file log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout diff --git a/org.eclipse.om2m.site.in-cse/om2m.product b/org.eclipse.om2m.site.in-cse/om2m.product index 1cc91c33..919cde63 100644 --- a/org.eclipse.om2m.site.in-cse/om2m.product +++ b/org.eclipse.om2m.site.in-cse/om2m.product @@ -72,6 +72,7 @@ + @@ -98,16 +99,17 @@ - + - - - + + + - - + + + diff --git a/org.eclipse.om2m.site.in-cse/pax-confman-propsloader-0.2.2.jar b/org.eclipse.om2m.site.in-cse/pax-confman-propsloader-0.2.2.jar new file mode 100644 index 00000000..54bc8aeb Binary files /dev/null and b/org.eclipse.om2m.site.in-cse/pax-confman-propsloader-0.2.2.jar differ diff --git a/org.eclipse.om2m.site.in-cse/pom.xml b/org.eclipse.om2m.site.in-cse/pom.xml index 2b2dc845..45566932 100644 --- a/org.eclipse.om2m.site.in-cse/pom.xml +++ b/org.eclipse.om2m.site.in-cse/pom.xml @@ -51,7 +51,7 @@ org.apache.maven.plugins maven-antrun-plugin - 1.1 + 1.8 package @@ -67,6 +67,16 @@ tofile="${basedir}/target/products/in-cse/${osgi.os}/${osgi.ws}/${osgi.arch}/start.bat" /> + + + + + + + diff --git a/org.eclipse.om2m.site.mn-cse/.project b/org.eclipse.om2m.site.mn-cse/.project deleted file mode 100644 index fc2fae28..00000000 --- a/org.eclipse.om2m.site.mn-cse/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.eclipse.om2m.site.mn-cse - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/org.eclipse.om2m.site.mn-cse/configurations/services/hue.basedriver.properties b/org.eclipse.om2m.site.mn-cse/configurations/services/hue.basedriver.properties new file mode 100644 index 00000000..def776e3 --- /dev/null +++ b/org.eclipse.om2m.site.mn-cse/configurations/services/hue.basedriver.properties @@ -0,0 +1,8 @@ +enable.ssdp.discovery false +hue.bridge.description.url http://192.168.1.15:80/description.xml + +# hue.bridge.userid defines the userid to be used on the hue bridge +# if set, the defined userId will be used for the communication with the bridge +# if not set, the hue base driver will negociate a new userId and store it +# in this configuration file +# ex : hue.bridge.userid 12345 \ No newline at end of file diff --git a/org.eclipse.om2m.site.mn-cse/om2m.product b/org.eclipse.om2m.site.mn-cse/om2m.product index 097a96fd..a798d8b5 100644 --- a/org.eclipse.om2m.site.mn-cse/om2m.product +++ b/org.eclipse.om2m.site.mn-cse/om2m.product @@ -80,6 +80,9 @@ + + + @@ -107,6 +110,9 @@ + + + diff --git a/org.eclipse.om2m.testsuite.flexcontainer/.classpath b/org.eclipse.om2m.testsuite.flexcontainer/.classpath deleted file mode 100644 index 642bfb34..00000000 --- a/org.eclipse.om2m.testsuite.flexcontainer/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.testsuite.flexcontainer/.project b/org.eclipse.om2m.testsuite.flexcontainer/.project deleted file mode 100644 index 2a848610..00000000 --- a/org.eclipse.om2m.testsuite.flexcontainer/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.testsuite.flexcontainer - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/AccessControlPolicyTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/AccessControlPolicyTest.java index b35e3320..888314c6 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/AccessControlPolicyTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/AccessControlPolicyTest.java @@ -66,8 +66,8 @@ public class AccessControlPolicyTest extends FlexContainerTestSuite { // init a new FlexContainer BinarySwitchFlexContainer flexContainer = new BinarySwitchFlexContainer(); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("false"); + ca.setShortName("powSe"); + ca.setValue("false"); flexContainer.getCustomAttributes().add(ca); String flexContainerName = "flexContainerACPTest_" + System.currentTimeMillis(); flexContainer.setName(flexContainerName); @@ -156,8 +156,8 @@ public class AccessControlPolicyTest extends FlexContainerTestSuite { BinarySwitchFlexContainer flexContainer = new BinarySwitchFlexContainer(); flexContainer.setName(flexContainerName); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("false"); + ca.setShortName("powSe"); + ca.setValue("false"); flexContainer.getCustomAttributes().add(ca); String flexContainerLocation = baseLocation + "/" + flexContainerName; @@ -216,8 +216,8 @@ public class AccessControlPolicyTest extends FlexContainerTestSuite { flexContainer.setName(flexContainerName); flexContainer.setContainerDefinition("org.onem2m.home.moduleclass.binaryswitch"); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("false"); + ca.setShortName("powSe"); + ca.setValue("false"); flexContainer.getCustomAttributes().add(ca); String flexContainerLocation = baseLocation + "/" + flexContainerName; diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/Activator.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/Activator.java index 415794de..2513a063 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/Activator.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/Activator.java @@ -178,7 +178,7 @@ public class Activator implements BundleActivator { faultDetectionTest.executeTestsAndPrintReports(); tests.add(faultDetectionTest); - RunModeFlexContainerTest runModeTest = new RunModeFlexContainerTest(cseService); + RunStateFlexContainerTest runModeTest = new RunStateFlexContainerTest(cseService); runModeTest.executeTestsAndPrintReports(); tests.add(runModeTest); diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/AlarmSpeakerFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/AlarmSpeakerFlexContainerTest.java index a6a98c75..cc51f156 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/AlarmSpeakerFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/AlarmSpeakerFlexContainerTest.java @@ -38,13 +38,13 @@ public class AlarmSpeakerFlexContainerTest extends FlexContainerTestSuite { flexContainer.setCreator("Greg"); CustomAttribute toneCustomAttribute = new CustomAttribute(); - toneCustomAttribute.setCustomAttributeName("tone"); - toneCustomAttribute.setCustomAttributeValue("1"); + toneCustomAttribute.setShortName("tone"); + toneCustomAttribute.setValue("1"); flexContainer.getCustomAttributes().add(toneCustomAttribute); CustomAttribute alarmStatusCustomAttribute = new CustomAttribute(); - alarmStatusCustomAttribute.setCustomAttributeName("alaSs"); - alarmStatusCustomAttribute.setCustomAttributeValue("true"); + alarmStatusCustomAttribute.setShortName("alaSs"); + alarmStatusCustomAttribute.setValue("true"); flexContainer.getCustomAttributes().add(alarmStatusCustomAttribute); // send CREATE request @@ -108,13 +108,13 @@ public class AlarmSpeakerFlexContainerTest extends FlexContainerTestSuite { flexContainer.setCreator("Greg"); CustomAttribute toneCustomAttribute = new CustomAttribute(); - toneCustomAttribute.setCustomAttributeName("tone"); - toneCustomAttribute.setCustomAttributeValue("1"); + toneCustomAttribute.setShortName("tone"); + toneCustomAttribute.setValue("1"); flexContainer.getCustomAttributes().add(toneCustomAttribute); CustomAttribute alarmStatusCustomAttribute = new CustomAttribute(); - alarmStatusCustomAttribute.setCustomAttributeName("alaSs"); - alarmStatusCustomAttribute.setCustomAttributeValue("true"); + alarmStatusCustomAttribute.setShortName("alaSs"); + alarmStatusCustomAttribute.setValue("true"); flexContainer.getCustomAttributes().add(alarmStatusCustomAttribute); // send CREATE request @@ -161,13 +161,13 @@ public class AlarmSpeakerFlexContainerTest extends FlexContainerTestSuite { flexContainer.setCreator("Greg"); CustomAttribute toneCustomAttribute = new CustomAttribute(); - toneCustomAttribute.setCustomAttributeName("tone"); - toneCustomAttribute.setCustomAttributeValue("1"); + toneCustomAttribute.setShortName("tone"); + toneCustomAttribute.setValue("1"); flexContainer.getCustomAttributes().add(toneCustomAttribute); CustomAttribute alarmStatusCustomAttribute = new CustomAttribute(); - alarmStatusCustomAttribute.setCustomAttributeName("alaSs"); - alarmStatusCustomAttribute.setCustomAttributeValue("true"); + alarmStatusCustomAttribute.setShortName("alaSs"); + alarmStatusCustomAttribute.setValue("true"); flexContainer.getCustomAttributes().add(alarmStatusCustomAttribute); // send CREATE request @@ -186,8 +186,8 @@ public class AlarmSpeakerFlexContainerTest extends FlexContainerTestSuite { AlarmSpeakerFlexContainer toBeUpdated = new AlarmSpeakerFlexContainer(); CustomAttribute updatedTone = new CustomAttribute(); - updatedTone.setCustomAttributeName("tone"); - updatedTone.setCustomAttributeValue("1"); + updatedTone.setShortName("tone"); + updatedTone.setValue("1"); toBeUpdated.getCustomAttributes().add(updatedTone); // send UPDATE request @@ -206,11 +206,11 @@ public class AlarmSpeakerFlexContainerTest extends FlexContainerTestSuite { return; } - if (!updatedTone.getCustomAttributeValue() - .equals(updatedFlexContainer.getCustomAttribute("tone").getCustomAttributeValue())) { + if (!updatedTone.getValue() + .equals(updatedFlexContainer.getCustomAttribute("tone").getValue())) { createTestReport("testUpdateAlarmSpeakerFlexContainer", Status.KO, - "Wrong tone attribute value. Expecting:" + updatedTone.getCustomAttributeValue() + ", received:" - + updatedFlexContainer.getCustomAttribute("tone").getCustomAttributeValue(), + "Wrong tone attribute value. Expecting:" + updatedTone.getValue() + ", received:" + + updatedFlexContainer.getCustomAttribute("tone").getValue(), null); return; } @@ -229,7 +229,7 @@ public class AlarmSpeakerFlexContainerTest extends FlexContainerTestSuite { // update createdFlexContainer with new tone value createdFlexContainer.getCustomAttribute("tone") - .setCustomAttributeValue(updatedTone.getCustomAttributeValue()); + .setValue(updatedTone.getValue()); try { checkFlexContainer(createdFlexContainer, retrievedFlexContainer); diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/BinarySwitchFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/BinarySwitchFlexContainerTest.java index 59642d59..a74d8721 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/BinarySwitchFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/BinarySwitchFlexContainerTest.java @@ -39,8 +39,8 @@ public class BinarySwitchFlexContainerTest extends FlexContainerTestSuite { initialFlexContainer.setCreator("Greg"); initialFlexContainer.setName("GregFirstBinaryFlexContainer" + System.currentTimeMillis()); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("true"); + ca.setShortName("powSe"); + ca.setValue("true"); initialFlexContainer.getCustomAttributes().add(ca); BinarySwitchFlexContainer responseCreatedFlexContainer = null; @@ -112,8 +112,8 @@ public class BinarySwitchFlexContainerTest extends FlexContainerTestSuite { initialFlexContainer.setCreator("Greg"); initialFlexContainer.setName("GregFirstBinaryFlexContainer" + System.currentTimeMillis()); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powerStateFake"); - ca.setCustomAttributeValue("true"); + ca.setShortName("powerStateFake"); + ca.setValue("true"); initialFlexContainer.getCustomAttributes().add(ca); BinarySwitchFlexContainer responseCreatedFlexContainer = null; @@ -147,8 +147,8 @@ public class BinarySwitchFlexContainerTest extends FlexContainerTestSuite { initialFlexContainer.setCreator("Greg"); initialFlexContainer.setName("GregFirstBinaryFlexContainer" + System.currentTimeMillis()); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("true"); + ca.setShortName("powSe"); + ca.setValue("true"); initialFlexContainer.getCustomAttributes().add(ca); BinarySwitchFlexContainer responseCreatedFlexContainer = null; @@ -171,7 +171,7 @@ public class BinarySwitchFlexContainerTest extends FlexContainerTestSuite { // update the flexContainer powerState custom attribute BinarySwitchFlexContainer toBeUpdated = new BinarySwitchFlexContainer(); - ca.setCustomAttributeValue("false"); + ca.setValue("false"); toBeUpdated.getCustomAttributes().add(ca); // send UPDATE request and check the response @@ -184,7 +184,7 @@ public class BinarySwitchFlexContainerTest extends FlexContainerTestSuite { updatedFlexContainer = (BinarySwitchFlexContainer) response.getContent(); // check powerState has been updated - if (!updatedFlexContainer.getCustomAttribute("powSe").getCustomAttributeValue().equals("false")) { + if (!updatedFlexContainer.getCustomAttribute("powSe").getValue().equals("false")) { createTestReport("testUpdateBinarySwitchFlexContainer", Status.KO, "unable to update powerState value to false", null); return; @@ -206,7 +206,7 @@ public class BinarySwitchFlexContainerTest extends FlexContainerTestSuite { // OK BinarySwitchFlexContainer retrievedFlexContainer = (BinarySwitchFlexContainer) response.getContent(); - responseCreatedFlexContainer.getCustomAttribute("powSe").setCustomAttributeValue("false"); + responseCreatedFlexContainer.getCustomAttribute("powSe").setValue("false"); try { checkFlexContainer(responseCreatedFlexContainer, retrievedFlexContainer); @@ -236,8 +236,8 @@ public class BinarySwitchFlexContainerTest extends FlexContainerTestSuite { initialFlexContainer.setCreator("Greg"); initialFlexContainer.setName("GregFirstBinaryFlexContainer" + System.currentTimeMillis()); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("true"); + ca.setShortName("powSe"); + ca.setValue("true"); initialFlexContainer.getCustomAttributes().add(ca); BinarySwitchFlexContainer responseCreatedFlexContainer = null; diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/CallbackTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/CallbackTest.java index 8742f7c9..f6ba5d67 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/CallbackTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/CallbackTest.java @@ -42,8 +42,8 @@ public class CallbackTest extends FlexContainerTestSuite { flexContainer = new BinarySwitchFlexContainer(); flexContainer.setName(flexContainerName); CustomAttribute powerState = new CustomAttribute(); - powerState.setCustomAttributeValue("false"); - powerState.setCustomAttributeName("powSe"); + powerState.setValue("false"); + powerState.setShortName("powSe"); flexContainer.getCustomAttributes().add(powerState); ResponsePrimitive response = sendCreateFlexContainerRequest(flexContainer, parentLocation, Constants.ADMIN_REQUESTING_ENTITY); @@ -77,7 +77,7 @@ public class CallbackTest extends FlexContainerTestSuite { public String getCustomAttributeValue(String customAttributeName) throws Om2mException { if (!customAttributeName.equals("powSe")) { throw new Om2mException( - "unexpected getCustomAttributeValue for attributeName=" + customAttributeName, + "unexpected getValue for attributeName=" + customAttributeName, ResponseStatusCode.NOT_IMPLEMENTED); } numberOfGetAttributeValue++; @@ -90,7 +90,7 @@ public class CallbackTest extends FlexContainerTestSuite { if ((customAttributeNames.size() != 1) || customAttributeNames.get(0).equals("powSe")) { throw new Om2mException( - "unexpected getCustomAttributeValue for attributeName=" + customAttributeNames, + "unexpected getValue for attributeName=" + customAttributeNames, ResponseStatusCode.NOT_IMPLEMENTED); } numberOfGetAttributeValue++; @@ -109,7 +109,7 @@ public class CallbackTest extends FlexContainerTestSuite { if (!response.getResponseStatusCode().equals(ResponseStatusCode.OK)) { BinarySwitchFlexContainer retrievedFlexContainer = (BinarySwitchFlexContainer) response.getContent(); - if (!retrievedFlexContainer.getCustomAttribute("powSe").getCustomAttributeValue() + if (!retrievedFlexContainer.getCustomAttribute("powSe").getValue() .equals(Boolean.TRUE.toString())) { createTestReport("testCallback", Status.KO, "invalid powerState value, expecting true", null); return; @@ -131,7 +131,7 @@ public class CallbackTest extends FlexContainerTestSuite { if (!response.getResponseStatusCode().equals(ResponseStatusCode.OK)) { BinarySwitchFlexContainer retrievedFlexContainer = (BinarySwitchFlexContainer) response.getContent(); - if (!retrievedFlexContainer.getCustomAttribute("powSe").getCustomAttributeValue() + if (!retrievedFlexContainer.getCustomAttribute("powSe").getValue() .equals(Boolean.TRUE.toString())) { createTestReport("testCallback", Status.KO, "invalid powerState value, expecting true", null); return; @@ -165,13 +165,13 @@ public class CallbackTest extends FlexContainerTestSuite { throw new Om2mException("not allowed. Invalid size of CustomAttribute", ResponseStatusCode.INVALID_ARGUMENTS); } CustomAttribute powerStateCA = customAttributes.get(0); - if (!"powSe".equals(powerStateCA.getCustomAttributeName())) { + if (!"powSe".equals(powerStateCA.getShortName())) { throw new Om2mException("not allowed", ResponseStatusCode.INVALID_ARGUMENTS); } Boolean booleanValue = null; try { - booleanValue = new Boolean((String) powerStateCA.getCustomAttributeValue()); + booleanValue = new Boolean((String) powerStateCA.getValue()); } catch (Exception e) { throw new Om2mException("not allowed", ResponseStatusCode.INVALID_ARGUMENTS); } @@ -190,7 +190,7 @@ public class CallbackTest extends FlexContainerTestSuite { public String getCustomAttributeValue(String customAttributeName) throws Om2mException { if (!customAttributeName.equals("powSe")) { throw new Om2mException( - "unexpected getCustomAttributeValue for attributeName=" + customAttributeName, + "unexpected getValue for attributeName=" + customAttributeName, ResponseStatusCode.NOT_IMPLEMENTED); } numberOfGetAttributeValue++; @@ -203,7 +203,7 @@ public class CallbackTest extends FlexContainerTestSuite { if ((customAttributeNames.size() != 1) || customAttributeNames.get(0).equals("powSe")) { throw new Om2mException( - "unexpected getCustomAttributeValue for attributeName=" + customAttributeNames, + "unexpected getValue for attributeName=" + customAttributeNames, ResponseStatusCode.NOT_IMPLEMENTED); } numberOfGetAttributeValue++; @@ -219,8 +219,8 @@ public class CallbackTest extends FlexContainerTestSuite { BinarySwitchFlexContainer toBeUpdated = new BinarySwitchFlexContainer(); CustomAttribute powerState = new CustomAttribute(); - powerState.setCustomAttributeValue("true"); - powerState.setCustomAttributeName("powSe"); + powerState.setValue("true"); + powerState.setShortName("powSe"); toBeUpdated.getCustomAttributes().add(powerState); ResponsePrimitive response = sendUpdateFlexContainerRequest(flexContainerLocation, toBeUpdated); @@ -231,10 +231,10 @@ public class CallbackTest extends FlexContainerTestSuite { } BinarySwitchFlexContainer updatedFlexContainer = (BinarySwitchFlexContainer) response.getContent(); - if (!updatedFlexContainer.getCustomAttribute("powSe").getCustomAttributeValue() + if (!updatedFlexContainer.getCustomAttribute("powSe").getValue() .equals(Boolean.TRUE.toString())) { createTestReport("testCallback_update", Status.KO, "invalid for powerState, expecting TRUE, found" - + updatedFlexContainer.getCustomAttribute("powSe").getCustomAttributeValue(), null); + + updatedFlexContainer.getCustomAttribute("powSe").getValue(), null); return; } @@ -243,7 +243,7 @@ public class CallbackTest extends FlexContainerTestSuite { if (!response.getResponseStatusCode().equals(ResponseStatusCode.OK)) { BinarySwitchFlexContainer retrievedFlexContainer = (BinarySwitchFlexContainer) response.getContent(); - if (!retrievedFlexContainer.getCustomAttribute("powSe").getCustomAttributeValue() + if (!retrievedFlexContainer.getCustomAttribute("powSe").getValue() .equals(Boolean.TRUE.toString())) { createTestReport("testCallback", Status.KO, "invalid powerState value, expecting true", null); return; diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/EnergyConsumptionFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/EnergyConsumptionFlexContainerTest.java index d3e737a3..aa2b16d1 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/EnergyConsumptionFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/EnergyConsumptionFlexContainerTest.java @@ -37,43 +37,43 @@ public class EnergyConsumptionFlexContainerTest extends FlexContainerTestSuite { flexContainer.setCreator("greg"); CustomAttribute powerCustomAttribute = new CustomAttribute(); - powerCustomAttribute.setCustomAttributeName("power"); - powerCustomAttribute.setCustomAttributeValue("342"); + powerCustomAttribute.setShortName("power"); + powerCustomAttribute.setValue("342"); flexContainer.getCustomAttributes().add(powerCustomAttribute); CustomAttribute absoluteEnergyConsumptionDataCustomAttribute = new CustomAttribute(); - absoluteEnergyConsumptionDataCustomAttribute.setCustomAttributeName("abECn"); - absoluteEnergyConsumptionDataCustomAttribute.setCustomAttributeValue("3434"); + absoluteEnergyConsumptionDataCustomAttribute.setShortName("abECn"); + absoluteEnergyConsumptionDataCustomAttribute.setValue("3434"); flexContainer.getCustomAttributes().add(absoluteEnergyConsumptionDataCustomAttribute); CustomAttribute roundingEnergyConsumptionDataCustomAttribute = new CustomAttribute(); - roundingEnergyConsumptionDataCustomAttribute.setCustomAttributeName("roECn"); - roundingEnergyConsumptionDataCustomAttribute.setCustomAttributeValue("43242"); + roundingEnergyConsumptionDataCustomAttribute.setShortName("roECn"); + roundingEnergyConsumptionDataCustomAttribute.setValue("43242"); flexContainer.getCustomAttributes().add(roundingEnergyConsumptionDataCustomAttribute); CustomAttribute significantFigures = new CustomAttribute(); - significantFigures.setCustomAttributeName("sigDs"); - significantFigures.setCustomAttributeValue("3"); + significantFigures.setShortName("sigDs"); + significantFigures.setValue("3"); flexContainer.getCustomAttributes().add(significantFigures); CustomAttribute multiplyingFactors = new CustomAttribute(); - multiplyingFactors.setCustomAttributeName("mulFs"); - multiplyingFactors.setCustomAttributeValue("100"); + multiplyingFactors.setShortName("mulFs"); + multiplyingFactors.setValue("100"); flexContainer.getCustomAttributes().add(multiplyingFactors); CustomAttribute voltage = new CustomAttribute(); - voltage.setCustomAttributeName("volte"); - voltage.setCustomAttributeValue("3443"); + voltage.setShortName("volte"); + voltage.setValue("3443"); flexContainer.getCustomAttributes().add(voltage); CustomAttribute current = new CustomAttribute(); - current.setCustomAttributeName("currt"); - current.setCustomAttributeValue("45353"); + current.setShortName("currt"); + current.setValue("45353"); flexContainer.getCustomAttributes().add(current); CustomAttribute frequency = new CustomAttribute(); - frequency.setCustomAttributeName("freqy"); - frequency.setCustomAttributeValue("34"); + frequency.setShortName("freqy"); + frequency.setValue("34"); flexContainer.getCustomAttributes().add(frequency); // send CREATE request @@ -159,43 +159,43 @@ public class EnergyConsumptionFlexContainerTest extends FlexContainerTestSuite { flexContainer.setCreator("greg"); CustomAttribute powerCustomAttribute = new CustomAttribute(); - powerCustomAttribute.setCustomAttributeName("power"); - powerCustomAttribute.setCustomAttributeValue("342"); + powerCustomAttribute.setShortName("power"); + powerCustomAttribute.setValue("342"); flexContainer.getCustomAttributes().add(powerCustomAttribute); CustomAttribute absoluteEnergyConsumptionDataCustomAttribute = new CustomAttribute(); - absoluteEnergyConsumptionDataCustomAttribute.setCustomAttributeName("abECn"); - absoluteEnergyConsumptionDataCustomAttribute.setCustomAttributeValue("3434"); + absoluteEnergyConsumptionDataCustomAttribute.setShortName("abECn"); + absoluteEnergyConsumptionDataCustomAttribute.setValue("3434"); flexContainer.getCustomAttributes().add(absoluteEnergyConsumptionDataCustomAttribute); CustomAttribute roundingEnergyConsumptionDataCustomAttribute = new CustomAttribute(); - roundingEnergyConsumptionDataCustomAttribute.setCustomAttributeName("roECn"); - roundingEnergyConsumptionDataCustomAttribute.setCustomAttributeValue("43242"); + roundingEnergyConsumptionDataCustomAttribute.setShortName("roECn"); + roundingEnergyConsumptionDataCustomAttribute.setValue("43242"); flexContainer.getCustomAttributes().add(roundingEnergyConsumptionDataCustomAttribute); CustomAttribute significantFigures = new CustomAttribute(); - significantFigures.setCustomAttributeName("sigDs"); - significantFigures.setCustomAttributeValue("3"); + significantFigures.setShortName("sigDs"); + significantFigures.setValue("3"); flexContainer.getCustomAttributes().add(significantFigures); CustomAttribute multiplyingFactors = new CustomAttribute(); - multiplyingFactors.setCustomAttributeName("mulFs"); - multiplyingFactors.setCustomAttributeValue("100"); + multiplyingFactors.setShortName("mulFs"); + multiplyingFactors.setValue("100"); flexContainer.getCustomAttributes().add(multiplyingFactors); CustomAttribute voltage = new CustomAttribute(); - voltage.setCustomAttributeName("volte"); - voltage.setCustomAttributeValue("3443"); + voltage.setShortName("volte"); + voltage.setValue("3443"); flexContainer.getCustomAttributes().add(voltage); CustomAttribute current = new CustomAttribute(); - current.setCustomAttributeName("currt"); - current.setCustomAttributeValue("45353"); + current.setShortName("currt"); + current.setValue("45353"); flexContainer.getCustomAttributes().add(current); CustomAttribute frequency = new CustomAttribute(); - frequency.setCustomAttributeName("freqy"); - frequency.setCustomAttributeValue("34"); + frequency.setShortName("freqy"); + frequency.setValue("34"); flexContainer.getCustomAttributes().add(frequency); // send CREATE request @@ -243,43 +243,43 @@ public class EnergyConsumptionFlexContainerTest extends FlexContainerTestSuite { flexContainer.setCreator("greg"); CustomAttribute powerCustomAttribute = new CustomAttribute(); - powerCustomAttribute.setCustomAttributeName("power"); - powerCustomAttribute.setCustomAttributeValue("342"); + powerCustomAttribute.setShortName("power"); + powerCustomAttribute.setValue("342"); flexContainer.getCustomAttributes().add(powerCustomAttribute); CustomAttribute absoluteEnergyConsumptionDataCustomAttribute = new CustomAttribute(); - absoluteEnergyConsumptionDataCustomAttribute.setCustomAttributeName("abECn"); - absoluteEnergyConsumptionDataCustomAttribute.setCustomAttributeValue("3434"); + absoluteEnergyConsumptionDataCustomAttribute.setShortName("abECn"); + absoluteEnergyConsumptionDataCustomAttribute.setValue("3434"); flexContainer.getCustomAttributes().add(absoluteEnergyConsumptionDataCustomAttribute); CustomAttribute roundingEnergyConsumptionDataCustomAttribute = new CustomAttribute(); - roundingEnergyConsumptionDataCustomAttribute.setCustomAttributeName("roECn"); - roundingEnergyConsumptionDataCustomAttribute.setCustomAttributeValue("43242"); + roundingEnergyConsumptionDataCustomAttribute.setShortName("roECn"); + roundingEnergyConsumptionDataCustomAttribute.setValue("43242"); flexContainer.getCustomAttributes().add(roundingEnergyConsumptionDataCustomAttribute); CustomAttribute significantFigures = new CustomAttribute(); - significantFigures.setCustomAttributeName("sigDs"); - significantFigures.setCustomAttributeValue("3"); + significantFigures.setShortName("sigDs"); + significantFigures.setValue("3"); flexContainer.getCustomAttributes().add(significantFigures); CustomAttribute multiplyingFactors = new CustomAttribute(); - multiplyingFactors.setCustomAttributeName("mulFs"); - multiplyingFactors.setCustomAttributeValue("100"); + multiplyingFactors.setShortName("mulFs"); + multiplyingFactors.setValue("100"); flexContainer.getCustomAttributes().add(multiplyingFactors); CustomAttribute voltage = new CustomAttribute(); - voltage.setCustomAttributeName("volte"); - voltage.setCustomAttributeValue("3443"); + voltage.setShortName("volte"); + voltage.setValue("3443"); flexContainer.getCustomAttributes().add(voltage); CustomAttribute current = new CustomAttribute(); - current.setCustomAttributeName("currt"); - current.setCustomAttributeValue("45353"); + current.setShortName("currt"); + current.setValue("45353"); flexContainer.getCustomAttributes().add(current); CustomAttribute frequency = new CustomAttribute(); - frequency.setCustomAttributeName("freqy"); - frequency.setCustomAttributeValue("34"); + frequency.setShortName("freqy"); + frequency.setValue("34"); flexContainer.getCustomAttributes().add(frequency); // send CREATE request @@ -298,8 +298,8 @@ public class EnergyConsumptionFlexContainerTest extends FlexContainerTestSuite { // prepare Update request EnergyConsumptionFlexContainer toBeUpdated = new EnergyConsumptionFlexContainer(); CustomAttribute updatedVoltage = new CustomAttribute(); - updatedVoltage.setCustomAttributeName("volte"); - updatedVoltage.setCustomAttributeValue("0"); + updatedVoltage.setShortName("volte"); + updatedVoltage.setValue("0"); toBeUpdated.getCustomAttributes().add(updatedVoltage); // send UPDATE request @@ -321,12 +321,12 @@ public class EnergyConsumptionFlexContainerTest extends FlexContainerTestSuite { return; } - if (!updatedFlexContainer.getCustomAttribute("volte").getCustomAttributeValue() - .equals(updatedVoltage.getCustomAttributeValue())) { + if (!updatedFlexContainer.getCustomAttribute("volte").getValue() + .equals(updatedVoltage.getValue())) { createTestReport("testUpdateEnergyConsumptionFlexContainer", Status.KO, - "wrong voltage customAttribute value. Expecting: " + updatedVoltage.getCustomAttributeValue() + "wrong voltage customAttribute value. Expecting: " + updatedVoltage.getValue() + " , found: " - + updatedFlexContainer.getCustomAttribute("volte").getCustomAttributeValue(), + + updatedFlexContainer.getCustomAttribute("volte").getValue(), null); return; @@ -346,7 +346,7 @@ public class EnergyConsumptionFlexContainerTest extends FlexContainerTestSuite { // prepare initial flexContainer createdFlexContainer.setName(flexContainerName); - createdFlexContainer.getCustomAttribute("volte").setCustomAttributeValue("0"); + createdFlexContainer.getCustomAttribute("volte").setValue("0"); try { checkFlexContainer(createdFlexContainer, retrievedFlexContainer); diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FaultDetectionFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FaultDetectionFlexContainerTest.java index 38778ca3..27223ba6 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FaultDetectionFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FaultDetectionFlexContainerTest.java @@ -41,18 +41,18 @@ public class FaultDetectionFlexContainerTest extends FlexContainerTestSuite { flexContainer.setCreator("Greg"); CustomAttribute statusCustomAttribute = new CustomAttribute(); - statusCustomAttribute.setCustomAttributeName("stats"); - statusCustomAttribute.setCustomAttributeValue("false"); + statusCustomAttribute.setShortName("stats"); + statusCustomAttribute.setValue("false"); flexContainer.getCustomAttributes().add(statusCustomAttribute); CustomAttribute codeCustomAttribute = new CustomAttribute(); - codeCustomAttribute.setCustomAttributeName("code"); - codeCustomAttribute.setCustomAttributeValue("123"); + codeCustomAttribute.setShortName("code"); + codeCustomAttribute.setValue("123"); flexContainer.getCustomAttributes().add(codeCustomAttribute); CustomAttribute descriptionCustomAttribute = new CustomAttribute(); - descriptionCustomAttribute.setCustomAttributeName("descn"); - descriptionCustomAttribute.setCustomAttributeValue("My description"); + descriptionCustomAttribute.setShortName("descn"); + descriptionCustomAttribute.setValue("My description"); flexContainer.getCustomAttributes().add(descriptionCustomAttribute); // send create Request @@ -148,18 +148,18 @@ public class FaultDetectionFlexContainerTest extends FlexContainerTestSuite { flexContainer.setCreator("Greg"); CustomAttribute statusCustomAttribute = new CustomAttribute(); - statusCustomAttribute.setCustomAttributeName("stats"); - statusCustomAttribute.setCustomAttributeValue("false"); + statusCustomAttribute.setShortName("stats"); + statusCustomAttribute.setValue("false"); flexContainer.getCustomAttributes().add(statusCustomAttribute); CustomAttribute codeCustomAttribute = new CustomAttribute(); - codeCustomAttribute.setCustomAttributeName("code"); - codeCustomAttribute.setCustomAttributeValue("123"); + codeCustomAttribute.setShortName("code"); + codeCustomAttribute.setValue("123"); flexContainer.getCustomAttributes().add(codeCustomAttribute); CustomAttribute descriptionCustomAttribute = new CustomAttribute(); - descriptionCustomAttribute.setCustomAttributeName("descn"); - descriptionCustomAttribute.setCustomAttributeValue("My description"); + descriptionCustomAttribute.setShortName("descn"); + descriptionCustomAttribute.setValue("My description"); flexContainer.getCustomAttributes().add(descriptionCustomAttribute); // send create Request @@ -174,8 +174,8 @@ public class FaultDetectionFlexContainerTest extends FlexContainerTestSuite { // update the status value FaultDetectionFlexContainer flexContainerToBeUpdated = new FaultDetectionFlexContainer(); CustomAttribute statusCustomAttributeToBeUpdated = new CustomAttribute(); - statusCustomAttributeToBeUpdated.setCustomAttributeName("stats"); - statusCustomAttributeToBeUpdated.setCustomAttributeValue("true"); + statusCustomAttributeToBeUpdated.setShortName("stats"); + statusCustomAttributeToBeUpdated.setValue("true"); flexContainerToBeUpdated.getCustomAttributes().add(statusCustomAttributeToBeUpdated); // send UPDATE request @@ -188,7 +188,7 @@ public class FaultDetectionFlexContainerTest extends FlexContainerTestSuite { return; } else { updatedFlexContainer = (FaultDetectionFlexContainer) response.getContent(); - if (!updatedFlexContainer.getCustomAttribute("stats").getCustomAttributeValue().equals("true")) { + if (!updatedFlexContainer.getCustomAttribute("stats").getValue().equals("true")) { createTestReport("testUpdateFaultDetectionFlexContainer", Status.KO, "expected \"true\" value for status custom attribute", null); return; @@ -209,18 +209,18 @@ public class FaultDetectionFlexContainerTest extends FlexContainerTestSuite { flexContainer.setCreator("Greg"); CustomAttribute statusCustomAttribute = new CustomAttribute(); - statusCustomAttribute.setCustomAttributeName("stats"); - statusCustomAttribute.setCustomAttributeValue("false"); + statusCustomAttribute.setShortName("stats"); + statusCustomAttribute.setValue("false"); flexContainer.getCustomAttributes().add(statusCustomAttribute); CustomAttribute codeCustomAttribute = new CustomAttribute(); - codeCustomAttribute.setCustomAttributeName("code"); - codeCustomAttribute.setCustomAttributeValue("123"); + codeCustomAttribute.setShortName("code"); + codeCustomAttribute.setValue("123"); flexContainer.getCustomAttributes().add(codeCustomAttribute); CustomAttribute descriptionCustomAttribute = new CustomAttribute(); - descriptionCustomAttribute.setCustomAttributeName("descn"); - descriptionCustomAttribute.setCustomAttributeValue("My description"); + descriptionCustomAttribute.setShortName("descn"); + descriptionCustomAttribute.setValue("My description"); flexContainer.getCustomAttributes().add(descriptionCustomAttribute); // send create Request diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FlexContainerTestSuite.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FlexContainerTestSuite.java index 0db7562d..250ceba4 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FlexContainerTestSuite.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FlexContainerTestSuite.java @@ -271,7 +271,7 @@ public abstract class FlexContainerTestSuite { CustomAttribute foundCa = null; for (CustomAttribute caOfToBeCompared : toBeCompared.getCustomAttributes()) { - if (caOfToBeCompared.getCustomAttributeName().equals(ca.getCustomAttributeName())) { + if (caOfToBeCompared.getShortName().equals(ca.getShortName())) { foundCa = caOfToBeCompared; break; } @@ -281,21 +281,21 @@ public abstract class FlexContainerTestSuite { } protected void checkCustomAttribute(CustomAttribute initialCa, CustomAttribute toBeComparedCa) throws Exception { - if (!initialCa.getCustomAttributeName().equals(toBeComparedCa.getCustomAttributeName())) { + if (!initialCa.getShortName().equals(toBeComparedCa.getShortName())) { throw new Exception( - "customAttributeName are differents (initialCaName=" + initialCa.getCustomAttributeName() - + ", toBeComparedCaName=" + toBeComparedCa.getCustomAttributeName()); + "name are differents (initialCaName=" + initialCa.getShortName() + + ", toBeComparedCaName=" + toBeComparedCa.getShortName()); } // value may be null - if ((initialCa.getCustomAttributeValue() == null) && (toBeComparedCa.getCustomAttributeValue() != null)) { + if ((initialCa.getValue() == null) && (toBeComparedCa.getValue() != null)) { throw new Exception("initialCa value is null but toBeComparedCa value is not null"); } - if (!initialCa.getCustomAttributeValue().equals(toBeComparedCa.getCustomAttributeValue())) { + if (!initialCa.getValue().equals(toBeComparedCa.getValue())) { throw new Exception( - "customAttributeValue are differents (initialCaType=" + initialCa.getCustomAttributeValue() - + ", toBeComparedCaType=" + toBeComparedCa.getCustomAttributeValue()); + "customAttributeValue are differents (initialCaType=" + initialCa.getValue() + + ", toBeComparedCaType=" + toBeComparedCa.getValue()); } } diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FloodDetectorFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FloodDetectorFlexContainerTest.java index 92ed9d83..8b8a95e7 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FloodDetectorFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/FloodDetectorFlexContainerTest.java @@ -37,28 +37,28 @@ public class FloodDetectorFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request @@ -123,28 +123,28 @@ public class FloodDetectorFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/GasValveFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/GasValveFlexContainerTest.java index 4250fec3..fdb42ab2 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/GasValveFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/GasValveFlexContainerTest.java @@ -37,28 +37,28 @@ public class GasValveFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request @@ -123,28 +123,28 @@ public class GasValveFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LightDeviceFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LightDeviceFlexContainerTest.java index 0cd8b991..bbfcff15 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LightDeviceFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LightDeviceFlexContainerTest.java @@ -37,28 +37,28 @@ public class LightDeviceFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request @@ -123,28 +123,28 @@ public class LightDeviceFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LightFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LightFlexContainerTest.java index b9dfe297..3baaec9c 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LightFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LightFlexContainerTest.java @@ -37,23 +37,23 @@ public class LightFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("Orange"); CustomAttribute illuminanceLevelCustomAttribute = new CustomAttribute(); - illuminanceLevelCustomAttribute.setCustomAttributeName("illuminanceLevel"); - illuminanceLevelCustomAttribute.setCustomAttributeValue("90"); + illuminanceLevelCustomAttribute.setShortName("illuminanceLevel"); + illuminanceLevelCustomAttribute.setValue("90"); flexContainer.getCustomAttributes().add(illuminanceLevelCustomAttribute); CustomAttribute illuminanceStepLevelCustomAttribute = new CustomAttribute(); - illuminanceStepLevelCustomAttribute.setCustomAttributeName("illuminanceStepLevel"); - illuminanceStepLevelCustomAttribute.setCustomAttributeValue("1"); + illuminanceStepLevelCustomAttribute.setShortName("illuminanceStepLevel"); + illuminanceStepLevelCustomAttribute.setValue("1"); flexContainer.getCustomAttributes().add(illuminanceStepLevelCustomAttribute); CustomAttribute modeCustomAttribute = new CustomAttribute(); - modeCustomAttribute.setCustomAttributeName("mode"); - modeCustomAttribute.setCustomAttributeValue("normal"); + modeCustomAttribute.setShortName("mode"); + modeCustomAttribute.setValue("normal"); flexContainer.getCustomAttributes().add(modeCustomAttribute); CustomAttribute rgbColorSettingCustomAttribute = new CustomAttribute(); - rgbColorSettingCustomAttribute.setCustomAttributeName("rgbColorSetting"); - rgbColorSettingCustomAttribute.setCustomAttributeValue(new Integer(0x222222).toString()); + rgbColorSettingCustomAttribute.setShortName("rgbColorSetting"); + rgbColorSettingCustomAttribute.setValue(new Integer(0x222222).toString()); flexContainer.getCustomAttributes().add(rgbColorSettingCustomAttribute); // send CREATE request @@ -142,23 +142,23 @@ public class LightFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("Orange"); CustomAttribute illuminanceLevelCustomAttribute = new CustomAttribute(); - illuminanceLevelCustomAttribute.setCustomAttributeName("illuminanceLevel"); - illuminanceLevelCustomAttribute.setCustomAttributeValue("90"); + illuminanceLevelCustomAttribute.setShortName("illuminanceLevel"); + illuminanceLevelCustomAttribute.setValue("90"); flexContainer.getCustomAttributes().add(illuminanceLevelCustomAttribute); CustomAttribute illuminanceStepLevelCustomAttribute = new CustomAttribute(); - illuminanceStepLevelCustomAttribute.setCustomAttributeName("illuminanceStepLevel"); - illuminanceStepLevelCustomAttribute.setCustomAttributeValue("1"); + illuminanceStepLevelCustomAttribute.setShortName("illuminanceStepLevel"); + illuminanceStepLevelCustomAttribute.setValue("1"); flexContainer.getCustomAttributes().add(illuminanceStepLevelCustomAttribute); CustomAttribute modeCustomAttribute = new CustomAttribute(); - modeCustomAttribute.setCustomAttributeName("mode"); - modeCustomAttribute.setCustomAttributeValue("normal"); + modeCustomAttribute.setShortName("mode"); + modeCustomAttribute.setValue("normal"); flexContainer.getCustomAttributes().add(modeCustomAttribute); CustomAttribute rgbColorSettingCustomAttribute = new CustomAttribute(); - rgbColorSettingCustomAttribute.setCustomAttributeName("rgbColorSetting"); - rgbColorSettingCustomAttribute.setCustomAttributeValue(new Integer(0x222222).toString()); + rgbColorSettingCustomAttribute.setShortName("rgbColorSetting"); + rgbColorSettingCustomAttribute.setValue(new Integer(0x222222).toString()); flexContainer.getCustomAttributes().add(rgbColorSettingCustomAttribute); // send CREATE request @@ -203,23 +203,23 @@ public class LightFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("Orange"); CustomAttribute illuminanceLevelCustomAttribute = new CustomAttribute(); - illuminanceLevelCustomAttribute.setCustomAttributeName("illuminanceLevel"); - illuminanceLevelCustomAttribute.setCustomAttributeValue("90"); + illuminanceLevelCustomAttribute.setShortName("illuminanceLevel"); + illuminanceLevelCustomAttribute.setValue("90"); flexContainer.getCustomAttributes().add(illuminanceLevelCustomAttribute); CustomAttribute illuminanceStepLevelCustomAttribute = new CustomAttribute(); - illuminanceStepLevelCustomAttribute.setCustomAttributeName("illuminanceStepLevel"); - illuminanceStepLevelCustomAttribute.setCustomAttributeValue("1"); + illuminanceStepLevelCustomAttribute.setShortName("illuminanceStepLevel"); + illuminanceStepLevelCustomAttribute.setValue("1"); flexContainer.getCustomAttributes().add(illuminanceStepLevelCustomAttribute); CustomAttribute modeCustomAttribute = new CustomAttribute(); - modeCustomAttribute.setCustomAttributeName("mode"); - modeCustomAttribute.setCustomAttributeValue("normal"); + modeCustomAttribute.setShortName("mode"); + modeCustomAttribute.setValue("normal"); flexContainer.getCustomAttributes().add(modeCustomAttribute); CustomAttribute rgbColorSettingCustomAttribute = new CustomAttribute(); - rgbColorSettingCustomAttribute.setCustomAttributeName("rgbColorSetting"); - rgbColorSettingCustomAttribute.setCustomAttributeValue(new Integer(0x222222).toString()); + rgbColorSettingCustomAttribute.setShortName("rgbColorSetting"); + rgbColorSettingCustomAttribute.setValue(new Integer(0x222222).toString()); flexContainer.getCustomAttributes().add(rgbColorSettingCustomAttribute); // send CREATE request @@ -237,8 +237,8 @@ public class LightFlexContainerTest extends FlexContainerTestSuite { // prepare a FlexContainer for update DeviceLightFlexContainer toBeUpdated = new DeviceLightFlexContainer(); CustomAttribute illuminanceToBeUpdated = new CustomAttribute(); - illuminanceToBeUpdated.setCustomAttributeName("illuminanceLevel"); - illuminanceToBeUpdated.setCustomAttributeValue("85"); + illuminanceToBeUpdated.setShortName("illuminanceLevel"); + illuminanceToBeUpdated.setValue("85"); toBeUpdated.getCustomAttributes().add(illuminanceToBeUpdated); // send UPDATE request @@ -257,12 +257,12 @@ public class LightFlexContainerTest extends FlexContainerTestSuite { return; } - if (!updatedFlexContainer.getCustomAttribute("illuminanceLevel").getCustomAttributeValue() - .equals(illuminanceToBeUpdated.getCustomAttributeValue())) { + if (!updatedFlexContainer.getCustomAttribute("illuminanceLevel").getValue() + .equals(illuminanceToBeUpdated.getValue())) { createTestReport("testUpdateLightFlexContainer", Status.KO, "wrong illuminanceLevel CustomAttribute value, expecting: " - + illuminanceToBeUpdated.getCustomAttributeValue() + ", found: " - + updatedFlexContainer.getCustomAttribute("illuminanceLevel").getCustomAttributeValue(), + + illuminanceToBeUpdated.getValue() + ", found: " + + updatedFlexContainer.getCustomAttribute("illuminanceLevel").getValue(), null); return; } @@ -278,7 +278,7 @@ public class LightFlexContainerTest extends FlexContainerTestSuite { } else { // OK DeviceLightFlexContainer retrievedFlexContainer = (DeviceLightFlexContainer) response.getContent(); - createdFlexContainer.getCustomAttribute("illuminanceLevel").setCustomAttributeValue("85"); + createdFlexContainer.getCustomAttribute("illuminanceLevel").setValue("85"); try { checkFlexContainer(createdFlexContainer, retrievedFlexContainer); } catch (Exception e) { diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LocationFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LocationFlexContainerTest.java index d66fb16c..f00e459f 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LocationFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/LocationFlexContainerTest.java @@ -50,8 +50,8 @@ public class LocationFlexContainerTest extends FlexContainerTestSuite { String parentFlexContainerName = "parentFlexContainer_" + System.currentTimeMillis(); parentFlexContainer.setName(parentFlexContainerName); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("true"); + ca.setShortName("powSe"); + ca.setValue("true"); parentFlexContainer.getCustomAttributes().add(ca); @@ -94,8 +94,8 @@ public class LocationFlexContainerTest extends FlexContainerTestSuite { // set a new flexContainer BinarySwitchFlexContainer flexContainer = new BinarySwitchFlexContainer(); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("true"); + ca.setShortName("powSe"); + ca.setValue("true"); flexContainer.getCustomAttributes().add(ca); String flexContainerName = "FLEXCONTAINER_" + System.currentTimeMillis(); diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/RunModeFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/RunModeFlexContainerTest.java deleted file mode 100644 index e31b4a2b..00000000 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/RunModeFlexContainerTest.java +++ /dev/null @@ -1,297 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2014, 2016 Orange. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.om2m.testsuite.flexcontainer; - -import org.eclipse.om2m.commons.constants.Constants; -import org.eclipse.om2m.commons.constants.ResponseStatusCode; -import org.eclipse.om2m.commons.resource.CustomAttribute; -import org.eclipse.om2m.commons.resource.ResponsePrimitive; -import org.eclipse.om2m.commons.resource.flexcontainerspec.RunModeFlexContainer; -import org.eclipse.om2m.core.service.CseService; -import org.eclipse.om2m.testsuite.flexcontainer.TestReport.Status; - -public class RunModeFlexContainerTest extends FlexContainerTestSuite { - - public RunModeFlexContainerTest(final CseService pCseService) { - super(pCseService); - } - - @Override - protected String getTestSuiteName() { - return "RunModeFlexContainerTest"; - } - - public void testCreateAndRetrieveRunModeFlexContainer() { - String baseLocation = "/" + Constants.CSE_ID + "/" + Constants.CSE_NAME; - String flexContainerName = "RunModeFlexContainer_" + System.currentTimeMillis(); - String flexContainerLocation = baseLocation + "/" + flexContainerName; - - RunModeFlexContainer flexContainer = new RunModeFlexContainer(); - flexContainer.setName(flexContainerName); - flexContainer.setCreator("Greg"); - flexContainer.setOntologyRef("OrangeOntology"); - - CustomAttribute operationModeCustomAttribute = new CustomAttribute(); - operationModeCustomAttribute.setCustomAttributeName("opeMe"); - operationModeCustomAttribute.setCustomAttributeValue("ON"); - flexContainer.getCustomAttributes().add(operationModeCustomAttribute); - - CustomAttribute supportedModesCustomAttribute = new CustomAttribute(); - supportedModesCustomAttribute.setCustomAttributeName("supMs"); - supportedModesCustomAttribute.setCustomAttributeValue("ON,OFF,UNKNOWN"); - flexContainer.getCustomAttributes().add(supportedModesCustomAttribute); - - // send CREATE request - ResponsePrimitive response = sendCreateFlexContainerRequest(flexContainer, baseLocation, Constants.ADMIN_REQUESTING_ENTITY); - RunModeFlexContainer createdFlexContainer = null; - if (!response.getResponseStatusCode().equals(ResponseStatusCode.CREATED)) { - // KO - createTestReport("testCreateAndRetrieveRunModeFlexContainer", Status.KO, - "unable to create RunModeFlexContainer :" + response.getContent(), null); - return; - } else { - // OK - createdFlexContainer = (RunModeFlexContainer) response.getContent(); - - if (!flexContainerName.equals(createdFlexContainer.getName())) { - createTestReport("testCreateAndRetrieveRunModeFlexContainer", Status.KO, - "name are differents (expected:" + flexContainerName + ", found:" - + createdFlexContainer.getName() + ")", - null); - return; - } - - try { - checkFlexContainerCreator(flexContainer, createdFlexContainer); - } catch (Exception e) { - createTestReport("testCreateAndRetrieveRunModeFlexContainer", Status.KO, - "creator are differents (expected:" + flexContainer.getCreator() + ", found:" - + createdFlexContainer.getCreator() + ")", - e); - return; - } - - try { - checkFlexContainerCustomAttribute(flexContainer, createdFlexContainer); - } catch (Exception e) { - createTestReport("testCreateAndRetrieveRunModeFlexContainer", Status.KO, - "customAttributes are differents (expected:" + flexContainer.getCustomAttributes() + ", found:" - + createdFlexContainer.getCustomAttributes() + ")", - e); - return; - } - - try { - checkFlexContainerDefinition(flexContainer, createdFlexContainer); - } catch (Exception e) { - createTestReport("testCreateAndRetrieveRunModeFlexContainer", Status.KO, - "containerDefinition are differents (expected:" + flexContainer.getContainerDefinition() - + ", found:" + createdFlexContainer.getContainerDefinition() + ")", - e); - return; - } - - try { - checkFlexContainerOntologyRef(flexContainer, createdFlexContainer); - } catch (Exception e) { - createTestReport("testCreateAndRetrieveRunModeFlexContainer", Status.KO, - "ontologyRef are differents (expected:" + flexContainer.getOntologyRef() + ", found:" - + createdFlexContainer.getOntologyRef() + ")", - e); - return; - } - } - - // retrieve it - response = sendRetrieveRequest(flexContainerLocation); - if (!response.getResponseStatusCode().equals(ResponseStatusCode.OK)) { - // KO - createTestReport("testCreateAndRetrieveRunModeFlexContainer", Status.KO, - "unable to retrieve RunModeFlexContainer (expected:" + ResponseStatusCode.OK + ", found:" - + response.getResponseStatusCode() + ")", - null); - } else { - // OK - RunModeFlexContainer retrievedFlexContainer = (RunModeFlexContainer) response.getContent(); - try { - checkFlexContainer(createdFlexContainer, retrievedFlexContainer); - } catch (Exception e) { - createTestReport("testCreateAndRetrieveRunModeFlexContainer", Status.KO, - "flexContainers are differents:" + e.getMessage(), e); - } - - } - - createTestReport("testCreateAndRetrieveRunModeFlexContainer", Status.OK, null, null); - - } - - public void testUpdateRunModeFlexContainer() { - - String baseLocation = "/" + Constants.CSE_ID + "/" + Constants.CSE_NAME; - String flexContainerName = "RunModeFlexContainer_" + System.currentTimeMillis(); - String flexContainerLocation = baseLocation + "/" + flexContainerName; - - RunModeFlexContainer flexContainer = new RunModeFlexContainer(); - flexContainer.setName(flexContainerName); - flexContainer.setCreator("Greg"); - flexContainer.setOntologyRef("OrangeOntology"); - - CustomAttribute operationModeCustomAttribute = new CustomAttribute(); - operationModeCustomAttribute.setCustomAttributeName("opeMe"); - operationModeCustomAttribute.setCustomAttributeValue("ON"); - flexContainer.getCustomAttributes().add(operationModeCustomAttribute); - - CustomAttribute supportedModesCustomAttribute = new CustomAttribute(); - supportedModesCustomAttribute.setCustomAttributeName("supMs"); - supportedModesCustomAttribute.setCustomAttributeValue("ON,OFF,UNKNOWN"); - flexContainer.getCustomAttributes().add(supportedModesCustomAttribute); - - // send CREATE request - ResponsePrimitive response = sendCreateFlexContainerRequest(flexContainer, baseLocation, Constants.ADMIN_REQUESTING_ENTITY); - RunModeFlexContainer createdFlexContainer = null; - if (!response.getResponseStatusCode().equals(ResponseStatusCode.CREATED)) { - // KO - createTestReport("testUpdateRunModeFlexContainer", Status.KO, - "unable to create RunModeFlexContainer :" + response.getContent(), null); - return; - } - - // update Flexcontainer - RunModeFlexContainer toBeUpdated = new RunModeFlexContainer(); - - CustomAttribute operationModeToBeUpdated = new CustomAttribute(); - operationModeToBeUpdated.setCustomAttributeValue("OFF"); - operationModeToBeUpdated.setCustomAttributeName("opeMe"); - toBeUpdated.getCustomAttributes().add(operationModeToBeUpdated); - - response = sendUpdateFlexContainerRequest(flexContainerLocation, toBeUpdated); - RunModeFlexContainer updatedFlexContainer = null; - if (!response.getResponseStatusCode().equals(ResponseStatusCode.UPDATED)) { - // KO - createTestReport( - "testUpdateRunModeFlexContainer", Status.KO, "unable to update RunModeFlexContainer (expected " - + ResponseStatusCode.UPDATED + ", received: " + response.getResponseStatusCode() + ")", - null); - return; - } else { - - updatedFlexContainer = (RunModeFlexContainer) response.getContent(); - if (updatedFlexContainer.getCustomAttributes().size() != 1) { - createTestReport("testUpdateRunModeFlexContainer", Status.KO, - "expecting 1 custom attribute, found " + updatedFlexContainer.getCustomAttributes().size(), - null); - return; - } - - if (!updatedFlexContainer.getCustomAttribute("opeMe").getCustomAttributeValue().equals("OFF")) { - createTestReport("testUpdateRunModeFlexContainer", Status.KO, - "invalid operationMode customAttribute value (expected: OFF, received: " - + updatedFlexContainer.getCustomAttribute("opeMe").getCustomAttributeValue() - + ")", - null); - return; - } - - - } - - // retrieve the updated FlexContainer - response = sendRetrieveRequest(flexContainerLocation); - if (!response.getResponseStatusCode().equals(ResponseStatusCode.OK)) { - // KO - createTestReport("testUpdateRunModeFlexContainer", Status.KO, - "unable to retrieve RunModeFlexContainer (expected " + ResponseStatusCode.OK + ", received: " - + response.getResponseStatusCode() + ")", - null); - return; - } else { - // OK - RunModeFlexContainer retrievedFlexContainer = (RunModeFlexContainer) response.getContent(); - if (retrievedFlexContainer.getCustomAttributes().size() != 2) { - createTestReport("testUpdateRunModeFlexContainer", Status.KO, - "expecting 2 custom attribute, found " + updatedFlexContainer.getCustomAttributes().size(), - null); - return; - } - - if (!retrievedFlexContainer.getCustomAttribute("opeMe").getCustomAttributeValue().equals("OFF")) { - createTestReport("testUpdateRunModeFlexContainer", Status.KO, - "invalid operationMode customAttribute value (expected: OFF, received: " - + retrievedFlexContainer.getCustomAttribute("opeMe").getCustomAttributeValue() - + ")", - null); - return; - } - - if (!retrievedFlexContainer.getCustomAttribute("supMs").getCustomAttributeValue().equals("ON,OFF,UNKNOWN")) { - createTestReport("testUpdateRunModeFlexContainer", Status.KO, - "invalid supportedModes customAttribute value (expected: ON,OFF,UNKNOWN, received: " - + retrievedFlexContainer.getCustomAttribute("supMs").getCustomAttributeValue() - + ")", - null); - return; - } - } - - createTestReport("testUpdateRunModeFlexContainer", Status.OK, null, null); - } - - public void testDeleteRunModeFlexContainer() { - - String baseLocation = "/" + Constants.CSE_ID + "/" + Constants.CSE_NAME; - String flexContainerName = "RunModeFlexContainer_" + System.currentTimeMillis(); - String flexContainerLocation = baseLocation + "/" + flexContainerName; - - RunModeFlexContainer flexContainer = new RunModeFlexContainer(); - flexContainer.setName(flexContainerName); - flexContainer.setCreator("Greg"); - flexContainer.setOntologyRef("OrangeOntology"); - - CustomAttribute operationModeCustomAttribute = new CustomAttribute(); - operationModeCustomAttribute.setCustomAttributeName("opeMe"); - operationModeCustomAttribute.setCustomAttributeValue("ON"); - flexContainer.getCustomAttributes().add(operationModeCustomAttribute); - - CustomAttribute supportedModesCustomAttribute = new CustomAttribute(); - supportedModesCustomAttribute.setCustomAttributeName("supMs"); - supportedModesCustomAttribute.setCustomAttributeValue("ON,OFF,UNKNOWN"); - flexContainer.getCustomAttributes().add(supportedModesCustomAttribute); - - // send CREATE request - ResponsePrimitive response = sendCreateFlexContainerRequest(flexContainer, baseLocation, Constants.ADMIN_REQUESTING_ENTITY); - RunModeFlexContainer createdFlexContainer = null; - if (!response.getResponseStatusCode().equals(ResponseStatusCode.CREATED)) { - // KO - createTestReport("testDeleteRunModeFlexContainer", Status.KO, - "unable to create RunModeFlexContainer :" + response.getContent(), null); - return; - } - - // send DELETE request - response = sendDeleteRequest(flexContainerLocation); - if (!response.getResponseStatusCode().equals(ResponseStatusCode.DELETED)) { - // KO - createTestReport("testDeleteRunModeFlexContainer", Status.KO, - "unable to delete RunModeFlexContainer :" + response.getContent(), null); - return; - } - - // try to retrieve it - response = sendRetrieveRequest(flexContainerLocation); - if (!response.getResponseStatusCode().equals(ResponseStatusCode.NOT_FOUND)) { - // KO - createTestReport("testDeleteRunModeFlexContainer", Status.KO, "expected errorCode:" - + ResponseStatusCode.NOT_FOUND + ", found:" + response.getResponseStatusCode(), null); - return; - } - - createTestReport("testDeleteRunModeFlexContainer", Status.OK, null, null); - } - -} diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/RunStateFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/RunStateFlexContainerTest.java new file mode 100644 index 00000000..79c99551 --- /dev/null +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/RunStateFlexContainerTest.java @@ -0,0 +1,297 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 Orange. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + *******************************************************************************/ +package org.eclipse.om2m.testsuite.flexcontainer; + +import org.eclipse.om2m.commons.constants.Constants; +import org.eclipse.om2m.commons.constants.ResponseStatusCode; +import org.eclipse.om2m.commons.resource.CustomAttribute; +import org.eclipse.om2m.commons.resource.ResponsePrimitive; +import org.eclipse.om2m.commons.resource.flexcontainerspec.RunStateFlexContainer; +import org.eclipse.om2m.core.service.CseService; +import org.eclipse.om2m.testsuite.flexcontainer.TestReport.Status; + +public class RunStateFlexContainerTest extends FlexContainerTestSuite { + + public RunStateFlexContainerTest(final CseService pCseService) { + super(pCseService); + } + + @Override + protected String getTestSuiteName() { + return "RunStateFlexContainerTest"; + } + + public void testCreateAndRetrieveRunStateFlexContainer() { + String baseLocation = "/" + Constants.CSE_ID + "/" + Constants.CSE_NAME; + String flexContainerName = "RunStateFlexContainer_" + System.currentTimeMillis(); + String flexContainerLocation = baseLocation + "/" + flexContainerName; + + RunStateFlexContainer flexContainer = new RunStateFlexContainer(); + flexContainer.setName(flexContainerName); + flexContainer.setCreator("Greg"); + flexContainer.setOntologyRef("OrangeOntology"); + + CustomAttribute operationModeCustomAttribute = new CustomAttribute(); + operationModeCustomAttribute.setShortName("opeMe"); + operationModeCustomAttribute.setValue("ON"); + flexContainer.getCustomAttributes().add(operationModeCustomAttribute); + + CustomAttribute supportedModesCustomAttribute = new CustomAttribute(); + supportedModesCustomAttribute.setShortName("supMs"); + supportedModesCustomAttribute.setValue("ON,OFF,UNKNOWN"); + flexContainer.getCustomAttributes().add(supportedModesCustomAttribute); + + // send CREATE request + ResponsePrimitive response = sendCreateFlexContainerRequest(flexContainer, baseLocation, Constants.ADMIN_REQUESTING_ENTITY); + RunStateFlexContainer createdFlexContainer = null; + if (!response.getResponseStatusCode().equals(ResponseStatusCode.CREATED)) { + // KO + createTestReport("testCreateAndRetrieveRunStateFlexContainer", Status.KO, + "unable to create RunStateFlexContainer :" + response.getContent(), null); + return; + } else { + // OK + createdFlexContainer = (RunStateFlexContainer) response.getContent(); + + if (!flexContainerName.equals(createdFlexContainer.getName())) { + createTestReport("testCreateAndRetrieveRunStateFlexContainer", Status.KO, + "name are differents (expected:" + flexContainerName + ", found:" + + createdFlexContainer.getName() + ")", + null); + return; + } + + try { + checkFlexContainerCreator(flexContainer, createdFlexContainer); + } catch (Exception e) { + createTestReport("testCreateAndRetrieveRunStateFlexContainer", Status.KO, + "creator are differents (expected:" + flexContainer.getCreator() + ", found:" + + createdFlexContainer.getCreator() + ")", + e); + return; + } + + try { + checkFlexContainerCustomAttribute(flexContainer, createdFlexContainer); + } catch (Exception e) { + createTestReport("testCreateAndRetrieveRunStateFlexContainer", Status.KO, + "customAttributes are differents (expected:" + flexContainer.getCustomAttributes() + ", found:" + + createdFlexContainer.getCustomAttributes() + ")", + e); + return; + } + + try { + checkFlexContainerDefinition(flexContainer, createdFlexContainer); + } catch (Exception e) { + createTestReport("testCreateAndRetrieveRunStateFlexContainer", Status.KO, + "containerDefinition are differents (expected:" + flexContainer.getContainerDefinition() + + ", found:" + createdFlexContainer.getContainerDefinition() + ")", + e); + return; + } + + try { + checkFlexContainerOntologyRef(flexContainer, createdFlexContainer); + } catch (Exception e) { + createTestReport("testCreateAndRetrieveRunStateFlexContainer", Status.KO, + "ontologyRef are differents (expected:" + flexContainer.getOntologyRef() + ", found:" + + createdFlexContainer.getOntologyRef() + ")", + e); + return; + } + } + + // retrieve it + response = sendRetrieveRequest(flexContainerLocation); + if (!response.getResponseStatusCode().equals(ResponseStatusCode.OK)) { + // KO + createTestReport("testCreateAndRetrieveRunStateFlexContainer", Status.KO, + "unable to retrieve RunStateFlexContainer (expected:" + ResponseStatusCode.OK + ", found:" + + response.getResponseStatusCode() + ")", + null); + } else { + // OK + RunStateFlexContainer retrievedFlexContainer = (RunStateFlexContainer) response.getContent(); + try { + checkFlexContainer(createdFlexContainer, retrievedFlexContainer); + } catch (Exception e) { + createTestReport("testCreateAndRetrieveRunStateFlexContainer", Status.KO, + "flexContainers are differents:" + e.getMessage(), e); + } + + } + + createTestReport("testCreateAndRetrieveRunStateFlexContainer", Status.OK, null, null); + + } + + public void testUpdateRunStateFlexContainer() { + + String baseLocation = "/" + Constants.CSE_ID + "/" + Constants.CSE_NAME; + String flexContainerName = "RunStateFlexContainer_" + System.currentTimeMillis(); + String flexContainerLocation = baseLocation + "/" + flexContainerName; + + RunStateFlexContainer flexContainer = new RunStateFlexContainer(); + flexContainer.setName(flexContainerName); + flexContainer.setCreator("Greg"); + flexContainer.setOntologyRef("OrangeOntology"); + + CustomAttribute operationModeCustomAttribute = new CustomAttribute(); + operationModeCustomAttribute.setShortName("opeMe"); + operationModeCustomAttribute.setValue("ON"); + flexContainer.getCustomAttributes().add(operationModeCustomAttribute); + + CustomAttribute supportedModesCustomAttribute = new CustomAttribute(); + supportedModesCustomAttribute.setShortName("supMs"); + supportedModesCustomAttribute.setValue("ON,OFF,UNKNOWN"); + flexContainer.getCustomAttributes().add(supportedModesCustomAttribute); + + // send CREATE request + ResponsePrimitive response = sendCreateFlexContainerRequest(flexContainer, baseLocation, Constants.ADMIN_REQUESTING_ENTITY); + RunStateFlexContainer createdFlexContainer = null; + if (!response.getResponseStatusCode().equals(ResponseStatusCode.CREATED)) { + // KO + createTestReport("testUpdateRunStateFlexContainer", Status.KO, + "unable to create RunStateFlexContainer :" + response.getContent(), null); + return; + } + + // update Flexcontainer + RunStateFlexContainer toBeUpdated = new RunStateFlexContainer(); + + CustomAttribute operationModeToBeUpdated = new CustomAttribute(); + operationModeToBeUpdated.setValue("OFF"); + operationModeToBeUpdated.setShortName("opeMe"); + toBeUpdated.getCustomAttributes().add(operationModeToBeUpdated); + + response = sendUpdateFlexContainerRequest(flexContainerLocation, toBeUpdated); + RunStateFlexContainer updatedFlexContainer = null; + if (!response.getResponseStatusCode().equals(ResponseStatusCode.UPDATED)) { + // KO + createTestReport( + "testUpdateRunStateFlexContainer", Status.KO, "unable to update RunStateFlexContainer (expected " + + ResponseStatusCode.UPDATED + ", received: " + response.getResponseStatusCode() + ")", + null); + return; + } else { + + updatedFlexContainer = (RunStateFlexContainer) response.getContent(); + if (updatedFlexContainer.getCustomAttributes().size() != 1) { + createTestReport("testUpdateRunStateFlexContainer", Status.KO, + "expecting 1 custom attribute, found " + updatedFlexContainer.getCustomAttributes().size(), + null); + return; + } + + if (!updatedFlexContainer.getCustomAttribute("opeMe").getValue().equals("OFF")) { + createTestReport("testUpdateRunStateFlexContainer", Status.KO, + "invalid operationMode customAttribute value (expected: OFF, received: " + + updatedFlexContainer.getCustomAttribute("opeMe").getValue() + + ")", + null); + return; + } + + + } + + // retrieve the updated FlexContainer + response = sendRetrieveRequest(flexContainerLocation); + if (!response.getResponseStatusCode().equals(ResponseStatusCode.OK)) { + // KO + createTestReport("testUpdateRunStateFlexContainer", Status.KO, + "unable to retrieve RunStateFlexContainer (expected " + ResponseStatusCode.OK + ", received: " + + response.getResponseStatusCode() + ")", + null); + return; + } else { + // OK + RunStateFlexContainer retrievedFlexContainer = (RunStateFlexContainer) response.getContent(); + if (retrievedFlexContainer.getCustomAttributes().size() != 2) { + createTestReport("testUpdateRunStateFlexContainer", Status.KO, + "expecting 2 custom attribute, found " + updatedFlexContainer.getCustomAttributes().size(), + null); + return; + } + + if (!retrievedFlexContainer.getCustomAttribute("opeMe").getValue().equals("OFF")) { + createTestReport("testUpdateRunStateFlexContainer", Status.KO, + "invalid operationMode customAttribute value (expected: OFF, received: " + + retrievedFlexContainer.getCustomAttribute("opeMe").getValue() + + ")", + null); + return; + } + + if (!retrievedFlexContainer.getCustomAttribute("supMs").getValue().equals("ON,OFF,UNKNOWN")) { + createTestReport("testUpdateRunStateFlexContainer", Status.KO, + "invalid supportedModes customAttribute value (expected: ON,OFF,UNKNOWN, received: " + + retrievedFlexContainer.getCustomAttribute("supMs").getValue() + + ")", + null); + return; + } + } + + createTestReport("testUpdateRunStateFlexContainer", Status.OK, null, null); + } + + public void testDeleteRunStateFlexContainer() { + + String baseLocation = "/" + Constants.CSE_ID + "/" + Constants.CSE_NAME; + String flexContainerName = "RunStateFlexContainer_" + System.currentTimeMillis(); + String flexContainerLocation = baseLocation + "/" + flexContainerName; + + RunStateFlexContainer flexContainer = new RunStateFlexContainer(); + flexContainer.setName(flexContainerName); + flexContainer.setCreator("Greg"); + flexContainer.setOntologyRef("OrangeOntology"); + + CustomAttribute operationModeCustomAttribute = new CustomAttribute(); + operationModeCustomAttribute.setShortName("opeMe"); + operationModeCustomAttribute.setValue("ON"); + flexContainer.getCustomAttributes().add(operationModeCustomAttribute); + + CustomAttribute supportedModesCustomAttribute = new CustomAttribute(); + supportedModesCustomAttribute.setShortName("supMs"); + supportedModesCustomAttribute.setValue("ON,OFF,UNKNOWN"); + flexContainer.getCustomAttributes().add(supportedModesCustomAttribute); + + // send CREATE request + ResponsePrimitive response = sendCreateFlexContainerRequest(flexContainer, baseLocation, Constants.ADMIN_REQUESTING_ENTITY); + RunStateFlexContainer createdFlexContainer = null; + if (!response.getResponseStatusCode().equals(ResponseStatusCode.CREATED)) { + // KO + createTestReport("testDeleteRunStateFlexContainer", Status.KO, + "unable to create RunStateFlexContainer :" + response.getContent(), null); + return; + } + + // send DELETE request + response = sendDeleteRequest(flexContainerLocation); + if (!response.getResponseStatusCode().equals(ResponseStatusCode.DELETED)) { + // KO + createTestReport("testDeleteRunStateFlexContainer", Status.KO, + "unable to delete RunStateFlexContainer :" + response.getContent(), null); + return; + } + + // try to retrieve it + response = sendRetrieveRequest(flexContainerLocation); + if (!response.getResponseStatusCode().equals(ResponseStatusCode.NOT_FOUND)) { + // KO + createTestReport("testDeleteRunStateFlexContainer", Status.KO, "expected errorCode:" + + ResponseStatusCode.NOT_FOUND + ", found:" + response.getResponseStatusCode(), null); + return; + } + + createTestReport("testDeleteRunStateFlexContainer", Status.OK, null, null); + } + +} diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SmartElectricMeterFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SmartElectricMeterFlexContainerTest.java index 23588fe9..8beacc34 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SmartElectricMeterFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SmartElectricMeterFlexContainerTest.java @@ -37,33 +37,33 @@ public class SmartElectricMeterFlexContainerTest extends FlexContainerTestSuite flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); CustomAttribute measuringScopeCA = new CustomAttribute(); - measuringScopeCA.setCustomAttributeName("meaSe"); - measuringScopeCA.setCustomAttributeValue("Room"); + measuringScopeCA.setShortName("meaSe"); + measuringScopeCA.setValue("Room"); flexContainer.getCustomAttributes().add(measuringScopeCA); // send CREATE request @@ -127,33 +127,33 @@ public class SmartElectricMeterFlexContainerTest extends FlexContainerTestSuite flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); CustomAttribute measuringScopeCA = new CustomAttribute(); - measuringScopeCA.setCustomAttributeName("meaSe"); - measuringScopeCA.setCustomAttributeValue("Room"); + measuringScopeCA.setShortName("meaSe"); + measuringScopeCA.setValue("Room"); flexContainer.getCustomAttributes().add(measuringScopeCA); // send CREATE request diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SmokeDetectorFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SmokeDetectorFlexContainerTest.java index ef9919cc..848b7af0 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SmokeDetectorFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SmokeDetectorFlexContainerTest.java @@ -37,28 +37,28 @@ public class SmokeDetectorFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request @@ -123,28 +123,28 @@ public class SmokeDetectorFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SubscriptionTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SubscriptionTest.java index 99ccffe7..4c33e950 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SubscriptionTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/SubscriptionTest.java @@ -168,8 +168,8 @@ public class SubscriptionTest extends FlexContainerTestSuite { // update the value of the custom attribute BinarySwitchFlexContainer toBeUpdated = new BinarySwitchFlexContainer(); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("false"); + ca.setShortName("powSe"); + ca.setValue("false"); toBeUpdated.getCustomAttributes().add(ca); response = sendUpdateFlexContainerRequest(flexContainerLocation, toBeUpdated); if (!response.getResponseStatusCode().equals(ResponseStatusCode.UPDATED)) { @@ -192,7 +192,7 @@ public class SubscriptionTest extends FlexContainerTestSuite { ca = notifiedFlexContainer.getCustomAttribute("powSe"); if (ca != null) { - if (!ca.getCustomAttributeValue().equals("false")) { + if (!ca.getValue().equals("false")) { createTestReport("testCreateSubscription", Status.KO, "CustomAttribute powerState value is wrong", null); return; @@ -316,8 +316,8 @@ public class SubscriptionTest extends FlexContainerTestSuite { // update the value of the custom attribute BinarySwitchFlexContainer toBeUpdated = new BinarySwitchFlexContainer(); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("false"); + ca.setShortName("powSe"); + ca.setValue("false"); toBeUpdated.getCustomAttributes().add(ca); response = sendUpdateFlexContainerRequest(flexContainerLocation, toBeUpdated); if (!response.getResponseStatusCode().equals(ResponseStatusCode.UPDATED)) { @@ -411,8 +411,8 @@ public class SubscriptionTest extends FlexContainerTestSuite { // update the value of the custom attribute BinarySwitchFlexContainer toBeUpdated = new BinarySwitchFlexContainer(); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("false"); + ca.setShortName("powSe"); + ca.setValue("false"); toBeUpdated.getCustomAttributes().add(ca); response = sendUpdateFlexContainerRequest(flexContainerLocation, toBeUpdated); if (!response.getResponseStatusCode().equals(ResponseStatusCode.UPDATED)) { @@ -435,7 +435,7 @@ public class SubscriptionTest extends FlexContainerTestSuite { ca = notifiedFlexContainer.getCustomAttribute("powSe"); if (ca != null) { - if (!ca.getCustomAttributeValue().equals("false")) { + if (!ca.getValue().equals("false")) { createTestReport("testUpdateSubscription", Status.KO, "CustomAttribute powerState value is wrong", null); return; @@ -481,8 +481,8 @@ public class SubscriptionTest extends FlexContainerTestSuite { // update the value of the custom attribut toBeUpdated = new BinarySwitchFlexContainer(); ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("false"); + ca.setShortName("powSe"); + ca.setValue("false"); toBeUpdated.getCustomAttributes().add(ca); response = sendUpdateFlexContainerRequest(flexContainerLocation, toBeUpdated); if (!response.getResponseStatusCode().equals(ResponseStatusCode.UPDATED)) { @@ -505,7 +505,7 @@ public class SubscriptionTest extends FlexContainerTestSuite { ca = notifiedFlexContainer.getCustomAttribute("powSe"); if (ca != null) { - if (!ca.getCustomAttributeValue().equals("false")) { + if (!ca.getValue().equals("false")) { createTestReport("testUpdateSubscription", Status.KO, "CustomAttribute powerState value is wrong", null); return; @@ -537,8 +537,8 @@ public class SubscriptionTest extends FlexContainerTestSuite { BinarySwitchFlexContainer flexContainer = new BinarySwitchFlexContainer(); flexContainer.setName("FlexContainer_" + System.currentTimeMillis()); CustomAttribute ca = new CustomAttribute(); - ca.setCustomAttributeName("powSe"); - ca.setCustomAttributeValue("true"); + ca.setShortName("powSe"); + ca.setValue("true"); flexContainer.getCustomAttributes().add(ca); ResponsePrimitive response = sendCreateFlexContainerRequest(flexContainer, diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WarningDeviceFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WarningDeviceFlexContainerTest.java index a396b298..4e1201f9 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WarningDeviceFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WarningDeviceFlexContainerTest.java @@ -11,7 +11,7 @@ import org.eclipse.om2m.commons.constants.Constants; import org.eclipse.om2m.commons.constants.ResponseStatusCode; import org.eclipse.om2m.commons.resource.CustomAttribute; import org.eclipse.om2m.commons.resource.ResponsePrimitive; -import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceWarningDeviceFlexContainer; +import org.eclipse.om2m.commons.resource.flexcontainerspec.DeviceWarningFlexContainer; import org.eclipse.om2m.core.service.CseService; import org.eclipse.om2m.testsuite.flexcontainer.TestReport.Status; @@ -31,46 +31,46 @@ public class WarningDeviceFlexContainerTest extends FlexContainerTestSuite { String flexContainerName = "SirenFlexContainer_" + System.currentTimeMillis(); String flexContainerLocation = baseLocation + "/" + flexContainerName; - DeviceWarningDeviceFlexContainer flexContainer = new DeviceWarningDeviceFlexContainer(); + DeviceWarningFlexContainer flexContainer = new DeviceWarningFlexContainer(); flexContainer.setName(flexContainerName); flexContainer.setCreator("Greg"); flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request ResponsePrimitive response = sendCreateFlexContainerRequest(flexContainer, baseLocation, Constants.ADMIN_REQUESTING_ENTITY); - DeviceWarningDeviceFlexContainer createdFlexContainer = null; + DeviceWarningFlexContainer createdFlexContainer = null; if (!response.getResponseStatusCode().equals(ResponseStatusCode.CREATED)) { // KO createTestReport("testCreateAndRetrieveWarningDeviceFlexContainer", Status.KO, "unable to create WarningDevice FlexContainer:" + response.getContent(), null); return; } else { - createdFlexContainer = (DeviceWarningDeviceFlexContainer) response.getContent(); + createdFlexContainer = (DeviceWarningFlexContainer) response.getContent(); if (!flexContainerName.equals(createdFlexContainer.getName())) { createTestReport("testCreateAndRetrieveWarningDeviceFlexContainer", Status.KO, @@ -98,7 +98,7 @@ public class WarningDeviceFlexContainerTest extends FlexContainerTestSuite { "unable to retrieve Warning Device FlexContainer:" + response.getContent(), null); return; } else { - DeviceWarningDeviceFlexContainer retrievedFlexContainer = (DeviceWarningDeviceFlexContainer) response.getContent(); + DeviceWarningFlexContainer retrievedFlexContainer = (DeviceWarningFlexContainer) response.getContent(); try { checkFlexContainer(createdFlexContainer, retrievedFlexContainer); } catch (Exception e) { @@ -117,34 +117,34 @@ public class WarningDeviceFlexContainerTest extends FlexContainerTestSuite { String flexContainerName = "WarningDeviceFlexContainer_" + System.currentTimeMillis(); String flexContainerLocation = baseLocation + "/" + flexContainerName; - DeviceWarningDeviceFlexContainer flexContainer = new DeviceWarningDeviceFlexContainer(); + DeviceWarningFlexContainer flexContainer = new DeviceWarningFlexContainer(); flexContainer.setName(flexContainerName); flexContainer.setCreator("Greg"); flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WaterSensorFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WaterSensorFlexContainerTest.java index b91bd7e3..e3650f44 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WaterSensorFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WaterSensorFlexContainerTest.java @@ -38,8 +38,8 @@ public class WaterSensorFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyOrange"); CustomAttribute alarmCustomAttribute = new CustomAttribute(); - alarmCustomAttribute.setCustomAttributeName("alarm"); - alarmCustomAttribute.setCustomAttributeValue("true"); + alarmCustomAttribute.setShortName("alarm"); + alarmCustomAttribute.setValue("true"); flexContainer.getCustomAttributes().add(alarmCustomAttribute); // send CREATE request @@ -103,8 +103,8 @@ public class WaterSensorFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyOrange"); CustomAttribute alarmCustomAttribute = new CustomAttribute(); - alarmCustomAttribute.setCustomAttributeName("alarm"); - alarmCustomAttribute.setCustomAttributeValue("true"); + alarmCustomAttribute.setShortName("alarm"); + alarmCustomAttribute.setValue("true"); flexContainer.getCustomAttributes().add(alarmCustomAttribute); // send CREATE request @@ -150,8 +150,8 @@ public class WaterSensorFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyOrange"); CustomAttribute alarmCustomAttribute = new CustomAttribute(); - alarmCustomAttribute.setCustomAttributeName("alarm"); - alarmCustomAttribute.setCustomAttributeValue("true"); + alarmCustomAttribute.setShortName("alarm"); + alarmCustomAttribute.setValue("true"); flexContainer.getCustomAttributes().add(alarmCustomAttribute); // send CREATE request @@ -169,8 +169,8 @@ public class WaterSensorFlexContainerTest extends FlexContainerTestSuite { // prepare UPDATE request WaterSensorFlexContainer toBeUpdated = new WaterSensorFlexContainer(); CustomAttribute alarmToBeUpdated = new CustomAttribute(); - alarmToBeUpdated.setCustomAttributeName("alarm"); - alarmToBeUpdated.setCustomAttributeValue("false"); + alarmToBeUpdated.setShortName("alarm"); + alarmToBeUpdated.setValue("false"); toBeUpdated.getCustomAttributes().add(alarmToBeUpdated); // send UPDATE request @@ -189,12 +189,12 @@ public class WaterSensorFlexContainerTest extends FlexContainerTestSuite { return; } - if (!alarmToBeUpdated.getCustomAttributeValue() - .equals(updatedFlexContainer.getCustomAttribute("alarm").getCustomAttributeValue())) { + if (!alarmToBeUpdated.getValue() + .equals(updatedFlexContainer.getCustomAttribute("alarm").getValue())) { createTestReport("testUpdateWaterSensorFlexContainer", Status.KO, - "Wrong alarm customAttribute value. Expecting:" + alarmToBeUpdated.getCustomAttributeValue() + "Wrong alarm customAttribute value. Expecting:" + alarmToBeUpdated.getValue() + ", found:" - + updatedFlexContainer.getCustomAttribute("alarm").getCustomAttributeValue(), + + updatedFlexContainer.getCustomAttribute("alarm").getValue(), null); return; } @@ -211,7 +211,7 @@ public class WaterSensorFlexContainerTest extends FlexContainerTestSuite { WaterSensorFlexContainer retrievedFlexContainer = (WaterSensorFlexContainer) response.getContent(); // apply update on createdFlexContainer - createdFlexContainer.getCustomAttribute("alarm").setCustomAttributeValue("false"); + createdFlexContainer.getCustomAttribute("alarm").setValue("false"); try { checkFlexContainer(createdFlexContainer, retrievedFlexContainer); diff --git a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WaterValveFlexContainerTest.java b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WaterValveFlexContainerTest.java index c99e30a6..4f47d17a 100644 --- a/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WaterValveFlexContainerTest.java +++ b/org.eclipse.om2m.testsuite.flexcontainer/src/main/java/org/eclipse/om2m/testsuite/flexcontainer/WaterValveFlexContainerTest.java @@ -37,28 +37,28 @@ public class WaterValveFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request @@ -123,28 +123,28 @@ public class WaterValveFlexContainerTest extends FlexContainerTestSuite { flexContainer.setOntologyRef("OntologyRef"); CustomAttribute serialNumberCA = new CustomAttribute(); - serialNumberCA.setCustomAttributeName("pDSNm"); - serialNumberCA.setCustomAttributeValue("sn1"); + serialNumberCA.setShortName("pDSNm"); + serialNumberCA.setValue("sn1"); flexContainer.getCustomAttributes().add(serialNumberCA); CustomAttribute locationCA = new CustomAttribute(); - locationCA.setCustomAttributeName("proLn"); - locationCA.setCustomAttributeValue("kitchen"); + locationCA.setShortName("proLn"); + locationCA.setValue("kitchen"); flexContainer.getCustomAttributes().add(locationCA); CustomAttribute deviceManufacturerCA = new CustomAttribute(); - deviceManufacturerCA.setCustomAttributeName("prDMr"); - deviceManufacturerCA.setCustomAttributeValue("Orange"); + deviceManufacturerCA.setShortName("prDMr"); + deviceManufacturerCA.setValue("Orange"); flexContainer.getCustomAttributes().add(deviceManufacturerCA); CustomAttribute protocolCA = new CustomAttribute(); - protocolCA.setCustomAttributeName("proPl"); - protocolCA.setCustomAttributeValue("ZigBee"); + protocolCA.setShortName("proPl"); + protocolCA.setValue("ZigBee"); flexContainer.getCustomAttributes().add(protocolCA); CustomAttribute deviceModelCA = new CustomAttribute(); - deviceModelCA.setCustomAttributeName("pDMNe"); - deviceModelCA.setCustomAttributeValue("Model1"); + deviceModelCA.setShortName("pDMNe"); + deviceModelCA.setValue("Model1"); flexContainer.getCustomAttributes().add(deviceModelCA); // send CREATE request diff --git a/org.eclipse.om2m.webapp.resourcesbrowser.json/.classpath b/org.eclipse.om2m.webapp.resourcesbrowser.json/.classpath deleted file mode 100644 index 98ddc48e..00000000 --- a/org.eclipse.om2m.webapp.resourcesbrowser.json/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.webapp.resourcesbrowser.json/.project b/org.eclipse.om2m.webapp.resourcesbrowser.json/.project deleted file mode 100644 index e037710c..00000000 --- a/org.eclipse.om2m.webapp.resourcesbrowser.json/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.webapp.resourcesbrowser.json - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.eclipse.om2m.webapp.resourcesbrowser.json/src/main/resources/webapps/om2m.js b/org.eclipse.om2m.webapp.resourcesbrowser.json/src/main/resources/webapps/om2m.js index 9c4c3b49..c7fe4008 100644 --- a/org.eclipse.om2m.webapp.resourcesbrowser.json/src/main/resources/webapps/om2m.js +++ b/org.eclipse.om2m.webapp.resourcesbrowser.json/src/main/resources/webapps/om2m.js @@ -1,296 +1,304 @@ -/******************************************************************************* - * Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) - * 7 Colonel Roche 31077 Toulouse - France - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Initial Contributors: - * Thierry Monteil : Project manager, technical co-manager - * Mahdi Ben Alaya : Technical co-manager - * Samir Medjiah : Technical co-manager - * Khalil Drira : Strategy expert - * Guillaume Garzone : Developer - * François Aïssaoui : Developer - * - * New contributors : - *******************************************************************************/ - -/** -* Authors: -* Mahdi Ben Alaya -* Marouane El kiasse -* Yassine Banouar -*/ - - -var cseBase= getUrlVar("cseId"); -var context=getUrlVar("context"); -$(document).ready(function() { - $("#main").hide(); - $("input#username").focus(); -}); - -var username; -var password; -var parser=new DOMParser(); - -function make_base_auth(user, password) { - var tok = user + ':' + password; - //var hash = btoa(tok); - //return "Basic " + hash; - return tok; -} - -function login(){ - username = $("input#username").val(); - password = $("input#password").val(); - get("/" + cseBase); -} - -function logout(){ - username = ""; - password = ""; - $("input#username").val("") - $("input#password").val("") - $("#attributes").html(""); - $('#content').html(""); - $('#response').html(""); - $("#login").show(); - $("#main").hide(); -} - -function get(targetId){ - $.ajax({ - type: "GET", - beforeSend: function(){}, - dataType: "json", - url: context + targetId + "?rcn=5&lvl=1", - headers : {"X-M2M-Origin" : make_base_auth(username, password), "Accept":"application/json"}, - success: function(response){ - $("#login").hide(); - $("#main").show(); - $("#url").text(window.location.protocol+"//"+window.location.host+context+targetId); - $("#"+encodeId(targetId)).html(""); - $("#attributes").html(""); - $('#content').html(''); - $('#response').html(''); - $("#error").html(''); - - for(var resourceName in response){ - var resource = response[resourceName]; - if(resourceName == "m2m:cb"){ - $("#resources").html("
  • "+resource['rn']+"
    • "); - } - for (var attribute in resource){ - if(attribute == "ch"){ - for (var index in resource[attribute]){ - var child = resource[attribute][index]; - $("#"+encodeId(targetId)).append("
    • "+child["nm"]+"
      • "); - } - - } else { - var value ; - if(attribute == "pv" || attribute == "pvs"){ - var table = '
        - - {{module.value}} + +
        + + {{module.datapoints[el.dataPoint].value}} +
        +
        ' + - '' ; - for(var index in resource[attribute]['acr']){ - var acr = resource[attribute]['acr'][index] ; - var acor = '
        AccessControlOriginatorAccessControlOperation
        ' - var acors = acr['acor']; - for (var indexJ in acors){ - acor += ""; - } - acor += "
        "+ acors[indexJ] +"
        " ; - table += '' + acor + ''+ acr['acop'] +''; - } - table += '' ; - value = table; - } else if (attribute == "poa"){ - var table = '' ; - var poas = resource[attribute]; - for (var index in poas){ - table += '' - } - table += "
        Point Of Access
        '+ poas[index] +'
        "; - value = table ; - } else if (attribute == "srt") { - var table = '' ; - var srts = resource[attribute]; - for (var index in srts){ - table += '' - } - table += "
        Supported resource types
        '+ srts[index] +'
        "; - value = table ; - } else if(resourceName == "m2m:csr" && attribute == "csi"){ - value = ''; - } else if(attribute == "acpi"){ - var table = ""; - var acpiList = resource[attribute]; - for(var index in acpiList){ - table += ""; - } - table += "
        AccessControlPolicyIDs
        " + acpiList[index] + "
        "; - value = table; - } else if(attribute == "la" || attribute == "ol"){ - value = ""; - } else if ((attribute =="lbl") || (attribute == "nu")) { - var lblList = resource[attribute]; - value="
          "; - for(var index in lblList) { - value+= "
        • " + lblList[index] + "
        • "; - } - value += "
        "; - } else { - value = resource[attribute]; - if (value instanceof Object) { - value = value.val; - } - } - - if(attribute == "con"){ - display(resource['con']); - } else { - $("#attributes").append(""+attribute+""+value+""); - } - } - } - } - $("li").click(function (e) { - e.stopPropagation(); - }); - }, - error: function(xhr,status,error){ - $("#error").html(xhr.status+' '+status+' '+error); - } - }); -} - -function encodeId(id){ - return id.replace(/[\n\s]/g,'').replace(/[\/]/gi,"_"); -} - -function clean(text){ - return text.replace(/[\n\s]/g,''); -} - -function display(content){ - $("#attributes").append(""+"con"+""); - - - //var obix= atob(content); - var rep=parser.parseFromString(content,'text/xml'); - if(rep.firstChild.tagName != 'obj'){ - $('#cont').append(content); - return; - } - - $('#cont').append("
        AttributeValue
        "); - - - if(rep.firstChild.tagName!="obj"){ - $('#contentTable').append(''+$(rep.firstChild).attr('name')+''+$(rep.firstChild).attr('val')+''); - } - - var childrens =$(rep.firstChild).children(); - - for(var t=0; t"+$(childrens[t]).attr('href')+""); - }else if ($(childrens[t]).attr('is')=="execute"){ - $('#contentTable').append(""+$(childrens[t]).attr('href')+""); - }else if ($(childrens[t]).attr('is')=="create"){ - var objs = childrens; - for(var j=0; j"+$(childrens[t]).attr('href')+""); - break; - } - } - } - } - } - else if(childrens[t].tagName!="obj"){ - $('#contentTable').append(''+$(childrens[t]).attr('name')+''+$(childrens[t]).attr('val')+''); - } - } -} - -function getUrlVar(key){ - var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search); - return result && unescape(result[1]) || ""; -} - -function execute(url){ - $('#response').html(''); - $.ajax({ - type: 'POST', - url: context+url, - headers: {"X-M2M-Origin":make_base_auth(username,password)}, - beforeSend: function() { - }, - timeout: 20000, - error: function(xhr, status, error) { - if(xhr.status==204) successCallback(null, error, xhr); - else $('#response').append('

        Post request failed: '+xhr.status+' '+error+'

        '); }, - dataType: 'xml', - success: function(response) { - $('#response').append('

        Successful POST request.

        '); - } - }); -} - -function retrieve(url){ - $('#response').html(''); - $.ajax({ - type: 'GET', - url: context+url, - headers: {"X-M2M-Origin":make_base_auth(username,password)}, - beforeSend: function() { - }, - timeout: 20000, - error: function(xhr, status, error) { $('#response').append('

        GET request failed: '+xhr.status+' '+error+'

        '); }, // alert a message in case of error - dataType: 'xml', - success: function(response) { - - $('#response').append('

        Successful GET Request:

        '); - $('#response').append('
        NameValue
        '); - - if(response.firstChild.localName=="obj"){ - $(response).find('obj').children().each(function() { - $('#contentTable1').append(''+$(this).attr('name')+''+$(this).attr('val')+''); - }); - }else{ - $(response).children().each(function() { - $('#contentTable1').append(''+$(this).attr('name')+''+$(this).attr('val')+''); - }); - } - } - }); -} - function create(url, content){ - $('#response').html(''); - $.ajax({ - type: 'POST', - url: context+'/'+url, - headers: {"X-M2M-Origin":make_base_auth(username,password)}, - beforeSend: function() { - }, - timeout: 20000, - data: atob(content), - error: function(xhr, status, error) { - if(xhr.status==204) successCallback(null, error, xhr); - else $('#response').append('

        Post request failed: '+xhr.status+' '+error+'

        '); - }, - dataType: 'xml', - success: function(response) { - $('#response').append('

        Successful POST request.

        '); - } - }); -} +/******************************************************************************* + * Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) + * 7 Colonel Roche 31077 Toulouse - France + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Initial Contributors: + * Thierry Monteil : Project manager, technical co-manager + * Mahdi Ben Alaya : Technical co-manager + * Samir Medjiah : Technical co-manager + * Khalil Drira : Strategy expert + * Guillaume Garzone : Developer + * François Aïssaoui : Developer + * + * New contributors : + *******************************************************************************/ + +/** +* Authors: +* Mahdi Ben Alaya +* Marouane El kiasse +* Yassine Banouar +*/ + + +var cseBase= getUrlVar("cseId"); +var context=getUrlVar("context"); +$(document).ready(function() { + $("#main").hide(); + $("input#username").focus(); +}); + +var username; +var password; +var parser=new DOMParser(); + +function make_base_auth(user, password) { + var tok = user + ':' + password; + //var hash = btoa(tok); + //return "Basic " + hash; + return tok; +} + +function login(){ + username = $("input#username").val(); + password = $("input#password").val(); + get("/" + cseBase); +} + +function logout(){ + username = ""; + password = ""; + $("input#username").val("") + $("input#password").val("") + $("#attributes").html(""); + $('#content').html(""); + $('#response').html(""); + $("#login").show(); + $("#main").hide(); +} + +function get(targetId){ + $.ajax({ + type: "GET", + beforeSend: function(){}, + dataType: "json", + url: context + targetId + "?rcn=5&lvl=1", + headers : {"X-M2M-Origin" : make_base_auth(username, password), "Accept":"application/json"}, + success: function(response){ + $("#login").hide(); + $("#main").show(); + $("#url").text(window.location.protocol+"//"+window.location.host+context+targetId); + $("#"+encodeId(targetId)).html(""); + $("#attributes").html(""); + $('#content').html(''); + $('#response').html(''); + $("#error").html(''); + + for(var resourceName in response){ + var resource = response[resourceName]; + if(resourceName == "m2m:cb"){ + $("#resources").html("
      • "+resource['rn']+"
        • "); + } + for (var attribute in resource){ + if(attribute == "ch"){ + for (var index in resource[attribute]){ + var child = resource[attribute][index]; + $("#"+encodeId(targetId)).append("
        • "+child["nm"]+"
          • "); + } + + } else { + var value ; + if(attribute == "pv" || attribute == "pvs"){ + var table = '' + + '' ; + for(var index in resource[attribute]['acr']){ + var acr = resource[attribute]['acr'][index] ; + var acor = '
            AccessControlOriginatorAccessControlOperation
            ' + var acors = acr['acor']; + for (var indexJ in acors){ + acor += ""; + } + acor += "
            "+ acors[indexJ] +"
            " ; + table += '' + acor + ''+ acr['acop'] +''; + } + table += '' ; + value = table; + } else if (attribute == "poa"){ + var table = '' ; + var poas = resource[attribute]; + for (var index in poas){ + table += '' + } + table += "
            Point Of Access
            '+ poas[index] +'
            "; + value = table ; + } else if (attribute == "srt") { + var table = '' ; + var srts = resource[attribute]; + for (var index in srts){ + table += '' + } + table += "
            Supported resource types
            '+ srts[index] +'
            "; + value = table ; + } else if(resourceName == "m2m:csr" && attribute == "csi"){ + value = ''; + } else if(attribute == "acpi"){ + var table = ""; + var acpiList = resource[attribute]; + for(var index in acpiList){ + table += ""; + } + table += "
            AccessControlPolicyIDs
            " + acpiList[index] + "
            "; + value = table; + } else if(attribute == "daci"){ + var table = ""; + var daciList = resource[attribute]; + for(var index in daciList){ + table += ""; + } + table += "
            DynamicAuthorizationConsultationIDs
            " + daciList[index] + "
            "; + value = table; + }else if(attribute == "la" || attribute == "ol"){ + value = ""; + } else if ((attribute =="lbl") || (attribute == "nu")) { + var lblList = resource[attribute]; + value="
              "; + for(var index in lblList) { + value+= "
            • " + lblList[index] + "
            • "; + } + value += "
            "; + } else { + value = resource[attribute]; + if (value instanceof Object) { + value = value.val; + } + } + + if(attribute == "con"){ + display(resource['con']); + } else { + $("#attributes").append(""+attribute+""+value+""); + } + } + } + } + $("li").click(function (e) { + e.stopPropagation(); + }); + }, + error: function(xhr,status,error){ + $("#error").html(xhr.status+' '+status+' '+error); + } + }); +} + +function encodeId(id){ + return id.replace(/[\n\s]/g,'').replace(/[\/]/gi,"_"); +} + +function clean(text){ + return text.replace(/[\n\s]/g,''); +} + +function display(content){ + $("#attributes").append(""+"con"+""); + + + //var obix= atob(content); + var rep=parser.parseFromString(content,'text/xml'); + if(rep.firstChild.tagName != 'obj'){ + $('#cont').append(content); + return; + } + + $('#cont').append("
            AttributeValue
            "); + + + if(rep.firstChild.tagName!="obj"){ + $('#contentTable').append(''+$(rep.firstChild).attr('name')+''+$(rep.firstChild).attr('val')+''); + } + + var childrens =$(rep.firstChild).children(); + + for(var t=0; t"+$(childrens[t]).attr('href')+""); + }else if ($(childrens[t]).attr('is')=="execute"){ + $('#contentTable').append(""+$(childrens[t]).attr('href')+""); + }else if ($(childrens[t]).attr('is')=="create"){ + var objs = childrens; + for(var j=0; j"+$(childrens[t]).attr('href')+""); + break; + } + } + } + } + } + else if(childrens[t].tagName!="obj"){ + $('#contentTable').append(''+$(childrens[t]).attr('name')+''+$(childrens[t]).attr('val')+''); + } + } +} + +function getUrlVar(key){ + var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search); + return result && unescape(result[1]) || ""; +} + +function execute(url){ + $('#response').html(''); + $.ajax({ + type: 'POST', + url: context+url, + headers: {"X-M2M-Origin":make_base_auth(username,password)}, + beforeSend: function() { + }, + timeout: 20000, + error: function(xhr, status, error) { + if(xhr.status==204) successCallback(null, error, xhr); + else $('#response').append('

            Post request failed: '+xhr.status+' '+error+'

            '); }, + dataType: 'xml', + success: function(response) { + $('#response').append('

            Successful POST request.

            '); + } + }); +} + +function retrieve(url){ + $('#response').html(''); + $.ajax({ + type: 'GET', + url: context+url, + headers: {"X-M2M-Origin":make_base_auth(username,password)}, + beforeSend: function() { + }, + timeout: 20000, + error: function(xhr, status, error) { $('#response').append('

            GET request failed: '+xhr.status+' '+error+'

            '); }, // alert a message in case of error + dataType: 'xml', + success: function(response) { + + $('#response').append('

            Successful GET Request:

            '); + $('#response').append('
            NameValue
            '); + + if(response.firstChild.localName=="obj"){ + $(response).find('obj').children().each(function() { + $('#contentTable1').append(''+$(this).attr('name')+''+$(this).attr('val')+''); + }); + }else{ + $(response).children().each(function() { + $('#contentTable1').append(''+$(this).attr('name')+''+$(this).attr('val')+''); + }); + } + } + }); +} + function create(url, content){ + $('#response').html(''); + $.ajax({ + type: 'POST', + url: context+'/'+url, + headers: {"X-M2M-Origin":make_base_auth(username,password)}, + beforeSend: function() { + }, + timeout: 20000, + data: atob(content), + error: function(xhr, status, error) { + if(xhr.status==204) successCallback(null, error, xhr); + else $('#response').append('

            Post request failed: '+xhr.status+' '+error+'

            '); + }, + dataType: 'xml', + success: function(response) { + $('#response').append('

            Successful POST request.

            '); + } + }); +} diff --git a/org.eclipse.om2m.webapp.resourcesbrowser.xml/.classpath b/org.eclipse.om2m.webapp.resourcesbrowser.xml/.classpath deleted file mode 100644 index 56b865eb..00000000 --- a/org.eclipse.om2m.webapp.resourcesbrowser.xml/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.eclipse.om2m.webapp.resourcesbrowser.xml/.project b/org.eclipse.om2m.webapp.resourcesbrowser.xml/.project deleted file mode 100644 index d69f0bf8..00000000 --- a/org.eclipse.om2m.webapp.resourcesbrowser.xml/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.om2m.webapp.resourcesbrowser.xml - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/protocols/.project b/protocols/.project deleted file mode 100644 index 8b8d4e6e..00000000 --- a/protocols/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - protocols - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - diff --git a/protocols/org.eclipse.om2m.protocols.hue/.project b/protocols/org.eclipse.om2m.protocols.hue/.project deleted file mode 100644 index a1bd70dd..00000000 --- a/protocols/org.eclipse.om2m.protocols.hue/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - com.orange.basedriver.hue - - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.m2e.core.maven2Nature - - -- cgit v1.2.3