static boolean hasMimeType(final HttpServletRequest req, final String mimeType) { final String contentType = req.getContentType(); return contentType != null && mimeType.equals(new MiniMime(contentType).getMimeType()); }
static boolean hasMimeType(final HttpServletRequest req, final String mimeType) { final String contentType = req.getContentType(); return contentType != null && mimeType.equals(new MiniMime(contentType).getMimeType()); }
/** * Post a GraphML file to the blueprints layer. */ @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws IOException { final String contentType = req.getContentType(); if (log.isInfoEnabled()) log.info("Request body: " + contentType); final String mimeType = new MiniMime(contentType).getMimeType().toLowerCase(); if (!mimeTypes.contains(mimeType)) { buildAndCommitResponse(resp, HTTP_BADREQUEST, MIME_TEXT_PLAIN, "Content-Type not recognized as graph data: " + contentType); return; } try { submitApiTask( new BlueprintsPostTask(req, resp, getNamespace(req), ITx.UNISOLATED)).get(); } catch (Throwable t) { BigdataRDFServlet.launderThrowable(t, resp, ""); } }
.getMimeType()); .forMIMEType(t.getMimeType()); .forMIMEType(t.getMimeType()); .forMIMEType(t.getMimeType()); .forMIMEType(t.getMimeType());
.getMimeType()); .forMIMEType(t.getMimeType()); .forMIMEType(t.getMimeType()); .forMIMEType(t.getMimeType()); .forMIMEType(t.getMimeType());
contentType).getMimeType());
final String mimeTypeStr = new MiniMime(contentType).getMimeType();
final String mimeTypeStr = new MiniMime(contentType).getMimeType();
contentType).getMimeType());
contentType).getMimeType());
final PropertiesFormat format = PropertiesFormat.forMIMEType(mimeType.getMimeType());
contentType).getMimeType());
contentType).getMimeType());
final BooleanQueryResultFormat format = BooleanQueryResultFormat.forMIMEType(mimeType.getMimeType());
final PropertiesFormat format = PropertiesFormat.forMIMEType(mimeType.getMimeType());
final RDFFormat format = RDFFormat.forMIMEType(mimeType.getMimeType());
.forMIMEType(new MiniMime(contentType).getMimeType());
.forMIMEType(new MiniMime(contentType).getMimeType());
.forMIMEType(new MiniMime(contentType).getMimeType());
.forMIMEType(new MiniMime(contentType).getMimeType());