示例#1
0
  public Document URLGetAuthor(String url, AlchemyAPI_Params params)
      throws IOException, SAXException, ParserConfigurationException, XPathExpressionException {
    CheckURL(url);

    params.setUrl(url);

    return GET("URLGetAuthor", "url", params);
  }
示例#2
0
  public Document URLGetRankedNamedEntities(String url, AlchemyAPI_NamedEntityParams params)
      throws IOException, SAXException, ParserConfigurationException, XPathExpressionException {
    CheckURL(url);

    params.setUrl(url);

    return GET("URLGetRankedNamedEntities", "url", params);
  }
示例#3
0
  public Document URLGetTargetedSentiment(
      String url, String target, AlchemyAPI_TargetedSentimentParams params)
      throws IOException, SAXException, ParserConfigurationException, XPathExpressionException {
    CheckURL(url);
    CheckText(target);

    params.setUrl(url);
    params.setTarget(target);

    return GET("URLGetTargetedSentiment", "url", params);
  }
示例#4
0
  public Document URLGetConstraintQuery(
      String url, String query, AlchemyAPI_ConstraintQueryParams params)
      throws IOException, XPathExpressionException, SAXException, ParserConfigurationException {
    CheckURL(url);
    if (null == query || query.length() < 2)
      throw new IllegalArgumentException("Invalid constraint query specified");

    params.setUrl(url);
    params.setCQuery(query);

    return POST("URLGetConstraintQuery", "url", params);
  }