Re: Accessing prefixes via Model

2013-04-14 Thread Chris_Dollin
On Friday, April 12, 2013 01:17:17 PM Evan Patton wrote: > Is there any way to access the prefixes from loaded documents via the Model > interface? Yes, a Model is a PrefixMapping, and the usual parsers will load prefixes from the documents they read into the Model. > For example, I create a ne

Re: Accessing prefixes via Model

2013-04-13 Thread Joshua TAYLOR
Here's a pastebin link for anyone wanting nicer formatting: http://pastebin.com/MLyq5vJK On Sat, Apr 13, 2013 at 4:48 PM, Joshua TAYLOR wrote: > The Model interface extends the PrefixMapping interface, so you've got > the functionality you need. Here's some sample code and output. Sorry > about

Re: Accessing prefixes via Model

2013-04-13 Thread Joshua TAYLOR
The Model interface extends the PrefixMapping interface, so you've got the functionality you need. Here's some sample code and output. Sorry about indentation; Google's new compose doesn't seem to handle it very well. import java.io.File; import java.io.FileInputStream; import java.io.FileNotFou

Accessing prefixes via Model

2013-04-13 Thread Evan Patton
Hello all, Is there any way to access the prefixes from loaded documents via the Model interface? For example, I create a new model and read in a number of ontologies (e.g. DBpedia, FOAF) via the Model.read(InputStream, String) method. If I then call the getNsURIPrefix(String) with a URI (e.g.