&& (te.getRefType() != null)) { te = te.getRefType(); && (te.getRefType() != null)) { te = te.getRefType();
&& (te.getRefType() != null)) { te = te.getRefType(); && (te.getRefType() != null)) { te = te.getRefType();
public static QName getItemQName(TypeEntry te) { if (te instanceof DefinedElement) { te = te.getRefType(); } return te.getItemQName(); }
public static QName getItemType(TypeEntry te) { if (te instanceof DefinedElement) { te = te.getRefType(); } return te.getComponentType(); } } // class Utils
public static QName getItemType(TypeEntry te) { if (te instanceof DefinedElement) { te = te.getRefType(); } return te.getComponentType(); } } // class Utils
public static QName getItemQName(TypeEntry te) { if (te instanceof DefinedElement) { te = te.getRefType(); } return te.getItemQName(); }
public static QName getItemQName(TypeEntry te) { if (te instanceof DefinedElement) { te = te.getRefType(); } return te.getItemQName(); }
public static QName getItemType(TypeEntry te) { if (te instanceof DefinedElement) { te = te.getRefType(); } return te.getComponentType(); } } // class Utils
/** * Get the XML type (QName) for a Fault - look in the (single) fault * part for type="" or element="" - if type, return the QName. If * element, return the reference type for the element. * * @param part the Fault to dig into * @param st the SymbolTable we're using * @return the XML type of the Fault's part, or null */ private QName getFaultType(SymbolTable st, Part part) { if (part != null) { if (part.getTypeName() != null) { return part.getTypeName(); } // Literal, so get the element's type TypeEntry entry = st.getElement(part.getElementName()); if ((entry != null) && (entry.getRefType() != null)) { return entry.getRefType().getQName(); } } return null; } }
/** * Returns a "wrapper" type for the given TypeEntry. * * @param type * @return the name of a java wrapper class for the type, or the type's * name if it's not a primitive. */ public static String getWrapperType(TypeEntry type) { String dims = type.getDimensions(); if (!dims.equals("")) { TypeEntry te = type.getRefType(); if (te != null && !te.getDimensions().equals("")) { return getWrapperType(te) + dims; } if (te instanceof BaseType || te instanceof DefinedElement && te.getRefType() instanceof BaseType) { return getWrapperType(te) + dims; } } return getWrapperType(type.getName()); }
/** * Returns a "wrapper" type for the given TypeEntry. * * @param type * @return the name of a java wrapper class for the type, or the type's * name if it's not a primitive. */ public static String getWrapperType(TypeEntry type) { String dims = type.getDimensions(); if (!dims.equals("")) { TypeEntry te = type.getRefType(); if (te != null && !te.getDimensions().equals("")) { return getWrapperType(te) + dims; } if (te instanceof BaseType || te instanceof DefinedElement && te.getRefType() instanceof BaseType) { return getWrapperType(te) + dims; } } return getWrapperType(type.getName()); }
/** * Returns a "wrapper" type for the given TypeEntry. * * @param type * @return the name of a java wrapper class for the type, or the type's * name if it's not a primitive. */ public static String getWrapperType(TypeEntry type) { String dims = type.getDimensions(); if (!dims.equals("")) { TypeEntry te = type.getRefType(); if (te != null && !te.getDimensions().equals("")) { return getWrapperType(te) + dims; } if (te instanceof BaseType || te instanceof DefinedElement && te.getRefType() instanceof BaseType) { return getWrapperType(te) + dims; } } return getWrapperType(type.getName()); }
/** * Get the XML type (QName) for a Fault - look in the (single) fault * part for type="" or element="" - if type, return the QName. If * element, return the reference type for the element. * * @param part the Fault to dig into * @param st the SymbolTable we're using * @return the XML type of the Fault's part, or null */ private QName getFaultType(SymbolTable st, Part part) { if (part != null) { if (part.getTypeName() != null) { return part.getTypeName(); } // Literal, so get the element's type TypeEntry entry = st.getElement(part.getElementName()); if ((entry != null) && (entry.getRefType() != null)) { return entry.getRefType().getQName(); } } return null; } }
/** * Get the XML type (QName) for a Fault - look in the (single) fault * part for type="" or element="" - if type, return the QName. If * element, return the reference type for the element. * * @param part the Fault to dig into * @param st the SymbolTable we're using * @return the XML type of the Fault's part, or null */ private QName getFaultType(SymbolTable st, Part part) { if (part != null) { if (part.getTypeName() != null) { return part.getTypeName(); } // Literal, so get the element's type TypeEntry entry = st.getElement(part.getElementName()); if ((entry != null) && (entry.getRefType() != null)) { return entry.getRefType().getQName(); } } return null; } }
private ArrayTypeDescriptor constructArrayType(TypeEntry type) { ArrayTypeDescriptor result = new ArrayTypeDescriptor(); result.setElementType(constructType(type.getRefType())); result.setType(type.getQName().getLocalPart()); result.setQname(type.getQName()); // Method getItemQName() not supported in axis 1.2 used by globus //result.setWrapped(type.getItemQName()!=null); return result; }
/** * Add an output parameter to the parameters object. * * @param outputs * @param outdex * @param parameters * @param trim */ private void addOutParm(Vector outputs, int outdex, Parameters parameters, boolean trim) { Parameter p = (Parameter) outputs.get(outdex); // If this is an element, we want the XML to reflect the element name // not the part name. Same check is made in addInishParam above. if (p.getType() instanceof DefinedElement) { DefinedElement de = (DefinedElement) p.getType(); p.setQName(de.getQName()); } // If this is a collection we want the XML to reflect the type in // the collection, not foo[unbounded]. // Same check is made in addInishParam above. if (p.getType() instanceof CollectionElement) { p.setQName(p.getType().getRefType().getQName()); } if (trim) { outputs.remove(outdex); } p.setMode(Parameter.OUT); ++parameters.outputs; parameters.list.add(p); } // addOutParm
/** * Add an output parameter to the parameters object. * * @param outputs * @param outdex * @param parameters * @param trim */ private void addOutParm(Vector outputs, int outdex, Parameters parameters, boolean trim) { Parameter p = (Parameter) outputs.get(outdex); // If this is an element, we want the XML to reflect the element name // not the part name. Same check is made in addInishParam above. if (p.getType() instanceof DefinedElement) { DefinedElement de = (DefinedElement) p.getType(); p.setQName(de.getQName()); } // If this is a collection we want the XML to reflect the type in // the collection, not foo[unbounded]. // Same check is made in addInishParam above. if (p.getType() instanceof CollectionElement) { p.setQName(p.getType().getRefType().getQName()); } if (trim) { outputs.remove(outdex); } p.setMode(Parameter.OUT); ++parameters.outputs; parameters.list.add(p); } // addOutParm
public static boolean shouldEmit(TypeEntry type) { // 1) Don't register types that are base (primitive) types // or attributeGroups or xs:groups. // If the baseType != null && getRefType() != null this // is a simpleType that must be registered. // 2) Don't register the special types for collections // (indexed properties) or elements // 3) Don't register types that are not referenced // or only referenced in a literal context. return (!(((type.getBaseType() != null) && (type.getRefType() == null)) || (type instanceof CollectionTE) || (type instanceof Element) || !type.isReferenced() || type.isOnlyLiteralReferenced() || ((type.getNode() != null) && (isXsNode(type.getNode(), "group") || isXsNode(type.getNode(), "attributeGroup"))))); }
public static boolean shouldEmit(TypeEntry type) { // 1) Don't register types that are base (primitive) types // or attributeGroups or xs:groups. // If the baseType != null && getRefType() != null this // is a simpleType that must be registered. // 2) Don't register the special types for collections // (indexed properties) or elements // 3) Don't register types that are not referenced // or only referenced in a literal context. return (!(((type.getBaseType() != null) && (type.getRefType() == null)) || (type instanceof CollectionTE) || (type instanceof Element) || !type.isReferenced() || type.isOnlyLiteralReferenced() || ((type.getNode() != null) && (isXsNode(type.getNode(), "group") || isXsNode(type.getNode(), "attributeGroup"))))); }
public static boolean shouldEmit(TypeEntry type) { // 1) Don't register types that are base (primitive) types // or attributeGroups or xs:groups. // If the baseType != null && getRefType() != null this // is a simpleType that must be registered. // 2) Don't register the special types for collections // (indexed properties) or elements // 3) Don't register types that are not referenced // or only referenced in a literal context. return (!(((type.getBaseType() != null) && (type.getRefType() == null)) || (type instanceof CollectionTE) || (type instanceof Element) || !type.isReferenced() || type.isOnlyLiteralReferenced() || ((type.getNode() != null) && (isXsNode(type.getNode(), "group") || isXsNode(type.getNode(), "attributeGroup"))))); }