/** * Extract the id from a resource element and add to the resource map then recurse into any * contained resources. Also extract the ids from any contained method and its representation or * fault elements. * * @param file the URI of the current WADL file being processed * @param r the resource element * @throws javax.xml.bind.JAXBException if the WADL file is invalid or if the code generator * encounters a problem. * @throws java.io.IOException if the specified WADL file cannot be read. */ protected void extractResourceIds(Resource r, URI file) throws JAXBException, IOException { processIDHref(file, r.getId(), null, r); for (String type : r.getType()) { processIDHref(file, null, type, r); } for (Object child : r.getMethodOrResource()) { if (child instanceof Method) extractMethodIds((Method) child, file); else if (child instanceof Resource) extractResourceIds((Resource) child, file); } }