public String getPrefixPreamble ( final PrefixMapping mapping ) { return mapping . getNsPrefixMap ( ) . entrySet ( ) . stream ( ) . map ( e -> "PREFIX " + e . getKey ( ) + ": <" + e . getValue ( ) + ">" ) . collect ( joining ( "\n" , "" , "\n\n" ) ) ; }
Get a prefix preamble appropriate for a SPARQL - UPDATE query from a prefix mapping object