You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by "sszuev (via GitHub)" <gi...@apache.org> on 2024/09/01 11:45:47 UTC
[PR] GH-2674: changes in OntModelControls + change some profile checking [jena]
sszuev opened a new pull request, #2676:
URL: https://github.com/apache/jena/pull/2676
GitHub issue resolved #2674
Pull request Description:
- remove OntModelControls#ALLOW_ANONYMOUS_INDIVIDUALS & USE_OWL_INVERSE_OBJECT_PROPERTY_FEATURE (now control via OntPersonality)
- rename USE_OWL_PROPERTY_INVERSE_OF_FEATURE -> USE_OWL_INVERSE_OBJECT_PROPERTIES_FEATURE
- QL OntPersonality - remove OntIndividual.Anonymous
- fix tests accordingly
----
- [x] Tests are included.
- [x] Documentation change and updates are provided for the [Apache Jena website](https://github.com/apache/jena-site/)
- [x] Commits have been squashed to remove intermediate development commit messages.
- [x] Key commit messages start with the issue number (GH-xxxx)
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](https://www.apache.org/licenses/contributor-agreements.html).
----
See the [Apache Jena "Contributing" guide](https://github.com/apache/jena/blob/main/CONTRIBUTING.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
Re: [PR] GH-2674: changes in OntModelControls + change some profile checking [jena]
Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2676:
URL: https://github.com/apache/jena/pull/2676#discussion_r1740190292
##########
jena-ontapi/src/main/java/org/apache/jena/ontapi/OntModelControls.java:
##########
@@ -247,19 +242,14 @@ public enum OntModelControls {
*/
USE_OWL_PROPERTY_IRREFLEXIVE_FEATURE,
/**
- * Controls {@link OWL2#inverseOf owl:inverseOf} functionality.
+ * Controls {@link OWL2#inverseOf owl:inverseOf} functionality (InverseObjectProperty axiom).
* If disabled,
* {@link OntObjectProperty#inverseProperties() OntObjectProperty#inverseProperties()}
- * will return {@code false}, modification operations, such as
+ * will return empty {@code Stream}, modification operations, such as
* {@link OntObjectProperty#addInverseProperty(OntObjectProperty) OntObjectProperty#addInverseProperty(OntObjectProperty)},
* will throw {@link OntJenaException.Unsupported OntJenaException.Unsupported} exception.
*/
- USE_OWL_PROPERTY_INVERSE_OF_FEATURE,
- /**
- * If this key is set to {@code true}, an anonymous inverse object property type is enabled (OWL2 feature).
- * That is {@code _:x owl:inverseOf PN}, where {@code _:x} is a b-node and {@code PN} is a named object property.
- */
- USE_OWL_INVERSE_OBJECT_PROPERTY_FEATURE,
+ USE_OWL_INVERSE_OBJECT_PROPERTIES_FEATURE,
Review Comment:
Something like this ?
```java
/**
* @deprecated this setting doesn't work anymore, use {@link #USE_OWL_INVERSE_OBJECT_PROPERTIES_FEATURE} instead
*/
@Deprecated
USE_OWL_PROPERTY_INVERSE_OF_FEATURE,
/**
* @deprecated this setting doesn't work anymore, the control delegated directly to OntPersonality
*/
@Deprecated
ALLOW_ANONYMOUS_INDIVIDUALS,
/**
* @deprecated this setting doesn't work anymore, the control delegated directly to OntPersonality
*/
@Deprecated
USE_OWL_INVERSE_OBJECT_PROPERTY_FEATURE,
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
Re: [PR] GH-2674: changes in OntModelControls + change some profile checking [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on code in PR #2676:
URL: https://github.com/apache/jena/pull/2676#discussion_r1741062326
##########
jena-ontapi/src/main/java/org/apache/jena/ontapi/OntModelControls.java:
##########
@@ -247,19 +242,14 @@ public enum OntModelControls {
*/
USE_OWL_PROPERTY_IRREFLEXIVE_FEATURE,
/**
- * Controls {@link OWL2#inverseOf owl:inverseOf} functionality.
+ * Controls {@link OWL2#inverseOf owl:inverseOf} functionality (InverseObjectProperty axiom).
* If disabled,
* {@link OntObjectProperty#inverseProperties() OntObjectProperty#inverseProperties()}
- * will return {@code false}, modification operations, such as
+ * will return empty {@code Stream}, modification operations, such as
* {@link OntObjectProperty#addInverseProperty(OntObjectProperty) OntObjectProperty#addInverseProperty(OntObjectProperty)},
* will throw {@link OntJenaException.Unsupported OntJenaException.Unsupported} exception.
*/
- USE_OWL_PROPERTY_INVERSE_OF_FEATURE,
- /**
- * If this key is set to {@code true}, an anonymous inverse object property type is enabled (OWL2 feature).
- * That is {@code _:x owl:inverseOf PN}, where {@code _:x} is a b-node and {@code PN} is a named object property.
- */
- USE_OWL_INVERSE_OBJECT_PROPERTY_FEATURE,
+ USE_OWL_INVERSE_OBJECT_PROPERTIES_FEATURE,
Review Comment:
Using a `@Deprecated` marking usually means "it works for now but will not at some point".
If the constant no longer has any effect, that is, there is a change in behaviour, then it might as be removed.
There is only so much effort worth spending on leaving the old way in place. This module is new and we did categorise it as experimental.
If it is effort and distorts the code, then just remove them.
BTW: `@Deprecated(forRemovel = true)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
Re: [PR] GH-2674: changes in OntModelControls + change some profile checking [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on code in PR #2676:
URL: https://github.com/apache/jena/pull/2676#discussion_r1740130100
##########
jena-ontapi/src/main/java/org/apache/jena/ontapi/OntModelControls.java:
##########
@@ -247,19 +242,14 @@ public enum OntModelControls {
*/
USE_OWL_PROPERTY_IRREFLEXIVE_FEATURE,
/**
- * Controls {@link OWL2#inverseOf owl:inverseOf} functionality.
+ * Controls {@link OWL2#inverseOf owl:inverseOf} functionality (InverseObjectProperty axiom).
* If disabled,
* {@link OntObjectProperty#inverseProperties() OntObjectProperty#inverseProperties()}
- * will return {@code false}, modification operations, such as
+ * will return empty {@code Stream}, modification operations, such as
Review Comment:
```suggestion
* will return an empty {@code Stream}, modification operations, such as
```
##########
jena-ontapi/src/main/java/org/apache/jena/ontapi/OntModelControls.java:
##########
@@ -247,19 +242,14 @@ public enum OntModelControls {
*/
USE_OWL_PROPERTY_IRREFLEXIVE_FEATURE,
/**
- * Controls {@link OWL2#inverseOf owl:inverseOf} functionality.
+ * Controls {@link OWL2#inverseOf owl:inverseOf} functionality (InverseObjectProperty axiom).
* If disabled,
* {@link OntObjectProperty#inverseProperties() OntObjectProperty#inverseProperties()}
- * will return {@code false}, modification operations, such as
+ * will return empty {@code Stream}, modification operations, such as
* {@link OntObjectProperty#addInverseProperty(OntObjectProperty) OntObjectProperty#addInverseProperty(OntObjectProperty)},
* will throw {@link OntJenaException.Unsupported OntJenaException.Unsupported} exception.
*/
- USE_OWL_PROPERTY_INVERSE_OF_FEATURE,
- /**
- * If this key is set to {@code true}, an anonymous inverse object property type is enabled (OWL2 feature).
- * That is {@code _:x owl:inverseOf PN}, where {@code _:x} is a b-node and {@code PN} is a named object property.
- */
- USE_OWL_INVERSE_OBJECT_PROPERTY_FEATURE,
+ USE_OWL_INVERSE_OBJECT_PROPERTIES_FEATURE,
Review Comment:
I agree that "Properties" is a better name.
`jena-ontapi` is new and it is noted as experimental. Incompatible changes are not unreasonable are this stage. It is used as a library so these changes show up in the application. If the new version is a drop-in, then the app breaks. If the app is rebuilt, a compiler time error occurs and it can be fixed.
To become more stable, the code will need to adopt deprecate-remove-later and semantic versioning where possible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
Re: [PR] GH-2674: changes in OntModelControls + change some profile checking [jena]
Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2676:
URL: https://github.com/apache/jena/pull/2676#discussion_r1741098325
##########
jena-ontapi/src/main/java/org/apache/jena/ontapi/OntModelControls.java:
##########
@@ -247,19 +242,14 @@ public enum OntModelControls {
*/
USE_OWL_PROPERTY_IRREFLEXIVE_FEATURE,
/**
- * Controls {@link OWL2#inverseOf owl:inverseOf} functionality.
+ * Controls {@link OWL2#inverseOf owl:inverseOf} functionality (InverseObjectProperty axiom).
* If disabled,
* {@link OntObjectProperty#inverseProperties() OntObjectProperty#inverseProperties()}
- * will return {@code false}, modification operations, such as
+ * will return empty {@code Stream}, modification operations, such as
* {@link OntObjectProperty#addInverseProperty(OntObjectProperty) OntObjectProperty#addInverseProperty(OntObjectProperty)},
* will throw {@link OntJenaException.Unsupported OntJenaException.Unsupported} exception.
*/
- USE_OWL_PROPERTY_INVERSE_OF_FEATURE,
- /**
- * If this key is set to {@code true}, an anonymous inverse object property type is enabled (OWL2 feature).
- * That is {@code _:x owl:inverseOf PN}, where {@code _:x} is a b-node and {@code PN} is a named object property.
- */
- USE_OWL_INVERSE_OBJECT_PROPERTY_FEATURE,
+ USE_OWL_INVERSE_OBJECT_PROPERTIES_FEATURE,
Review Comment:
I doubt that anyone is already using this api, if so, then in a very simple manner - these options are very advanced way to configure model. I think simply removing these constants is the best way now. It is quite difficult to bring back their original behavior without code degradation.
##########
jena-ontapi/src/main/java/org/apache/jena/ontapi/OntModelControls.java:
##########
@@ -247,19 +242,14 @@ public enum OntModelControls {
*/
USE_OWL_PROPERTY_IRREFLEXIVE_FEATURE,
/**
- * Controls {@link OWL2#inverseOf owl:inverseOf} functionality.
+ * Controls {@link OWL2#inverseOf owl:inverseOf} functionality (InverseObjectProperty axiom).
* If disabled,
* {@link OntObjectProperty#inverseProperties() OntObjectProperty#inverseProperties()}
- * will return {@code false}, modification operations, such as
+ * will return empty {@code Stream}, modification operations, such as
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org
Re: [PR] GH-2674: changes in OntModelControls + change some profile checking [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs merged PR #2676:
URL: https://github.com/apache/jena/pull/2676
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org