test_class.declarator: validator = new XONValidator()
test_class.modifier: private static final
test_class.original_string: private static final XONValidator validator = new XONValidator();
test_class.type: XONValidator
test_class.var_name: validator
test_class.file: commons/ihe/xds/src/test/java/org/openehealth/ipf/commons/ihe/xds/core/validate/XONValidatorTest.java
test_class.identifier: XONValidatorTest
test_case.body: @Test
      public void testValidateGoodCases() throws XDSMetaDataException {
          validator.validate("Some Hospital^^^^^&1.2.3.4.5.6.7.8.9.1789&ISO^^^^45");
          validator.validate("Some Hospital^^^^^^^^^1.2.3.4.5.6.7.8.9.1789.45");
          validator.validate("Some Hospital");
      }
test_case.class_method_signature: XONValidatorTest.testValidateGoodCases()
test_case.full_signature: @Test public void testValidateGoodCases()
test_case.identifier: testValidateGoodCases
test_case.invocations: validate validate validate
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidateGoodCases()
focal_class.declarator: OID_VALIDATOR = new OIDValidator()
focal_class.modifier: private static final
focal_class.original_string: private static final OIDValidator OID_VALIDATOR = new OIDValidator();
focal_class.type: OIDValidator
focal_class.var_name: OID_VALIDATOR
focal_class.declarator: HD_VALIDATOR = new HDValidator()
focal_class.modifier: private static final
focal_class.original_string: private static final HDValidator HD_VALIDATOR = new HDValidator();
focal_class.type: HDValidator
focal_class.var_name: HD_VALIDATOR
focal_class.file: commons/ihe/xds/src/main/java/org/openehealth/ipf/commons/ihe/xds/core/validate/XONValidator.java
focal_class.identifier: XONValidator
focal_class.interfaces: implements ValueValidator
focal_class.class_method_signature: XONValidator.validate(String hl7XON)
focal_class.full_signature: @Override public void validate(String hl7XON)
focal_class.identifier: validate
focal_class.modifiers: @Override public
focal_class.parameters: (String hl7XON)
focal_class.return: void
focal_class.signature: void validate(String hl7XON)
focal_method.body: @Override
      public void validate(String hl7XON) throws XDSMetaDataException {
          Organization organization = Hl7v2Based.parse(hl7XON, Organization.class);
          metaDataAssert(organization != null, ORGANIZATION_NAME_MISSING, hl7XON);
  
          XON xon = organization.getHapiObject();
          metaDataAssert(isNotEmpty(xon.getXon1_OrganizationName().getValue()), ORGANIZATION_NAME_MISSING, hl7XON);
  
          HD hd = xon.getXon6_AssigningAuthority();
          if (HD_VALIDATOR.isEmpty(hd)) {
              String idNumber = xon.getXon10_OrganizationIdentifier().getValue();
              if (isNotEmpty(idNumber)) {
                  OID_VALIDATOR.validate(idNumber);
              }
          } else {
              HD_VALIDATOR.validate(hd, hl7XON);
          }
  
          metaDataAssert(countMatches(hl7XON, "^") <= 9, ORGANIZATION_TOO_MANY_COMPONENTS);
          metaDataAssert(isEmpty(xon.getXon2_OrganizationNameTypeCode().getValue()), ORGANIZATION_TOO_MANY_COMPONENTS);
          metaDataAssert(isEmpty(xon.getXon3_IDNumber().getValue()), ORGANIZATION_TOO_MANY_COMPONENTS);
          metaDataAssert(isEmpty(xon.getXon4_CheckDigit().getValue()), ORGANIZATION_TOO_MANY_COMPONENTS);
          metaDataAssert(isEmpty(xon.getXon5_CheckDigitScheme().getValue()), ORGANIZATION_TOO_MANY_COMPONENTS);
          metaDataAssert(isEmpty(xon.getXon7_IdentifierTypeCode().getValue()), ORGANIZATION_TOO_MANY_COMPONENTS);
          metaDataAssert(HD_VALIDATOR.isEmpty(xon.getXon8_AssigningFacility()), ORGANIZATION_TOO_MANY_COMPONENTS);
          metaDataAssert(isEmpty(xon.getXon9_NameRepresentationCode().getValue()), ORGANIZATION_TOO_MANY_COMPONENTS);
      }
focal_method.class_method_signature: XONValidator.validate(String hl7XON)
focal_method.full_signature: @Override public void validate(String hl7XON)
focal_method.identifier: validate
focal_method.invocations: parse metaDataAssert getHapiObject metaDataAssert isNotEmpty getValue getXon1_OrganizationName getXon6_AssigningAuthority isEmpty getValue getXon10_OrganizationIdentifier isNotEmpty validate validate metaDataAssert countMatches metaDataAssert isEmpty getValue getXon2_OrganizationNameTypeCode metaDataAssert isEmpty getValue getXon3_IDNumber metaDataAssert isEmpty getValue getXon4_CheckDigit metaDataAssert isEmpty getValue getXon5_CheckDigitScheme metaDataAssert isEmpty getValue getXon7_IdentifierTypeCode metaDataAssert isEmpty getXon8_AssigningFacility metaDataAssert isEmpty getValue getXon9_NameRepresentationCode
focal_method.modifiers: @Override public
focal_method.parameters: (String hl7XON)
focal_method.return: void
focal_method.signature: void validate(String hl7XON)