set.add("[" + tClass.getCanonicalName() + "]"); // Indicates a actual class reference
}
// If there is an xmlType, and it maps to a package then add
// an override if the package is different.
if (pkg != null) {
AnnotationDesc ad = msrd.getAnnotationDesc(tClass);
if (ad != null && ad.hasXmlType()) {
String ns = ad.getXmlTypeNamespace();
if (ns != null && ns.length() > 0) {
List pkgs = makePackages(ns);
if (pkgs != null) {
for (int i=0; i<pkgs.size(); i++) {
String pkg2 = (String) pkgs.get(i);
if (!pkg.equals(pkg2)) {
String override = pkg + " > " + pkg2;
if (!set.contains(override)) {
set.add(override);
if (log.isDebugEnabled()) {
log.debug("Adding override=" + override);
}
}
}
}
}
}
}
}
addXmlSeeAlsoPackages(tClass, msrd, set);
}
// Set the package for the element
if (tClass != eClass) {
if (eClass == null) {
// A null or empty namespace indicates that the element is
// unqualified. This can occur if the parameter is represented as a child element
// in doc/lit wrapped. The package is determined from the wrapper element in such casses.
if (namespace != null && namespace.length() > 0) {
// Use default namespace to package algorithm
List pkgs = makePackages(namespace);
if (pkgs != null) {
set.addAll(pkgs);
}
}
} else {
Package elementPkg = eClass.getPackage();
String pkg = (elementPkg != null) ? elementPkg.getName() : null;
if (pkg != null) {
set.add(pkg);
set.add("@" + pkg); // Indicates a package from an actual class reference (versus namespace)
set.add("[" + eClass.getCanonicalName() + "]"); // Indicates a actual class reference
}
if (pkg != null) {
AnnotationDesc ad = msrd.getAnnotationDesc(tClass);
if (ad != null && ad.hasXmlRootElement()) {
String ns = ad.getXmlRootElementNamespace();
if (ns != null && ns.length() > 0) {
List pkgs = makePackages(ns);
if (pkgs != null) {
for (int i=0; i<pkgs.size(); i++) {
String pkg2 = (String) pkgs.get(i);