/** * Create an Enunciate configuration. * * @return The enunciate configuration. */ protected EnunciateConfiguration createEnunciateConfiguration() { return new EnunciateConfiguration(); }
/** * Get the schema associated with this WSDL. * * @return The schema associated with this WSDL. */ public SchemaInfo getAssociatedSchema() { return lookupSchema(getTargetNamespace()); }
/** * Set the default rest context iff it hasn't been set yet. * * @param defaultRestSubcontext The default rest context. */ public void setDefaultRestSubcontextConditionally(String defaultRestSubcontext) { if (!this.isDefaultRestSubcontextSet) { setDefaultRestSubcontext(defaultRestSubcontext); } }
/** * Loads the configuration specified by the given config file. * * @param file The file. */ public void load(File file) throws IOException, SAXException { load(new FileInputStream(file)); }
protected String getSubcontext(EnunciateConfiguration config) { return config.getDefaultRestSubcontext(); }
/** * Does any post-processing of the enunciate configuration. * * @param config The config. */ protected void postProcessConfig(EnunciateConfiguration config) { if (this.includes != null) { for (String include : this.includes) { config.addApiIncludePattern(include); } } if (this.excludes != null) { for (String exclude : this.excludes) { config.addApiExcludePattern(exclude); } } config.setIncludeReferenceTrailInErrors(this.includeReferenceTrailInErrors); }
public int compare(SchemaInfo info1, SchemaInfo info2) { String namespace1 = info1.getNamespace(); if (namespace1 == null) { namespace1 = ""; } String namespace2 = info2.getNamespace(); if (namespace2 == null) { namespace2 = ""; } return namespace1.compareTo(namespace2); } }
/** * Do the initialization logic. Loads and initializes the deployment modules. */ protected void doInit() throws EnunciateException, IOException { if (isJavacCheck()) { invokeJavac(createTempDir(), getSourceFiles()); } if (this.config == null) { this.config = loadConfig(); } initModules(this.config.getAllModules()); }
/** * The namespace to schema map. * * @return The namespace to schema map. */ protected Map<String, SchemaInfo> getNamespacesToSchemas() { return getModel().getNamespacesToSchemas(); }
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { getDigester().push(module); }
/** * The namespace to schema map. * * @return The namespace to schema map. */ protected Map<String, SchemaInfo> getNamespacesToSchemas() { return getModel().getNamespacesToSchemas(); }
/** * Whether to include referenced type definitions. * * @return Whether to include referenced type definitions. */ protected boolean includeReferencedClasses() { return this.enunciateConfig == null || this.enunciateConfig.isIncludeReferencedClasses(); }
/** * Get the schema associated with this WSDL. * * @return The schema associated with this WSDL. */ public SchemaInfo getAssociatedSchema() { return lookupSchema(getTargetNamespace()); }
/** * Package-private constructor for testing purposes. */ EnunciateAnnotationProcessor() throws EnunciateException { this(new Enunciate(new String[0], new EnunciateConfiguration())); }
/** * Loads the configuration specified by the given config file. * * @param file The file. */ public void load(File file) throws IOException, SAXException { load(new FileInputStream(file)); }
/** * Whether this is the schema for the empty namespace. * * @return Whether this is the schema for the empty namespace. */ public boolean isEmptyNamespace() { return ((getNamespace() == null) || "".equals(getNamespace())); }
/** * The namespace to schema map. * * @return The namespace to schema map. */ protected Map<String, SchemaInfo> getNamespacesToSchemas() { return getModel().getNamespacesToSchemas(); }
/** * Package-private constructor for testing purposes. */ EnunciateAnnotationProcessor() throws EnunciateException { this(new Enunciate(new String[0], new EnunciateConfiguration())); }
/** * Loads the configuration specified by the given stream. * * @param in The stream. */ public void load(InputStream in) throws IOException, SAXException { load(new InputStreamReader(in, "utf-8")); }
/** * Whether this is the schema for the empty namespace. * * @return Whether this is the schema for the empty namespace. */ public boolean isEmptyNamespace() { return ((getNamespace() == null) || "".equals(getNamespace())); }