コード例 #1
0
ファイル: PQRPresenter.java プロジェクト: markusgumbel/dshl7
 public void build(RimGraphXMLSpeaker.ContentBuilder builder, PQR value, String localName)
     throws BuilderException {
   try {
     PQR pqr = (PQR) value;
     if (builder.nullValueHandled(value, localName)) return;
     builder.addAttribute(ATTR_VALUE, pqr.value());
     builder.addAttribute(ATTR_CODE, pqr.code());
     builder.addAttribute(ATTR_DISPLAY_NAME, pqr.displayName());
     builder.addAttribute(ATTR_CODE_SYSTEM, pqr.codeSystem());
     builder.addAttribute(ATTR_CODE_SYSTEM_NAME, pqr.codeSystemName());
     builder.addAttribute(ATTR_CODE_SYSTEM_VERSION, pqr.codeSystemVersion());
     builder.startElement(localName);
     // An ugly workaround to avoid fake <originalText nullFlavor="NA"/>
     // entries in output for all CDs, CEs, CVs. Should it be here???
     if (!pqr.originalText().notApplicableJ()) {
       builder.build(pqr.originalText(), ATTR_ORIGINAL_TEXT);
     }
     builder.endElement(localName);
   } catch (SAXException ex) {
     throw new BuilderException(ex);
   }
 }
コード例 #2
0
ファイル: PQRPresenter.java プロジェクト: markusgumbel/dshl7
 // .......................................................................
 public void buildStructural(
     RimGraphXMLSpeaker.ContentBuilder builder, PQR value, String localName)
     throws BuilderException {
   PQR pqrValue = (PQR) value;
   builder.addAttribute(localName, pqrValue.code().toString());
 }