private List < Resource > resourcesOf ( JsonNode resourceNodes ) { List < Resource > resources = new LinkedList < Resource > ( ) ; if ( resourceNodes . isArray ( ) ) { for ( JsonNode resource : resourceNodes ) { resources . add ( new Resource ( resource . asText ( ) ) ) ; } } else { resources . add ( new Resource ( resourceNodes . asText ( ) ) ) ; } return resources ; }
Generates a list of resources from the Resource Json Node .