Package org.springframework.hateoas.client.hc

Examples of org.springframework.hateoas.client.hc.CommonsHttpClient4Browser


   *          account.
   * @param currentContext to start from, must have a describedBy rel.
   */
  public void identifyGoal(String goalUri, URI currentContext) {
    // TODO support other representations, e.g. json-ld
    Browser rdfBrowser = new CommonsHttpClient4Browser(currentContext);
    rdfBrowser.followRel("describedBy");
    Browsable rdfDescription = rdfBrowser.getCurrentResource();
    Object o = rdfDescription.getParsedContent();
    if (o instanceof Model) {
      Model model = (Model) o;
      Resource goal = model.createResource(goalUri);

View Full Code Here


        "200"));

  }

  private static CommonsHttpClient4Browser createBrowserForUri(URI uri) {
    CommonsHttpClient4Browser browser = new CommonsHttpClient4Browser(uri);
    HttpClient httpClient = new DefaultHttpClient();
    browser.setHttpClient(httpClient);
    return browser;
  }
View Full Code Here

TOP

Related Classes of org.springframework.hateoas.client.hc.CommonsHttpClient4Browser

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.