[ 
https://issues.apache.org/jira/browse/JENA-2140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17394639#comment-17394639
 ] 

Andy Seaborne commented on JENA-2140:
-------------------------------------

See JENA-1847 and also the Javadoc: 
[Resource#getLocalName()|http://jena.apache.org/documentation/javadoc/jena/org/apache/jena/rdf/model/Resource.html#getLocalName()]

{{getLocalName}} returns a value that is legal in all circumstances, including 
RDF/XML.

The example UUID starts with a digit.

{{SplitIRI}} provides algorithms for different circumstances.


> Resource.getLocalName does not return full localName
> ----------------------------------------------------
>
>                 Key: JENA-2140
>                 URL: https://issues.apache.org/jira/browse/JENA-2140
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: RDF API
>    Affects Versions: Jena 4.1.0
>            Reporter: Jarne Kerkaert
>            Priority: Major
>
> Resource.getLocalName() sometimes cuts off part of the localName. I found it 
> happens specifically when the localName is a UUID:
>  
>  
> {code:java}
> @Test
>  void givenResourceWithUUIDLocalName_whenGetLocalName_shouldReturnLocalName() 
> {
>  Resource resource = ResourceFactory.createResource(
>  "http://www.example.com/rdf/#1c4ef388-7398-455c-b2b9-5d9bb20ac566";
>  );
> assertThat(resource.getLocalName()).isEqualTo("1c4ef388-7398-455c-b2b9-5d9bb20ac566");
>  }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to