if (formatIdentifier == null || "".equals(formatIdentifier.trim())) formats = OntologyUtils
.getPreferredSupportedFormats(parser.getSupportedFormats());
else formats = Collections.singleton(formatIdentifier);
for (String currentFormat : formats) {
try {
final URLConnection con = location.toURI().toURL().openConnection();
con.setRequestProperty("Accept", currentFormat);
final InputStream is = con.getInputStream();
if (is != null) {
/*
* We provide the current format, so the recursive call won't be trying to sort preferred