/** * Returns the list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as defined * by the given {@link org.raml.model.Resource}. * * @param resource * The given resource. * @return The list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as * defined by the given {@link org.raml.model.Resource}. */ private static List<PathVariable> getPathVariables( org.raml.model.Resource resource) { List<PathVariable> pathVariables = new ArrayList<>(); for (Entry<String, UriParameter> entry : resource.getUriParameters() .entrySet()) { pathVariables .add(getPathVariable(entry.getKey(), entry.getValue())); } if (resource.getParentResource() != null) { pathVariables .addAll(getPathVariables(resource.getParentResource())); } return pathVariables; }
/** * Returns the list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as defined * by the given {@link org.raml.model.Resource}. * * @param resource * The given resource. * @return The list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as * defined by the given {@link org.raml.model.Resource}. */ private static List<PathVariable> getPathVariables( org.raml.model.Resource resource) { List<PathVariable> pathVariables = new ArrayList<>(); for (Entry<String, UriParameter> entry : resource.getUriParameters() .entrySet()) { pathVariables .add(getPathVariable(entry.getKey(), entry.getValue())); } if (resource.getParentResource() != null) { pathVariables .addAll(getPathVariables(resource.getParentResource())); } return pathVariables; }
/** * Returns the list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as defined * by the given {@link org.raml.model.Resource}. * * @param resource * The given resource. * @return The list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as * defined by the given {@link org.raml.model.Resource}. */ private static List<PathVariable> getPathVariables( org.raml.model.Resource resource) { List<PathVariable> pathVariables = new ArrayList<>(); for (Entry<String, UriParameter> entry : resource.getUriParameters() .entrySet()) { pathVariables .add(getPathVariable(entry.getKey(), entry.getValue())); } if (resource.getParentResource() != null) { pathVariables .addAll(getPathVariables(resource.getParentResource())); } return pathVariables; }
/** * Returns the list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as defined * by the given {@link org.raml.model.Resource}. * * @param resource * The given resource. * @return The list of * {@link org.restlet.ext.platform.internal.model.PathVariable} as * defined by the given {@link org.raml.model.Resource}. */ private static List<PathVariable> getPathVariables( org.raml.model.Resource resource) { List<PathVariable> pathVariables = new ArrayList<>(); for (Entry<String, UriParameter> entry : resource.getUriParameters() .entrySet()) { pathVariables .add(getPathVariable(entry.getKey(), entry.getValue())); } if (resource.getParentResource() != null) { pathVariables .addAll(getPathVariables(resource.getParentResource())); } return pathVariables; }
rwadResource.setPathVariables(getPathVariables(resource)); rwadResource.getPathVariables().addAll(rootPathVariables);
rwadResource.setPathVariables(getPathVariables(resource)); rwadResource.getPathVariables().addAll(rootPathVariables);
rwadResource.setPathVariables(getPathVariables(resource)); rwadResource.getPathVariables().addAll(rootPathVariables);
rwadResource.setPathVariables(getPathVariables(resource)); rwadResource.getPathVariables().addAll(rootPathVariables);