244245246247248249250251252253254
if (resourceUri != null) { if ("file".equals(resourceUri.getScheme())) { return resourceUri.getPath(); } else { throw new ResourceAccessException(); //TODO: error message } } else { return null; }
277278279280281282283284285286287
"getResourceAsStream", LOG_RESOURCE_BUNDLE, "UIMA_unmanaged_resource__WARNING", new Object[] { aKey }); try { return unmanagedResourceUrl.openStream(); } catch (IOException e) { throw new ResourceAccessException(e); } } return null; } }
317318319320321322323324325326327
366367368369370371372373374375376
URL resourceUrl = getResourceURL(aKey, aParams); if (resourceUrl != null) { try { return new URI(resourceUrl.toString().replaceAll(" ", "%20")); } catch (URISyntaxException e) { throw new ResourceAccessException(e); } } else { return null; }
385386387388389390391392393394395
230231232233234235236237238239240
private URI getResourceURIfromURL(URL resourceUrl) throws ResourceAccessException { if (resourceUrl != null) { try { return UriUtils.quote(resourceUrl); } catch (URISyntaxException e) { throw new ResourceAccessException(e); } } else { return null; }
249250251252253254255256257258259
282283284285286287288289290291292
322323324325326327328329330331332
379380381382383384385386387388389