Examples of HandlerException


Examples of org.wymiwyg.wrhapi.HandlerException

    }
    String language = null;
    try {
      UploadHandler.createDocument(webDocument, fileContent, language, new MimeType(fileContentType), hashStore);
    } catch (MimeTypeParseException e) {
      throw new HandlerException(e);
    }
    return webDocument;
  }
View Full Code Here

Examples of org.wymiwyg.wrhapi.HandlerException

      ResIterator iter = model.listSubjectsWithProperty(KNOBOT.target);
      process(iter, out);
      out.close();
     
    } catch (IOException e) {
      throw new HandlerException(e);
    }
   

  }
View Full Code Here

Examples of org.wymiwyg.wrhapi.HandlerException

    if (startDateParamValues != null) {
      try {
        startDate = new SimpleDateFormat("yyyy-MM-dd")
            .parse(startDateParamValues[0]);
      } catch (ParseException e) {
        throw new HandlerException(e);
      }
    } else {
      startDate = getStartOfMonth(now);
     
    }
    Set relevantMonths = new HashSet();
    Date endDate;
    String[] endDateParamValues = ehRequest.getRequestURI()
        .getParameterValues("endDate");
    if (endDateParamValues != null) {
      try {
        endDate = new SimpleDateFormat("yyyy-MM-dd")
            .parse(endDateParamValues[0]);
      } catch (ParseException e) {
        throw new HandlerException(e);
      }
      endDate.setTime(endDate.getTime() + (24*60*60-1)*1000);
    } else {
      endDate = getEndOfMonth(now);
      if ((endDate.getTime() - now.getTime()) < (15*24*60*60*1000)) {
View Full Code Here

Examples of org.wymiwyg.wrhapi.HandlerException

              new URL(relationSource.getURI()),
              relationTargetString).toString();
        }
        relationTarget = model.createResource(relationTargetURL);
      } catch (MalformedURLException e) {
        throw new HandlerException(e);
      }
    } else {
      String targetDescriptionString = requestBody.getParameter("targetDescription");
      URL targetDescriptionURL;
      try {
        if (targetDescriptionString.startsWith("http")) {
          targetDescriptionURL = new URL(targetDescriptionString);
        } else {
          targetDescriptionURL = new URL(new URL(relationSource
              .getURI()), targetDescriptionString);
        }
        Resource targetDescription = model
            .createResource(targetDescriptionURL.toString());
        relationTarget = BaseItemPostHandler.lookUpByIFP(model,
            FOAF.isPrimaryTopicOf, targetDescription);
      } catch (MalformedURLException e) {
        throw new HandlerException(e);
      }
    }

   
    float strength;
View Full Code Here

Examples of org.wymiwyg.wrhapi.HandlerException

      try {
        relationSource = model.createResource(new URL(new URL(
            relationSource.toString()), relationSourceString)
            .toString());
      } catch (MalformedURLException e) {
        throw new HandlerException(e);
      }
    }
    if (targetString.equals("http://") || targetString.equals("")) {
      throw new HandlerException("Must specify a target");
    }
    Resource relationTarget;
    try {
      relationTarget = getTarget(targetTypeString, targetString, new URL(
          relationSource.getURI()));
    } catch (MalformedURLException e) {
      throw new HandlerException(e);
    }
    ResIterator relations = model.listSubjectsWithProperty(KNOBOT.target,
        relationTarget);
    while (relations.hasNext()) {
      Resource current = relations.nextResource();
View Full Code Here

Examples of org.wymiwyg.wrhapi.HandlerException

   
      URL relationTargetURL;
      try {
        relationTargetURL = new URL(baseURL, targetString);
      } catch (MalformedURLException e) {
        throw new HandlerException(e);
      }
      Resource targetResource =  model.createResource(relationTargetURL
          .toString());
    if (targetTypeString.equals("url")) {
      return targetResource;
    } else {
      Property ifp = null;
      if (targetTypeString.equals("mbox")) {
        ifp = FOAF.mbox;
      }
      if (targetTypeString.equals("descriptionDocument")) {
        ifp = FOAF.isPrimaryTopicOf;
      }
      if (ifp == null) {
        throw new HandlerException("unsupported target-type: "+targetTypeString);
      }
      return BaseItemPostHandler.lookUpByIFP(model, ifp, targetResource);
    }
  }
View Full Code Here

Examples of org.wymiwyg.wrhapi.HandlerException

    long nextDownload = System.currentTimeMillis() + interval * 60 * 1000;
    newAggregator.addProperty(AGGREGATOR.nextDownload, model.createTypedLiteral(nextDownload));
    try {
      Aggregator.aggregate(newAggregator);
    } catch (IOException ex) {
      throw new HandlerException(ex);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.