test_class.declarator: transformer
test_class.modifier: private
test_class.original_string: private RecipientTransformer transformer;
test_class.type: RecipientTransformer
test_class.var_name: transformer
test_class.declarator: recipient
test_class.modifier: private
test_class.original_string: private Recipient recipient;
test_class.type: Recipient
test_class.var_name: recipient
test_class.file: commons/ihe/xds/src/test/java/org/openehealth/ipf/commons/ihe/xds/core/transform/ebxml/RecipientTransformerTest.java
test_class.identifier: RecipientTransformerTest
test_case.body: @Test
      public void testToEbXMLNoOrganization() {
          recipient.setOrganization(null);
          String ebXML = transformer.toEbXML(recipient);
          assertNotNull(ebXML);
          
          assertEquals("|personId^familyName^givenName^second^suffix^prefix^degree^^&uni2&uniType2|^^Fidonet^2:465/193.8",
                  ebXML);
      }
test_case.class_method_signature: RecipientTransformerTest.testToEbXMLNoOrganization()
test_case.full_signature: @Test public void testToEbXMLNoOrganization()
test_case.identifier: testToEbXMLNoOrganization
test_case.invocations: setOrganization toEbXML assertNotNull assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToEbXMLNoOrganization()
focal_class.file: commons/ihe/xds/src/main/java/org/openehealth/ipf/commons/ihe/xds/core/transform/ebxml/RecipientTransformer.java
focal_class.identifier: RecipientTransformer
focal_class.class_method_signature: RecipientTransformer.toEbXML(Recipient recipient)
focal_class.full_signature: public String toEbXML(Recipient recipient)
focal_class.identifier: toEbXML
focal_class.modifiers: public
focal_class.parameters: (Recipient recipient)
focal_class.return: String
focal_class.signature: String toEbXML(Recipient recipient)
focal_class.class_method_signature: RecipientTransformer.fromEbXML(String slotValue)
focal_class.full_signature: public Recipient fromEbXML(String slotValue)
focal_class.identifier: fromEbXML
focal_class.modifiers: public
focal_class.parameters: (String slotValue)
focal_class.return: Recipient
focal_class.signature: Recipient fromEbXML(String slotValue)
focal_method.body: public String toEbXML(Recipient recipient) {
          if (recipient == null) {
              return null;
          }
          
          String person = Hl7v2Based.render(recipient.getPerson());
          String organization = Hl7v2Based.render(recipient.getOrganization());
          String telecom = Hl7v2Based.render(recipient.getTelecom());
  
          if ((person == null) && (organization == null) && (telecom == null)) {
              return null;
          }
  
          StringBuilder sb = new StringBuilder();
          if (organization != null) {
              sb.append(organization);
          }
          if ((person != null) || (telecom != null)) {
              sb.append('|');
              if (person != null) {
                  sb.append(person);
              }
              if (telecom != null) {
                  sb.append('|').append(telecom);
              }
          }
  
          return sb.toString();
      }
focal_method.class_method_signature: RecipientTransformer.toEbXML(Recipient recipient)
focal_method.full_signature: public String toEbXML(Recipient recipient)
focal_method.identifier: toEbXML
focal_method.invocations: render getPerson render getOrganization render getTelecom append append append append append toString
focal_method.modifiers: public
focal_method.parameters: (Recipient recipient)
focal_method.return: String
focal_method.signature: String toEbXML(Recipient recipient)