Cheers Andy.

I need to perform some prefix compression and was hoping to hook into the
existing functionality of the prefix map from within a stream rdf. As it's
a protected method I've overridden it to return true because I write the
pair similar to the thrift code so there's no ambiguity when I recreate the
node.

On 19 Jan 2018 13:56, "Andy Seaborne" <[email protected]> wrote:



On 18/01/18 16:48, Dick Murray wrote:

> Is it possible to get a Pair<String, String> lexvo (left) code/002 (right)
> from abbrev  given the prefix map entry;
>

In Turtle the "/"  would need escaping as "\/".



> lexvo http://lexvo.org/id/
>
> and the URI;
>
> http://lexvo.org/id/code/002
>
> PrefixMapStd (actually base call) returns null because the call to;
>
> protected Pair<String, String> abbrev(Map<String, IRI> prefixes, String
> uriStr, boolean checkLocalPart)
>
> has checkLocalPart as true and the call to strSafeFor fails the "/" test.
>

That's a quick, partial check and there there is a later test as well in
NodeFormatterTTL.

Neither allow for rewriting the local part (at the moment).

    Andy

Reply via email to