/*      */ public static String wrapPrimitiveType(TypeEntry type, String var) /*      */ {
   /*  668 */ String objType = type == null ? null : (String) TYPES.get(type.getName());
   /*      */
   /*  672 */ if (objType != null) /*  673 */ return "new " + objType + "(" + var + ")";
   /*  674 */ if ((type != null)
       && (type.getName().equals("byte[]"))
       && (type.getQName().getLocalPart().equals("hexBinary")))
   /*      */ {
     /*  678 */ return "new org.apache.axis.types.HexBinary(" + var + ")";
     /*      */ }
   /*  680 */ return var;
   /*      */ }
 /*      */ public static boolean shouldEmit(TypeEntry type) /*      */ {
   /* 1351 */ return ((type.getBaseType() == null) || (type.getRefType() != null))
       && (!(type instanceof CollectionTE))
       && (!(type instanceof org.apache.axis.wsdl.symbolTable.Element))
       && (type.isReferenced())
       && (!type.isOnlyLiteralReferenced())
       && ((type.getNode() == null)
           || ((!isXsNode(type.getNode(), "group"))
               && (!isXsNode(type.getNode(), "attributeGroup"))));
   /*      */ }
 /*      */ public static QName getXSIType(TypeEntry te) /*      */ {
   /* 1045 */ QName xmlType = null;
   /*      */
   /* 1049 */ if ((te != null)
       && ((te instanceof org.apache.axis.wsdl.symbolTable.Element))
       && (te.getRefType() != null))
   /*      */ {
     /* 1051 */ te = te.getRefType();
     /*      */ }
   /*      */
   /* 1063 */ if ((te != null) && ((te instanceof CollectionTE)) && (te.getRefType() != null))
   /*      */ {
     /* 1065 */ te = te.getRefType();
     /*      */ }
   /*      */
   /* 1068 */ if (te != null) {
     /* 1069 */ xmlType = te.getQName();
     /*      */ }
   /*      */
   /* 1072 */ return xmlType;
   /*      */ }
 /*      */ public static String getWrapperType(TypeEntry type) /*      */ {
   /*  781 */ String dims = type.getDimensions();
   /*  782 */ if (!dims.equals(""))
   /*      */ {
     /*  784 */ TypeEntry te = type.getRefType();
     /*  785 */ if ((te != null) && (!te.getDimensions().equals("")))
     /*      */ {
       /*  788 */ return getWrapperType(te) + dims;
       /*      */ }
     /*  790 */ if (((te instanceof BaseType))
         || (((te instanceof DefinedElement)) && ((te.getRefType() instanceof BaseType))))
     /*      */ {
       /*  794 */ return getWrapperType(te) + dims;
       /*      */ }
     /*      */ }
   /*  797 */ return getWrapperType(type.getName());
   /*      */ }
 /*      */ public static QName getItemType(TypeEntry te) {
   /* 1379 */ if ((te instanceof DefinedElement)) {
     /* 1380 */ te = te.getRefType();
     /*      */ }
   /* 1382 */ return te.getComponentType();
   /*      */ }
 /*      */ public static QName getItemQName(TypeEntry te) /*      */ {
   /* 1372 */ if ((te instanceof DefinedElement)) {
     /* 1373 */ te = te.getRefType();
     /*      */ }
   /* 1375 */ return te.getItemQName();
   /*      */ }
 /*      */ public static String holder(Parameter p, Emitter emitter) /*      */ {
   /*   82 */ String mimeType = p.getMIMEInfo() == null ? null : p.getMIMEInfo().getType();
   /*      */
   /*   85 */ String mimeDimensions = mimeType == null ? "" : p.getMIMEInfo().getDimensions();
   /*      */
   /*   90 */ if (mimeType != null) {
     /*   91 */ if ((mimeType.equals("image/gif")) || (mimeType.equals("image/jpeg")))
       /*   92 */ return "org.apache.axis.holders.ImageHolder" + mimeDimensions;
     /*   93 */ if (mimeType.equals("text/plain"))
       /*   94 */ return "javax.xml.rpc.holders.StringHolder" + mimeDimensions;
     /*   95 */ if (mimeType.startsWith("multipart/")) {
       /*   96 */ return "org.apache.axis.holders.MimeMultipartHolder" + mimeDimensions;
       /*      */ }
     /*   98 */ if ((mimeType.startsWith("application/octetstream"))
         || (mimeType.startsWith("application/octet-stream")))
     /*      */ {
       /*  100 */ return "org.apache.axis.holders.OctetStreamHolder" + mimeDimensions;
       /*      */ }
     /*  102 */ if ((mimeType.equals("text/xml")) || (mimeType.equals("application/xml")))
     /*      */ {
       /*  104 */ return "org.apache.axis.holders.SourceHolder" + mimeDimensions;
       /*      */ }
     /*  106 */ return "org.apache.axis.holders.DataHandlerHolder" + mimeDimensions;
     /*      */ }
   /*      */
   /*  111 */ TypeEntry type = p.getType();
   /*  112 */ String typeValue = type.getName();
   /*      */
   /*  116 */ if (((p.isOmittable()) && (p.getType().getDimensions().equals("")))
       || (((p.getType() instanceof CollectionType))
           && (((CollectionType) p.getType()).isWrapped()))
       || (p.getType().getUnderlTypeNillable()))
   /*      */ {
     /*  120 */ typeValue = getWrapperType(type);
     /*      */ }
   /*      */
   /*  125 */ if ((typeValue.equals("byte[]")) && (type.isBaseType()))
   /*      */ {
     /*  127 */ return "javax.xml.rpc.holders.ByteArrayHolder";
     /*      */ }
   /*      */
   /*  131 */ if (typeValue.endsWith("[]")) {
     /*  132 */ String name = emitter.getJavaName(type.getQName());
     /*  133 */ String packagePrefix = "";
     /*      */
     /*  137 */ if (((type instanceof CollectionType))
         && ((type.getRefType() instanceof BaseType)))
     /*      */ {
       /*  139 */ String uri = type.getRefType().getQName().getNamespaceURI();
       /*      */
       /*  143 */ if (TYPES.get(JavaUtils.replace(name, "[]", "")) != null) {
         /*  144 */ name = capitalizeFirstChar(name);
         /*      */ }
       /*      */
       /*  148 */ if ((((CollectionType) type).isWrapped())
           && (!typeValue.equals(type.getName()))) {
         /*  149 */ name = name + "Wrapper";
         /*      */ }
       /*      */
       /*  152 */ packagePrefix = emitter.getNamespaces().getCreate(uri, false);
       /*      */
       /*  154 */ if (packagePrefix == null) /*  155 */ packagePrefix = "";
       /*      */ else {
         /*  157 */ packagePrefix = packagePrefix + '.';
         /*      */ }
       /*      */ }
     /*  160 */ name = JavaUtils.replace(name, "java.lang.", "");
     /*      */
     /*  164 */ name = JavaUtils.replace(name, "[]", "Array");
     /*  165 */ name = addPackageName(name, "holders");
     /*      */
     /*  167 */ return packagePrefix + name + "Holder";
     /*      */ }
   /*      */
   /*  171 */ if (typeValue.equals("String"))
     /*  172 */ return "javax.xml.rpc.holders.StringHolder";
   /*  173 */ if (typeValue.equals("java.lang.String")) {
     /*  174 */ return "javax.xml.rpc.holders.StringHolder";
     /*      */ }
   /*      */
   /*  178 */ if (typeValue.equals("Object"))
     /*  179 */ return "javax.xml.rpc.holders.ObjectHolder";
   /*  180 */ if (typeValue.equals("java.lang.Object")) {
     /*  181 */ return "javax.xml.rpc.holders.ObjectHolder";
     /*      */ }
   /*      */
   /*  185 */ if ((typeValue.equals("int"))
       || (typeValue.equals("long"))
       || (typeValue.equals("short"))
       || (typeValue.equals("float"))
       || (typeValue.equals("double"))
       || (typeValue.equals("boolean"))
       || (typeValue.equals("byte")))
   /*      */ {
     /*  189 */ return "javax.xml.rpc.holders." + capitalizeFirstChar(typeValue) + "Holder";
     /*      */ }
   /*      */
   /*  194 */ if (typeValue.startsWith("java.lang.")) {
     /*  195 */ return "javax.xml.rpc.holders"
         + typeValue.substring(typeValue.lastIndexOf("."))
         + "WrapperHolder";
     /*      */ }
   /*      */
   /*  198 */ if (typeValue.indexOf(".") < 0) {
     /*  199 */ return "javax.xml.rpc.holders" + typeValue + "WrapperHolder";
     /*      */ }
   /*      */
   /*  204 */ if (typeValue.equals("java.math.BigDecimal"))
     /*  205 */ return "javax.xml.rpc.holders.BigDecimalHolder";
   /*  206 */ if (typeValue.equals("java.math.BigInteger"))
     /*  207 */ return "javax.xml.rpc.holders.BigIntegerHolder";
   /*  208 */ if (typeValue.equals("java.util.Date"))
     /*  209 */ return "org.apache.axis.holders.DateHolder";
   /*  210 */ if (typeValue.equals("java.util.Calendar"))
     /*  211 */ return "javax.xml.rpc.holders.CalendarHolder";
   /*  212 */ if (typeValue.equals("javax.xml.namespace.QName"))
     /*  213 */ return "javax.xml.rpc.holders.QNameHolder";
   /*  214 */ if (typeValue.equals("javax.activation.DataHandler")) {
     /*  215 */ return "org.apache.axis.holders.DataHandlerHolder";
     /*      */ }
   /*      */
   /*  219 */ if (typeValue.startsWith("org.apache.axis.types.")) {
     /*  220 */ int i = typeValue.lastIndexOf('.');
     /*  221 */ String t = typeValue.substring(i + 1);
     /*      */
     /*  223 */ return "org.apache.axis.holders." + t + "Holder";
     /*      */ }
   /*      */
   /*  229 */ return addPackageName(typeValue, "holders") + "Holder";
   /*      */ }
 /*      */ public static boolean isPrimitiveType(TypeEntry type) /*      */ {
   /*  756 */ return TYPES.get(type.getName()) != null;
   /*      */ }
 /*      */ public static Vector getEnumerationBaseAndValues(Node node, SymbolTable symbolTable)
       /*      */ {
   /*  320 */ if (node == null) {
     /*  321 */ return null;
     /*      */ }
   /*      */
   /*  325 */ QName nodeKind = getNodeQName(node);
   /*      */ NodeList children;
   /*      */ Node simpleNode;
   /*      */ int j;
   /*  327 */ if ((nodeKind != null)
       && (nodeKind.getLocalPart().equals("element"))
       && (Constants.isSchemaXSD(nodeKind.getNamespaceURI())))
   /*      */ {
     /*  329 */ children = node.getChildNodes();
     /*  330 */ simpleNode = null;
     /*      */
     /*  332 */ for (j = 0; (j < children.getLength()) && (simpleNode == null); )
     /*      */ {
       /*  334 */ QName simpleKind = getNodeQName(children.item(j));
       /*      */
       /*  336 */ if ((simpleKind != null)
           && (simpleKind.getLocalPart().equals("simpleType"))
           && (Constants.isSchemaXSD(simpleKind.getNamespaceURI())))
       /*      */ {
         /*  340 */ simpleNode = children.item(j);
         /*  341 */ node = simpleNode;
         /*      */ }
       /*  333 */ j++;
       /*      */ }
     /*      */
     /*      */ }
   /*      */
   /*  347 */ nodeKind = getNodeQName(node);
   /*      */
   /*  349 */ if ((nodeKind != null)
       && (nodeKind.getLocalPart().equals("simpleType"))
       && (Constants.isSchemaXSD(nodeKind.getNamespaceURI())))
   /*      */ {
     /*  354 */ NodeList children = node.getChildNodes();
     /*  355 */ Node restrictionNode = null;
     /*      */
     /*  357 */ int j = 0;
     /*  358 */ while ((j < children.getLength()) && (restrictionNode == null))
     /*      */ {
       /*  360 */ QName restrictionKind = getNodeQName(children.item(j));
       /*      */
       /*  362 */ if ((restrictionKind != null)
           && (restrictionKind.getLocalPart().equals("restriction"))
           && (Constants.isSchemaXSD(restrictionKind.getNamespaceURI())))
       /*      */ {
         /*  366 */ restrictionNode = children.item(j);
         /*      */ }
       /*  359 */ j++;
       /*      */ }
     /*      */
     /*  373 */ TypeEntry baseEType = null;
     /*      */
     /*  375 */ if (restrictionNode != null) {
       /*  376 */ QName baseType = getTypeQName(restrictionNode, new BooleanHolder(), false);
       /*      */
       /*  379 */ baseEType = symbolTable.getType(baseType);
       /*      */
       /*  381 */ if (baseEType != null) {
         /*  382 */ String javaName = baseEType.getName();
         /*      */
         /*  384 */ if ((javaName.equals("boolean"))
             || (!SchemaUtils.isSimpleSchemaType(baseEType.getQName())))
         /*      */ {
           /*  387 */ baseEType = null;
           /*      */ }
         /*      */ }
       /*      */
       /*      */ }
     /*      */
     /*  393 */ if ((baseEType != null) && (restrictionNode != null)) {
       /*  394 */ Vector v = new Vector();
       /*  395 */ NodeList enums = restrictionNode.getChildNodes();
       /*      */
       /*  397 */ for (int i = 0; i < enums.getLength(); i++) {
         /*  398 */ QName enumKind = getNodeQName(enums.item(i));
         /*      */
         /*  400 */ if ((enumKind == null)
             || (!enumKind.getLocalPart().equals("enumeration"))
             || (!Constants.isSchemaXSD(enumKind.getNamespaceURI())))
         /*      */ {
           /*      */ continue;
           /*      */ }
         /*      */
         /*  406 */ Node enumNode = enums.item(i);
         /*  407 */ String value = getAttribute(enumNode, "value");
         /*      */
         /*  409 */ if (value != null) {
           /*  410 */ v.add(value);
           /*      */ }
         /*      */
         /*      */ }
       /*      */
       /*  416 */ if (v.isEmpty()) {
         /*  417 */ return null;
         /*      */ }
       /*      */
       /*  421 */ v.add(0, baseEType);
       /*      */
       /*  423 */ return v;
       /*      */ }
     /*      */ }
   /*      */
   /*  427 */ return null;
   /*      */ }