class URIConverter implements PropertyConverter<URI> {

    @Override
    public URI convert(String value, ConversionContext ctx) {
        ctx.addSupportedFormats(getClass(), "<uri> -> new URI(uri)");
        if(value==null){
            return null;
        }
        String trimmed = value.trim();
        if(value.isEmpty()){
            return null;
        }
        try {
            return new URI(trimmed);
        } catch (Exception e) {
            LOG.log(Level.FINE, "Unparseable URI: " + trimmed, e);
            return null;
        }
    }

}