As far as I understand, prefix mapping is only available after parsing, as it's a purely syntactic thing. Some syntaxes have prefixes (Turtle or RDF/XML, for example), some don't (N-Triples). So in general you cannot retrieve them, as there is no such thing in the RDF data model. I might be wrong though :)
On Fri, Mar 4, 2016 at 12:22 AM, Valerio Belcastro <[email protected]> wrote: > Jena Graph class has the method getPrefixMapping() > <https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/graph/Graph.html#getPrefixMapping-->. > This method returns a map that associates prefixes to their uri. I would > like to achieve the same behaviour with a remote graph without using > DatasetAccessor. > > 2016-03-03 23:12 GMT+01:00 A. Soroka <[email protected]>: > >> If you are talking about a graph accessed via SPARQL, it’s not clear (to >> me) what you mean by “prefix mapping”. A SPARQL dataset doesn’t have a >> prefix mapping that is constant between queries. Is there something else >> you mean by the term? >> >> --- >> A. Soroka >> The University of Virginia Library >> >> > On Mar 3, 2016, at 4:00 PM, Valerio Belcastro < >> [email protected]> wrote: >> > >> > Hi guys, >> > >> > Is it possible to get prefix mapping from remote graph in Jena? >> > >> > I know that I can get a model (and then its prefix mapping) through >> > DatasetAccessor class, but I think it is too much expensive when using a >> > model containing large amounts of triples. Is there another way to >> achieve >> > this or am I missing something? >> > >> > thank you in advance >> >>
