core/src/main/java/net/typedrest/AbstractEndpoint.java
private void parseLinkObject(String rel, ObjectNode obj, Map<URI, String> linksForRel, Map<String, String> linkTemplates) {
        JsonNode href = obj.findValue("href");
        if (href == null) {
            return;
        }

        JsonNode templated = obj.findValue("templated");
        if (templated != null && templated.isBoolean() && templated.asBoolean()) {
            linkTemplates.put(rel, href.asText());
        } else {
            JsonNode title = obj.findValue("title");
            linksForRel.put(
                    uri.resolve(href.asText()),
                    (title != null && title.getNodeType() == JsonNodeType.STRING) ? title.asText() : null);
        }
    }
private void parseLinkObject(String rel, ObjectNode obj, Map<URI, String> linksForRel, Map<String, String> linkTemplates) {
        JsonNode href = obj.findValue("href");
        if (href == null) {
            return;
        }

        JsonNode templated = obj.findValue("templated");
        if (templated != null && templated.isBoolean() && templated.asBoolean()) {
            linkTemplates.put(rel, href.asText());
        } else {
            JsonNode title = obj.findValue("title");
            linksForRel.put(
                    uri.resolve(href.asText()),
                    (title != null && title.getNodeType() == JsonNodeType.STRING) ? title.asText() : null);
        }
    }
private void parseLinkObject ( String rel , ObjectNode obj , Map < URI , String > linksForRel , Map < String , String > linkTemplates ) { JsonNode href = obj . findValue ( "href" ) ; if ( href == null ) { return ; } JsonNode templated = obj . findValue ( "templated" ) ; if ( templated != null && templated . isBoolean ( ) && templated . asBoolean ( ) ) { linkTemplates . put ( rel , href . asText ( ) ) ; } else { JsonNode title = obj . findValue ( "title" ) ; linksForRel . put ( uri . resolve ( href . asText ( ) ) , ( title != null && title . getNodeType ( ) == JsonNodeType . STRING ) ? title . asText ( ) : null ) ; } }
Parses a JSON object for link information.

@param rel The relation type of the link.
@param obj The JSON object to parse for link information.
@param linksForRel A dictionary to add found links to. Maps hrefs to
titles.
@param linkTemplates A dictionary to add found link templates to. Maps
rels to templated hrefs.
Parses a JSON object for link information .