Ejemplo n.º 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);
  }
Ejemplo n.º 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);
  }
Ejemplo n.º 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);
  }
Ejemplo n.º 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);
  }