On 24/10/13 15:59, Altmann, Michael wrote:
Thanks,  I was not aware of the change.  I have code that configures the global 
FileManager.  It sets the locators, locations and prefixes.  Should I change 
that code to only manipulate the global StreamManager or manipulate it in 
addition to the FileManager?  I looked around in the documentation a bit, but I 
still see this page 
http://jena.apache.org/documentation/notes/file-manager.html , which focuses on 
the FileManager.


At what point do you reconfigure the global FileManager? Before any read/write atall? Maybe the reset is being doen after you changed it. I've just looked at the code and I can believe the you can set the global FileManager configuration, then cause RIOT to kick in and so loose the configuration.

If you call:

  IO_Jena.wireIntoJena()

it explicitly forces the reconfiguration.  It starts:

  FileManager.setGlobalFileManager(AdapterFileManager.get()) ;

If that wortks, it'll confirm my suspicion and I can put in a automatic kickstart.

> http://jena.apache.org/documentation/notes/file-manager.html

That could do with rewriting but it should be compatible.

        Andy


[This thread is probably evolving to something that ought to be on the users 
list.  Should we move it? ]




-----Original Message-----
From: Rob Vesse [mailto:[email protected]]
Sent: Thursday, October 24, 2013 9:26 AM
To: [email protected]
Subject: Re: Replacing FileManager (WAS use of recent features from httpclient)

Michael

The issue is that recent versions of Jena delegate IO to ARQs RIOT subsystem 
which has a separate StreamManager which manages how resources are opened.

You can replace this like so:

StreamManager mgr = StreamManager.makeDefaultStreamManager();
// Clear out default setup
mgr.clearLocators();
// Add back ability to read from files
mgr.addLocator(new LocatorFile(null));
// Optionally add back ability to read from class path mgr.addLocator(new 
LocatorClassLoader(StreamManager.getClass().getClassLoader()));
                StreamManager.setGlobal(mgr);

Hope this helps,

Rob



On 24/10/2013 14:45, "Altmann, Michael" <[email protected]>
wrote:

[Altmann, Michael] ...





Reply via email to