agave-metadata/metadata-core/src/main/java/org/iplantc/service/metadata/search/JsonHandler.java
/**
     * Get permissions field from {@link JsonNode}
     *
     * @param permissionNode{@link JsonNode} to parse field from
     * @return List of permissions as {@link Document}
     * @throws MetadataQueryException if permissions field is not an array
     */
Get permissions field from  JsonNode
@param permissionNode JsonNode to parse field from
@return List of permissions as  Document
@throws MetadataQueryException if permissions field is not an array
Get permissions field from JsonNode @param permissionNode JsonNode to parse field from @return List of permissions as Document @throws MetadataQueryException if permissions field is not an array
public List<Document> parsePermissionToList(JsonNode permissionNode) throws MetadataQueryException {
        if (permissionNode.hasNonNull("permissions")) {
            if (permissionNode.get("permissions").isArray()) {
                ArrayNode permissionArrayNode = (ArrayNode) permissionNode.get("permissions");
                return parseObjectArrayNodeToList(permissionArrayNode);
            } else {
                throw new MetadataQueryException(
                        "Invalid permissions value. permissions should be an "
                                + "JSON array of permission objects.");
            }
        }
        return null;
    }
public List < Document > parsePermissionToList ( JsonNode permissionNode ) throws MetadataQueryException { if ( permissionNode . hasNonNull ( "permissions" ) ) { if ( permissionNode . get ( "permissions" ) . isArray ( ) ) { ArrayNode permissionArrayNode = ( ArrayNode ) permissionNode . get ( "permissions" ) ; return parseObjectArrayNodeToList ( permissionArrayNode ) ; } else { throw new MetadataQueryException ( "Invalid permissions value. permissions should be an " + "JSON array of permission objects." ) ; } } return null ; }
Get permissions field from {@link JsonNode}
 @param permissionNode{@link JsonNode} to parse field from
 @return List of permissions as {@link Document}
 @throws MetadataQueryException if permissions field is not an array
Get permissions field from { @link JsonNode } @param permissionNode { @link JsonNode } to parse field from @return List of permissions as { @link Document } @throws MetadataQueryException if permissions field is not an array