private Optional<JsonNode> findPossiblyCuriedEmbeddedNode(final HalRepresentation halRepresentation,
                                                              final JsonNode jsonNode,
                                                              final String rel) {
        final JsonNode embedded = jsonNode.get("_embedded");
        if (embedded != null) {
            final Curies curies = halRepresentation.getCuries();
            final JsonNode curiedNode = embedded.get(curies.resolve(rel));
            if (curiedNode == null) {
                return Optional.ofNullable(embedded.get(curies.expand(rel)));
            } else {
                return Optional.of(curiedNode);
            }
        } else {
            return Optional.empty();
        }
    }
private Optional < JsonNode > findPossiblyCuriedEmbeddedNode ( final HalRepresentation halRepresentation , final JsonNode jsonNode , final String rel ) { final JsonNode embedded = jsonNode . get ( "_embedded" ) ; if ( embedded != null ) { final Curies curies = halRepresentation . getCuries ( ) ; final JsonNode curiedNode = embedded . get ( curies . resolve ( rel ) ) ; if ( curiedNode == null ) { return Optional . ofNullable ( embedded . get ( curies . expand ( rel ) ) ) ; } else { return Optional . of ( curiedNode ) ; } } else { return Optional . empty ( ) ; } }
Returns the JsonNode of the embedded items by link-relation type and resolves possibly curied rels.

@param halRepresentation the HAL document including the 'curies' links.
@param jsonNode the JsonNode of the document
@param rel the link-relation type of interest
@return JsonNode
@since 0.3.0