Hi Suman, Currently it is not possible to acquire the File location of the Datafiles. However this is something we might want to add to the DatafileProvider interface. Can you create an Issue about that.
In the meantime you can use the input stream and create a temp file as a workaround Best to use the commons-io FileUtils helper for that. org.apache.commons.io.FileUtils.copyInputStreamToFile( File.createTempFile(prefix, suffix), destination); best Rupert On Sat, Jun 21, 2014 at 8:57 AM, Suman Saurabh <ss.sumansaurab...@gmail.com> wrote: > Hi Rupert, All, > > I was playing with the implementation of DataFileprovider service provided > by OpenNLP. It provides the InputStream of the data to the bundle (that's > what DataFileProvider service do). I want to get the location (URL) of the > model file from where it is parsed i.e. > eg. 'stanbol/datafile/path/to/file' or > 'jar:file:/home/.m2/repository/jarfile.jar!/path/to/file' > > Sphinx needs the URL to load the model files. No such api has been provided > yet by Sphnix to load the model as Stream ( I confirmed it from the > discussion forum ). > > Is there a way to get the URL, > DataFileproviderEvent.getActualFileLocation() returns information of > location of file, if I am correct can this service be used or I have to > develop an api to provide the service of accessing URL of file? > > Regards, > Suman Saurabh -- | Rupert Westenthaler rupert.westentha...@gmail.com | Bodenlehenstraße 11 ++43-699-11108907 | A-5500 Bischofshofen | REDLINK.CO .......................................................................... | http://redlink.co/