private void fillNode ( final ResourceXMLParser . Entity entity , final NodeEntryImpl node ) { node . setUsername ( entity . getProperty ( NODE_USERNAME ) ) ; node . setHostname ( entity . getProperty ( NODE_HOSTNAME ) ) ; node . setOsArch ( entity . getProperty ( NODE_OS_ARCH ) ) ; node . setOsFamily ( entity . getProperty ( NODE_OS_FAMILY ) ) ; node . setOsName ( entity . getProperty ( NODE_OS_NAME ) ) ; node . setOsVersion ( entity . getProperty ( NODE_OS_VERSION ) ) ; node . setDescription ( entity . getProperty ( COMMON_DESCRIPTION ) ) ; final String tags = entity . getProperty ( COMMON_TAGS ) ; final HashSet < String > tags1 ; if ( null != tags && ! "" . equals ( tags ) ) { tags1 = new HashSet < String > ( ) ; for ( final String s : tags . split ( "," ) ) { tags1 . add ( s . trim ( ) ) ; } } else { tags1 = new HashSet < String > ( ) ; } node . setTags ( tags1 ) ; if ( null == node . getAttributes ( ) ) { node . setAttributes ( new HashMap < String , String > ( ) ) ; } if ( null != entity . getProperties ( ) ) { for ( String key : entity . getProperties ( ) . stringPropertyNames ( ) ) { if ( ! ResourceXMLConstants . allPropSet . contains ( key ) ) { node . getAttributes ( ) . put ( key , entity . getProperty ( key ) ) ; } } } //parse embedded attribute elements }
Fill the NodeEntryImpl based on the Entity s parsed attributes