/** * create new XmlSchemaAppinfo and add value goten from element * to this obj * @param content */ XmlSchemaAppInfo handleAppInfo(Element content) { XmlSchemaAppInfo appInfo = new XmlSchemaAppInfo(); NodeList markup = new DocumentFragmentNodeList(content); if (!content.hasAttribute("source") && markup.getLength() == 0) { return null; } appInfo.setSource(getAttribute(content, "source")); appInfo.setMarkup(markup); return appInfo; }
/** * create new XmlSchemaAppinfo and add value goten from element * to this obj * @param content */ XmlSchemaAppInfo handleAppInfo(Element content) { XmlSchemaAppInfo appInfo = new XmlSchemaAppInfo(); NodeList markup = new DocumentFragmentNodeList(content); if (!content.hasAttribute("source") && markup.getLength() == 0) { return null; } appInfo.setSource(getAttribute(content, "source")); appInfo.setMarkup(markup); return appInfo; }
/** * create new XmlSchemaAppinfo and add value goten from element * to this obj * @param content */ XmlSchemaAppInfo handleAppInfo(Element content) { XmlSchemaAppInfo appInfo = new XmlSchemaAppInfo(); NodeList markup = getChildren(content); if (!content.hasAttribute("source") && (markup == null || markup.getLength() <= 0)) { return null; } appInfo.setSource(getAttribute(content, "source")); appInfo.setMarkup(markup); return appInfo; }
/** * Create a typesafeEnumMember markup. This provides a legal java identifier * for an enumeration value. Since these are constant values, we follow the * naming convention for static fields (all uppercase). * * @param jaxbNamespace the JAXB namespace * @param jaxbNamespacePrefix the JAXB namespace prefix * @param enumerationFacet the enumeration facet to annotate * @param value the enumeration value. */ protected void injectJaxbTypeSafeEnumMemberAnnotation( final String jaxbNamespace, final String jaxbNamespacePrefix, final XmlSchemaEnumerationFacet enumerationFacet, final String value) { XmlSchemaAppInfo appInfo = getXmlSchemaAppInfo(enumerationFacet); DocumentFragment markupParent = getMarkupParent(appInfo); Element typesafeEnumMemberEl = getElement(markupParent, jaxbNamespace, jaxbNamespacePrefix, JAXB_TYPESAFEENUMMEMBER); typesafeEnumMemberEl.setAttribute( JAXB_TYPESAFEENUMMEMBER_NAME, DEFAULT_ENUMERATION_MEMBER_PREFIX + NameUtil.toVariableName(value).toUpperCase()); appInfo.setMarkup(markupParent.getChildNodes()); }
/** * Create a typesafeEnumClass markup. This marks the simple Type as eligible * to become a separate Enum class. * * @param jaxbNamespace the JAXB namespace * @param jaxbNamespacePrefix the JAXB namespace prefix * @param xsdSimpleType the simple type to annotate * @param elementName the name of the element whose simple type we are * dealing with. */ protected void injectJaxbTypeSafeEnumClassAnnotation( final String jaxbNamespace, final String jaxbNamespacePrefix, final XmlSchemaSimpleType xsdSimpleType, final String elementName) { XmlSchemaAppInfo appInfo = getXmlSchemaAppInfo(xsdSimpleType); DocumentFragment markupParent = getMarkupParent(appInfo); Element typesafeEnumClassEl = getElement(markupParent, jaxbNamespace, jaxbNamespacePrefix, JAXB_TYPESAFEENUMCLASS); typesafeEnumClassEl.setAttribute(JAXB_TYPESAFEENUMCLASS_NAME, NameUtil.toClassName(elementName)); appInfo.setMarkup(markupParent.getChildNodes()); }
appInfo.setMarkup(markup); schemaObject.setAnnotation(annotation);
appInfo.setMarkup(el.getChildNodes()); } catch (ParserConfigurationException ex) { throw new RuntimeException("[ObjectReferenceVisitor: error creating endpoint schema]");
jaxbNamespacePrefix); appInfo.setMarkup(markupParent.getChildNodes());