iovka / shex-java

Validation of Shape Expression Schemas
GNU Lesser General Public License v3.0
10 stars 6 forks source link

ShExR parser question #15

Open acoburn opened 4 years ago

acoburn commented 4 years ago

This is primarily a question that arose while reading through the ShExR parsing code.

The ShExRParser::parseValues method calls out to three very similar methods: ::parseLanguage, ::parseLiteralStem and ::parseIRIStem. In each of those methods, there is a control structure for handling shex:*StemRange types in which certain RDF values are segmented into two data structures:

Set<RDFTerm> explicitValues = ...;
Set<ValueConstraint> constraints = ...;

The ShExRParser::parseLanguage method, however, handles these values differently than the ::parse*Stem methods. In ::parseLanguage, the explicitValues set is never populated. Effectively my question is whether this line ought to be:

if (excl instanceof Literal) {
    explicitValues.add(excl);
}