下面列出了javax.xml.bind.annotation.XmlSchema#attributeFormDefault ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
public final XmlNsForm getAttributeFormDefault(String nsUri) {
for (ClassInfoImpl<T,C,F,M> ci : beans().values()) {
XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
if(xs==null)
continue;
if(!xs.namespace().equals(nsUri))
continue;
XmlNsForm xnf = xs.attributeFormDefault();
if(xnf!=XmlNsForm.UNSET)
return xnf;
}
return XmlNsForm.UNSET;
}
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());
}
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
public final XmlNsForm getAttributeFormDefault(String nsUri) {
for (ClassInfoImpl<T,C,F,M> ci : beans().values()) {
XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
if(xs==null)
continue;
if(!xs.namespace().equals(nsUri))
continue;
XmlNsForm xnf = xs.attributeFormDefault();
if(xnf!=XmlNsForm.UNSET)
return xnf;
}
return XmlNsForm.UNSET;
}
public final XmlNsForm getAttributeFormDefault(String nsUri) {
for (ClassInfoImpl<T,C,F,M> ci : beans().values()) {
XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
if(xs==null)
continue;
if(!xs.namespace().equals(nsUri))
continue;
XmlNsForm xnf = xs.attributeFormDefault();
if(xnf!=XmlNsForm.UNSET)
return xnf;
}
return XmlNsForm.UNSET;
}
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
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());
}
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());
}
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
public final XmlNsForm getAttributeFormDefault(String nsUri) {
for (ClassInfoImpl<T,C,F,M> ci : beans().values()) {
XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
if(xs==null)
continue;
if(!xs.namespace().equals(nsUri))
continue;
XmlNsForm xnf = xs.attributeFormDefault();
if(xnf!=XmlNsForm.UNSET)
return xnf;
}
return XmlNsForm.UNSET;
}
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());
}
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
public final XmlNsForm getAttributeFormDefault(String nsUri) {
for (ClassInfoImpl<T,C,F,M> ci : beans().values()) {
XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
if(xs==null)
continue;
if(!xs.namespace().equals(nsUri))
continue;
XmlNsForm xnf = xs.attributeFormDefault();
if(xnf!=XmlNsForm.UNSET)
return xnf;
}
return XmlNsForm.UNSET;
}
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());
}
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
public final XmlNsForm getAttributeFormDefault(String nsUri) {
for (ClassInfoImpl<T,C,F,M> ci : beans().values()) {
XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
if(xs==null)
continue;
if(!xs.namespace().equals(nsUri))
continue;
XmlNsForm xnf = xs.attributeFormDefault();
if(xnf!=XmlNsForm.UNSET)
return xnf;
}
return XmlNsForm.UNSET;
}
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());
}
private String getEffectiveNamespaceFor(XmlElementRef r) {
String nsUri = r.namespace();
XmlSchema xs = reader().getPackageAnnotation( XmlSchema.class, parent.getClazz(), this );
if(xs!=null && xs.attributeFormDefault()== XmlNsForm.QUALIFIED) {
// JAX-RPC doesn't want the default namespace URI swapping to take effect to
// local "unqualified" elements. UGLY.
if(nsUri.length()==0)
nsUri = parent.builder.defaultNsUri;
}
return nsUri;
}
public final XmlNsForm getAttributeFormDefault(String nsUri) {
for (ClassInfoImpl<T,C,F,M> ci : beans().values()) {
XmlSchema xs = reader.getPackageAnnotation( XmlSchema.class, ci.getClazz(), null );
if(xs==null)
continue;
if(!xs.namespace().equals(nsUri))
continue;
XmlNsForm xnf = xs.attributeFormDefault();
if(xnf!=XmlNsForm.UNSET)
return xnf;
}
return XmlNsForm.UNSET;
}