Package org.wymiwyg.wrhapi.util.parameterparser

Examples of org.wymiwyg.wrhapi.util.parameterparser.FormFile


   *      org.wymiwyg.wrhapi.Response)
   */
  public void handle(Request request, Response response)
      throws HandlerException {
    MultiPartBody body = ParameterUtil.parseMultipart(request);
    final FormFile formFile = body.getFormFileParameterValues("file")[0];
    final String locationString = body.getTextParameterValues("location")[0];
    final Model editableModel = ModelFactory.createDefaultModel();
    final Resource infoBitResource = editableModel.createResource();
   
    infoBitResource.addProperty(DISCOBITS.mediaType, formFile
        .getMimeType().toString());
    infoBitResource.addProperty(DISCOBITS.bytes, editableModel
        .createTypedLiteral(formFile.getContent()));
    infoBitResource.addProperty(RDF.type, DISCOBITS.InfoBit);
    store.perform(identity, new StoreTransaction() {

      public void execute(SourceStoreView storeView) {
        NamedNode locationNode = new NamedNodeImpl(locationString);
View Full Code Here

TOP

Related Classes of org.wymiwyg.wrhapi.util.parameterparser.FormFile

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.