New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When classes & property names use reserve names, RDF names get messed up too #18

Closed
berezovskyi opened this Issue Aug 28, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@berezovskyi
Copy link
Member

berezovskyi commented Aug 28, 2018

I have a resource shape Object and a property object in my domain spec. I expect instances to look like

:o1 a ds:Object;
    ds:object "bla" .

The class generated for it is DsObject and the methods are is getDsObject & setDsObject. This is expected. But what I did not expect were the annotations for DsObject RDF Class & OSLC shape and the dsObject RDF property. I had to override the annotations as a workaround.

jadelkhoury added a commit that referenced this issue Sep 2, 2018

#18 When classes & property names use reserve names, RDF names get
messed up too

RDF names are exactly as they are specified in the model (including
capitalisation).

Fixed for both classes and properties.

berezovskyi added a commit that referenced this issue Sep 3, 2018

#18 When classes & property names use reserve names, RDF names get
messed up too

RDF names are exactly as they are specified in the model (including
capitalisation).

Fixed for both classes and properties.
@yashkhatri

This comment has been minimized.

Copy link
Member

yashkhatri commented Sep 4, 2018

@berezovskyi This is also merged in master. Can we close it?

@berezovskyi

This comment has been minimized.

Copy link
Member Author

berezovskyi commented Sep 4, 2018

sure

@jadelkhoury can in future write "closes #18" anywhere in the commit message and the issue will be closed automatically once that pull request gets merged

@berezovskyi berezovskyi closed this Sep 4, 2018

@jadelkhoury

This comment has been minimized.

Copy link
Contributor

jadelkhoury commented Sep 4, 2018

Previously, a resource/property named "Test Case" is merged to provide an RDF name "TestCase".
This latest fix results in an RDF name "Test Case". This change of behaviour was not intended in this latest change. All we needed was to not add the prefix for java-protected words.

@jadelkhoury jadelkhoury reopened this Sep 4, 2018

@berezovskyi

This comment has been minimized.

Copy link
Member Author

berezovskyi commented Sep 4, 2018

First, this is a legal class name that maps to

<http://example.com/ns/crazy/Test%20Case> a rdfs:Class .

Not that I support doing anything close to that...

Second, I would just disallow some characters from a vocabulary class title instead of mangling them. This way, users will fail early in the process instead of scratching their head later down the road. Because I expect more people to use LyoD as I did to "mirror" an existing ontology. And they are in for a surprise if they attempt that.

@jadelkhoury

This comment has been minimized.

Copy link
Contributor

jadelkhoury commented Sep 5, 2018

fair enough.
I would at the least need to fix the url-path, since a space there does not look good.

jadelkhoury added a commit that referenced this issue Sep 5, 2018

closes #18: When classes & property names use reserve names, RDF names
get messed up too

the relative path for a particualr resource no longer have invalid
characters such as empty space.

berezovskyi added a commit that referenced this issue Sep 6, 2018

closes #18: When classes & property names use reserve names, RDF names (
#38)

get messed up too

the relative path for a particualr resource no longer have invalid
characters such as empty space.

@berezovskyi berezovskyi added this to the 2.4.0 milestone Nov 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment