test_class.declarator: transformer
test_class.modifier: private
test_class.original_string: private UriTransformer transformer;
test_class.type: UriTransformer
test_class.var_name: transformer
test_class.declarator: veryLongUriString
test_class.modifier: private
test_class.original_string: private StringBuilder veryLongUriString;
test_class.type: StringBuilder
test_class.var_name: veryLongUriString
test_class.file: commons/ihe/xds/src/test/java/org/openehealth/ipf/commons/ihe/xds/core/transform/ebxml/UriTransformerTest.java
test_class.identifier: UriTransformerTest
test_case.body: @Test
      public void testFromEbXMLWithSimpleUri() {
          String uri = "http://localhost:8080";        
          assertEquals(uri, transformer.fromEbXML(Collections.singletonList(uri)));
      }
test_case.class_method_signature: UriTransformerTest.testFromEbXMLWithSimpleUri()
test_case.full_signature: @Test public void testFromEbXMLWithSimpleUri()
test_case.identifier: testFromEbXMLWithSimpleUri
test_case.invocations: assertEquals fromEbXML singletonList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFromEbXMLWithSimpleUri()
focal_class.file: commons/ihe/xds/src/main/java/org/openehealth/ipf/commons/ihe/xds/core/transform/ebxml/UriTransformer.java
focal_class.identifier: UriTransformer
focal_class.class_method_signature: UriTransformer.fromEbXML(List<String> slotValues)
focal_class.full_signature: public String fromEbXML(List<String> slotValues)
focal_class.identifier: fromEbXML
focal_class.modifiers: public
focal_class.parameters: (List<String> slotValues)
focal_class.return: String
focal_class.signature: String fromEbXML(List<String> slotValues)
focal_class.class_method_signature: UriTransformer.toEbXML(String uri)
focal_class.full_signature: public String[] toEbXML(String uri)
focal_class.identifier: toEbXML
focal_class.modifiers: public
focal_class.parameters: (String uri)
focal_class.return: String[]
focal_class.signature: String[] toEbXML(String uri)
focal_method.body: public String fromEbXML(List<String> slotValues) {
          if (slotValues.size() == 1) {
              String slotValue = slotValues.get(0);
              if (slotValue.indexOf('|') == -1) {
                  return slotValue;
              }
          }
          
          String[] uriParts = new String[10];
          for (String slotValue : slotValues) {
              int separatorIdx = slotValue.indexOf('|');
              if (separatorIdx > 0) {
                  int uriIdx = Integer.parseInt(slotValue.substring(0, separatorIdx));
                  if (uriIdx < 10) {
                      uriParts[uriIdx] = slotValue.substring(separatorIdx + 1);
                  }
              }
          }
          
          StringBuilder builder = new StringBuilder();
          for (String uriPart : uriParts) {
              if (uriPart != null) {
                  builder.append(uriPart);
              }
          }
          
          String uri = builder.toString();
          return uri.isEmpty() ? null : uri;
      }
focal_method.class_method_signature: UriTransformer.fromEbXML(List<String> slotValues)
focal_method.full_signature: public String fromEbXML(List<String> slotValues)
focal_method.identifier: fromEbXML
focal_method.invocations: size get indexOf indexOf parseInt substring substring append toString isEmpty
focal_method.modifiers: public
focal_method.parameters: (List<String> slotValues)
focal_method.return: String
focal_method.signature: String fromEbXML(List<String> slotValues)