[GitHub] commons-rdf pull request #30: COMMONSRDF-51 language tags compared lower cas...

2017-02-08 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/commons-rdf/pull/30


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



[GitHub] commons-rdf pull request #30: COMMONSRDF-51 language tags compared lower cas...

2017-01-16 Thread ansell
Github user ansell commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/30#discussion_r96309778
  
--- Diff: api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java 
---
@@ -194,6 +194,114 @@ public void testCreateLiteralLangISO693_3() throws 
Exception {
 assertEquals("\"Herbert Van de Sompel\"@vls", 
vls.ntriplesString());
 }
 
+public void testCreateLiteralLangCaseInsensitive() throws Exception {
+// COMMONSRDF-51: Literal langtag may not be in lowercase, but
+// must be COMPARED (aka .equals and .hashCode()) in lowercase
+// as the language space is lower case.   
+final Literal lower = factory.createLiteral("Hello", "en-gb"); 
+final Literal upper = factory.createLiteral("Hello", "EN-GB"); 
+final Literal mixed = factory.createLiteral("Hello", "en-GB");
+
+
+assertEquals("en-gb", lower.getLanguageTag().get());
--- End diff --

RDF4J may not follow this in some cases. It may use the BCP47 normalisation 
conventions to obtain en-GB instead.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



[GitHub] commons-rdf pull request #30: COMMONSRDF-51 language tags compared lower cas...

2017-01-16 Thread ansell
Github user ansell commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/30#discussion_r96309546
  
--- Diff: api/src/test/java/org/apache/commons/rdf/api/AbstractRDFTest.java 
---
@@ -194,6 +194,114 @@ public void testCreateLiteralLangISO693_3() throws 
Exception {
 assertEquals("\"Herbert Van de Sompel\"@vls", 
vls.ntriplesString());
 }
 
+public void testCreateLiteralLangCaseInsensitive() throws Exception {
--- End diff --

Does this need @Test annotation?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



[GitHub] commons-rdf pull request #30: COMMONSRDF-51 language tags compared lower cas...

2017-01-12 Thread stain
GitHub user stain opened a pull request:

https://github.com/apache/commons-rdf/pull/30

COMMONSRDF-51 language tags compared lower case

This fixes 
[COMMONSRDF-51](https://issues.apache.org/jira/browse/COMMONSRDF-51) - at least 
from `Literal.equals()` and `Literal.hashCode()`

Further test might be needed to verify consistent behaviour in `Graph` and 
`Dataset` if underlying framework does not correctly do langtag comparison in 
lower case (e.g. Turkish locale problem).

Please comment on the fixes and the suggested updated javadoc:

* 
[Literal.equals(Object)](http://stain.github.io/commons-rdf/COMMONSRDF-51/org/apache/commons/rdf/api/Literal.html#equals-java.lang.Object-)
* 
[Literal.hashCode()](http://stain.github.io/commons-rdf/COMMONSRDF-51/org/apache/commons/rdf/api/Literal.html#hashCode--)
* 
[Literal.getLanguageTag()](http://stain.github.io/commons-rdf/COMMONSRDF-51/org/apache/commons/rdf/api/Literal.html#getLanguageTag--)

For code improvements of this PR, feel free to push to the 
`COMMONSRDF-51-langtag-lcase` branch at 
https://git-wip-us.apache.org/repos/asf/commons-rdf.git or use the "Start 
review" mechanism in GitHub.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/commons-rdf COMMONSRDF-51-langtag-lcase

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/commons-rdf/pull/30.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #30


commit 3064d219606cbe42c0150d81dbf6cdbc74bf7491
Author: Stian Soiland-Reyes 
Date:   2017-01-12T14:51:26Z

COMMONSRDF-51: compare language tags in lower case




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org