/** * Adds a new element to the list of elements to be written. */ public void add( ElementInfo<T,C> elem ) { assert elem!=null; @SuppressWarnings("UnusedAssignment") boolean nillable = false; // default value QName name = elem.getElementName(); Namespace n = getNamespace(name.getNamespaceURI()); ElementInfo ei; if (elem.getScope() != null) { // (probably) never happens ei = this.types.getElementInfo(elem.getScope().getClazz(), name); } else { ei = this.types.getElementInfo(null, name); } XmlElement xmlElem = ei.getProperty().readAnnotation(XmlElement.class); if (xmlElem == null) { nillable = false; } else { nillable = xmlElem.nillable(); } n.elementDecls.put(name.getLocalPart(),n.new ElementWithType(nillable, elem.getContentType())); // search for foreign namespace references n.processForeignNamespaces(elem.getProperty(), 1); }
/** * Adds a new element to the list of elements to be written. */ public void add( ElementInfo<T,C> elem ) { assert elem!=null; @SuppressWarnings("UnusedAssignment") boolean nillable = false; // default value QName name = elem.getElementName(); Namespace n = getNamespace(name.getNamespaceURI()); ElementInfo ei; if (elem.getScope() != null) { // (probably) never happens ei = this.types.getElementInfo(elem.getScope().getClazz(), name); } else { ei = this.types.getElementInfo(null, name); } XmlElement xmlElem = ei.getProperty().readAnnotation(XmlElement.class); if (xmlElem == null) { nillable = false; } else { nillable = xmlElem.nillable(); } n.elementDecls.put(name.getLocalPart(),n.new ElementWithType(nillable, elem.getContentType())); // search for foreign namespace references n.processForeignNamespaces(elem.getProperty(), 1); }
/** * Adds a new element to the list of elements to be written. */ public void add( ElementInfo<T,C> elem ) { assert elem!=null; @SuppressWarnings("UnusedAssignment") boolean nillable = false; // default value QName name = elem.getElementName(); Namespace n = getNamespace(name.getNamespaceURI()); ElementInfo ei; if (elem.getScope() != null) { // (probably) never happens ei = this.types.getElementInfo(elem.getScope().getClazz(), name); } else { ei = this.types.getElementInfo(null, name); } XmlElement xmlElem = ei.getProperty().readAnnotation(XmlElement.class); if (xmlElem == null) { nillable = false; } else { nillable = xmlElem.nillable(); } n.elementDecls.put(name.getLocalPart(),n.new ElementWithType(nillable, elem.getContentType())); // search for foreign namespace references n.processForeignNamespaces(elem.getProperty(), 1); }
/** * Adds an additional element declaration. * * @param tagName * The name of the element declaration to be added. * @param type * The type this element refers to. * Can be null, in which case the element refers to an empty anonymous complex type. */ public void add( QName tagName, boolean isNillable, NonElement<T,C> type ) { if(type!=null && type.getType()==navigator.ref(CompositeStructure.class)) return; // this is a special class we introduced for JAX-WS that we *don't* want in the schema Namespace n = getNamespace(tagName.getNamespaceURI()); n.elementDecls.put(tagName.getLocalPart(), n.new ElementWithType(isNillable,type)); // search for foreign namespace references if(type!=null) n.addDependencyTo(type.getTypeName()); }
/** * Adds an additional element declaration. * * @param tagName * The name of the element declaration to be added. * @param type * The type this element refers to. * Can be null, in which case the element refers to an empty anonymous complex type. */ public void add( QName tagName, boolean isNillable, NonElement<T,C> type ) { if(type!=null && type.getType()==navigator.ref(CompositeStructure.class)) return; // this is a special class we introduced for JAX-WS that we *don't* want in the schema Namespace n = getNamespace(tagName.getNamespaceURI()); n.elementDecls.put(tagName.getLocalPart(), n.new ElementWithType(isNillable,type)); // search for foreign namespace references if(type!=null) n.addDependencyTo(type.getTypeName()); }
/** * Adds a new element to the list of elements to be written. */ public void add( ElementInfo<T,C> elem ) { assert elem!=null; @SuppressWarnings("UnusedAssignment") boolean nillable = false; // default value QName name = elem.getElementName(); Namespace n = getNamespace(name.getNamespaceURI()); ElementInfo ei; if (elem.getScope() != null) { // (probably) never happens ei = this.types.getElementInfo(elem.getScope().getClazz(), name); } else { ei = this.types.getElementInfo(null, name); } XmlElement xmlElem = ei.getProperty().readAnnotation(XmlElement.class); if (xmlElem == null) { nillable = false; } else { nillable = xmlElem.nillable(); } n.elementDecls.put(name.getLocalPart(),n.new ElementWithType(nillable, elem.getContentType())); // search for foreign namespace references n.processForeignNamespaces(elem.getProperty(), 1); }
/** * Adds an additional element declaration. * * @param tagName * The name of the element declaration to be added. * @param type * The type this element refers to. * Can be null, in which case the element refers to an empty anonymous complex type. */ public void add( QName tagName, boolean isNillable, NonElement<T,C> type ) { if(type!=null && type.getType()==navigator.ref(CompositeStructure.class)) return; // this is a special class we introduced for JAX-WS that we *don't* want in the schema Namespace n = getNamespace(tagName.getNamespaceURI()); n.elementDecls.put(tagName.getLocalPart(), n.new ElementWithType(isNillable,type)); // search for foreign namespace references if(type!=null) n.addDependencyTo(type.getTypeName()); }
/** * Adds an additional element declaration. * * @param tagName * The name of the element declaration to be added. * @param type * The type this element refers to. * Can be null, in which case the element refers to an empty anonymous complex type. */ public void add( QName tagName, boolean isNillable, NonElement<T,C> type ) { if(type!=null && type.getType()==navigator.ref(CompositeStructure.class)) return; // this is a special class we introduced for JAX-WS that we *don't* want in the schema Namespace n = getNamespace(tagName.getNamespaceURI()); n.elementDecls.put(tagName.getLocalPart(), n.new ElementWithType(isNillable,type)); // search for foreign namespace references if(type!=null) n.addDependencyTo(type.getTypeName()); }