Code Monkey home page Code Monkey logo

Comments (4)

VladimirAlexiev avatar VladimirAlexiev commented on July 30, 2024

Furthermore, the patterns are over-quoted and too complicated. Eg:

osdu:activityLevel rdf:type owl:DatatypeProperty ;
	rdfs:pattern "^[\\\\w\\\\-\\\\.]+:reference-data\\\\-\\\\-ActivityLevel:[\\\\w\\\\-\\\\.\\\\:\\\\%]+:[0-9]*$"

IMHO should become:
"^[\\w.-]+:reference-data--ActivityLevel:[\\w.:%-]+:[0-9]*$"

Dot has no special meaning in a char class [...] and putting the dash last removes its special meaning.

from osdu-ontology.

ana-tudor avatar ana-tudor commented on July 30, 2024

The syntax used in the patterns is drawn from the OSDU 3.0.0 schema, and we conform exactly to values contained there, for interpretation by users of the OSDU schema. However, thank you for the catch on rdfs:pattern - we have changed our ontology to use xsd:pattern instead.

from osdu-ontology.

VladimirAlexiev avatar VladimirAlexiev commented on July 30, 2024

Ok, I agree about sticking to the original patterns as much as possible, even though they are grossly overquoted:
if the first dash is not quoted here, why the second and third should be?
reference-data\\\\-\\\\-ActivityLevel

But the patterns as rendered in Turtle are incorrect and will not work:

  • "^[\\\\w\\\\-\\\\.]" uses backslashes in a Turtle string. When you reduce them, becomes
  • ^[\\w\\-\\.] as a regex pattern.
    • This means "any char except backslash, w, dot" and is obviously not what is wanted.
    • Backslash is mentioned 3 times, the last 2 times as a singleton range
    • What is wanted is ^[\w.-] i.e. "any char except alphanumeric, dot or dash"

from osdu-ontology.

VladimirAlexiev avatar VladimirAlexiev commented on July 30, 2024

@ana-tudor

osdu:activityLevel rdf:type owl:DatatypeProperty ;
	xsd:pattern "^[\\\\w\\\\-\\\\.]+:reference-data\\\\-\\\\-ActivityLevel:[\\\\w\\\\-\\\\.\\\\:\\\\%]+:[0-9]*$" ;

from osdu-ontology.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.