Package org.fcrepo.server.rest.RestUtil

Examples of org.fcrepo.server.rest.RestUtil.RequestContent


            InputStream is = null;

            // Determine if datastream content is included in the request
            if (!ignoreContent) {
                RequestContent content =
                        RestUtil.getRequestContent(m_servletRequest, m_headers);

                if (content != null && content.getContentStream() != null) {
                    is = content.getContentStream();
                    // Give preference to the passed in mimeType
                    if (mimeType == null && content.getMimeType() != null) {
                        mimeType = content.getMimeType();
                    }
                }
            } else {
              LOGGER.warn("ignoring content on {}/{}", pid, dsID);
            }
View Full Code Here


            Context context = getContext();

            InputStream is = null;

            // Determine if content is provided
            RequestContent content =
                    RestUtil.getRequestContent(m_servletRequest, headers);
            if (content != null && content.getContentStream() != null) {
                if (ignoreMime) {
                    is = content.getContentStream();
                } else {
                    // Make sure content is XML or ZIP
                    String contentMime = content.getMimeType();
                    if (contentMime != null) {
                        MediaType t = MediaType.valueOf(contentMime);
                        if (TEXT_XML.isCompatible(t) || APP_ZIP.isCompatible(t)) {
                            is = content.getContentStream();
                        }
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.fcrepo.server.rest.RestUtil.RequestContent

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.