protected void writeEntityMetawidget ( final Map < Object , Object > context , final int entityMetawidgetIndent , final Map < String , String > existingNamespaces ) { StringWriter stringWriter = new StringWriter ( ) ; this . entityMetawidget . write ( stringWriter , entityMetawidgetIndent ) ; context . put ( "metawidget" , stringWriter . toString ( ) . trim ( ) ) ; Map < String , String > namespaces = this . entityMetawidget . getNamespaces ( ) ; namespaces . keySet ( ) . removeAll ( existingNamespaces . keySet ( ) ) ; context . put ( "metawidgetNamespaces" , namespacesToString ( namespaces ) ) ; }
Writes the entity Metawidget and its namespaces into the given context .