ParameterRepresentation( String name, Class<?> type, boolean optional, String description, boolean list) { super(RepresentationType.PLUGIN_PARAMETER); this.name = name; this.optional = optional; this.list = list; this.paramType = RepresentationType.extended(type); this.description = description; }
/** * Add a representation to a method's input or output list. Follow references to representations * across WADL file boundaries * * @param list the list to add the representation to * @param representation the WADL representation element to process * @param file the URI of the current WADL file being processed */ protected void addRepresentation( List<RepresentationNode> list, RepresentationType representation, URI file) { String href = representation.getHref(); if (href != null && href.length() > 0) { // dereference resource if (!href.startsWith("#")) { // referecnce to element in another document file = getReferencedFile(file, href); } representation = dereferenceLocalHref(file, href, RepresentationType.class); } if (representation != null) { RepresentationNode n = new RepresentationNode(representation); list.add(n); } }
public ExtensionPointRepresentation(String name, Class<?> extended, String desciption) { super(RepresentationType.PLUGIN_DESCRIPTION); this.name = name; this.desciption = desciption; this.extended = RepresentationType.extended(extended); }
/** * Extract the id from a representation element and add to the representation map. * * @param file the URI of the current WADL file being processed * @param r the representation 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 extractRepresentationId(RepresentationType r, URI file) throws JAXBException, IOException { processIDHref(file, r.getId(), r.getHref(), r); }