Initial commit of node deserialisation
Update serialisation code.
This modification moves the 'restore from file' code from the node advancer, into the controller. Instead of creating a new node, then restoring and then having to read all the information out of the file and put it into the node, and restore all the command classes and their data, this instead reads the node file directly and uses the class created by the XML deserialiser which contains all the data that was originally serialised. This avoids having to add getter/setter methods for every new class, or bit of information that gets added to classes, or nodes in future.
Once the data is deserialised from disk, some information needs to be added to the command classes and nodes - i.e. links to the controller, and to the node for a command class.
** Needs further testing **
Ensure name/location get maintained even if the XML is considered invalid.
Remove version from XML folder.
Fix bug restoring name/location
Don't persist the node stage - this will always be reset on startup anyway.
Initialise endpoint command classes
Initial modification to set default endpoint to 0.
This allows distinction over the multi-instance commands. Endpoints always start from 1, so a value of 0 can now be defined to use the non multi-instance version.
https://github.com/openhab/openhab/issues/1545, https://github.com/openhab/openhab/pull/1544,https://github.com/openhab/openhab/issues/1461
Manual merge from druciak@eecd7c3
https://github.com/openhab/openhab/issues/1545
Added new constructor for ZWaveEvent that uses default endpoint.
Changed all events that used a default endpoint to use the new constructor.
Merge branch 'master' of https://github.com/openhab/openhab into zwave-endpoint_default_to_zero
Change lastUpdated to lastSent and lastReceived
lastUpdated wasn't used, and wasn't very useful as it was changed each time anything in the node changed (including internal information). lastSent and lastReceived allows determination of the health of the node by knowing when it was last heard, and when we last sent data to it.
Handle receive time, and NEVER received
Add exception handling for XML errors.
Merge branch 'master' into zwave-restore_serialisation

* master: (63 commits)
  Workaround for https://github.com/openhab/jmdns/issues/12
  Add Z-Wave remote Merten MOVE, fix label for Merten 4-chan controller
  Fixed out of order params in log message
  Removed formated log messages.
  Cleanup debug messages to use standard format
  Changed assoications from 232 to 5
  Default config file changes for Pushover.
  Added retry and expire values for messages with priority of 2 as required by Pushover API.
  Debug log instances of OpenSprinkler library not initialized.
  Fixed null pointer exception on OpenHab startup.
  Astro: fix error in DateTimeUtil::getRange
  Proper handling of corrupted METER message.
  Added logging of unhandled exceptions in sending/receiving threads.
  Update ZWaveMeterCommandClass.java
  Update ZWaveMeterCommandClass.java
  Fix openhab_default.cfg MySQL JDBC template text
  Fixed error message on parsing a step size
  Add Duwi 054375
  Update debug messages
  added alternative prdoct id
  ...

Conflicts:
	bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/initialization/ZWaveNodeStageAdvancer.java
Merge pull request #1552 from cdjackson/zwave-endpoint_default_to_zero

Zwave endpoint default to zero
Merge pull request #1539 from cdjackson/zwave-restore_serialisation

Zwave serialisation updates
Merge branch 'master' into zwave-last_updated

* master:
  XML formatting update
  XML reformatting
  RFXCom Lighting4 Message
  Add itemp device (Thanks to Nicolas Bonnefond)
  Add exception handling for XML errors.
  Added new constructor for ZWaveEvent that uses default endpoint. Changed all events that used a default endpoint to use the new constructor.
  Manual merge from druciak@eecd7c3 https://github.com/openhab/openhab/issues/1545
  Initial modification to set default endpoint to 0. This allows distinction over the multi-instance commands. Endpoints always start from 1, so a value of 0 can now be defined to use the non multi-instance version. https://github.com/openhab/openhab/issues/1545, https://github.com/openhab/openhab/pull/1544,https://github.com/openhab/openhab/issues/1461
  Initialise endpoint command classes
  Make association group names read-only
  Don't persist the node stage - this will always be reset on startup anyway.
  Fix bug restoring name/location
  Ensure name/location get maintained even if the XML is considered invalid. Remove version from XML folder.
  Update serialisation code. This modification moves the 'restore from file' code from the node advancer, into the controller. Instead of creating a new node, then restoring and then having to read all the information out of the file and put it into the node, and restore all the command classes and their data, this instead reads the node file directly and uses the class created by the XML deserialiser which contains all the data that was originally serialised. This avoids having to add getter/setter methods for every new class, or bit of information that gets added to classes, or nodes in future. Once the data is deserialised from disk, some information needs to be added to the command classes and nodes - i.e. links to the controller, and to the node for a command class. ** Needs further testing **
  Initial commit of node deserialisation

Conflicts:
	bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveNode.java
Resolve merge conflicts
Merge pull request #1598 from cdjackson/zwave-last_updated

Change lastUpdated to lastSent and lastReceived
Merge branch 'master' into zwave-failed_node_bug

* master:
  Resolve merge conflicts
  Add exception handling for XML errors.
  Handle receive time, and NEVER received
  Change lastUpdated to lastSent and lastReceived lastUpdated wasn't used, and wasn't very useful as it was changed each time anything in the node changed (including internal information). lastSent and lastReceived allows determination of the health of the node by knowing when it was last heard, and when we last sent data to it.
  Added new constructor for ZWaveEvent that uses default endpoint. Changed all events that used a default endpoint to use the new constructor.
  Manual merge from druciak@eecd7c3 https://github.com/openhab/openhab/issues/1545
  Initial modification to set default endpoint to 0. This allows distinction over the multi-instance commands. Endpoints always start from 1, so a value of 0 can now be defined to use the non multi-instance version. https://github.com/openhab/openhab/issues/1545, https://github.com/openhab/openhab/pull/1544,https://github.com/openhab/openhab/issues/1461
  Initialise endpoint command classes
  Don't persist the node stage - this will always be reset on startup anyway.
  Fix bug restoring name/location
  Ensure name/location get maintained even if the XML is considered invalid. Remove version from XML folder.
  Update serialisation code. This modification moves the 'restore from file' code from the node advancer, into the controller. Instead of creating a new node, then restoring and then having to read all the information out of the file and put it into the node, and restore all the command classes and their data, this instead reads the node file directly and uses the class created by the XML deserialiser which contains all the data that was originally serialised. This avoids having to add getter/setter methods for every new class, or bit of information that gets added to classes, or nodes in future. Once the data is deserialised from disk, some information needs to be added to the command classes and nodes - i.e. links to the controller, and to the node for a command class. ** Needs further testing **
  Initial commit of node deserialisation

Conflicts:
	bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveNode.java