public String getPackageFromNamespace(String namespace){ return URLProcessor.makePackageName(namespace); } public int getPageType() {
addWordToPackageBuffer(sb, words[i], (i == words.length - 1)); addWordToPackageBuffer(sb, st2.nextToken(), false);
addWordToPackageBuffer(sb, words[i], (i == words.length - 1)); addWordToPackageBuffer(sb, st2.nextToken(), false);
private String getPackage(String namespaceURI) { String basePackageName; if ((ns2packageNameMap != null) && ns2packageNameMap.containsKey(namespaceURI)) { basePackageName = ns2packageNameMap.get(namespaceURI); } else { basePackageName = URLProcessor.makePackageName(namespaceURI); } return this.packageName == null ? basePackageName : this.packageName + basePackageName; }
private String getPackage(String namespaceURI) { String basePackageName; if ((ns2packageNameMap != null) && ns2packageNameMap.containsKey(namespaceURI)) { basePackageName = ns2packageNameMap.get(namespaceURI); } else { basePackageName = URLProcessor.makePackageName(namespaceURI); } return this.packageName == null ? basePackageName : this.packageName + basePackageName; }
public String packageFromTargetNamespace() { return URLProcessor.makePackageName(wsdlDefinition.getTargetNamespace()); }
public String lookupPackageForNamespace(String uri) { /* If the xsdconfig file has mappings, we'll use them instead of the -p option. * If we have an xsdconfig file but no namespace to package mappings, then we'll * defer to the -p option. */ if (xsdConfig != null) { if (xsdConfig.hasNamespaceToJavaPackageMappings) { log.debug("RETURNING " + uri + " = " + xsdConfig.getNamespacesToJavaPackages().get(uri)); return (String)xsdConfig.getNamespacesToJavaPackages().get(uri); } } if (uri2packageMappings.containsKey(uri)) { return (String)uri2packageMappings.get(uri); } else { return URLProcessor.makePackageName(uri); } }
public String lookupPackageForNamespace(String uri) { /* If the xsdconfig file has mappings, we'll use them instead of the -p option. * If we have an xsdconfig file but no namespace to package mappings, then we'll * defer to the -p option. */ if (xsdConfig != null) { if (xsdConfig.hasNamespaceToJavaPackageMappings) { log.debug("RETURNING " + uri + " = " + xsdConfig.getNamespacesToJavaPackages().get(uri)); return (String)xsdConfig.getNamespacesToJavaPackages().get(uri); } } if (uri2packageMappings.containsKey(uri)) { return (String)uri2packageMappings.get(uri); } else { return URLProcessor.makePackageName(uri); } }
private static String extractNamespace(XmlSchema schema) { String pkg; pkg = schema.getTargetNamespace(); if (pkg == null) { XmlSchema[] schemas2 = SchemaUtil.getAllSchemas(schema); for (int j = 0; schemas2 != null && j < schemas2.length; j++) { pkg = schemas2[j].getTargetNamespace(); if (pkg != null) break; } } if (pkg == null) { pkg = URLProcessor.DEFAULT_PACKAGE; } pkg = URLProcessor.makePackageName(pkg); return pkg; }
public void engage(CodeGenConfiguration configuration) { String packageName = configuration.getPackageName(); if (packageName == null || URLProcessor.DEFAULT_PACKAGE.equals(packageName)) { //use the target namespace from the axis service to form a package name // since all the services are in same name space String targetNameSpace = configuration.getTargetNamespace(); // if this target name space exists in the ns2p then we have to get that package if ((configuration.getUri2PackageNameMap() != null) && configuration.getUri2PackageNameMap().containsKey(targetNameSpace.trim())) { packageName = (String)configuration.getUri2PackageNameMap().get(targetNameSpace); } else { // i.e. user have not given any ns2p information for this name space packageName = URLProcessor.makePackageName(configuration.getTargetNamespace()); if (packageName != null) { packageName = packageName.toLowerCase(); } } } if ((packageName == null) || "".equals(packageName)) { packageName = URLProcessor.DEFAULT_PACKAGE; } configuration.setPackageName(packageName); }
private static String extractNamespace(XmlSchema schema) { String pkg; pkg = schema.getTargetNamespace(); if (pkg == null) { XmlSchema[] schemas2 = SchemaUtil.getAllSchemas(schema); for (int j = 0; schemas2 != null && j < schemas2.length; j++) { pkg = schemas2[j].getTargetNamespace(); if (pkg != null) break; } } if (pkg == null) { pkg = URLProcessor.DEFAULT_PACKAGE; } pkg = URLProcessor.makePackageName(pkg); return pkg; }
} else { writer.registerExtensionMapperPackageName(nsp == null ? null : URLProcessor.makePackageName(nsp));
} else { writer.registerExtensionMapperPackageName(nsp == null ? null : URLProcessor.makePackageName(nsp));
writer.registerExtensionMapperPackageName(options.getNs2PackageMap().get(ns)); } else { writer.registerExtensionMapperPackageName(URLProcessor.makePackageName(ns));
writer.registerExtensionMapperPackageName(options.getNs2PackageMap().get(ns)); } else { writer.registerExtensionMapperPackageName(URLProcessor.makePackageName(ns));