GH-2828: Remove validation for XML-only datatypes #2846
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GitHub issue resolved #2828
Pull request Description:
Remove the code for validating datatypes that according to the RDF 1.1 spec SHOULD NOT be used: QName, ENTITY, ID, IDREF, NOTATION, ENTITIES, NMTOKENS, IDREFS. Also remove code for validating XSD lists and unions. This should not change the behavior of Jena for users, unless they were relying on it to validate their weird XML data, which I don't think is an official functionality of Jena.
This is the first step to resolving #2828 – first I wanted to focus on untangling the unneeded the logic. In future PRs, I will remove all the dead code.
After applying these changes, the size of the jena-core JAR was reduced by 13 489 bytes. Not huge, but still something.
Details:
XSDDatatype
XSSimpleType
isIdType()
along with its implementations (was unused).getPrimitiveKind()
along with its implementations (was unused).XSSimpleTypeDecl
XSSimpleTypeDefinition
BaseSchemaDVFactory
andFullDVFactory
XSDDatatype
in a public interface.BaseDVFactory
andSchemaDVFactory
By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.
See the Apache Jena "Contributing" guide.