Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1377

Model.isIsomorphicWith() returns false when language tags case do not match

    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: Jena 3.3.0
    • Fix Version/s: None
    • Component/s: ARQ, Core
    • Labels:
      None
    • Environment:

      Linux

      Description

      Model.isIsomorphicWith() treats language tags in a case-sensitive way, which is against BCP47 spec. It is easily shown with an example:

                 Model m1 = ModelFactory.createDefaultModel();
                 Resource r = m1.getResource("http://example.com/resource");
                 Property p = m1.getProperty("http://example.com/property");
                 m1.add(r, p, m1.createLiteral("example", "zh-Latn-pinyin")); // canonical
                 Model m2 = ModelFactory.createDefaultModel();
                 r = m2.getResource("http://example.com/resource");
                 p = m2.getProperty("http://example.com/property");
                 m2.add(r, p, m1.createLiteral("example", "zh-latn-pinyin")); // lower case
                 System.out.println(m1.isIsomorphicWith(m2));
      

      prints false, while it clearly should print true. Related bug (which is not really a bug per se, just a trigger for this one: https://github.com/jsonld-java/jsonld-java/issues/199

      See also https://issues.apache.org/jira/browse/COMMONSRDF-51 for some consideration of the language tag case.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              eroux Elie Roux
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: