public void serializeURIs(
     be.ac.ulg.montefiore.run.totem.util.jaxb.runtime.XMLSerializer context)
     throws org.xml.sax.SAXException {
   if (!has_Value) {
     context.reportError(
         com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "Value"));
   }
 }
Example #2
0
  /**
   * Marshalls text.
   *
   * <p>This method can be called (i) after the startAttribute method and (ii) before the
   * endAttribute method, to marshal attribute values. If the method is called more than once, those
   * texts are considered as separated by whitespaces. For example,
   *
   * <pre>
   * c.startAttribute();
   * c.text("abc");
   * c.text("def");
   * c.endAttribute("","foo");
   * </pre>
   *
   * will generate foo="abc def".
   *
   * <p>Similarly, this method can be called after the endAttributes method to marshal texts inside
   * elements. The same rule about multiple invokations apply to this case, too. For example,
   *
   * <pre>
   * c.startElement("","foo");
   * c.endAttributes();
   * c.text("abc");
   * c.text("def");
   *   c.startElement("","bar");
   *   c.endAttributes();
   *   c.endElement();
   * c.text("ghi");
   * c.endElement();
   * </pre>
   *
   * will generate <code>&lt;foo>abc def&lt;bar/>ghi&lt;/foo></code>.
   */
  public void text(String text, String fieldName) throws SAXException {
    // If the assertion fails, it must be a bug of xjc.
    // right now, we are not expecting the text method to be called.
    if (text == null) {
      reportError(Util.createMissingObjectError(currentTarget, fieldName));
      return;
    }

    if (textBuf.length() != 0) textBuf.append(' ');
    textBuf.append(text);
  }
 public void serializeBody(
     be.ac.ulg.montefiore.run.totem.util.jaxb.runtime.XMLSerializer context)
     throws org.xml.sax.SAXException {
   if (!has_Value) {
     context.reportError(
         com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "Value"));
   }
   try {
     context.text(javax.xml.bind.DatatypeConverter.printInt(((int) _Value)), "Value");
   } catch (java.lang.Exception e) {
     be.ac.ulg.montefiore.run.totem.util.jaxb.runtime.Util.handlePrintConversionException(
         this, e, context);
   }
 }
 public void serializeAttributes(
     be.ac.ulg.montefiore.run.totem.util.jaxb.runtime.XMLSerializer context)
     throws org.xml.sax.SAXException {
   if (!has_Value) {
     context.reportError(
         com.sun.xml.bind.serializer.Util.createMissingObjectError(this, "Value"));
   }
   context.startAttribute("", "name");
   try {
     context.text(((java.lang.String) _Name), "Name");
   } catch (java.lang.Exception e) {
     be.ac.ulg.montefiore.run.totem.util.jaxb.runtime.Util.handlePrintConversionException(
         this, e, context);
   }
   context.endAttribute();
 }
Example #5
0
 public void reportMissingObjectError(String fieldName) throws SAXException {
   reportError(Util.createMissingObjectError(currentTarget, fieldName));
 }