root.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns", uri);
doc.appendChild(root);
for (Iterator iter = pContextList.iterator(); iter.hasNext(); ) {
Object o = iter.next();
Context ctx, typeCtx;
if (o instanceof ObjectSG) {
ObjectSG oSG = (ObjectSG) o;
ctx = oSG.getClassContext();
typeCtx = oSG.getTypeSG().getComplexTypeSG().getClassContext();
} else {
TypeSG tSG = (TypeSG) o;
ctx = typeCtx = tSG.getComplexTypeSG().getClassContext();
}
String packageName = ctx.getXMLInterfaceName().getPackageName();
if (packageName == null) {
packageName = "";
}
if (!packageName.equals(pPackageName)) {
continue;
}
Element manager = doc.createElementNS(uri, "Manager");
root.appendChild(manager);
manager.setAttributeNS(null, "elementInterface", ctx.getXMLInterfaceName().toString());
manager.setAttributeNS(null, "elementClass", ctx.getXMLImplementationName().toString());
manager.setAttributeNS(null, "handlerClass", typeCtx.getXMLHandlerName().toString());
manager.setAttributeNS(null, "driverClass", typeCtx.getXMLSerializerName().toString());
manager.setAttributeNS(null, "validatorClass", ctx.getXMLValidatorName().toString());
if (o instanceof ObjectSG) {
XsQName name = ((ObjectSG) o).getName();
manager.setAttributeNS(null, "qName", name.toString());
if (name.getPrefix() != null) {
manager.setAttributeNS(null, "prefix", name.getPrefix());