public String namespace() { return core.namespace(); }
/** * Puts definitions for XML attribute. * * @param attribute XmlAttribute * @param property property instance to be updated */ private static void applyAttribute(XmlAttribute attribute, Schema property) { if (attribute != null) { final XML xml = getXml(property); xml.setAttribute(true); setName(attribute.namespace(), attribute.name(), property); } }
private QName calcXmlName(XmlAttribute att) { String uri; String local; uri = att.namespace(); local = att.name(); // compute the default if(local.equals("##default")) local = NameConverter.standard.toVariableName(getName()); if(uri.equals("##default")) { XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this ); // JAX-RPC doesn't want the default namespace URI swapping to take effect to // local "unqualified" elements. UGLY. if(xs!=null) { switch(xs.attributeFormDefault()) { case QUALIFIED: uri = parent.getTypeName().getNamespaceURI(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else uri = ""; } return new QName(uri.intern(),local.intern()); }
public String namespace() { return core.namespace(); }
private QName calcXmlName(XmlAttribute att) { String uri; String local; uri = att.namespace(); local = att.name(); // compute the default if(local.equals("##default")) local = NameConverter.standard.toVariableName(getName()); if(uri.equals("##default")) { XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this ); // JAX-RPC doesn't want the default namespace URI swapping to take effect to // local "unqualified" elements. UGLY. if(xs!=null) { switch(xs.attributeFormDefault()) { case QUALIFIED: uri = parent.getTypeName().getNamespaceURI(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else uri = ""; } return new QName(uri.intern(),local.intern()); }
public String findNamespace(Annotated ann) { String ns = null; if (ann instanceof AnnotatedClass) { // For classes, it must be @XmlRootElement. Also, we do // want to use defaults from package, base class XmlRootElement elem = findRootElementAnnotation((AnnotatedClass) ann); if (elem != null) { ns = elem.namespace(); } } else { // For others, XmlElement or XmlAttribute work (anything else?) XmlElement elem = findAnnotation(XmlElement.class, ann, false, false, false); if (elem != null) { ns = elem.namespace(); } if (ns == null || MARKER_FOR_DEFAULT.equals(ns)) { XmlAttribute attr = findAnnotation(XmlAttribute.class, ann, false, false, false); if (attr != null) { ns = attr.namespace(); } } } // JAXB uses marker for "not defined" if (MARKER_FOR_DEFAULT.equals(ns)) { ns = null; } return ns; }
return _combineNames(attribute.name(), attribute.namespace(), defaultName);
public String namespace() { return core.namespace(); }
public String namespace() { return core.namespace(); }
public String getNamespace() { String namespace = null; if (getTypeDefinition().getSchema().getAttributeFormDefault() == XmlNsForm.QUALIFIED) { namespace = getTypeDefinition().getNamespace(); } if ((xmlAttribute != null) && (!"##default".equals(xmlAttribute.namespace()))) { namespace = xmlAttribute.namespace(); } return namespace; }
private QName calcXmlName(XmlAttribute att) { String uri; String local; uri = att.namespace(); local = att.name(); // compute the default if(local.equals("##default")) local = NameConverter.standard.toVariableName(getName()); if(uri.equals("##default")) { XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this ); // JAX-RPC doesn't want the default namespace URI swapping to take effect to // local "unqualified" elements. UGLY. if(xs!=null) { switch(xs.attributeFormDefault()) { case QUALIFIED: uri = parent.getTypeName().getNamespaceURI(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else uri = ""; } return new QName(uri.intern(),local.intern()); }
public String findNamespace(Annotated ann) { String ns = null; if (ann instanceof AnnotatedClass) { // For classes, it must be @XmlRootElement. Also, we do // want to use defaults from package, base class XmlRootElement elem = findRootElementAnnotation((AnnotatedClass) ann); if (elem != null) { ns = elem.namespace(); } } else { // For others, XmlElement or XmlAttribute work (anything else?) XmlElement elem = findAnnotation(XmlElement.class, ann, false, false, false); if (elem != null) { ns = elem.namespace(); } if (ns == null || MARKER_FOR_DEFAULT.equals(ns)) { XmlAttribute attr = findAnnotation(XmlAttribute.class, ann, false, false, false); if (attr != null) { ns = attr.namespace(); } } } // JAXB uses marker for "not defined" if (MARKER_FOR_DEFAULT.equals(ns)) { ns = null; } return ns; }
/** * Puts definitions for XML attribute. * * @param attribute XmlAttribute * @param property property instance to be updated */ private static void applyAttribute(XmlAttribute attribute, Schema property) { if (attribute != null) { final XML xml = getXml(property); xml.setAttribute(true); setName(attribute.namespace(), attribute.name(), property); } }
public String findNamespace(Annotated ann) { String ns = null; if (ann instanceof AnnotatedClass) { // For classes, it must be @XmlRootElement. Also, we do // want to use defaults from package, base class XmlRootElement elem = findRootElementAnnotation((AnnotatedClass) ann); if (elem != null) { ns = elem.namespace(); } } else { // For others, XmlElement or XmlAttribute work (anything else?) XmlElement elem = findAnnotation(XmlElement.class, ann, false, false, false); if (elem != null) { ns = elem.namespace(); } if (ns == null || MARKER_FOR_DEFAULT.equals(ns)) { XmlAttribute attr = findAnnotation(XmlAttribute.class, ann, false, false, false); if (attr != null) { ns = attr.namespace(); } } } // JAXB uses marker for "not defined" if (MARKER_FOR_DEFAULT.equals(ns)) { ns = null; } return ns; }
XmlAttribute attr = findAnnotation(XmlAttribute.class, ann, false, false, false); if (attr != null) { ns = attr.namespace();
public String findNamespace(Annotated ann) { String ns = null; if (ann instanceof AnnotatedClass) { // For classes, it must be @XmlRootElement. Also, we do // want to use defaults from package, base class XmlRootElement elem = findRootElementAnnotation((AnnotatedClass) ann); if (elem != null) { ns = elem.namespace(); } } else { // For others, XmlElement or XmlAttribute work (anything else?) XmlElement elem = findAnnotation(XmlElement.class, ann, false, false, false); if (elem != null) { ns = elem.namespace(); } if (ns == null || MARKER_FOR_DEFAULT.equals(ns)) { XmlAttribute attr = findAnnotation(XmlAttribute.class, ann, false, false, false); if (attr != null) { ns = attr.namespace(); } } } // JAXB uses marker for "not defined" if (MARKER_FOR_DEFAULT.equals(ns)) { ns = null; } return ns; }
return _combineNames(attribute.name(), attribute.namespace(), defaultName);