weso / shexerp3

Apache License 2.0
1 stars 0 forks source link

Remove the property rdf:type #1

Closed thewillyhuman closed 3 years ago

thewillyhuman commented 3 years ago

Could you please not generate the property rdf:type in the target Shapes?

DaniFdezAlvarez commented 3 years ago

@thewilly Done, that can be achived by tunning a config param. However, some shapes that only had a triple constraint with rdf:type now are empty, such as ResearchProblem. What should I produce?

---------------------------- Option1 :ResearchContribution { ns2:yields @:ResearchResult ; ns2:employs @:ResearchMethod ; ns2:utilizes @:ResearchMaterial ; ns2:addresses @:ResearchProblem
}

:ResearchProblem { } ---------------------------- Option2

{ ns2:yields @:ResearchResult ; ns2:employs @:ResearchMethod ; ns2:utilizes @:ResearchMaterial ; ns2:addresses IRI
}

thewillyhuman commented 3 years ago

I guess that semantically, the correct one is the first one. It is the one that states the contents of the ontology. On the other hand, ShEx-Lite will raise a syntactic error for this first option. The Shape Body must not be empty.

Second option, at the end of the day, is the same as the first one, from a semantics POV (point of view). But, when translating to Java, the Type of the addresses property should not be an IRI. But a ResearchProblem. That, can be achieved by defining a ResearchProblem as anything (“.”). That way, ShEx-Lite generates an Interface rather than a Class.

If you could generate this would be awesome. But not sure if will increase your work. Else, option 2 would be preferred (from the ShEx-Lite POV).

—— Proposed Alternative ——


{
 ns2:yields @:ResearchResult ;
 ns2:employs @:ResearchMethod ;
 ns2:utilizes @:ResearchMaterial ;
 ns2:addresses @:ResearchProblem
}
:ResearchProblem .```
DaniFdezAlvarez commented 3 years ago

I'll go for it =)