Java Code Examples for javax.xml.bind.annotation.XmlSchema#elementFormDefault()
The following examples show how to use
javax.xml.bind.annotation.XmlSchema#elementFormDefault() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TypeInfoSetImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public final XmlNsForm getElementFormDefault(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.elementFormDefault(); if(xnf!=XmlNsForm.UNSET) return xnf; } return XmlNsForm.UNSET; }
Example 2
Source File: PropertyInfoImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private QName calcXmlName(String uri,String local) { // compute the default TODO.checkSpec(); if(local.length()==0 || local.equals("##default")) local = seed.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.elementFormDefault()) { case QUALIFIED: QName typeName = parent.getTypeName(); if(typeName!=null) uri = typeName.getNamespaceURI(); else uri = xs.namespace(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else { uri = ""; } } return new QName(uri.intern(),local.intern()); }
Example 3
Source File: TypeInfoSetImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public final XmlNsForm getElementFormDefault(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.elementFormDefault(); if(xnf!=XmlNsForm.UNSET) return xnf; } return XmlNsForm.UNSET; }
Example 4
Source File: PropertyInfoImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private QName calcXmlName(String uri,String local) { // compute the default TODO.checkSpec(); if(local.length()==0 || local.equals("##default")) local = seed.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.elementFormDefault()) { case QUALIFIED: QName typeName = parent.getTypeName(); if(typeName!=null) uri = typeName.getNamespaceURI(); else uri = xs.namespace(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else { uri = ""; } } return new QName(uri.intern(),local.intern()); }
Example 5
Source File: TypeInfoSetImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public final XmlNsForm getElementFormDefault(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.elementFormDefault(); if(xnf!=XmlNsForm.UNSET) return xnf; } return XmlNsForm.UNSET; }
Example 6
Source File: PropertyInfoImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private QName calcXmlName(String uri,String local) { // compute the default TODO.checkSpec(); if(local.length()==0 || local.equals("##default")) local = seed.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.elementFormDefault()) { case QUALIFIED: QName typeName = parent.getTypeName(); if(typeName!=null) uri = typeName.getNamespaceURI(); else uri = xs.namespace(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else { uri = ""; } } return new QName(uri.intern(),local.intern()); }
Example 7
Source File: TypeInfoSetImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public final XmlNsForm getElementFormDefault(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.elementFormDefault(); if(xnf!=XmlNsForm.UNSET) return xnf; } return XmlNsForm.UNSET; }
Example 8
Source File: PropertyInfoImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private QName calcXmlName(String uri,String local) { // compute the default TODO.checkSpec(); if(local.length()==0 || local.equals("##default")) local = seed.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.elementFormDefault()) { case QUALIFIED: QName typeName = parent.getTypeName(); if(typeName!=null) uri = typeName.getNamespaceURI(); else uri = xs.namespace(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else { uri = ""; } } return new QName(uri.intern(),local.intern()); }
Example 9
Source File: TypeInfoSetImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public final XmlNsForm getElementFormDefault(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.elementFormDefault(); if(xnf!=XmlNsForm.UNSET) return xnf; } return XmlNsForm.UNSET; }
Example 10
Source File: PropertyInfoImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private QName calcXmlName(String uri,String local) { // compute the default TODO.checkSpec(); if(local.length()==0 || local.equals("##default")) local = seed.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.elementFormDefault()) { case QUALIFIED: QName typeName = parent.getTypeName(); if(typeName!=null) uri = typeName.getNamespaceURI(); else uri = xs.namespace(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else { uri = ""; } } return new QName(uri.intern(),local.intern()); }
Example 11
Source File: TypeInfoSetImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
public final XmlNsForm getElementFormDefault(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.elementFormDefault(); if(xnf!=XmlNsForm.UNSET) return xnf; } return XmlNsForm.UNSET; }
Example 12
Source File: PropertyInfoImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
private QName calcXmlName(String uri,String local) { // compute the default TODO.checkSpec(); if(local.length()==0 || local.equals("##default")) local = seed.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.elementFormDefault()) { case QUALIFIED: QName typeName = parent.getTypeName(); if(typeName!=null) uri = typeName.getNamespaceURI(); else uri = xs.namespace(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else { uri = ""; } } return new QName(uri.intern(),local.intern()); }
Example 13
Source File: TypeInfoSetImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public final XmlNsForm getElementFormDefault(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.elementFormDefault(); if(xnf!=XmlNsForm.UNSET) return xnf; } return XmlNsForm.UNSET; }
Example 14
Source File: PropertyInfoImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private QName calcXmlName(String uri,String local) { // compute the default TODO.checkSpec(); if(local.length()==0 || local.equals("##default")) local = seed.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.elementFormDefault()) { case QUALIFIED: QName typeName = parent.getTypeName(); if(typeName!=null) uri = typeName.getNamespaceURI(); else uri = xs.namespace(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else { uri = ""; } } return new QName(uri.intern(),local.intern()); }
Example 15
Source File: TypeInfoSetImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public final XmlNsForm getElementFormDefault(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.elementFormDefault(); if(xnf!=XmlNsForm.UNSET) return xnf; } return XmlNsForm.UNSET; }
Example 16
Source File: PropertyInfoImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private QName calcXmlName(String uri,String local) { // compute the default TODO.checkSpec(); if(local.length()==0 || local.equals("##default")) local = seed.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.elementFormDefault()) { case QUALIFIED: QName typeName = parent.getTypeName(); if(typeName!=null) uri = typeName.getNamespaceURI(); else uri = xs.namespace(); if(uri.length()==0) uri = parent.builder.defaultNsUri; break; case UNQUALIFIED: case UNSET: uri = ""; } } else { uri = ""; } } return new QName(uri.intern(),local.intern()); }