public UNode toDoc ( ) { UNode rootNode = UNode . createMapNode ( m_taskID , "task" ) ; for ( String name : m_properties . keySet ( ) ) { String value = m_properties . get ( name ) ; if ( name . endsWith ( "Time" ) ) { rootNode . addValueNode ( name , formatTimestamp ( value ) ) ; } else { rootNode . addValueNode ( name , value ) ; } } return rootNode ; }
Serialize this task record into a UNode tree . The root UNode is returned which is a map containing one child value node for each TaskRecord property . The map s name is the task ID with a tag name of task . Timestamp values are formatted into friendly display format .