Package org.openrdf.rio

Examples of org.openrdf.rio.UnsupportedRDFormatException


      request.sendForm(getQueryParams(ql, query, dataset, includeInferred, bindings));
      execute(request);
      request.readRDF(handler);
    }
    catch (NoCompatibleMediaType e) {
      throw new UnsupportedRDFormatException(e);
    }
    catch (IOException e) {
      throw new StoreException(e);
    }
    catch (RDFParseException e) {
View Full Code Here


      request.sendForm(getQueryParams(ql, query, dataset, includeInferred, bindings));
      execute(request);
      return request.readBoolean();
    }
    catch (NoCompatibleMediaType e) {
      throw new UnsupportedRDFormatException(e);
    }
    catch (IOException e) {
      throw new StoreException(e);
    }
    catch (QueryResultParseException e) {
View Full Code Here

    }
    catch (UnsupportedQueryLanguage e) {
      throw new UnsupportedQueryLanguageException(e);
    }
    catch (UnsupportedFileFormat e) {
      throw new UnsupportedRDFormatException(e);
    }
    catch (UnsupportedMediaType e) {
      throw new UnsupportedRDFormatException(e);
    }
    catch (Unauthorized e) {
      throw new UnauthorizedException(e);
    }
    catch (HTTPException e) {
View Full Code Here

      if (httpCode == HttpURLConnection.HTTP_UNAUTHORIZED) {
        throw new UnauthorizedException();
      }
      else if (httpCode == HttpURLConnection.HTTP_UNSUPPORTED_TYPE) {
        throw new UnsupportedRDFormatException(method.getResponseBodyAsString());
      }
      else if (!HttpClientUtil.is2xx(httpCode)) {
        ErrorInfo errInfo = ErrorInfo.parse(method.getResponseBodyAsString());

        if (errInfo.getErrorType() == ErrorType.MALFORMED_DATA) {
          throw new RDFParseException(errInfo.getErrorMessage());
        }
        else if (errInfo.getErrorType() == ErrorType.UNSUPPORTED_FILE_FORMAT) {
          throw new UnsupportedRDFormatException(errInfo.getErrorMessage());
        }
        else {
          throw new RepositoryException("Failed to upload data: " + errInfo);
        }
      }
View Full Code Here

        return  RdfStringMatcher.wrap(format, baseUri, CoreMatchers.allOf(matchers));
    }

    public static <T extends String, V extends RepositoryConnection> Matcher<T> rdfStringMatches(String mimeType, String baseUri, Matcher<V> matcher) {
        final RDFFormat format = Rio.getParserFormatForMIMEType(mimeType);
        if (format == null) throw new UnsupportedRDFormatException(mimeType);
        return  RdfStringMatcher.wrap(format, baseUri, matcher);
    }
View Full Code Here

        return  RdfStringMatcher.wrap(format, baseUri, matcher);
    }

    public static <T extends String, V extends RepositoryConnection> Matcher<T> rdfStringMatches(String mimeType, String baseUri, Matcher<V> matcher1, Matcher<V> matcher2) {
        final RDFFormat format = Rio.getParserFormatForMIMEType(mimeType);
        if (format == null) throw new UnsupportedRDFormatException(mimeType);
        return  RdfStringMatcher.wrap(format, baseUri, CoreMatchers.allOf(matcher1, matcher2));
    }
View Full Code Here

    }

    @SafeVarargs
    public static <T extends String, V extends RepositoryConnection> Matcher<T> rdfStringMatches(String mimeType, String baseUri, Matcher<V>... matchers) {
        final RDFFormat format = Rio.getParserFormatForMIMEType(mimeType);
        if (format == null) throw new UnsupportedRDFormatException(mimeType);
        return  RdfStringMatcher.wrap(format, baseUri, CoreMatchers.allOf(matchers));
    }
View Full Code Here

TOP

Related Classes of org.openrdf.rio.UnsupportedRDFormatException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.