private void setMimeTypes() {
        HttpURLConnection connection = null;
        try {
            connection = (HttpURLConnection) uri.toURL().openConnection();
            connection.setRequestMethod("GET");
            connection.setRequestProperty("Accept", "application/xml");

            StringBuilder result = new StringBuilder();
            String temp;

            try (BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()))) {
                while ((temp = in.readLine()) != null) {
                    result.append(temp);
                    result.append("\n");
                }
            }

            StringReader stringReader = new StringReader(result.toString());
            Model model = ModelFactory.createDefaultModel();
            model.read(stringReader, null, "TTL");

            // save supported formats
            for (Statement s : model.listStatements().toList()) {
                if (s.asTriple().getPredicate().getLocalName().equals("supportedInputFormat")) {
                    String inputType = s.asTriple().getObject().getLiteralValue().toString();
                    try {
                        supportedInputFormats.add(new MimeType(inputType));
                    } catch (MimeTypeParseException e) {
                        throw new RuntimeException(e);
                    }
                }
                if (s.asTriple().getPredicate().getLocalName().equals("supportedOutputFormat")) {
                    String outputType = s.asTriple().getObject().getLiteralValue().toString();
                    try {
                        supportedOutputFormats.add(new MimeType(outputType));
                    } catch (MimeTypeParseException e) {
                        throw new RuntimeException(e);
                    }
                }
            }

        } catch (IOException e) {
            throw new RuntimeException("Cannot establish connection to " + uri.toString() + " !", e);
        } finally {
            if (connection != null) {
                connection.disconnect();
            }
        }
    }