/*     */ public void writeLeafElement(XMLSerializer w, Name tagName, BeanT o, String fieldName)
     throws SAXException, AccessorException, IOException, XMLStreamException
       /*     */ {
   /* 202 */ w.startElement(tagName, null);
   /* 203 */ declareNamespace(o, w);
   /* 204 */ w.endNamespaceDecls(null);
   /* 205 */ w.endAttributes();
   /* 206 */ this.xducer.writeText(w, this.acc.get(o), fieldName);
   /* 207 */ w.endElement();
   /*     */ }
 /*     */ public String print(BeanT bean) throws AccessorException, SAXException {
   /* 270 */ Object target = this.acc.get(bean);
   /* 271 */ if (target == null) return null;
   /*     */
   /* 273 */ XMLSerializer w = XMLSerializer.getInstance();
   /*     */ try {
     /* 275 */ String id = w.grammar.getBeanInfo(target, true).getId(target, w);
     /* 276 */ if (id == null) /* 277 */ w.errorMissingId(target);
     /* 278 */ return id;
     /*     */ } catch (JAXBException e) {
     /* 280 */ w.reportError(null, e);
     /* 281 */ }
   return null;
   /*     */ }
예제 #3
0
 @Override
 public final void writeLeafElement(
     XMLSerializer w, Name tagName, String o, String fieldName)
     throws IOException, SAXException, XMLStreamException {
   w.leafElement(tagName, o, fieldName);
 }
예제 #4
0
 @Override
 public final void writeText(XMLSerializer w, String o, String fieldName)
     throws IOException, SAXException, XMLStreamException {
   w.text(o, fieldName);
 }
예제 #5
0
 public final void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName)
     throws IOException, SAXException, XMLStreamException, AccessorException {
   w.leafElement(tagName, print(o), fieldName);
 }
예제 #6
0
 public final void writeText(XMLSerializer w, T o, String fieldName)
     throws IOException, SAXException, XMLStreamException, AccessorException {
   w.text(print(o), fieldName);
 }