Search in sources :

Example 1 with JavaClassCompareByNamespace

use of org.eclipse.persistence.jaxb.javamodel.JavaClassCompareByNamespace in project eclipselink by eclipse-ee4j.

the class SchemaGenerator method generateSchema.

public void generateSchema(List<JavaClass> typeInfoClasses, Map<String, TypeInfo> typeInfo, Map<String, QName> userDefinedSchemaTypes, Map<String, PackageInfo> packageToPackageInfoMappings, Map<QName, ElementDeclaration> additionalGlobalElements, Map<String, Class<?>> arrayClassesToGeneratedClasses) {
    this.typeInfo = typeInfo;
    this.userDefinedSchemaTypes = userDefinedSchemaTypes;
    this.packageToPackageInfoMappings = packageToPackageInfoMappings;
    this.schemaCount = 1;
    this.schemaTypeInfo = new HashMap<>(typeInfo.size());
    this.arrayClassesToGeneratedClasses = arrayClassesToGeneratedClasses;
    // sort input classes before schema name (like schema1.xsd, schema2.xsd....) is generated and assigned
    typeInfoClasses.sort(new JavaClassCompareByNamespace(typeInfo));
    for (JavaClass javaClass : typeInfoClasses) {
        addSchemaComponents(javaClass);
    }
    populateSchemaTypes();
    if (additionalGlobalElements != null) {
        addGlobalElements(additionalGlobalElements);
    }
}
Also used : JavaClass(org.eclipse.persistence.jaxb.javamodel.JavaClass) JavaClassCompareByNamespace(org.eclipse.persistence.jaxb.javamodel.JavaClassCompareByNamespace)

Aggregations

JavaClass (org.eclipse.persistence.jaxb.javamodel.JavaClass)1 JavaClassCompareByNamespace (org.eclipse.persistence.jaxb.javamodel.JavaClassCompareByNamespace)1