test_class.declarator: validator = new UriValidator()
test_class.modifier: private static final
test_class.original_string: private static final UriValidator validator = new UriValidator();
test_class.type: UriValidator
test_class.var_name: validator
test_class.file: commons/ihe/xds/src/test/java/org/openehealth/ipf/commons/ihe/xds/core/validate/UriValidatorTest.java
test_class.identifier: UriValidatorTest
test_case.body: @Test
      public void testValidateGoodCases() throws XDSMetaDataException {
          validator.validate(Arrays.asList("http://localhost:8080"));
          validator.validate(Arrays.asList("1|http://localhost:8080"));
          validator.validate(Arrays.asList("1|http://localhost:8080", "2|/a", "3|/a", "4|/a", "5|/a", "6|/a", "7|/a", "8|/a", "9|/a"));
      }
test_case.class_method_signature: UriValidatorTest.testValidateGoodCases()
test_case.full_signature: @Test public void testValidateGoodCases()
test_case.identifier: testValidateGoodCases
test_case.invocations: validate asList validate asList validate asList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidateGoodCases()
focal_class.declarator: PATTERN = Pattern.compile("([1-9])\\|(.*)")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern PATTERN = Pattern.compile("([1-9])\\|(.*)");
focal_class.type: Pattern
focal_class.var_name: PATTERN
focal_class.file: commons/ihe/xds/src/main/java/org/openehealth/ipf/commons/ihe/xds/core/validate/UriValidator.java
focal_class.identifier: UriValidator
focal_class.interfaces: implements ValueListValidator
focal_class.class_method_signature: UriValidator.validate(List<String> values)
focal_class.full_signature: @Override public void validate(List<String> values)
focal_class.identifier: validate
focal_class.modifiers: @Override public
focal_class.parameters: (List<String> values)
focal_class.return: void
focal_class.signature: void validate(List<String> values)
focal_class.class_method_signature: UriValidator.getUri(List<String> values)
focal_class.full_signature: private String getUri(List<String> values)
focal_class.identifier: getUri
focal_class.modifiers: private
focal_class.parameters: (List<String> values)
focal_class.return: String
focal_class.signature: String getUri(List<String> values)
focal_method.body: @Override
      public void validate(List<String> values) throws XDSMetaDataException {
          if (values.size() > 0) {
              String uri = getUri(values);
              metaDataAssert(uri != null, NULL_URI);
              metaDataAssert(!uri.isEmpty(), EMPTY_URI);
              
              // Accept anything that the classes URI or URL accept. This is done to
              // avoid e.g. "http://" to fail. The XDSToolKit is using this URI
              // for some tests and the RFCs do not clearly state if this is a valid
              // URI or not. The URL class seems to accept it, the URI class doesn't.
              try {
                  new URI(uri);
              }
              catch (URISyntaxException eUri) {
                  try {
                      new URL(uri);
                  } catch (MalformedURLException eUrl) {
                      throw new XDSMetaDataException(INVALID_URI, uri);
                  }
              }
          }
      }
focal_method.class_method_signature: UriValidator.validate(List<String> values)
focal_method.full_signature: @Override public void validate(List<String> values)
focal_method.identifier: validate
focal_method.invocations: size getUri metaDataAssert metaDataAssert isEmpty
focal_method.modifiers: @Override public
focal_method.parameters: (List<String> values)
focal_method.return: void
focal_method.signature: void validate(List<String> values)