Comments (4)
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.
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.
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.
OSDU-Ontology/src/ttl_utils.py
Line 237 in ef6fa99
rdfs:pattern
- The regexps are still wrong, eg
osdu:activityLevel rdf:type owl:DatatypeProperty ;
xsd:pattern "^[\\\\w\\\\-\\\\.]+:reference-data\\\\-\\\\-ActivityLevel:[\\\\w\\\\-\\\\.\\\\:\\\\%]+:[0-9]*$" ;
from osdu-ontology.
Related Issues (15)
- Stale OSDU schema source HOT 2
- property naming convention HOT 3
- `boundingBoxEastBoundLongitude` etc are improperly defined HOT 2
- reduce the use of acronyms HOT 3
- improve the camel casing of abbreviations HOT 1
- many "strings" should become "things" HOT 4
- duplicated restrictions HOT 1
- doubled restriction HOT 1
- unreadable description HOT 1
- osdu:bbox is not properly defined HOT 3
- use GeoSPARQL don't invent your own classes
- undefined property HOT 1
- unused properties HOT 3
- reuse QUDT or another UoM ontology
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osdu-ontology.