Uploaded image for project: 'VIVO'
  1. VIVO
  2. VIVO-1285

Validation of local name in properties

    Details

    • Attachments:
      0
    • Comments:
      0

      Description

      In Jena pre-3, the ResourceFactory.createProperty method does not properly validate a URI passed to it.

      Specifically, it does not check that the local name component - e.g. http://uri.com/example/localName - is valid. Such as starting with a non-numeric value.

      In 3.1, ResourceFactory.createProperty does validate the local name. So URIs such as:

      http://www.eionet.europa.eu/gemet/concept/148

      will throw an invalid URI error, because the local name is "148".

      The createProperty method on Model / OntModel does NOT do this check, and so does not throw an exception.

      We need to be careful of this, because any use of ResourceFactory.createProperty may cause errors where they didn't before. This is the case in the research areas code, where it checks to see if a URI exists in the model, and uses URIs of the form above.

      This also suggests that it is theoretically possible that we might have invalid property URIs in the triple store, and we should check this.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                grahamtriggs Graham Triggs
                Reporter:
                grahamtriggs Graham Triggs
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: