[
https://issues.apache.org/jira/browse/JENA-1196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15334804#comment-15334804
]
Jacques Fize commented on JENA-1196:
------------------------------------
"World_War_II/London" is the right answer.
To sum up, I have a map where I stored :
- Key : DBpedia_URI
- Value : Wikidata_ID
So if the URI is badly extracted, it will give me a wrong couple. I replaced
the method by one of my own that is doing the same thing that you proposed in
your comment.
I looked into
*SplitIRI*(https://github.com/apache/jena/blob/master/jena-core/src/main/java/org/apache/jena/util/SplitIRI.java)
source code, it will not working for _dbpedia/ressource_ or _Wikipedia
article_ URI because you can find char like "-" or "/" that messed up the
computation of the namespace limit.
Thank you very much for your response.
> jena.graph.Node.getLocalName() bad output
> -----------------------------------------
>
> Key: JENA-1196
> URL: https://issues.apache.org/jira/browse/JENA-1196
> Project: Apache Jena
> Issue Type: Bug
> Components: Jena
> Affects Versions: Jena 3.0.1
> Environment: Ubuntu 14.04 LTS
> Reporter: Jacques Fize
> Labels: method, patch, triple
> Fix For: Jena 3.1.1
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Hi,
> I'm currently using Jena to extract data from DBpedia dumps. In my process, i
> need to extract the URI of a DBpedia resource URL. I'm using a
> *Triple*(jena.graph.Triple) to fetch the data. But when i use the
> _Node.getLocalName()_ on an URL like
> http://dbpedia.org/resource/World_War_II/London I get *London* which is false.
> To avoid this issue, I propose to implement a new method :
> *String* _Node.getLocalName_(*String* namespace)
> It allows the user to specify the namespace to have a better extraction of
> the URI. If such a method exists already, I'm interested in knowing its name.
> Hope it helps.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)