test_class.declarator: TEST = "http://test/url"
test_class.modifier: private static final
test_class.original_string: private static final String TEST = "http://test/url";
test_class.type: String
test_class.var_name: TEST
test_class.declarator: LOCAL = "http://localhost:8080/url"
test_class.modifier: private static final
test_class.original_string: private static final String LOCAL = "http://localhost:8080/url";
test_class.type: String
test_class.var_name: LOCAL
test_class.declarator: EXT1 = "http://test/url/something"
test_class.modifier: private static final
test_class.original_string: private static final String EXT1 = "http://test/url/something";
test_class.type: String
test_class.var_name: EXT1
test_class.declarator: LOCAL1 = "http://localhost:8080/url/something"
test_class.modifier: private static final
test_class.original_string: private static final String LOCAL1 = "http://localhost:8080/url/something";
test_class.type: String
test_class.var_name: LOCAL1
test_class.declarator: BAD = "http://other/url/something"
test_class.modifier: private static final
test_class.original_string: private static final String BAD = "http://other/url/something";
test_class.type: String
test_class.var_name: BAD
test_class.file: impl/src/test/java/org/geomajas/service/impl/StaticDispatcherUrlServiceTest.java
test_class.identifier: StaticDispatcherUrlServiceTest
test_case.body: @Test
  	public void testLocalize() {
  		StaticDispatcherUrlService sdus = new StaticDispatcherUrlService();
  		sdus.setDispatcherUrl(TEST);
  		sdus.setLocalDispatcherUrl(LOCAL);
  		Assert.assertEquals(LOCAL, sdus.getLocalDispatcherUrl());
  		Assert.assertEquals(LOCAL1, sdus.localize(EXT1));
  		Assert.assertEquals(BAD, sdus.localize(BAD));
  	}
test_case.class_method_signature: StaticDispatcherUrlServiceTest.testLocalize()
test_case.full_signature: @Test public void testLocalize()
test_case.identifier: testLocalize
test_case.invocations: setDispatcherUrl setLocalDispatcherUrl assertEquals getLocalDispatcherUrl assertEquals localize assertEquals localize
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLocalize()
focal_class.declarator: dispatcherUrl
focal_class.modifier: @NotNull
  	private
focal_class.original_string: @NotNull
  	private String dispatcherUrl;
focal_class.type: String
focal_class.var_name: dispatcherUrl
focal_class.declarator: localDispatcherUrl
focal_class.modifier: private
focal_class.original_string: private String localDispatcherUrl;
focal_class.type: String
focal_class.var_name: localDispatcherUrl
focal_class.file: impl/src/main/java/org/geomajas/service/impl/StaticDispatcherUrlService.java
focal_class.identifier: StaticDispatcherUrlService
focal_class.interfaces: implements DispatcherUrlService
focal_class.class_method_signature: StaticDispatcherUrlService.setDispatcherUrl(String dispatcherUrl)
focal_class.full_signature: public void setDispatcherUrl(String dispatcherUrl)
focal_class.identifier: setDispatcherUrl
focal_class.modifiers: public
focal_class.parameters: (String dispatcherUrl)
focal_class.return: void
focal_class.signature: void setDispatcherUrl(String dispatcherUrl)
focal_class.class_method_signature: StaticDispatcherUrlService.getDispatcherUrl()
focal_class.full_signature: @Override public String getDispatcherUrl()
focal_class.identifier: getDispatcherUrl
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDispatcherUrl()
focal_class.class_method_signature: StaticDispatcherUrlService.setLocalDispatcherUrl(String localDispatcherUrl)
focal_class.full_signature: public void setLocalDispatcherUrl(String localDispatcherUrl)
focal_class.identifier: setLocalDispatcherUrl
focal_class.modifiers: public
focal_class.parameters: (String localDispatcherUrl)
focal_class.return: void
focal_class.signature: void setLocalDispatcherUrl(String localDispatcherUrl)
focal_class.class_method_signature: StaticDispatcherUrlService.getLocalDispatcherUrl()
focal_class.full_signature: public String getLocalDispatcherUrl()
focal_class.identifier: getLocalDispatcherUrl
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getLocalDispatcherUrl()
focal_class.class_method_signature: StaticDispatcherUrlService.localize(String externalUrl)
focal_class.full_signature: public String localize(String externalUrl)
focal_class.identifier: localize
focal_class.modifiers: public
focal_class.parameters: (String externalUrl)
focal_class.return: String
focal_class.signature: String localize(String externalUrl)
focal_method.body: public String localize(String externalUrl) {
  		String localBase = getLocalDispatcherUrl();
  		if (localBase == null) {
  			return externalUrl;
  		} else {
  			String dispatcherBase = getDispatcherUrl();
  			if (externalUrl.startsWith(dispatcherBase)) {
  				return localBase + externalUrl.substring(dispatcherBase.length());
  			} else {
  				// not a dispatcher url, return the original one
  				return externalUrl;
  			}
  		}
  	}
focal_method.class_method_signature: StaticDispatcherUrlService.localize(String externalUrl)
focal_method.full_signature: public String localize(String externalUrl)
focal_method.identifier: localize
focal_method.invocations: getLocalDispatcherUrl getDispatcherUrl startsWith substring length
focal_method.modifiers: public
focal_method.parameters: (String externalUrl)
focal_method.return: String
focal_method.signature: String localize(String externalUrl)